AztecProtocol / aztec-packages

Apache License 2.0
185 stars 186 forks source link

Contract gate info reporting tool #6190

Open vezenovm opened 5 months ago

vezenovm commented 5 months ago

As per (https://github.com/noir-lang/noir/issues/4962) we will be removing nargo info as nargo moves away from all backend specific operations. We will now expect bb to take in an ACIR Program (collection of multiple ACIR circuits) and spit out a JSON gates report (https://github.com/AztecProtocol/aztec-packages/issues/6168). However, bb does not know about contracts and arguably should not know about them (it should not matter to bb how an ACIR program was generated).

We need some tool as part of aztec's developer suite that allows developers to fetch gate information on their contract using the new bb info command. A new tool will be best imo as gate counts are only really relevant for private functions as public functions work in an entirely different execution paradigm. Perhaps some sort of general tool that generates "gas" reports that distinguishes between public/private functions will be most beneficial for devs.

Savio-Sou commented 4 months ago

We now have a bash script for gathering the constraint counts: https://github.com/AztecProtocol/aztec-packages/blob/e28f1991e130bf1aab41778d91be5c110f2eebdf/noir-projects/gates_report.sh

Next steps for full closure of this Issue: