feat: translation evaluations: refactor + soundness fix#12051
feat: translation evaluations: refactor + soundness fix#12051iakovenkos merged 26 commits intomasterfrom
Conversation
| sumcheck_output.round_univariates, | ||
| sumcheck_output.round_univariate_evaluations); | ||
|
|
||
| // Get the challenge at which we evaluate all transcript polynomials as univariates |
There was a problem hiding this comment.
isolated into a separate method
| @@ -0,0 +1,90 @@ | |||
| #pragma once | |||
There was a problem hiding this comment.
It's a new class in a way similar to ZKSumcheckData. It is supposed to accept the eccvm transcript wires, extract, and concatenate the masking terms to prepare them for the SmallSubgroupIPA.
| commitments.transcript_z1, | ||
| commitments.transcript_z2 }; | ||
|
|
||
| const OpeningClaim translation_opening_claim = reduce_verify_translation_evaluations(transcript_commitments); |
There was a problem hiding this comment.
again, isolated the translation evaluations logic into a separarte method to improve readability and make it uniform with the prover class
| PCS::compute_opening_proof(key->commitment_key, batch_opening_claim, ipa_transcript); | ||
|
|
||
| // Produce another challenge passed as input to the translator verifier | ||
| translation_batching_challenge_v = transcript->template get_challenge<FF>("Translation:batching_challenge"); |
There was a problem hiding this comment.
This was a very strange step, the challenge that has to be propagated is the batching_challenge_v produced in reduce_translation_evaluations
| Flavor::CommitmentLabels commitment_labels; | ||
|
|
||
| const auto circuit_size = transcript->template receive_from_prover<uint32_t>("circuit_size"); | ||
| evaluation_input_x = transcript->template receive_from_prover<BF>("evaluation_input_x"); |
There was a problem hiding this comment.
this was not sound, the prover could've sent anything here, switched to the propagation of these challenges from the ECCVMVerifier to TranslatorVerifier.
…ocol/aztec-packages into si/fix-translation-evaluations
| } | ||
| } | ||
|
|
||
| // Check that the GoblinRecursiveVerifier circuit does not depend on the inputs. |
There was a problem hiding this comment.
Added this test to catch any discrepancies caused by interactions between different components of goblin
ledwards2225
left a comment
There was a problem hiding this comment.
Looks great, just a couple of minor comments about naming and some comment typo fixes. Nice work!
| static constexpr uint32_t NUM_LIBRA_EVALUATIONS = 4; | ||
| // There are 5 distinguished wires in ECCVM that have to be opened as univariates to establish the connection between | ||
| // ECCVM and Translator | ||
| static constexpr uint32_t NUM_TRANSLATION_EVALUATIONS = 5; |
There was a problem hiding this comment.
Seems like the eccvm flavor might be a better place for this constant
There was a problem hiding this comment.
It was also implicitly used in TranslationEvaluations struct that is propagated to Translator, I just modified it to use this constant explicitly. It is also used by the SmallSubgroupIPA in #12244, so I'd keep it here. But probably we'll need to revise these constants at some point.
In the ECCVM, we have a special sub-protocol to prove the univariate evaluations of
Op,Px,Py,z1, andz2. The corresponding logic used to be un-rolled inexecute_pcs_rounds()andverify_proof(). I isolated this logic into separate methods for the following reasons:The following Goblin soundness issue has been discovered:
evaluation_challenge_xsampled in ECCVM would be propagated from theECCVMProverto theTranslatorProverand sent to theTranslatorVerifiermeaning that a maliciousGoblinProverwas free to send any field element and chooseaccumulated_result.ECCVMProver/TranslatorVerifier) the translation evaluations proof seemed redundant and would have blocked the further changes. Namely, in the fix being implemented, we must enforce that the batching challenge used to compute the batched claim is the batching challenge used by the Translator.TranslatorVerifierretrievesevaluation_challenge_xandbatching_challenge_vas class members of ECCVMVerifier.