Exact circuit size + update for new aztec_backend#551
Conversation
…still getting a proof verified false returned
…l be fixed in separate issue
|
What is the current status on this PR? |
About to set it ready for review and write some more context. The last thing that had to be fixed was |
jfecher
left a comment
There was a problem hiding this comment.
Looks good, builds locally for me as well
|
Any known backward-incompatible in addition to the Pedersen changes? Would love to consolidate a list for external comm (e.g. Discord announcement) when this goes out. |
Schnorr signatures also had to be updated. And anything dependent on pedersen such as the merkle membership functions in the std lib. This is mainly relevant to those who are using nargo for proving and verifying their circuits. The TS wrapper is based off this updated backend. If they were operating exclusively with the TS wrapper when proving circuits, they are using the same backend as this update. |
* master: Exact circuit size + update for new aztec_backend (noir-lang#551) Separate parsing of inputs from toml format from file loading. (noir-lang#552)
Related issue(s)
Resolves #568
Description
This adds a
get_exact_circuit_sizemethod to look at the exact constraints of a circuit. If the circuit size has been used to initialize the prover it has already been rounded to the closest power of 2. However, if we want to fine tune our circuits it helps to have the exact size of the circuit.In order to add this method we need to upgrade Noir to interop with the new aztec_backend that is based off of
noir-lang/aztec-connectrather than the old barretenberg repo (which has now been renamed and lives here.Summary of changes
I added a new method to the
ProofSystemCompilerthat requires a backend to specify a function for fetching the exact constraint size of a proof. This was already included in the newbarretenberg_static_libpackage inaztec_backend. I have this PR where I also fetch the exact circuit size inbarretenberg_wasm(noir-lang/acvm-backend-barretenberg#22). That PR also contains an updated reference to the newbarretenbergrepo as changes had to be made innoir-lang/aztec-connect. These changes tobarretenbergcan be found here: noir-lang/aztec-connect#5.Dependency additions / changes
The
aztec_backendreference has been changed to reflect that we added a new method toProofSystemCompilerbut also thataztec_backendrequired a new reference tobarretenberg.Test additions / changes
I had to update some inputs to the nargo functions to reflect changes in the functionality of std_lib functions from barretenberg. These included different signatures for programs that use schnorr and changes to hash outputs for anything that uses pedersen.
Checklist
cargo fmtwith default settings.Additional context
(If applicable.)