feat: Mocking for translator and eccvm proofs#16368
feat: Mocking for translator and eccvm proofs#16368federicobarbacovi merged 14 commits intomerge-train/barretenbergfrom
Conversation
283ead9 to
c8a8abf
Compare
| /** | ||
| * @brief Check that the size of a mock merge proof matches expectation | ||
| */ | ||
| TEST_F(IvcRecursionConstraintTest, MockMergeProofSize) |
There was a problem hiding this comment.
Duplicate test
There was a problem hiding this comment.
where's the other occurrence?
There was a problem hiding this comment.
Sorry, I should have pointed this out:
barretenberg/cpp/src/barretenberg/dsl/acir_format/mock_verifier_inputs.cpp
Outdated
Show resolved
Hide resolved
| // Sumcheck multilinear evaluations | ||
| for (size_t i = 0; i < Flavor::NUM_ALL_ENTITIES; ++i) { | ||
| proof.emplace_back(FF::random_element()); | ||
| populate_field_elements(proof, Flavor::NUM_ALL_ENTITIES); |
barretenberg/cpp/src/barretenberg/dsl/acir_format/mock_verifier_inputs.cpp
Show resolved
Hide resolved
| { | ||
| // Construct a Honk proof as the concatenation of an Oink proof and a Decider proof | ||
| HonkProof oink_proof = create_mock_oink_proof<Flavor, PublicInputs>(); | ||
| HonkProof oink_proof = create_mock_oink_proof<Flavor, PublicInputs>(inner_public_inputs_size); |
There was a problem hiding this comment.
again a nitpick, why are we calling these inner_public_inputs?
There was a problem hiding this comment.
Added an explanation for the parameter. They are the pub inputs coming from ACIR.
barretenberg/cpp/src/barretenberg/dsl/acir_format/mock_verifier_inputs.cpp
Outdated
Show resolved
Hide resolved
| builder.set_variable(key_fields[offset++].witness_index, public_inputs_size); | ||
| // Third key field is the pub inputs offset | ||
| size_t num_inner_public_inputs = public_inputs_size - IO::PUBLIC_INPUTS_SIZE; | ||
| uint32_t pub_inputs_offset = NativeFlavor::has_zero_row ? 1 : 0; |
There was a problem hiding this comment.
thanks for cleaning up the mess I created here :D
kashbrti
left a comment
There was a problem hiding this comment.
LGTM. nice work! It would be good if @ledwards2225 takes a final look because he probably has more context on what exactly had to be done.
Will run CI full because the VK generation might be affected by this I think.
ledwards2225
left a comment
There was a problem hiding this comment.
Nice! Looks like maybe some more code sharing could be done but maybe you tried and found there are quirks that prevent it.
barretenberg/cpp/src/barretenberg/dsl/acir_format/mock_verifier_inputs.cpp
Show resolved
Hide resolved
barretenberg/cpp/src/barretenberg/dsl/acir_format/mock_verifier_inputs.cpp
Show resolved
Hide resolved
* Define methods to mock proofs for translator and eccvm * Restructure functions to create dummy vk and proofs in recursion constraints so that they use the functions from `mock_verifier_inputs` (this avoids code duplication) This PR is mostly in preparation for transitioning the tube in noir. We need to mock translator and eccvm proofs to mock ClientIVC proofs. --------- Co-authored-by: AztecBot <tech@aztecprotocol.com>
mock_verifier_inputs(this avoids code duplication)This PR is mostly in preparation for transitioning the tube in noir. We need to mock translator and eccvm proofs to mock ClientIVC proofs.