-
Notifications
You must be signed in to change notification settings - Fork 283
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: send G_0 in proof to reduce tube size #9766
Conversation
const auto poly_length = static_cast<uint32_t>(poly_length_var.get_value()); | ||
info("IPA poly length: ", poly_length); |
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.
will delete
barretenberg/cpp/src/barretenberg/commitment_schemes_recursion/ipa_recursive.test.cpp
Show resolved
Hide resolved
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1142): Handle this return value correctly. | ||
const typename PCS::VerifierAccumulator batched_opening_accumulator = | ||
PCS::reduce_verify(key->pcs_verification_key, batch_opening_claim, transcript); | ||
|
||
info("pre-finalized size after IPA opening: ", builder->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.
will undo these measurement prints
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.
LGTM, couple minor comments
@@ -409,6 +413,8 @@ template <typename Curve_> class IPA { | |||
// Compute G₀ | |||
Commitment G_zero = bb::scalar_multiplication::pippenger_without_endomorphism_basis_points<Curve>( | |||
s_poly, {&G_vec_local[0], /*size*/ poly_length}, vk->pippenger_runtime_state); | |||
Commitment G_zero_sent = transcript->template receive_from_prover<Commitment>("IPA:G_0"); | |||
ASSERT(G_zero == G_zero_sent && "G_0 should be equal to G_0 sent in transcript."); |
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.
interesting, haven't seen this syntax before
UltraFlavor::VerificationKey verification_key_1(pk_1); | ||
UltraFlavor::VerificationKey verification_key_2(pk_2); | ||
bool broke(false); | ||
auto check_eq = [&broke](auto& p1, auto& p2) { |
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 suppose its useful to have all of this logic here for debugging purposes but just FYI I believe the operators are in place so you can also just check equality of verification keys directly (just sometimes have to manually exclude the commitment keys depending on how they were constructed)
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.
ah ok, yeah I just wanted to have the debugging logic
barretenberg/cpp/src/barretenberg/commitment_schemes/ipa/ipa.hpp
Outdated
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/commitment_schemes_recursion/ipa_recursive.test.cpp
Show resolved
Hide resolved
Changes to public function bytecode sizes
🧾 Summary (100% most significant diffs)
Full diff report 👇
|
Removes the G^0 MSM computation from the recursive verifier and instead includes it in the proof. Adds test to ensure that IPA recursive verifier is a fixed circuit no matter the ECCVM size. For the command: `FLOW=prove_then_verify_tube ./run_acir_tests.sh fold_basic`, which has 6 circuits: Tube gates before constification and before MSM removal: 7104756 Tube gates after: 4172057 For the ClientTubeBase test with 8 circuits, we see: Tube before: 10047313 Tube gates after: 4172057
Removes the G^0 MSM computation from the recursive verifier and instead includes it in the proof.
Adds test to ensure that IPA recursive verifier is a fixed circuit no matter the ECCVM size.
For the command:
FLOW=prove_then_verify_tube ./run_acir_tests.sh fold_basic
, which has 6 circuits:Tube gates before constification and before MSM removal: 7104756
Tube gates after: 4172057
For the ClientTubeBase test with 8 circuits, we see:
Tube before: 10047313
Tube gates after: 4172057