Skip to content

feat: Link successive recursive Merge verifications#16032

Merged
federicobarbacovi merged 20 commits into
merge-train/barretenbergfrom
fb/merge_consistency_checks
Jul 29, 2025
Merged

feat: Link successive recursive Merge verifications#16032
federicobarbacovi merged 20 commits into
merge-train/barretenbergfrom
fb/merge_consistency_checks

Conversation

@federicobarbacovi

@federicobarbacovi federicobarbacovi commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

We address AztecProtocol/barretenberg#1351: Merge protocol table commitment consistency checks.

More precisely, we ensure the Merge recursive verification at step $i+1$ uses as commitments to the previous state of the op queue the output of the Merge recursive verification at step $i$. Instead of performing a consistency check between the output at step $i$ and the input at step $i+1$, we pass the output at step $i$ as the input at step $i+1$.

This PR also closes AztecProtocol/barretenberg#1473.

PairingAccumulator points_accumulator;
OpeningClaim<Curve> opening_claim;
stdlib::Proof<Builder> ipa_proof;
TableCommitments merged_table_commitments;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No need to store this as Goblin verification is the end of the verification, there is no operation after it.

@federicobarbacovi federicobarbacovi marked this pull request as ready for review July 28, 2025 14:25
@federicobarbacovi federicobarbacovi self-assigned this Jul 28, 2025
@fcarreiro fcarreiro removed their request for review July 28, 2025 15:32

@maramihali maramihali left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks great overall, left a couple of suggestions to improve clarity

#include "barretenberg/stdlib/pairing_points.hpp"
#include "barretenberg/stdlib/primitives/circuit_builders/circuit_builders_fwd.hpp"
#include "barretenberg/stdlib/primitives/curves/bn254.hpp"
#include "barretenberg/stdlib/primitives/databus/databus.hpp"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

instead of special public inputs maybe we could call thing client_ivc_io_types or something :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I see your point. Luke chose this name, so I'll tag him @ledwards2225 and we can chat about this once he's back

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@federicobarbacovi (tagging myself as well)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A better name is definitely warranted! "special public inputs" was never meant to be permanent

Comment thread barretenberg/cpp/src/barretenberg/ultra_honk/merge_verifier.cpp Outdated
Comment thread barretenberg/cpp/src/barretenberg/stdlib/merge_verifier/merge_verifier.test.cpp Outdated
Comment thread barretenberg/cpp/src/barretenberg/goblin/goblin.cpp
Comment thread barretenberg/cpp/src/barretenberg/dsl/acir_format/mock_verifier_inputs.cpp Outdated

// Commitments to the previous status of the op_queue, to be finalized according to the recursive verification we
// are performing
TableCommitments finalised_T_prev_commitments = T_prev_commitments;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

finalised is quite a confusing name

@@ -38,9 +39,47 @@ TYPED_TEST(MockVerifierInputsTest, MockOinkProofSize)
{

@maramihali maramihali Jul 29, 2025

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit: there isn't much point in preserving these tests typed given that their functionality for each flavor is entirely different, I would rather split them in three tests. - ditto below

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed, I split them up. I also removed the RollupIO test, as I noticed that it was never meant to be there (the flavors are Ultra and Mega, no Rollup). Should we ever need to bring it back, the new structure of create_mock_*_proof would make it easy to do so.

@maramihali maramihali left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

thanks, will you please resolve my requests before merging :)

@federicobarbacovi federicobarbacovi merged commit 6dbbca6 into merge-train/barretenberg Jul 29, 2025
4 checks passed
@federicobarbacovi federicobarbacovi deleted the fb/merge_consistency_checks branch July 29, 2025 11:13
github-merge-queue Bot pushed a commit that referenced this pull request Jul 30, 2025
See
[merge-train-readme.md](https://github.com/AztecProtocol/aztec-packages/blob/next/.github/workflows/merge-train-readme.md).

BEGIN_COMMIT_OVERRIDE
chore: remove `logic` operations from `uint` (#15975)
chore: Modify the `MergeVerifier` so that it gets the subtable
commitments as input and returns the commitment to the merged table
(#15949)
fix: delete tar generated by test-vk-havent-changed script (#15988)
chore: replace q_arith with q_3 in memory relation (#15953)
chore: simplify `uint` logic by removing `witness_status` (#15976)
Revert "chore: remove `logic` operations from `uint`" (#15997)
Revert "chore: simplify `uint` logic by removing `witness_status`"
(#16000)
feat: Add the last merged table to the public inputs of the hiding
circuit (#15829)
chore: combined `uint` audit (#16030)
chore: delete and ignore barretenberg/src/honk/keys/ (#16042)
fix: Fix tube proof construction (#16052)
feat: Link successive recursive Merge verifications (#16032)
chore: Package inputs to Merge verifier into a single struct (#16075)
END_COMMIT_OVERRIDE

---------

Co-authored-by: AztecBot <tech@aztecprotocol.com>
Co-authored-by: Suyash Bagad <suyash@aztecprotocol.com>
Co-authored-by: federicobarbacovi <171914500+federicobarbacovi@users.noreply.github.com>
Co-authored-by: Jonathan Hao <jonathan@aztec-labs.com>
Co-authored-by: ledwards2225 <98505400+ledwards2225@users.noreply.github.com>
Co-authored-by: sergei iakovenko <105737703+iakovenkos@users.noreply.github.com>
Co-authored-by: ludamad <adam.domurad@gmail.com>
Co-authored-by: Raju Krishnamoorthy <krishnamoorthy@gmail.com>
Co-authored-by: notnotraju <raju@aztec-labs.com>
Co-authored-by: Lucas Xia <lucasxia01@gmail.com>
Co-authored-by: Khashayar Barooti <khashayar@aztecprotocol.com>
Co-authored-by: Jean M <132435771+jeanmon@users.noreply.github.com>
Co-authored-by: Alex Gherghisan <alexghr@users.noreply.github.com>
Co-authored-by: Santiago Palladino <spalladino@users.noreply.github.com>
Co-authored-by: Santiago Palladino <santiago@aztec-labs.com>
Co-authored-by: ludamad <domuradical@gmail.com>
Co-authored-by: maramihali <mara@aztecprotocol.com>
Co-authored-by: Sarkoxed <75146596+Sarkoxed@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants