Skip to content

Commit 3c5a2f2

Browse files
Squash merge from lde/two-more-db to keep the work going
commit fe8ed94 Author: federicobarbacovi <171914500+federicobarbacovi@users.noreply.github.com> Date: Thu May 7 14:09:02 2026 +0000 Fix name commit c704130 Author: federicobarbacovi <171914500+federicobarbacovi@users.noreply.github.com> Date: Thu May 7 13:34:34 2026 +0000 Extend calldata types, minor changes to README commit de94416 Author: ledwards2225 <l.edwards.d@gmail.com> Date: Thu May 7 00:43:23 2026 +0000 prover tomls commit c554fd0 Author: ledwards2225 <l.edwards.d@gmail.com> Date: Wed May 6 21:59:54 2026 +0000 vks commit 0ae600b Author: ledwards2225 <l.edwards.d@gmail.com> Date: Wed May 6 21:08:25 2026 +0000 constants commit 6686c89 Author: ledwards2225 <l.edwards.d@gmail.com> Date: Wed May 6 20:16:44 2026 +0000 extend databus with 2 more cols commit f8ac6da Merge: 42e2e67 b3031a2 Author: AztecBot <tech@aztecprotocol.com> Date: Wed May 6 17:47:36 2026 +0000 Merge branch 'next' into merge-train/barretenberg commit b3031a2 Merge: 420fd55 d06c141 Author: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Wed May 6 16:32:12 2026 +0000 chore: Update Noir to nightly-2026-05-05 (#22911) Automated update of Noir submodule to latest nightly. **Current**: unknown **New**: nightly-2026-05-05 [View changes in noir-lang/noir](noir-lang/noir@20391fd...nightly-2026-05-05) commit d06c141 Author: AztecBot <49558828+AztecBot@users.noreply.github.com> Date: Wed May 6 16:31:28 2026 +0000 chore: Update Noir to nightly-2026-05-05 Automated update of Noir submodule to latest nightly. **Current**: unknown **New**: nightly-2026-05-05 [View changes in noir-lang/noir](noir-lang/noir@20391fd...nightly-2026-05-05) commit 420fd55 Merge: 72c125c 22231d5 Author: ledwards2225 <98505400+ledwards2225@users.noreply.github.com> Date: Wed May 6 16:30:52 2026 +0000 feat: merge-train/barretenberg (#22969) BEGIN_COMMIT_OVERRIDE chore: skip zero-init and reserve copy_cycle vectors (#22963) feat: Multi app per kernel (#22640) END_COMMIT_OVERRIDE commit 72c125c Merge: a864dec 38115ab Author: Aztec Bot <49558828+AztecBot@users.noreply.github.com> Date: Wed May 6 16:30:50 2026 +0000 feat: merge-train/avm (#22986) BEGIN_COMMIT_OVERRIDE refactor(avm)!: consolidate revertible/non-revertible append selectors (#22982) END_COMMIT_OVERRIDE commit 42e2e67 Author: federicobarbacovi <171914500+federicobarbacovi@users.noreply.github.com> Date: Wed May 6 16:54:17 2026 +0100 feat: Improve add_scaled_batch (#22981) Two improvements: 1. `add_scaled_batch` was iterating over all polys to be batched and processing indices based on the range of the destination poly (the biggest of the polys to be batched). This PR adds a skipping condition that speeds up the function: we only iterate over the poly to be batched 2. Write a bespoke `add_batch_scaled` for use in the AVM with dynamic allocation of threads: each thread picks up the new available poly and works with it. This makes optimal usage of the fact that many polys in the AVM are small. Link to AVM bulk test: http://ci.aztec-labs.com/1df80aa9b6ae0088. The PCS component is `446ms` down from ~`600ms` commit 22231d5 Merge: 36d6ec8 a864dec Author: AztecBot <tech@aztecprotocol.com> Date: Wed May 6 15:35:10 2026 +0000 Merge branch 'next' into merge-train/barretenberg commit 38115ab Merge: 024b01b a864dec Author: AztecBot <tech@aztecprotocol.com> Date: Wed May 6 15:35:07 2026 +0000 Merge branch 'next' into merge-train/avm commit a864dec Merge: 1211a03 b23fb63 Author: PhilWindle <60546371+PhilWindle@users.noreply.github.com> Date: Wed May 6 14:55:36 2026 +0000 chore(p2p): drop unused ENR xxhash versioning path (#22943) ## Summary Removes dead code from `p2p/src/versioning.ts`: - `USE_XX_HASH` was never `true` outside tests; production ENRs always used the compressed string from `compressComponentVersions`. - Peer discovery already validates with `checkCompressedComponentVersion` in `discV5_service.ts`; `checkAztecEnrVersion` was only used from tests. - Drops `xxhash-wasm` / `toBufferBE` from this module (gossip `encoding.ts` still uses xxhash for message IDs). Related to [A-766](https://linear.app/aztec-labs/issue/A-766/audit-97-enr-version-detection-uses-string-prefix-matching-fragile) commit 024b01b Author: Jean M <132435771+jeanmon@users.noreply.github.com> Date: Wed May 6 14:18:16 2026 +0200 refactor(avm)!: consolidate revertible/non-revertible append selectors (#22982) The 6 boolean pairs (non_revertible_append_X, revertible_append_X) for X in {note_hash, nullifier, l2_l1_msg} in TX_PHASE_SPEC_MAP were perfectly correlated with is_revertible: in every phase where one of them is set, is_revertible already determines which side. Replace each pair with a single sel_append_X selector and let is_revertible carry the revertibility bit. This removes 3 precomputed columns and 3 committed columns in the tx trace, shrinks the #[READ_PHASE_SPEC] lookup tuple, and simplifies the sel_try_X_append / is_tree_insert_phase / SEL_CAN_EMIT_X expressions. In #[NOTE_HASH_APPEND], the sel_unique flag (previously fed by sel_revertible_append_note_hash) is now is_revertible directly: on the two rows where the lookup is gated on, the two values agree by construction, and is_revertible is the more direct semantic for the "make this note hash unique with a nonce" decision. Updates the hardcoded precomputed VK commitments in avm_fixed_vk.hpp and the corresponding vk_hash; new values obtained from AvmFixedVKTests.FixedVKCommitments. commit b23fb63 Author: spypsy <spypsy@outlook.com> Date: Tue May 5 10:07:46 2026 +0000 chore(p2p): drop unused ENR xxhash versioning path USE_XX_HASH was never true in production; discv5 already validates via checkCompressedComponentVersion. Removes xxhash/toBufferBE from versioning.ts and tests the string format only.
1 parent 0766ec3 commit 3c5a2f2

46 files changed

Lines changed: 4481 additions & 4287 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

barretenberg/cpp/scripts/test_chonk_standalone_vks_havent_changed.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ script_path="$root/barretenberg/cpp/scripts/test_chonk_standalone_vks_havent_cha
2121
# - Generate a hash for versioning: sha256sum bb-chonk-inputs.tar.gz
2222
# - Upload the compressed results: aws s3 cp bb-chonk-inputs.tar.gz s3://aztec-ci-artifacts/protocol/bb-chonk-inputs-[hash(0:8)].tar.gz
2323
# Note: In case of the "Test suite failed to run ... Unexpected token 'with' " error, need to run: docker pull aztecprotocol/build:3.0
24-
pinned_short_hash="c09aeb0c"
24+
pinned_short_hash="341842bf"
2525
pinned_chonk_inputs_url="https://aztec-ci-artifacts.s3.us-east-2.amazonaws.com/protocol/bb-chonk-inputs-${pinned_short_hash}.tar.gz"
2626

2727
function update_pinned_hash_in_script {

barretenberg/cpp/src/barretenberg/chonk/README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ MegaZK Oink → Merge → ECCVM → Translator Oink + Joint Sumcheck + Joint PCS
111111
112112
Concretely (`ChonkVerifier::reduce_to_ipa_claim` / `ChonkVerifier::verify`):
113113
114-
1. **MegaZK Oink verification**: `BatchedHonkTranslatorVerifier::verify_mega_zk_oink` processes the hiding kernel's pre-sumcheck proof and extracts `HidingKernelIO` (pairing points, calldata commitment, ECC op wire commitments)
115-
2. **Databus consistency check**: Asserts the hiding kernel's calldata commitment equals its `kernel_return_data` commitment
114+
1. **MegaZK Oink verification**: `BatchedHonkTranslatorVerifier::verify_mega_zk_oink` processes the hiding kernel's pre-sumcheck proof and extracts `HidingKernelIO` (pairing points, kernel return data commitment, ECC op wire commitments)
115+
2. **Databus consistency check**: Asserts the hiding kernel's kernel calldata commitment equals the `kernel_return_data` commitment contained it its public inputs
116116
3. **Merge verification**: Verifies the hiding kernel's APPEND-mode merge proof using the ECC op wire commitments from step 1 and `ecc_op_tables` from `HidingKernelIO`
117117
4. **ECCVM verification**: Reduces to an IPA opening claim; extracts translator input parameters (`v`, `x`, `accumulated_result`)
118118
5. **Joint verification**: `BatchedHonkTranslatorVerifier::verify` processes the translator Oink, runs the 17-round joint sumcheck, and performs the joint Shplemini/KZG PCS reduction
@@ -269,13 +269,13 @@ The databus solves this by using **commitments** instead of raw data. Rather tha
269269
270270
| Column | Purpose |
271271
|--------|---------|
272-
| `calldata` | Input from previous kernel's return data ($C_i$) |
273-
| `secondary_calldata` | Input from previous app's return data ($C'_i$) |
272+
| `kernel_calldata` | Input from previous kernel's return data ($C_i$) |
273+
| `app_calldata[0..2]` | Inputs from up to three apps' return data ($C'_{i,j}$) |
274274
| `return_data` | Output to be consumed by next circuit ($R_i$) |
275275
276-
App circuits only produce `return_data` (no calldata). Kernel circuits receive both:
277-
- `calldata` from the previous kernel's return data
278-
- `secondary_calldata` from the corresponding app's return data
276+
App circuits only produce `return_data` (no calldata). Kernel circuits receive:
277+
- `kernel_calldata` from the previous kernel's return data
278+
- `app_calldata[0..2]` from the corresponding apps' return data
279279
280280
#### Lookup Relations
281281
@@ -301,7 +301,7 @@ $$\sum_{i=0}^{n-1} a_i \cdot I_i \cdot (w_{1,i} + w_{2,i}\beta + \gamma) - q_{bu
301301
302302
Inverse correctness is enforced by two separate gating subrelations: $(I \cdot L \cdot T - 1) \cdot \text{is\_read} = 0$ on read rows, and $(I \cdot L \cdot T - 1) \cdot \text{count} = 0$ on write rows. At inactive rows (where both gates are zero), $I$ is unconstrained but the lookup identity contribution is also zero, so the prover gets no free degrees of freedom.
303303
304-
**Multiple columns**: Each bus column (calldata, secondary_calldata, return_data) has separate subrelations, distinguished by column-specific selectors $q_j$.
304+
**Multiple columns**: Each bus column (kernel calldata, three app calldata columns, return data) has separate subrelations, distinguished by column-specific selectors $q_j$.
305305
306306
#### Population
307307
@@ -315,14 +315,15 @@ The databus columns are populated from ACIR constraints generated by the Noir co
315315
```
316316
App₀ ──return_data [R'₀]──┐
317317
318-
Kernel₀ ←─calldata─── (empty for first kernel)
318+
Kernel₀ ←─kernel_calldata─── (empty for first kernel)
319+
←─app_calldata[0] [C'₀,0]─── App₀.return_data
319320
320321
return_data [R₀]
321322
322323
App₁ ──return_data [R'₁]──┐
323324
324-
Kernel₁ ←─calldata [C₁]─── Kernel₀.return_data
325-
←─secondary_calldata [C'₁]─── App₁.return_data
325+
Kernel₁ ←─kernel_calldata [C₁]─── Kernel₀.return_data
326+
←─app_calldata[0] [C'₁,0]─── App₁.return_data
326327
327328
return_data [R₁]
328329
@@ -685,8 +686,8 @@ Kernel circuits output a structured public input block that carries cross-circui
685686
struct KernelIO {
686687
PairingInputs pairing_inputs; // Accumulated {P0, P1} for deferred pairing check
687688
G1 kernel_return_data; // Commitment to this kernel's return data
688-
G1 app_return_data; // Commitment to the app's return data
689-
TableCommitments ecc_op_tables; // [M_1]...[M_4] merged op queue tables from Merge
689+
std::array<G1, MAX_APPS_PER_KERNEL> app_return_data; // App return data commitments
690+
FF ecc_op_hash; // Running hash over ECC op column commitments
690691
FF output_hn_accum_hash; // Hash of the HyperNova accumulator state
691692
};
692693

@@ -722,10 +723,10 @@ The [Databus](#databus) section explains how circuits pass data via commitment e
722723

723724
```cpp
724725
// Kernel's calldata must match previous kernel's return_data
725-
kernel_input.kernel_return_data.incomplete_assert_equal(witness_commitments.calldata);
726+
kernel_input.kernel_return_data.incomplete_assert_equal(witness_commitments.kernel_calldata);
726727

727-
// Kernel's secondary_calldata must match previous app's return_data
728-
kernel_input.app_return_data.incomplete_assert_equal(witness_commitments.secondary_calldata);
728+
// Each app calldata column must match the corresponding app's return_data
729+
kernel_input.app_return_data[idx].incomplete_assert_equal(*app_calldata_commitments[idx]);
729730
```
730731

731732
The `incomplete_assert_equal` (for non-native G1 points) adds in-circuit constraints that the commitments are equal. Combined with the HyperNova binding of public inputs to proofs, tampering with databus content invalidates the proof.

barretenberg/cpp/src/barretenberg/chonk/batched_honk_translator/batched_honk_translator.test.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,14 @@ class BatchedHonkTranslatorTests : public ::testing::Test {
142142
// DataBus entities:
143143
for (const auto& label : { "KERNEL_CALLDATA",
144144
"KERNEL_CALLDATA_READ_COUNTS",
145-
"APP_CALLDATA",
146-
"APP_CALLDATA_READ_COUNTS",
147-
"RETURNDATA",
148-
"RETURNDATA_READ_COUNTS" }) {
145+
"FIRST_APP_CALLDATA",
146+
"FIRST_APP_CALLDATA_READ_COUNTS",
147+
"SECOND_APP_CALLDATA",
148+
"SECOND_APP_CALLDATA_READ_COUNTS",
149+
"THIRD_APP_CALLDATA",
150+
"THIRD_APP_CALLDATA_READ_COUNTS",
151+
"RETURN_DATA",
152+
"RETURN_DATA_READ_COUNTS" }) {
149153
m.add_entry(round, label, G);
150154
}
151155
m.add_challenge(round, "eta");
@@ -161,8 +165,10 @@ class BatchedHonkTranslatorTests : public ::testing::Test {
161165
// ── Round 2: MegaZK logderiv inverses + Z_PERM + translator Oink ─────────
162166
m.add_entry(round, "LOOKUP_INVERSES", G);
163167
m.add_entry(round, "KERNEL_CALLDATA_INVERSES", G);
164-
m.add_entry(round, "APP_CALLDATA_INVERSES", G);
165-
m.add_entry(round, "RETURNDATA_INVERSES", G);
168+
m.add_entry(round, "FIRST_APP_CALLDATA_INVERSES", G);
169+
m.add_entry(round, "SECOND_APP_CALLDATA_INVERSES", G);
170+
m.add_entry(round, "THIRD_APP_CALLDATA_INVERSES", G);
171+
m.add_entry(round, "RETURN_DATA_INVERSES", G);
166172
m.add_entry(round, "Z_PERM", G);
167173
// Translator Oink: vk_hash, masking commitment, 10 wire commitments
168174
m.add_entry(round, "vk_hash", Fr);

barretenberg/cpp/src/barretenberg/chonk/batched_honk_translator/batched_honk_translator_verifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ typename BatchedHonkTranslatorVerifier_<Curve>::OinkResult BatchedHonkTranslator
5555

5656
return OinkResult{
5757
.public_inputs = mega_zk_verifier_instance->public_inputs,
58-
.calldata_commitment = mega_zk_verifier_instance->witness_commitments.calldata,
58+
.kernel_calldata_commitment = mega_zk_verifier_instance->witness_commitments.kernel_calldata,
5959
.ecc_op_wires = mega_zk_verifier_instance->witness_commitments.get_ecc_op_wires().get_copy(),
6060
};
6161
}

barretenberg/cpp/src/barretenberg/chonk/batched_honk_translator/batched_honk_translator_verifier.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ template <typename Curve> class BatchedHonkTranslatorVerifier_ {
9999
*/
100100
struct OinkResult {
101101
std::vector<FF> public_inputs;
102-
Commitment calldata_commitment;
102+
Commitment kernel_calldata_commitment;
103103
std::array<Commitment, MegaZKFlavorT::NUM_WIRES> ecc_op_wires;
104104
};
105105

@@ -114,7 +114,7 @@ template <typename Curve> class BatchedHonkTranslatorVerifier_ {
114114
/**
115115
* @brief Phase 1: Verify the MegaZK Oink phase on the shared transcript.
116116
* @details Loads mega_zk_proof into the transcript, runs OinkVerifier, stores verifier instance.
117-
* @return OinkResult with public inputs, calldata commitment, and ECC op wires.
117+
* @return OinkResult with public inputs, kernel calldata commitment, and ECC op wires.
118118
*/
119119
OinkResult verify_mega_zk_oink(const Proof& mega_zk_proof);
120120

barretenberg/cpp/src/barretenberg/chonk/chonk.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "barretenberg/translator_vm/translator_proving_key.hpp"
2020
#include "barretenberg/ultra_honk/oink_prover.hpp"
2121
#include "barretenberg/ultra_honk/oink_verifier.hpp"
22+
#include <array>
2223

2324
namespace bb {
2425

@@ -164,25 +165,24 @@ Chonk::PublicInputsResult Chonk::process_public_inputs_and_consistency_checks(
164165

165166
// Kernel return data
166167
bool kernel_return_data_match =
167-
kernel_input.kernel_return_data.get_value() == witness_commitments.calldata.get_value();
168+
kernel_input.kernel_return_data.get_value() == witness_commitments.kernel_calldata.get_value();
168169
BB_ASSERT_DEBUG(kernel_return_data_match,
169-
"kernel_return_data mismatch: proof contains " << kernel_input.kernel_return_data.get_value()
170-
<< " but calldata commitment is "
171-
<< witness_commitments.calldata.get_value());
172-
kernel_input.kernel_return_data.incomplete_assert_equal(witness_commitments.calldata);
173-
174-
// App return data. Mega currently exposes a single app calldata witness commitment
175-
// (`secondary_calldata`), so MAX_APPS_PER_KERNEL remains 1.
176-
static_assert(MAX_APPS_PER_KERNEL == 1, "Multiple app calldata witness columns are not wired yet");
170+
"kernel_return_data mismatch: proof contains "
171+
<< kernel_input.kernel_return_data.get_value() << " but kernel_calldata commitment is "
172+
<< witness_commitments.kernel_calldata.get_value());
173+
kernel_input.kernel_return_data.incomplete_assert_equal(witness_commitments.kernel_calldata);
174+
175+
const std::array app_calldata_commitments{ &witness_commitments.first_app_calldata,
176+
&witness_commitments.second_app_calldata,
177+
&witness_commitments.third_app_calldata };
177178
for (size_t idx = 0; idx < MAX_APPS_PER_KERNEL; ++idx) {
178179
bool app_return_data_match =
179-
kernel_input.app_return_data[idx].get_value() == witness_commitments.secondary_calldata.get_value();
180+
kernel_input.app_return_data[idx].get_value() == app_calldata_commitments[idx]->get_value();
180181
BB_ASSERT_DEBUG(app_return_data_match,
181182
"app_return_data mismatch: proof contains "
182-
<< kernel_input.app_return_data[idx].get_value()
183-
<< " but secondary_calldata commitment is "
184-
<< witness_commitments.secondary_calldata.get_value());
185-
kernel_input.app_return_data[idx].incomplete_assert_equal(witness_commitments.secondary_calldata);
183+
<< kernel_input.app_return_data[idx].get_value() << " but app calldata commitment "
184+
<< idx << " is " << app_calldata_commitments[idx]->get_value());
185+
kernel_input.app_return_data[idx].incomplete_assert_equal(*app_calldata_commitments[idx]);
186186
}
187187

188188
// ============= Perform accumulator hash consistency check =========================

barretenberg/cpp/src/barretenberg/chonk/chonk_verifier.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ template <> ChonkVerifier<false>::IPAReductionResult ChonkVerifier<false>::reduc
4242
}
4343

4444
// Step 2: Databus consistency check
45-
const Commitment calldata_commitment = oink_result.calldata_commitment;
45+
const Commitment kernel_calldata_commitment = oink_result.kernel_calldata_commitment;
4646
const Commitment return_data_commitment = kernel_io.kernel_return_data;
47-
bool databus_consistency_verified = (calldata_commitment == return_data_commitment);
47+
bool databus_consistency_verified = (kernel_calldata_commitment == return_data_commitment);
4848
vinfo("ChonkVerifier: databus consistency verified: ", databus_consistency_verified);
4949
if (!databus_consistency_verified) {
5050
info("ChonkVerifier: verification failed at databus consistency check");
@@ -146,11 +146,11 @@ template <> ChonkVerifier<true>::Output ChonkVerifier<true>::verify(const Proof&
146146
kernel_io.reconstruct_from_public(oink_result.public_inputs);
147147

148148
// Step 2: Databus consistency check (in-circuit)
149-
const Commitment calldata_commitment = oink_result.calldata_commitment;
150-
if (kernel_io.kernel_return_data.get_value() != calldata_commitment.get_value()) {
149+
const Commitment kernel_calldata_commitment = oink_result.kernel_calldata_commitment;
150+
if (kernel_io.kernel_return_data.get_value() != kernel_calldata_commitment.get_value()) {
151151
info("ChonkRecursiveVerifier: Databus Consistency check failure");
152152
}
153-
kernel_io.kernel_return_data.incomplete_assert_equal(calldata_commitment);
153+
kernel_io.kernel_return_data.incomplete_assert_equal(kernel_calldata_commitment);
154154

155155
// Step 3: Merge verification
156156
MergeCommitments merge_commitments{ .t_commitments = oink_result.ecc_op_wires,

barretenberg/cpp/src/barretenberg/chonk/mock_circuit_producer.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ namespace {
1313
/**
1414
* @brief Test utility for coordinating passing of databus data between mocked private function execution circuits
1515
* @details Facilitates testing of the databus consistency checks that establish the correct passing of databus data
16-
* between circuits. Generates arbitrary return data for each app/kernel. Sets the kernel calldata and
17-
* secondary_calldata based respectively on the previous kernel return data and app return data.
16+
* between circuits. Generates arbitrary return data for each app/kernel. Sets the kernel calldata and app calldata
17+
* columns based respectively on the previous kernel return data and each app return data.
1818
*/
1919
class MockDatabusProducer {
2020
private:
@@ -57,16 +57,16 @@ class MockDatabusProducer {
5757
};
5858

5959
/**
60-
* @brief Populate the calldata and secondary calldata in the kernel from respectively the previous kernel and app
61-
* return data. Update and populate the return data for the present kernel.
60+
* @brief Populate the kernel calldata and app calldata columns from respectively the previous kernel and app return
61+
* data. Update and populate the return data for the present kernel.
6262
*/
6363
void populate_kernel_databus(ClientCircuit& circuit)
6464
{
65-
// Populate calldata from previous kernel return data (if it exists)
65+
// Populate kernel calldata from previous kernel return data (if it exists)
6666
for (auto& val : kernel_return_data) {
6767
circuit.add_public_calldata(BusId::KERNEL_CALLDATA, circuit.add_variable(val));
6868
}
69-
// Populate secondary_calldata from app return data (if it exists), then clear the app return data
69+
// Populate app calldata from app return data (if it exists), then clear the app return data
7070
for (size_t idx = 0; idx < app_return_data.size(); ++idx) {
7171
for (auto& val : app_return_data[idx]) {
7272
circuit.add_public_calldata(static_cast<BusId>(idx + 1), circuit.add_variable(val));

barretenberg/cpp/src/barretenberg/circuit_checker/ultra_circuit_checker.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ template <typename Builder> bool UltraCircuitChecker::check_databus_read(auto& v
242242
auto value = values.w_l;
243243

244244
// Map bus_idx → wire-linear selector on the values struct (mirrors BusData<i>::selector in the relation).
245-
const std::array<const FF*, NUM_BUS_COLUMNS> bus_selectors{ &values.q_l, &values.q_r, &values.q_o };
245+
const std::array<const FF*, NUM_BUS_COLUMNS> bus_selectors{
246+
&values.q_l, &values.q_r, &values.q_o, &values.q_4, &values.q_m
247+
};
246248

247249
// Locate the bus column being read (exactly one selector should be active on a busread row) and look up the
248250
// expected value from the builder's bus vector.

barretenberg/cpp/src/barretenberg/constants.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ static constexpr uint32_t NUM_TRANSLATION_EVALUATIONS = 5;
6262
// The number of leading zero rows in the execution trace. Used to enable shifted polynomials.
6363
static constexpr size_t NUM_ZERO_ROWS = 1;
6464

65-
// The maximum number of app circuits a single kernel can recursively verify
66-
static constexpr uint8_t MAX_APPS_PER_KERNEL = 1;
65+
// The maximum number of app circuits a single kernel can recursively verify in one accumulation group.
66+
static constexpr uint8_t MAX_APPS_PER_KERNEL = 3;
6767

68-
static constexpr size_t CHONK_MAX_NUM_CIRCUITS = 56 + /*trailing kernels*/ 3;
68+
static constexpr size_t CHONK_MAX_NUM_CIRCUITS = 52 + /*trailing kernels*/ 3;
6969

7070
static constexpr size_t BATCH_MERGE_PROOF_SIZE =
7171
/*num subtables*/ 1 +

0 commit comments

Comments
 (0)