-
Notifications
You must be signed in to change notification settings - Fork 270
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: Checking finalized sizes + a test of two folding verifiers #8503
Conversation
``` Running main() from /mnt/user-data/cody/aztec-packages/barretenberg/cpp/build/_deps/gtest-src/googletest/src/gtest_main.cc Note: Google Test filter = ProtogalaxyRecursiveTests/0.RecursiveFoldingTwiceTest [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from ProtogalaxyRecursiveTests/0, where TypeParam = bb::MegaRecursiveFlavor_<bb::MegaCircuitBuilder_<bb::field<bb::Bn254FrParams> > > [ RUN ] ProtogalaxyRecursiveTests/0.RecursiveFoldingTwiceTest Folding Recursive Verifier: num gates unfinalized = 37272 Folding Recursive Verifier: num gates finalized = 44041 WARNING: Redundant call to finalize_circuit(). Is this intentional? Dyadic size of verifier circuit: 65536 [ OK ] ProtogalaxyRecursiveTests/0.RecursiveFoldingTwiceTest (1854 ms) [----------] 1 test from ProtogalaxyRecursiveTests/0 (1854 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (1854 ms total) [ PASSED ] 1 test. ```
This reverts commit 6998193.
5122669
to
82d5b3d
Compare
@@ -60,7 +60,7 @@ MemBn254CrsFactory::MemBn254CrsFactory(std::vector<g1::affine_element> const& po | |||
std::shared_ptr<bb::srs::factories::ProverCrs<curve::BN254>> MemBn254CrsFactory::get_prover_crs(size_t degree) | |||
{ | |||
if (prover_crs_->get_monomial_size() < degree) { | |||
throw_or_abort(format("prover trying to get too many points in MemGrumpkinCrsFactory! ", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops
@@ -405,6 +410,11 @@ TYPED_TEST(ProtogalaxyRecursiveTests, RecursiveFoldingTest) | |||
TestFixture::test_recursive_folding(); | |||
} | |||
|
|||
TYPED_TEST(ProtogalaxyRecursiveTests, RecursiveFoldingTwiceTest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new test from refactoring the other test.
@@ -421,7 +421,7 @@ class UltraCircuitBuilder_ : public CircuitBuilderBase<typename Arithmetization_ | |||
#endif // NDEBUG | |||
} | |||
|
|||
void finalize_circuit(); | |||
void finalize_circuit(const bool ensure_nonzero = false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to preserve the ability to finalize without ensuring nonzero because this is how the function is used in most places (e.g. in the SMT solver). I should raise this issue internally to make sure people know this is happening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this makes things more confusing. Like we're going to have unfinalized gate count, sorta finalized gate count without ensure_nonzero gates, and also a finalized gate count...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'd rather not add this but I also don't want to change underlying assumptions--literally only one case DOES ensure gates are nonzero...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FoldingVerifier test looks great. I'm somewhat unclear why we want this finalized-but-without-ensure-nonzero-gates gate count because it seems to make things more confusing. It seems like we could already add finalize_circuit calls to tests to print out the finalized gate count like you said without this finalized-but-without-ensure-nonzero-gates thing.
@@ -60,7 +60,7 @@ MemBn254CrsFactory::MemBn254CrsFactory(std::vector<g1::affine_element> const& po | |||
std::shared_ptr<bb::srs::factories::ProverCrs<curve::BN254>> MemBn254CrsFactory::get_prover_crs(size_t degree) | |||
{ | |||
if (prover_crs_->get_monomial_size() < degree) { | |||
throw_or_abort(format("prover trying to get too many points in MemGrumpkinCrsFactory! ", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops
@@ -41,6 +42,9 @@ template <typename Arithmetization> void UltraCircuitBuilder_<Arithmetization>:: | |||
* our circuit is finalized, and we must not to execute these functions again. | |||
*/ | |||
if (!circuit_finalized) { | |||
if (ensure_nonzero) { | |||
add_gates_to_ensure_all_polys_are_non_zero(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confusing that this wasn't renamed to add_ultra_gates_to_ensure_all_polys_are_non_zero
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a member function of UltraCircuitBuilder so it feels redundant.
@@ -226,7 +227,11 @@ template <typename RecursiveFlavor> class ProtogalaxyRecursiveTests : public tes | |||
// Check for a failure flag in the recursive verifier circuit | |||
|
|||
if constexpr (!IsSimulator<OuterBuilder>) { | |||
// inefficiently check finalized size | |||
folding_circuit.finalize_circuit(); | |||
info("Folding Recursive Verifier: num gates finalized = ", folding_circuit.num_gates); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this is now printing out finalized gates without the ensure nonzero gates? But in practice, our circuit is actually going to include these ensure_nonzero gates so I don't understand why we wouldn't want them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed--typo! I agree this is confusing but note that it's only adding better functionality that we should adopt and then using it in one case. The default behavior almost everywhere is to finalize without ensuring Whether it should be that behavior... I'll make an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could link this to code but also no need if you just want to merge
@@ -421,7 +421,7 @@ class UltraCircuitBuilder_ : public CircuitBuilderBase<typename Arithmetization_ | |||
#endif // NDEBUG | |||
} | |||
|
|||
void finalize_circuit(); | |||
void finalize_circuit(const bool ensure_nonzero = false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this makes things more confusing. Like we're going to have unfinalized gate count, sorta finalized gate count without ensure_nonzero gates, and also a finalized gate count...
Console is in 'commands' mode, prefix expressions with '?'. Launching: /mnt/user-data/cody/aztec-packages/barretenberg/cpp/build-debug/bin/stdlib_protogalaxy_verifier_tests --gtest_color=no --gtest_filter=ProtogalaxyRecursiveTests/0.RecursiveFoldingTwiceTest --gtest_also_run_disabled_tests --gtest_break_on_failure Launched process 2317410 Running main() from /mnt/user-data/cody/aztec-packages/barretenberg/cpp/build-debug/_deps/gtest-src/googletest/src/gtest_main.cc Note: Google Test filter = ProtogalaxyRecursiveTests/0.RecursiveFoldingTwiceTest [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from ProtogalaxyRecursiveTests/0, where TypeParam = bb::MegaRecursiveFlavor_<bb::MegaCircuitBuilder_<bb::field<bb::Bn254FrParams> > > [ RUN ] ProtogalaxyRecursiveTests/0.RecursiveFoldingTwiceTest Folding Recursive Verifier: num gates unfinalized = 18085 Folding Recursive Verifier: num gates finalized = 20194 WARNING: Redundant call to finalize_circuit(). Is this intentional? Dyadic size of verifier circuit: 32768 [ OK ] ProtogalaxyRecursiveTests/0.RecursiveFoldingTwiceTest (13082 ms) [----------] 1 test from ProtogalaxyRecursiveTests/0 (13082 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (13082 ms total) [ PASSED ] 1 test. Process exited with code 0.
``` Console is in 'commands' mode, prefix expressions with '?'. Launching: /mnt/user-data/cody/aztec-packages/barretenberg/cpp/build-debug/bin/stdlib_protogalaxy_verifier_tests --gtest_color=no --gtest_filter=ProtogalaxyRecursiveTests/0.RecursiveFoldingTwiceTest --gtest_also_run_disabled_tests --gtest_break_on_failure Launched process 2323108 Running main() from /mnt/user-data/cody/aztec-packages/barretenberg/cpp/build-debug/_deps/gtest-src/googletest/src/gtest_main.cc Note: Google Test filter = ProtogalaxyRecursiveTests/0.RecursiveFoldingTwiceTest [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from ProtogalaxyRecursiveTests/0, where TypeParam = bb::MegaRecursiveFlavor_<bb::MegaCircuitBuilder_<bb::field<bb::Bn254FrParams> > > [ RUN ] ProtogalaxyRecursiveTests/0.RecursiveFoldingTwiceTest Folding Recursive Verifier: num gates unfinalized = 18085 Folding Recursive Verifier: num gates finalized = 20211 WARNING: Redundant call to finalize_circuit(). Is this intentional? Dyadic size of verifier circuit: 32768 [ OK ] ProtogalaxyRecursiveTests/0.RecursiveFoldingTwiceTest (6768 ms) [----------] 1 test from ProtogalaxyRecursiveTests/0 (6768 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (6768 ms total) [ PASSED ] 1 test. Process exited with code 0. ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after some discussion, LGTM, but only if this confusing code gets fixed soon
std::shared_ptr<RecursiveDeciderVerificationKey> accumulator; | ||
for (size_t idx = 0; idx < num_verifiers; idx++) { | ||
accumulator = verifier.verify_folding_proof(stdlib_proof); | ||
if (idx < num_verifiers - 1) { // else the transcript is null in the test below |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait, how was there no error from the transcript being null before (when I first reviewed)?
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.55.0</summary> ## [0.55.0](aztec-package-v0.54.0...aztec-package-v0.55.0) (2024-09-13) ### Bug Fixes * Load prover node config from env ([#8525](#8525)) ([7065962](7065962)) ### Miscellaneous * Remove unneeded propose and da oracle ([#8474](#8474)) ([274a6b7](274a6b7)) </details> <details><summary>barretenberg.js: 0.55.0</summary> ## [0.55.0](barretenberg.js-v0.54.0...barretenberg.js-v0.55.0) (2024-09-13) ### Features * New test programs for wasm benchmarking ([#8389](#8389)) ([0b46e96](0b46e96)) </details> <details><summary>aztec-packages: 0.55.0</summary> ## [0.55.0](aztec-packages-v0.54.0...aztec-packages-v0.55.0) (2024-09-13) ### ⚠ BREAKING CHANGES * Add Not instruction in brillig ([#8488](#8488)) * refactor NoteGetterOptions::select API ([#8504](#8504)) * **avm:** variants for CAST/NOT opcode ([#8497](#8497)) * **avm:** variants for REVERT opcode ([#8487](#8487)) ### Features * (bb) remove redundant constraints on field/group elements when using goblin plonk ([#8409](#8409)) ([12a093d](12a093d)) * Add `Module::structs` (noir-lang/noir#6017) ([cb20e07](cb20e07)) * Add `TypedExpr::get_type` (noir-lang/noir#5992) ([875cfe6](875cfe6)) * Add assertions for ACVM `FunctionInput` `bit_size` (noir-lang/noir#5864) ([20d7576](20d7576)) * Add Not instruction in brillig ([#8488](#8488)) ([ceda361](ceda361)) * Add timeouts for request / response stream connections ([#8434](#8434)) ([190c27f](190c27f)) * **avm:** Parallelize polynomial alloc and set ([#8520](#8520)) ([7e73531](7e73531)) * **avm:** Variants for CAST/NOT opcode ([#8497](#8497)) ([bc609fa](bc609fa)) * **avm:** Variants for REVERT opcode ([#8487](#8487)) ([a0c8915](a0c8915)) * **bb:** Iterative constexpr_for ([#8502](#8502)) ([02c3330](02c3330)) * Better error message for misplaced doc comments (noir-lang/noir#5990) ([875cfe6](875cfe6)) * Change the layout of arrays and vectors to be a single pointer ([#8448](#8448)) ([3ad624c](3ad624c)) * Checking finalized sizes + a test of two folding verifiers ([#8503](#8503)) ([d9e3f4d](d9e3f4d)) * Extract brillig slice ops to reusable procedures (noir-lang/noir#6002) ([20d7576](20d7576)) * Format trait impl functions (noir-lang/noir#6016) ([cb20e07](cb20e07)) * Impl Hash and Eq on more comptime types (noir-lang/noir#6022) ([cb20e07](cb20e07)) * Implement LSP code action "Implement missing members" (noir-lang/noir#6020) ([cb20e07](cb20e07)) * Let `has_named_attribute` work for built-in attributes (noir-lang/noir#6024) ([cb20e07](cb20e07)) * LSP completion function detail (noir-lang/noir#5993) ([875cfe6](875cfe6)) * Native world state ([#7516](#7516)) ([c1aa6f7](c1aa6f7)) * New test programs for wasm benchmarking ([#8389](#8389)) ([0b46e96](0b46e96)) * Output timestamps in prover-stats raw logs ([#8476](#8476)) ([aa67a14](aa67a14)) * Rate limit peers in request response p2p interactions ([#8498](#8498)) ([00146fa](00146fa)) * Refactor NoteGetterOptions::select API ([#8504](#8504)) ([e527992](e527992)) * Sync from aztec-packages (noir-lang/noir#5971) ([875cfe6](875cfe6)) * Sync from aztec-packages (noir-lang/noir#6001) ([20d7576](20d7576)) * Use Zac's quicksort algorithm in stdlib sorting (noir-lang/noir#5940) ([20d7576](20d7576)) * Validators ensure transactions live in their p2p pool before attesting ([#8410](#8410)) ([bce1eea](bce1eea)) * Verification key stuff ([#8431](#8431)) ([11dc8ff](11dc8ff)) ### Bug Fixes * Correctly print string tokens (noir-lang/noir#6021) ([cb20e07](cb20e07)) * Enable verifier when deploying the networks ([#8500](#8500)) ([f6d31f1](f6d31f1)) * Error when comptime types are used in runtime code (noir-lang/noir#5987) ([875cfe6](875cfe6)) * Error when mutating comptime variables in non-comptime code (noir-lang/noir#6003) ([20d7576](20d7576)) * Fix some mistakes in arithmetic generics docs (noir-lang/noir#5999) ([20d7576](20d7576)) * Fix using lazily elaborated comptime globals (noir-lang/noir#5995) ([20d7576](20d7576)) * Help link was outdated (noir-lang/noir#6004) ([20d7576](20d7576)) * Load prover node config from env ([#8525](#8525)) ([7065962](7065962)) * Remove claim_public from fee juice ([#8337](#8337)) ([dca74ae](dca74ae)) * Try to move constant terms to one side for arithmetic generics (noir-lang/noir#6008) ([cb20e07](cb20e07)) * Use module name as line after which we'll insert auto-import (noir-lang/noir#6025) ([cb20e07](cb20e07)) ### Miscellaneous * Add some `pub use` and remove unused imports ([#8521](#8521)) ([8bd0755](8bd0755)) * **bb:** Fix mac build ([#8505](#8505)) ([32fd347](32fd347)), closes [#8499](#8499) * **bb:** Fix mac build ([#8522](#8522)) ([986e703](986e703)) * **ci:** Fix bb publishing ([#8486](#8486)) ([c210c36](c210c36)) * Fix a load of warnings in aztec-nr ([#8501](#8501)) ([35dc1e1](35dc1e1)) * Protogalaxy verifier matches prover 1 ([#8414](#8414)) ([5a76ec6](5a76ec6)) * Remove RC tracking in mem2reg (noir-lang/noir#6019) ([cb20e07](cb20e07)) * Remove unneeded propose and da oracle ([#8474](#8474)) ([274a6b7](274a6b7)) * Replace relative paths to noir-protocol-circuits ([b179c6b](b179c6b)) * Replace relative paths to noir-protocol-circuits ([1c042be](1c042be)) * Replace relative paths to noir-protocol-circuits ([1c8409f](1c8409f)) * Run mac builds on master ([#8519](#8519)) ([c458a79](c458a79)) * Single install script for cargo-binstall (noir-lang/noir#5998) ([20d7576](20d7576)) * Use uint32_t instead of size_t for databus data ([#8479](#8479)) ([79995c8](79995c8)) </details> <details><summary>barretenberg: 0.55.0</summary> ## [0.55.0](barretenberg-v0.54.0...barretenberg-v0.55.0) (2024-09-13) ### ⚠ BREAKING CHANGES * Add Not instruction in brillig ([#8488](#8488)) * **avm:** variants for CAST/NOT opcode ([#8497](#8497)) * **avm:** variants for REVERT opcode ([#8487](#8487)) ### Features * (bb) remove redundant constraints on field/group elements when using goblin plonk ([#8409](#8409)) ([12a093d](12a093d)) * Add Not instruction in brillig ([#8488](#8488)) ([ceda361](ceda361)) * **avm:** Parallelize polynomial alloc and set ([#8520](#8520)) ([7e73531](7e73531)) * **avm:** Variants for CAST/NOT opcode ([#8497](#8497)) ([bc609fa](bc609fa)) * **avm:** Variants for REVERT opcode ([#8487](#8487)) ([a0c8915](a0c8915)) * **bb:** Iterative constexpr_for ([#8502](#8502)) ([02c3330](02c3330)) * Checking finalized sizes + a test of two folding verifiers ([#8503](#8503)) ([d9e3f4d](d9e3f4d)) * Native world state ([#7516](#7516)) ([c1aa6f7](c1aa6f7)) * New test programs for wasm benchmarking ([#8389](#8389)) ([0b46e96](0b46e96)) * Verification key stuff ([#8431](#8431)) ([11dc8ff](11dc8ff)) ### Miscellaneous * **bb:** Fix mac build ([#8505](#8505)) ([32fd347](32fd347)), closes [#8499](#8499) * **bb:** Fix mac build ([#8522](#8522)) ([986e703](986e703)) * Protogalaxy verifier matches prover 1 ([#8414](#8414)) ([5a76ec6](5a76ec6)) * Use uint32_t instead of size_t for databus data ([#8479](#8479)) ([79995c8](79995c8)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.55.0</summary> ## [0.55.0](AztecProtocol/aztec-packages@aztec-package-v0.54.0...aztec-package-v0.55.0) (2024-09-13) ### Bug Fixes * Load prover node config from env ([#8525](AztecProtocol/aztec-packages#8525)) ([7065962](AztecProtocol/aztec-packages@7065962)) ### Miscellaneous * Remove unneeded propose and da oracle ([#8474](AztecProtocol/aztec-packages#8474)) ([274a6b7](AztecProtocol/aztec-packages@274a6b7)) </details> <details><summary>barretenberg.js: 0.55.0</summary> ## [0.55.0](AztecProtocol/aztec-packages@barretenberg.js-v0.54.0...barretenberg.js-v0.55.0) (2024-09-13) ### Features * New test programs for wasm benchmarking ([#8389](AztecProtocol/aztec-packages#8389)) ([0b46e96](AztecProtocol/aztec-packages@0b46e96)) </details> <details><summary>aztec-packages: 0.55.0</summary> ## [0.55.0](AztecProtocol/aztec-packages@aztec-packages-v0.54.0...aztec-packages-v0.55.0) (2024-09-13) ### ⚠ BREAKING CHANGES * Add Not instruction in brillig ([#8488](AztecProtocol/aztec-packages#8488)) * refactor NoteGetterOptions::select API ([#8504](AztecProtocol/aztec-packages#8504)) * **avm:** variants for CAST/NOT opcode ([#8497](AztecProtocol/aztec-packages#8497)) * **avm:** variants for REVERT opcode ([#8487](AztecProtocol/aztec-packages#8487)) ### Features * (bb) remove redundant constraints on field/group elements when using goblin plonk ([#8409](AztecProtocol/aztec-packages#8409)) ([12a093d](AztecProtocol/aztec-packages@12a093d)) * Add `Module::structs` (noir-lang/noir#6017) ([cb20e07](AztecProtocol/aztec-packages@cb20e07)) * Add `TypedExpr::get_type` (noir-lang/noir#5992) ([875cfe6](AztecProtocol/aztec-packages@875cfe6)) * Add assertions for ACVM `FunctionInput` `bit_size` (noir-lang/noir#5864) ([20d7576](AztecProtocol/aztec-packages@20d7576)) * Add Not instruction in brillig ([#8488](AztecProtocol/aztec-packages#8488)) ([ceda361](AztecProtocol/aztec-packages@ceda361)) * Add timeouts for request / response stream connections ([#8434](AztecProtocol/aztec-packages#8434)) ([190c27f](AztecProtocol/aztec-packages@190c27f)) * **avm:** Parallelize polynomial alloc and set ([#8520](AztecProtocol/aztec-packages#8520)) ([7e73531](AztecProtocol/aztec-packages@7e73531)) * **avm:** Variants for CAST/NOT opcode ([#8497](AztecProtocol/aztec-packages#8497)) ([bc609fa](AztecProtocol/aztec-packages@bc609fa)) * **avm:** Variants for REVERT opcode ([#8487](AztecProtocol/aztec-packages#8487)) ([a0c8915](AztecProtocol/aztec-packages@a0c8915)) * **bb:** Iterative constexpr_for ([#8502](AztecProtocol/aztec-packages#8502)) ([02c3330](AztecProtocol/aztec-packages@02c3330)) * Better error message for misplaced doc comments (noir-lang/noir#5990) ([875cfe6](AztecProtocol/aztec-packages@875cfe6)) * Change the layout of arrays and vectors to be a single pointer ([#8448](AztecProtocol/aztec-packages#8448)) ([3ad624c](AztecProtocol/aztec-packages@3ad624c)) * Checking finalized sizes + a test of two folding verifiers ([#8503](AztecProtocol/aztec-packages#8503)) ([d9e3f4d](AztecProtocol/aztec-packages@d9e3f4d)) * Extract brillig slice ops to reusable procedures (noir-lang/noir#6002) ([20d7576](AztecProtocol/aztec-packages@20d7576)) * Format trait impl functions (noir-lang/noir#6016) ([cb20e07](AztecProtocol/aztec-packages@cb20e07)) * Impl Hash and Eq on more comptime types (noir-lang/noir#6022) ([cb20e07](AztecProtocol/aztec-packages@cb20e07)) * Implement LSP code action "Implement missing members" (noir-lang/noir#6020) ([cb20e07](AztecProtocol/aztec-packages@cb20e07)) * Let `has_named_attribute` work for built-in attributes (noir-lang/noir#6024) ([cb20e07](AztecProtocol/aztec-packages@cb20e07)) * LSP completion function detail (noir-lang/noir#5993) ([875cfe6](AztecProtocol/aztec-packages@875cfe6)) * Native world state ([#7516](AztecProtocol/aztec-packages#7516)) ([c1aa6f7](AztecProtocol/aztec-packages@c1aa6f7)) * New test programs for wasm benchmarking ([#8389](AztecProtocol/aztec-packages#8389)) ([0b46e96](AztecProtocol/aztec-packages@0b46e96)) * Output timestamps in prover-stats raw logs ([#8476](AztecProtocol/aztec-packages#8476)) ([aa67a14](AztecProtocol/aztec-packages@aa67a14)) * Rate limit peers in request response p2p interactions ([#8498](AztecProtocol/aztec-packages#8498)) ([00146fa](AztecProtocol/aztec-packages@00146fa)) * Refactor NoteGetterOptions::select API ([#8504](AztecProtocol/aztec-packages#8504)) ([e527992](AztecProtocol/aztec-packages@e527992)) * Sync from aztec-packages (noir-lang/noir#5971) ([875cfe6](AztecProtocol/aztec-packages@875cfe6)) * Sync from aztec-packages (noir-lang/noir#6001) ([20d7576](AztecProtocol/aztec-packages@20d7576)) * Use Zac's quicksort algorithm in stdlib sorting (noir-lang/noir#5940) ([20d7576](AztecProtocol/aztec-packages@20d7576)) * Validators ensure transactions live in their p2p pool before attesting ([#8410](AztecProtocol/aztec-packages#8410)) ([bce1eea](AztecProtocol/aztec-packages@bce1eea)) * Verification key stuff ([#8431](AztecProtocol/aztec-packages#8431)) ([11dc8ff](AztecProtocol/aztec-packages@11dc8ff)) ### Bug Fixes * Correctly print string tokens (noir-lang/noir#6021) ([cb20e07](AztecProtocol/aztec-packages@cb20e07)) * Enable verifier when deploying the networks ([#8500](AztecProtocol/aztec-packages#8500)) ([f6d31f1](AztecProtocol/aztec-packages@f6d31f1)) * Error when comptime types are used in runtime code (noir-lang/noir#5987) ([875cfe6](AztecProtocol/aztec-packages@875cfe6)) * Error when mutating comptime variables in non-comptime code (noir-lang/noir#6003) ([20d7576](AztecProtocol/aztec-packages@20d7576)) * Fix some mistakes in arithmetic generics docs (noir-lang/noir#5999) ([20d7576](AztecProtocol/aztec-packages@20d7576)) * Fix using lazily elaborated comptime globals (noir-lang/noir#5995) ([20d7576](AztecProtocol/aztec-packages@20d7576)) * Help link was outdated (noir-lang/noir#6004) ([20d7576](AztecProtocol/aztec-packages@20d7576)) * Load prover node config from env ([#8525](AztecProtocol/aztec-packages#8525)) ([7065962](AztecProtocol/aztec-packages@7065962)) * Remove claim_public from fee juice ([#8337](AztecProtocol/aztec-packages#8337)) ([dca74ae](AztecProtocol/aztec-packages@dca74ae)) * Try to move constant terms to one side for arithmetic generics (noir-lang/noir#6008) ([cb20e07](AztecProtocol/aztec-packages@cb20e07)) * Use module name as line after which we'll insert auto-import (noir-lang/noir#6025) ([cb20e07](AztecProtocol/aztec-packages@cb20e07)) ### Miscellaneous * Add some `pub use` and remove unused imports ([#8521](AztecProtocol/aztec-packages#8521)) ([8bd0755](AztecProtocol/aztec-packages@8bd0755)) * **bb:** Fix mac build ([#8505](AztecProtocol/aztec-packages#8505)) ([32fd347](AztecProtocol/aztec-packages@32fd347)), closes [#8499](AztecProtocol/aztec-packages#8499) * **bb:** Fix mac build ([#8522](AztecProtocol/aztec-packages#8522)) ([986e703](AztecProtocol/aztec-packages@986e703)) * **ci:** Fix bb publishing ([#8486](AztecProtocol/aztec-packages#8486)) ([c210c36](AztecProtocol/aztec-packages@c210c36)) * Fix a load of warnings in aztec-nr ([#8501](AztecProtocol/aztec-packages#8501)) ([35dc1e1](AztecProtocol/aztec-packages@35dc1e1)) * Protogalaxy verifier matches prover 1 ([#8414](AztecProtocol/aztec-packages#8414)) ([5a76ec6](AztecProtocol/aztec-packages@5a76ec6)) * Remove RC tracking in mem2reg (noir-lang/noir#6019) ([cb20e07](AztecProtocol/aztec-packages@cb20e07)) * Remove unneeded propose and da oracle ([#8474](AztecProtocol/aztec-packages#8474)) ([274a6b7](AztecProtocol/aztec-packages@274a6b7)) * Replace relative paths to noir-protocol-circuits ([b179c6b](AztecProtocol/aztec-packages@b179c6b)) * Replace relative paths to noir-protocol-circuits ([1c042be](AztecProtocol/aztec-packages@1c042be)) * Replace relative paths to noir-protocol-circuits ([1c8409f](AztecProtocol/aztec-packages@1c8409f)) * Run mac builds on master ([#8519](AztecProtocol/aztec-packages#8519)) ([c458a79](AztecProtocol/aztec-packages@c458a79)) * Single install script for cargo-binstall (noir-lang/noir#5998) ([20d7576](AztecProtocol/aztec-packages@20d7576)) * Use uint32_t instead of size_t for databus data ([#8479](AztecProtocol/aztec-packages#8479)) ([79995c8](AztecProtocol/aztec-packages@79995c8)) </details> <details><summary>barretenberg: 0.55.0</summary> ## [0.55.0](AztecProtocol/aztec-packages@barretenberg-v0.54.0...barretenberg-v0.55.0) (2024-09-13) ### ⚠ BREAKING CHANGES * Add Not instruction in brillig ([#8488](AztecProtocol/aztec-packages#8488)) * **avm:** variants for CAST/NOT opcode ([#8497](AztecProtocol/aztec-packages#8497)) * **avm:** variants for REVERT opcode ([#8487](AztecProtocol/aztec-packages#8487)) ### Features * (bb) remove redundant constraints on field/group elements when using goblin plonk ([#8409](AztecProtocol/aztec-packages#8409)) ([12a093d](AztecProtocol/aztec-packages@12a093d)) * Add Not instruction in brillig ([#8488](AztecProtocol/aztec-packages#8488)) ([ceda361](AztecProtocol/aztec-packages@ceda361)) * **avm:** Parallelize polynomial alloc and set ([#8520](AztecProtocol/aztec-packages#8520)) ([7e73531](AztecProtocol/aztec-packages@7e73531)) * **avm:** Variants for CAST/NOT opcode ([#8497](AztecProtocol/aztec-packages#8497)) ([bc609fa](AztecProtocol/aztec-packages@bc609fa)) * **avm:** Variants for REVERT opcode ([#8487](AztecProtocol/aztec-packages#8487)) ([a0c8915](AztecProtocol/aztec-packages@a0c8915)) * **bb:** Iterative constexpr_for ([#8502](AztecProtocol/aztec-packages#8502)) ([02c3330](AztecProtocol/aztec-packages@02c3330)) * Checking finalized sizes + a test of two folding verifiers ([#8503](AztecProtocol/aztec-packages#8503)) ([d9e3f4d](AztecProtocol/aztec-packages@d9e3f4d)) * Native world state ([#7516](AztecProtocol/aztec-packages#7516)) ([c1aa6f7](AztecProtocol/aztec-packages@c1aa6f7)) * New test programs for wasm benchmarking ([#8389](AztecProtocol/aztec-packages#8389)) ([0b46e96](AztecProtocol/aztec-packages@0b46e96)) * Verification key stuff ([#8431](AztecProtocol/aztec-packages#8431)) ([11dc8ff](AztecProtocol/aztec-packages@11dc8ff)) ### Miscellaneous * **bb:** Fix mac build ([#8505](AztecProtocol/aztec-packages#8505)) ([32fd347](AztecProtocol/aztec-packages@32fd347)), closes [#8499](AztecProtocol/aztec-packages#8499) * **bb:** Fix mac build ([#8522](AztecProtocol/aztec-packages#8522)) ([986e703](AztecProtocol/aztec-packages@986e703)) * Protogalaxy verifier matches prover 1 ([#8414](AztecProtocol/aztec-packages#8414)) ([5a76ec6](AztecProtocol/aztec-packages@5a76ec6)) * Use uint32_t instead of size_t for databus data ([#8479](AztecProtocol/aztec-packages#8479)) ([79995c8](AztecProtocol/aztec-packages@79995c8)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Original goal: add a test so we can get the size of a circuit containing two folding verifiers.
Detour: (Ultra and Mega flavors only) getting the size after adding nonzero gates and finalizing a circuit used to require adding a printout to the Honk proving key constructor, which would either be noise in many tests, or which would then have to be removed. Rearranging the ensure_nonzero function, we can accommodate the use case in tests where we want to print out the number of gates after finalization. To do this, just call finalize and and print the number of gates before passing the circuit to the prover or proving key constructor. You get a warning, but that's appropriate.
Caution: I left in a code path that finalizes but does add extra gates because this was in use in many places. If those are all valid uses, then we only really want the gate-adding version in one place, so I made the default not add nonzero gates.