feat: Support contract package type for the info command#2088
feat: Support contract package type for the info command#2088
contract package type for the info command#2088Conversation
nargo info --contracts command to count contract gatesnargo info --contracts command to count contract gates
nargo info --contracts command to count contract gatesnargo info --contracts and nargo info --contract <CONTRACT>command to count contract gates
|
Thanks so much for this! If I may, it'd be even sexier if the data could be tabulated, e.g. using the A more advanced question: for an ultraplonk backend, tables are used in some computations (e.g. hashing). Now the 'circuit size' has three interesting pieces of information:
As an extreme example, a circuit might only have 10 gates, but could include a table which is 10,000 rows. Then the proving time will be greatly affected by these 10,000 rows. The important metric for proving time is then: 2^14 = 16,384. |
|
Whoops, you beat me to it, re formatting :) #2089 |
ahh thanks for suggestion 🙂 will checkout this crate I think a table should be better formatting than printing about getting the circuit size. maybe this is the correct function to use https://github.com/AztecProtocol/barretenberg/blob/b22b8d5f42ddfae140068c3ce8b3053d4c8d1874/cpp/src/barretenberg/proof_system/circuit_builder/ultra_circuit_builder.hpp#L849-L861 |
|
@codygunton might be able to point you to the relevant functions. That one looks like it might be correct, for giving you the value As for whether the Noir backend uses this (and is 'allowed' to make a call to get this information, without sacrificing 'backend agnosticism'), someone on the Noir team will need to help you there :) |
So |
|
I'd be in favour of providing all the numbers. As much useful info as we can be given :) |
|
Hey @Ethan-000, this should probably be implemented on top of #2075 because it will make contracts work with each command. I'm taking a look at it this week. |
sounds good :) |
I'm trying to answer some design questions right now, but hoping to have something up by end of tomorrow. We could merge this, but then there'd be a "breaking" change that only affects people that built a compiler between this PR and my PR (since mine will be removing both flags) and it seems like unnecessary/confusing churn. |
|
I created #2204 to unblock this without churn. |
|
We should also add support for contracts in |
|
@Ethan-000 #2204 is getting merged, can you rebase and mark as ready when you are ready for a review |
nargo info --contracts and nargo info --contract <CONTRACT>command to count contract gatescontract package type for the info command
|
Updated the title to reflect the implementation that needs to happen 🙇 |
|
reopened #2249 |
Description
Problem*
Resolves #1970
Summary*
run
nargo info --contractsin thecontractstest intest_datanow returnsrun
nargo info --contract Fooreturnsrun
nargo info --contract FreturnsDocumentation
This PR requires documentation updates when merged.
Additional Context
This does not look very good imho so this issue is opened to address this and others #2089
PR Checklist*
cargo fmton default settings.