-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support contract
package type for the info
command
#2088
Conversation
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 --contracts
in thecontracts
test intest_data
now returnsrun
nargo info --contract Foo
returnsrun
nargo info --contract F
returnsDocumentation
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 fmt
on default settings.