Skip to content

feat: Mocking for translator and eccvm proofs#16368

Merged
federicobarbacovi merged 14 commits intomerge-train/barretenbergfrom
fb/mock_translator_eccvm_proofs
Aug 15, 2025
Merged

feat: Mocking for translator and eccvm proofs#16368
federicobarbacovi merged 14 commits intomerge-train/barretenbergfrom
fb/mock_translator_eccvm_proofs

Conversation

@federicobarbacovi
Copy link
Contributor

@federicobarbacovi federicobarbacovi commented Aug 14, 2025

  • 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.

@federicobarbacovi federicobarbacovi force-pushed the fb/mock_translator_eccvm_proofs branch from 283ead9 to c8a8abf Compare August 14, 2025 10:46
/**
* @brief Check that the size of a mock merge proof matches expectation
*/
TEST_F(IvcRecursionConstraintTest, MockMergeProofSize)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate test

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where's the other occurrence?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I should have pointed this out:

@federicobarbacovi federicobarbacovi marked this pull request as ready for review August 14, 2025 10:55
// 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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice cleanup

{
// 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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again a nitpick, why are we calling these inner_public_inputs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an explanation for the parameter. They are the pub inputs coming from ACIR.

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for cleaning up the mess I created here :D

@federicobarbacovi federicobarbacovi self-assigned this Aug 14, 2025
Copy link
Contributor

@kashbrti kashbrti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kashbrti kashbrti added the ci-full Run all master checks. label Aug 15, 2025
Copy link
Contributor

@ledwards2225 ledwards2225 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Looks like maybe some more code sharing could be done but maybe you tried and found there are quirks that prevent it.

@federicobarbacovi federicobarbacovi merged commit 0d54bf9 into merge-train/barretenberg Aug 15, 2025
6 checks passed
@federicobarbacovi federicobarbacovi deleted the fb/mock_translator_eccvm_proofs branch August 15, 2025 15:54
github-merge-queue bot pushed a commit that referenced this pull request Aug 18, 2025
BEGIN_COMMIT_OVERRIDE
feat: Mocking for translator and eccvm proofs (#16368)
refactor: cleanup acir_tests and unused bb cli commands (#16361)
END_COMMIT_OVERRIDE
mralj pushed a commit that referenced this pull request Oct 13, 2025
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-full Run all master checks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants