-
Notifications
You must be signed in to change notification settings - Fork 310
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: constify eccvm and translator #9661
Conversation
This PR could add a test for showing that the tube circuit is fixed, but it isn't true as of now because the linear component of IPA verification was not constifying as it will be removed in a followup PR. |
challenge_poly_eval *= (Fr(1) + u_challenges_inv[len - 1 - i] * r_pow); | ||
r_pow *= r_pow; | ||
for (size_t i = 0; i < CONST_ECCVM_LOG_N; i++) { | ||
stdlib::bool_t<typename Curve::Builder> dummy_round = stdlib::witness_t(builder, i < CONST_ECCVM_LOG_N - uint32_t(log_poly_length.get_value())); |
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.
this sort of stuff is not secure. Will need to figure out a way to fix it, like the rest of the dummy_round stuff in sumcheck
// Step 7 | ||
// Send a_0 to the verifier | ||
transcript->send_to_verifier("IPA:a_0", a_vec[0]); | ||
|
||
info("prove G_zero: ", G_vec_local[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.
will delete all the infos
@@ -346,11 +358,13 @@ template <typename Curve_> class IPA { | |||
} | |||
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1140): Use batch_invert. | |||
round_challenges_inv[i] = round_challenges[i].invert(); | |||
if (i < log_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.
for native verifier, we only need to look at the log_poly_length elements that matter
auto element_L = transcript->template receive_from_prover<Commitment>("IPA:L_" + index); | ||
auto element_R = transcript->template receive_from_prover<Commitment>("IPA:R_" + index); | ||
round_challenges[i] = transcript->template get_challenge<Fr>("IPA:round_challenge_" + index); | ||
round_challenges_inv[i] = round_challenges[i].invert(); | ||
|
||
msm_elements[2 * i] = element_L; | ||
msm_elements[2 * i + 1] = element_R; | ||
msm_scalars[2 * i] = round_challenges_inv[i]; | ||
msm_scalars[2 * i + 1] = round_challenges[i]; | ||
msm_scalars[2 * i] = Fr::conditional_assign(dummy_round, Fr(0), round_challenges_inv[i]); |
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.
for the dummy rounds, put 0s as the scalars.
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.
Looks good, just some minor comments/questions
Fr monomial = Fr::conditional_assign(dummy_round, Fr(0), round_challenges_inv[CONST_ECCVM_LOG_N - 1 - i] * challenge); | ||
b_zero *= Fr(1) + monomial; | ||
info("rec verify b_zero after i: ", i, " is ", b_zero.get_value()); | ||
if (i != CONST_ECCVM_LOG_N - 1) // this if is fine because the number of iterations is constant |
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 comment?
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 meant this if statement is fine (as opposed to using a constexpr if)
Makes the proof size of ECCVM constant by making the sumcheck gate challenges and IPA constant. Fixes the ECCVM recursive verifier size (besides the MSM in the IPA Recursive verifier) as a result. Closes AztecProtocol/barretenberg#1009.
Makes the proof size of ECCVM constant by making the sumcheck gate challenges and IPA constant.
Fixes the ECCVM recursive verifier size (besides the MSM in the IPA Recursive verifier) as a result.
Closes AztecProtocol/barretenberg#1009.