Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
7add7c7
[empty] Start merge-train. Choo choo.
Jul 25, 2025
042a9bc
Merge branch 'next' into merge-train/barretenberg
Jul 25, 2025
f5ec98e
chore: remove `logic` operations from `uint` (#15975)
suyash67 Jul 25, 2025
a671f86
Merge branch 'next' into merge-train/barretenberg
Jul 25, 2025
78021ea
chore: Modify the `MergeVerifier` so that it gets the subtable commit…
federicobarbacovi Jul 25, 2025
bfaaad4
Merge branch 'next' into merge-train/barretenberg
Jul 25, 2025
43c3219
Merge branch 'next' into merge-train/barretenberg
Jul 25, 2025
7f9ee70
Merge branch 'next' into merge-train/barretenberg
Jul 25, 2025
069a1c4
fix: delete tar generated by test-vk-havent-changed script (#15988)
johnathan79717 Jul 25, 2025
95c7e7c
Merge branch 'next' into merge-train/barretenberg
Jul 25, 2025
b26c28f
chore: replace q_arith with q_3 in memory relation (#15953)
johnathan79717 Jul 25, 2025
01ed70c
Merge branch 'next' into merge-train/barretenberg
Jul 25, 2025
96868aa
chore: simplify `uint` logic by removing `witness_status` (#15976)
suyash67 Jul 25, 2025
e8bd564
Revert "chore: remove `logic` operations from `uint`" (#15997)
suyash67 Jul 25, 2025
efd3528
Revert "chore: simplify `uint` logic by removing `witness_status`" (#…
suyash67 Jul 25, 2025
fd26dff
feat: Add the last merged table to the public inputs of the hiding ci…
federicobarbacovi Jul 25, 2025
bb77341
Merge branch 'next' into merge-train/barretenberg
Jul 25, 2025
71d9c68
Merge branch 'next' into merge-train/barretenberg
Jul 25, 2025
4204b4b
Merge branch 'next' into merge-train/barretenberg
Jul 25, 2025
32e687a
Merge branch 'next' into merge-train/barretenberg
Jul 25, 2025
51627bb
Merge branch 'next' into merge-train/barretenberg
Jul 25, 2025
3bb4e9a
Merge branch 'next' into merge-train/barretenberg
Jul 28, 2025
45132ab
Merge branch 'next' into merge-train/barretenberg
Jul 28, 2025
fc25483
Merge branch 'next' into merge-train/barretenberg
Jul 28, 2025
46b3510
Merge branch 'next' into merge-train/barretenberg
Jul 28, 2025
c18ef5e
chore: combined `uint` audit (#16030)
suyash67 Jul 28, 2025
fde8bc0
Merge branch 'next' into merge-train/barretenberg
Jul 28, 2025
44c81f4
chore: delete and ignore barretenberg/src/honk/keys/ (#16042)
johnathan79717 Jul 28, 2025
6e8eaec
Merge branch 'next' into merge-train/barretenberg
Jul 28, 2025
bd0b716
Merge branch 'next' into merge-train/barretenberg
Jul 28, 2025
751fbd8
Merge branch 'next' into merge-train/barretenberg
Jul 28, 2025
e205d2e
fix: Fix tube proof construction (#16052)
federicobarbacovi Jul 28, 2025
8b7989c
Merge branch 'next' into merge-train/barretenberg
Jul 28, 2025
14d6f62
Merge branch 'next' into merge-train/barretenberg
Jul 28, 2025
48d8a8e
Merge branch 'next' into merge-train/barretenberg
Jul 28, 2025
286d5bb
Merge branch 'next' into merge-train/barretenberg
Jul 28, 2025
3528223
Merge branch 'next' into merge-train/barretenberg
Jul 28, 2025
280c945
Merge branch 'next' into merge-train/barretenberg
Jul 28, 2025
6607191
Merge branch 'next' into merge-train/barretenberg
Jul 28, 2025
220bfc9
Merge branch 'next' into merge-train/barretenberg
Jul 29, 2025
aae3bc3
Merge branch 'next' into merge-train/barretenberg
Jul 29, 2025
2a1726d
Merge branch 'next' into merge-train/barretenberg
Jul 29, 2025
841c961
Merge branch 'next' into merge-train/barretenberg
Jul 29, 2025
d4864ff
Merge branch 'next' into merge-train/barretenberg
Jul 29, 2025
bc1c08a
Merge branch 'next' into merge-train/barretenberg
Jul 29, 2025
63f7b79
Merge branch 'next' into merge-train/barretenberg
Jul 29, 2025
6dbbca6
feat: Link successive recursive Merge verifications (#16032)
federicobarbacovi Jul 29, 2025
5edff18
Merge branch 'next' into merge-train/barretenberg
Jul 29, 2025
93dfded
Merge branch 'next' into merge-train/barretenberg
Jul 29, 2025
d344d36
Merge branch 'next' into merge-train/barretenberg
Jul 29, 2025
2c3edfb
chore: Package inputs to Merge verifier into a single struct (#16075)
federicobarbacovi Jul 30, 2025
3088403
Merge remote-tracking branch 'origin/next' into merge-train/barretenberg
ludamad Jul 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed barretenberg/cpp/bb-civc-inputs.tar.gz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cd ..
# - Generate a hash for versioning: sha256sum bb-civc-inputs.tar.gz
# - Upload the compressed results: aws s3 cp bb-civc-inputs.tar.gz s3://aztec-ci-artifacts/protocol/bb-civc-inputs-[hash(0:8)].tar.gz
# Note: In case of the "Test suite failed to run ... Unexpected token 'with' " error, need to run: docker pull aztecprotocol/build:3.0
pinned_short_hash="458fb354"
pinned_short_hash="bb7c0098"
pinned_civc_inputs_url="https://aztec-ci-artifacts.s3.us-east-2.amazonaws.com/protocol/bb-civc-inputs-${pinned_short_hash}.tar.gz"

function compress_and_upload {
Expand Down Expand Up @@ -53,7 +53,7 @@ if [[ "${1:-}" == "--update_inputs" ]]; then
fi

export inputs_tmp_dir=$(mktemp -d)
trap 'rm -rf "$inputs_tmp_dir"' EXIT SIGINT
trap 'rm -rf "$inputs_tmp_dir" bb-civc-inputs.tar.gz' EXIT SIGINT

curl -s -f "$pinned_civc_inputs_url" | tar -xzf - -C "$inputs_tmp_dir" &>/dev/null

Expand Down
17 changes: 11 additions & 6 deletions barretenberg/cpp/src/barretenberg/api/prove_tube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,20 @@ void prove_tube(const std::string& output_path, const std::string& vk_path)
ClientIVCRecursiveVerifier::Output client_ivc_rec_verifier_output = verifier.verify(stdlib_proof);

// The public inputs in the proof are propagated to the base rollup by making them public inputs of this circuit.
// Exclude the pairing points which are handled separately.
auto num_inner_public_inputs = vk.mega->num_public_inputs - bb::PAIRING_POINTS_SIZE;
// Exclude the public inputs of the Hiding Kernel: the pairing points are handled separately, the ecc op tables are
// not needed after this point
auto num_inner_public_inputs = vk.mega->num_public_inputs - HidingKernelIO<Builder>::PUBLIC_INPUTS_SIZE;
for (size_t i = 0; i < num_inner_public_inputs; i++) {
stdlib_proof.mega_proof[i].set_public();
}

client_ivc_rec_verifier_output.points_accumulator.set_public();
// The tube only calls an IPA recursive verifier once, so we can just add this IPA claim and proof
client_ivc_rec_verifier_output.opening_claim.set_public();
// IO
RollupIO inputs;
inputs.pairing_inputs = client_ivc_rec_verifier_output.points_accumulator;
inputs.ipa_claim = client_ivc_rec_verifier_output.opening_claim;
inputs.set_public();

// The tube only calls an IPA recursive verifier once, so we can just add this IPA proof
builder->ipa_proof = client_ivc_rec_verifier_output.ipa_proof.get_value();
BB_ASSERT_EQ(builder->ipa_proof.size(), IPA_PROOF_LENGTH, "IPA proof should be set.");

Expand Down Expand Up @@ -92,7 +97,7 @@ void prove_tube(const std::string& output_path, const std::string& vk_path)

// Break up the tube proof into the honk portion and the ipa portion
const size_t HONK_PROOF_LENGTH_WITHOUT_INNER_PUB_INPUTS =
UltraRollupFlavor::PROOF_LENGTH_WITHOUT_PUB_INPUTS + PAIRING_POINTS_SIZE + IPA_CLAIM_SIZE;
UltraRollupFlavor::PROOF_LENGTH_WITHOUT_PUB_INPUTS + RollupIO::PUBLIC_INPUTS_SIZE;
// The extra calculation is for the IPA proof length.
BB_ASSERT_EQ(tube_proof.size(),
HONK_PROOF_LENGTH_WITHOUT_INNER_PUB_INPUTS + num_inner_public_inputs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,9 @@ inline std::vector<uint32_t> StaticAnalyzer_<FF>::get_memory_gate_connected_comp
gate_variables.reserve(8);
auto q_1 = block.q_1()[index];
auto q_2 = block.q_2()[index];
[[maybe_unused]] auto q_3 = block.q_3()[index];
auto q_3 = block.q_3()[index];
auto q_4 = block.q_4()[index];
[[maybe_unused]] auto q_m = block.q_m()[index];
auto q_arith = block.q_arith()[index];
[[maybe_unused]] auto q_c = block.q_c()[index];

[[maybe_unused]] auto w_l = block.w_l()[index];
Expand All @@ -329,7 +328,7 @@ inline std::vector<uint32_t> StaticAnalyzer_<FF>::get_memory_gate_connected_comp
[[maybe_unused]] auto w_4 = block.w_4()[index];

if (q_1 == FF::one() && q_4 == FF::one()) {
ASSERT(q_arith.is_zero());
ASSERT(q_3.is_zero());
// ram timestamp check
if (index < block.size() - 1) {
gate_variables.insert(gate_variables.end(),
Expand All @@ -340,7 +339,7 @@ inline std::vector<uint32_t> StaticAnalyzer_<FF>::get_memory_gate_connected_comp
block.w_o()[index] });
}
} else if (q_1 == FF::one() && q_2 == FF::one()) {
ASSERT(q_arith.is_zero());
ASSERT(q_3.is_zero());
// rom constitency check
if (index < block.size() - 1) {
gate_variables.insert(
Expand All @@ -349,7 +348,7 @@ inline std::vector<uint32_t> StaticAnalyzer_<FF>::get_memory_gate_connected_comp
}
} else {
// ram constitency check
if (!q_arith.is_zero()) {
if (!q_3.is_zero()) {
if (index < block.size() - 1) {
gate_variables.insert(gate_variables.end(),
{ block.w_o()[index],
Expand Down Expand Up @@ -388,7 +387,6 @@ inline std::vector<uint32_t> StaticAnalyzer_<FF>::get_non_native_field_gate_conn
auto q_3 = block.q_3()[index];
auto q_4 = block.q_4()[index];
auto q_m = block.q_m()[index];
auto q_arith = block.q_arith()[index];
[[maybe_unused]] auto q_c = block.q_c()[index];

auto w_l = block.w_l()[index];
Expand All @@ -397,13 +395,11 @@ inline std::vector<uint32_t> StaticAnalyzer_<FF>::get_non_native_field_gate_conn
auto w_4 = block.w_4()[index];
if (q_3 == FF::one() && q_4 == FF::one()) {
// bigfield limb accumulation 1
ASSERT(q_arith.is_zero());
if (index < block.size() - 1) {
gate_variables.insert(gate_variables.end(),
{ w_l, w_r, w_o, w_4, block.w_l()[index + 1], block.w_r()[index + 1] }); // 6
}
} else if (q_3 == FF::one() && q_m == FF::one()) {
ASSERT(q_arith.is_zero());
// bigfield limb accumulation 2
if (index < block.size() - 1) {
gate_variables.insert(gate_variables.end(),
Expand All @@ -415,7 +411,6 @@ inline std::vector<uint32_t> StaticAnalyzer_<FF>::get_non_native_field_gate_conn
block.w_4()[index + 1] });
}
} else if (q_2 == FF::one() && (q_3 == FF::one() || q_4 == FF::one() || q_m == FF::one())) {
ASSERT(q_arith.is_zero());
// bigfield product cases
if (index < block.size() - 1) {
std::vector<uint32_t> limb_subproduct_vars = {
Expand Down Expand Up @@ -483,16 +478,14 @@ inline std::vector<uint32_t> StaticAnalyzer_<FF>::get_rom_table_connected_compon
auto q_3 = ultra_builder.blocks.memory.q_3()[gate_index];
auto q_4 = ultra_builder.blocks.memory.q_4()[gate_index];
auto q_m = ultra_builder.blocks.memory.q_m()[gate_index];
auto q_arith = ultra_builder.blocks.memory.q_arith()[gate_index];
auto q_c = ultra_builder.blocks.memory.q_c()[gate_index];

auto index_witness = record.index_witness;
auto vc1_witness = record.value_column1_witness; // state[0] from RomTranscript
auto vc2_witness = record.value_column2_witness; // state[1] from RomTranscript
auto record_witness = record.record_witness;

if (q_1 == FF::one() && q_m == FF::one() && q_2.is_zero() && q_3.is_zero() && q_4.is_zero() && q_c.is_zero() &&
q_arith.is_zero()) {
if (q_1 == FF::one() && q_m == FF::one() && q_2.is_zero() && q_3.is_zero() && q_4.is_zero() && q_c.is_zero()) {
// By default ROM read gate uses variables (w_1, w_2, w_3, w_4) = (index_witness, vc1_witness, vc2_witness,
// record_witness) So we can update all of them
gate_variables.emplace_back(index_witness);
Expand Down Expand Up @@ -538,7 +531,6 @@ inline std::vector<uint32_t> StaticAnalyzer_<FF>::get_ram_table_connected_compon
auto q_3 = ultra_builder.blocks.memory.q_3()[gate_index];
auto q_4 = ultra_builder.blocks.memory.q_4()[gate_index];
auto q_m = ultra_builder.blocks.memory.q_m()[gate_index];
auto q_arith = ultra_builder.blocks.memory.q_arith()[gate_index];
auto q_c = ultra_builder.blocks.memory.q_c()[gate_index];

auto index_witness = record.index_witness;
Expand All @@ -547,7 +539,7 @@ inline std::vector<uint32_t> StaticAnalyzer_<FF>::get_ram_table_connected_compon
auto record_witness = record.record_witness;

if (q_1 == FF::one() && q_m == FF::one() && q_2.is_zero() && q_3.is_zero() && q_4.is_zero() &&
q_arith.is_zero() && (q_c.is_zero() || q_c == FF::one())) {
(q_c.is_zero() || q_c == FF::one())) {
// By default RAM read/write gate uses variables (w_1, w_2, w_3, w_4) = (index_witness, timestamp_witness,
// value_witness, record_witness) So we can update all of them
gate_variables.emplace_back(index_witness);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ class BoomerangGoblinRecursiveVerifierTests : public testing::Test {
using OuterDeciderProvingKey = DeciderProvingKey_<OuterFlavor>;

using Commitment = MergeVerifier::Commitment;
using MergeCommitments = MergeVerifier::InputCommitments;
using RecursiveCommitment = GoblinRecursiveVerifier::MergeVerifier::Commitment;
using MergeCommitments = GoblinRecursiveVerifier::MergeVerifier::WitnessCommitments;
using RecursiveMergeCommitments = GoblinRecursiveVerifier::MergeVerifier::InputCommitments;

static void SetUpTestSuite() { bb::srs::init_file_crs_factory(bb::srs::bb_crs_path()); }

struct ProverOutput {
GoblinProof proof;
Goblin::VerificationKey verifier_input;
std::array<Commitment, MegaFlavor::NUM_WIRES> t_commitments;
MergeCommitments merge_commitments;
};

/**
Expand All @@ -58,17 +59,19 @@ class BoomerangGoblinRecursiveVerifierTests : public testing::Test {
GoblinMockCircuits::construct_simple_circuit(builder);
goblin_final.op_queue->merge();
// Subtable values and commitments - needed for (Recursive)MergeVerifier
std::array<Commitment, MegaFlavor::NUM_WIRES> t_commitments;
MergeCommitments merge_commitments;
auto t_current = goblin_final.op_queue->construct_current_ultra_ops_subtable_columns();
auto T_prev = goblin_final.op_queue->construct_previous_ultra_ops_table_columns();
CommitmentKey<curve::BN254> pcs_commitment_key(goblin_final.op_queue->get_ultra_ops_table_num_rows());
for (size_t idx = 0; idx < MegaFlavor::NUM_WIRES; idx++) {
t_commitments[idx] = pcs_commitment_key.commit(t_current[idx]);
merge_commitments.t_commitments[idx] = pcs_commitment_key.commit(t_current[idx]);
merge_commitments.T_prev_commitments[idx] = pcs_commitment_key.commit(T_prev[idx]);
}

// Output is a goblin proof plus ECCVM/Translator verification keys
return { goblin_final.prove(),
{ std::make_shared<ECCVMVK>(), std::make_shared<TranslatorVK>() },
t_commitments };
merge_commitments };
}
};

Expand All @@ -78,20 +81,21 @@ class BoomerangGoblinRecursiveVerifierTests : public testing::Test {
*/
TEST_F(BoomerangGoblinRecursiveVerifierTests, graph_description_basic)
{
auto [proof, verifier_input, t_commitments] = create_goblin_prover_output();
auto [proof, verifier_input, merge_commitments] = create_goblin_prover_output();

Builder builder;

// Merge commitments
MergeCommitments recursive_merge_commitments;
RecursiveMergeCommitments recursive_merge_commitments;
for (size_t idx = 0; idx < MegaFlavor::NUM_WIRES; idx++) {
recursive_merge_commitments.t_commitments[idx] =
RecursiveCommitment::from_witness(&builder, t_commitments[idx]);
RecursiveCommitment::from_witness(&builder, merge_commitments.t_commitments[idx]);
recursive_merge_commitments.T_prev_commitments[idx] =
RecursiveCommitment::from_witness(&builder, merge_commitments.T_prev_commitments[idx]);
}

GoblinRecursiveVerifier verifier{ &builder, verifier_input };
GoblinRecursiveVerifierOutput output =
verifier.verify(proof, recursive_merge_commitments, recursive_merge_commitments.T_commitments);
GoblinRecursiveVerifierOutput output = verifier.verify(proof, recursive_merge_commitments);
output.points_accumulator.set_public();
// Construct and verify a proof for the Goblin Recursive Verifier circuit
{
Expand Down
Loading
Loading