Skip to content

Commit b3444c2

Browse files
AztecBotspalladinospypsyAztecBotalexghr
authored
chore: merge next into merge-train/fairies (#23021)
Same single conflict as PR #22991, recurring because new commits landed on `next` (e.g. #23011, p2p versioning, AVM tx changes) before fairies merged forward. Conflict in `yarn-project/pxe/src/pxe.ts` around the PXE store-construction block — `merge-train/fairies` uses the `openPxeStores(store, initialBlockHash)` factory; `next` still has the inline `new AddressStore / ... / new L2TipsKVStore(store, 'pxe', initialBlockHash)` pattern. Resolution keeps the factory; `initialBlockHash` is already threaded through it. No other files needed in this round — the previous round's `schema_tests.ts` follow-up is already on the branch. All five `new L2TipsKVStore(...)` callers in yarn-project pass the three required args. Details: https://gist.github.com/AztecBot/cee6d74ae6e439f71f16de4ef05e5a12 CI will validate the merge. ClaudeBox log: https://claudebox.work/s/8a13135d95b87e96?run=3 --------- Co-authored-by: Santiago Palladino <santiago@aztecprotocol.com> Co-authored-by: spypsy <spypsy@outlook.com> Co-authored-by: AztecBot <tech@aztecprotocol.com> Co-authored-by: Alex Gherghisan <alexghr@users.noreply.github.com> Co-authored-by: ledwards2225 <98505400+ledwards2225@users.noreply.github.com> Co-authored-by: rkarabut <ratmir@aztecprotocol.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Ratmir Karabut <rkarabut@users.noreply.github.com> Co-authored-by: federicobarbacovi <171914500+federicobarbacovi@users.noreply.github.com> Co-authored-by: ledwards2225 <l.edwards.d@gmail.com> Co-authored-by: Jean M <132435771+jeanmon@users.noreply.github.com> Co-authored-by: PhilWindle <60546371+PhilWindle@users.noreply.github.com> Co-authored-by: Rumata888 <isennovskiy@gmail.com> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> Co-authored-by: sergei iakovenko <105737703+iakovenkos@users.noreply.github.com> Co-authored-by: iakovenkos <sergey.s.yakovenko@gmail.com>
1 parent 9a59ef0 commit b3444c2

57 files changed

Lines changed: 738 additions & 682 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.

SECURITY.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ We welcome external submissions in the meantime. To submit a vulnerability, plea
66

77
## Reporting Security Vulnerabilities
88

9-
- **Do not** open public GitHub issues or pull requests for suspected security vulnerabilities.
9+
Please use [Aztec Network Bug Bounty](https://cantina.xyz/bounties/80e74370-10d8-4e52-8e4b-7294deb7c9ee) to submit vulnerabilities. If the vulnerability is not in scope of the bug bounty program, please use the following procedure.
1010

11-
Instead, please use the [Private Vulnerability Reporting](https://github.com/AztecProtocol/aztec-packages/security/advisories/new) process on GitHub.
11+
**Do not** open public GitHub issues or pull requests for suspected security vulnerabilities.
12+
13+
Instead, please use the [Private Vulnerability Reporting](https://github.com/AztecProtocol/aztec-packages/security/advisories/new) process on GitHub.
1214

1315
- Navigate to the "Security" tab of this repository.
1416
- Click "Report a vulnerability" on the left sidebar.

barretenberg/cpp/CLAUDE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,27 @@ Key constants to watch:
108108

109109
If C++ static_asserts fail after your changes, update both the assert values AND the corresponding Noir constants, then run `yarn remake-constants`.
110110

111+
## Prover.toml Fixtures
112+
113+
Proof-length-affecting changes (e.g. `CHONK_PROOF_LENGTH` bumps from MegaFlavor entity additions) make the committed `Prover.toml` fixtures stale. `nargo execute --program-dir <crate>` then fails with `Type Array { length: N, typ: Field } is expected to have length N but value Vec(...)`.
114+
115+
Regenerate via the e2e prover full test with fake proofs:
116+
117+
```bash
118+
cd yarn-project
119+
AZTEC_GENERATE_TEST_DATA=1 FAKE_PROOFS=1 yarn workspace @aztec/end-to-end test full.test
120+
```
121+
122+
`FAKE_PROOFS=1` skips real proving — runs in ~2 min (orchestrator + witness generation only). Writes 12 `Prover.toml` files under `noir-projects/noir-protocol-circuits/crates/<circuit>/Prover.toml`.
123+
124+
For circuits not exercised by `full.test.ts` (`rollup-tx-merge`, `rollup-block-root`, `rollup-block-root-single-tx`, `rollup-block-merge`, `rollup-checkpoint-root`, `rollup-block-root-first-empty-tx`), additionally run:
125+
126+
```bash
127+
AZTEC_GENERATE_TEST_DATA=1 yarn workspace @aztec/prover-client test orchestrator_single_checkpoint
128+
```
129+
130+
Verify with `nargo execute --program-dir noir-projects/noir-protocol-circuits/crates/<crate>` for any previously-failing crate; should print `Circuit witness successfully solved`.
131+
111132
## Verification Keys
112133

113134
**IMPORTANT**: When making barretenberg changes that could affect verification keys, you must verify that VKs haven't changed unexpectedly, or

barretenberg/cpp/pil/vm2/precomputed.pil

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ pol constant sel_mem_tag_out_of_range;
209209
// - instruction size (in bytes): instr_size
210210
// - Selector on whether the instruction has a tag: sel_has_tag
211211
// - Selector on whether operand op2 is a tag: sel_tag_is_op2
212-
//
212+
//
213213
// Used by the instruction fetching subtrace to decode raw bytecode.
214214
// Selectors for operands decomposition into bytes (required by instr_fetching.pil)
215215
// This table is populated by a map generated by a cpp test defined in op_decomposition.test.cpp.
@@ -361,22 +361,23 @@ pol constant addressing_gas;
361361
// properties: which tree operations are allowed, public-input offsets, revert behavior.
362362
// Used by the transaction trace to enforce phase-based constraints.
363363
//
364-
// Example trace (idx encodes the TransactionPhase enum; abbreviated column names):
365-
// idx | sel_phase | is_call | is_teardown | is_collect_fee | is_tree_padding | is_cleanup | is_revertible | nr_null | nr_note | nr_l2l1 | r_null | r_note | r_l2l1 | next_on_revert
366-
// ----+-----------+---------+-------------+----------------+-----------------+------------+---------------+---------+---------+---------+--------+--------+--------+---------------
367-
// 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 (NR_NULLIFIER_INSERTION)
368-
// 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 (NR_NOTE_INSERTION)
369-
// 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 (NR_L2_TO_L1_MESSAGE)
370-
// 3 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 (SETUP)
371-
// 4 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 8 (R_NULLIFIER_INSERTION)
372-
// 5 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 8 (R_NOTE_INSERTION)
373-
// 6 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 8 (R_L2_TO_L1_MESSAGE)
374-
// 7 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 8 (APP_LOGIC)
375-
// 8 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 9 (TEARDOWN)
376-
// 9 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 (COLLECT_GAS_FEES)
377-
// 10 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 (TREE_PADDING)
378-
// 11 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 (CLEANUP)
379-
// 12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 (beyond phase range)
364+
// Example trace (idx encodes the TransactionPhase enum; abbreviated column names).
365+
// Whether an append is revertible or not is determined by `is_revertible`.
366+
// idx | sel_phase | is_call | is_teardown | is_collect_fee | is_tree_padding | is_cleanup | is_revertible | append_null | append_note | append_l2l1 | next_on_revert
367+
// ----+-----------+---------+-------------+----------------+-----------------+------------+---------------+-------------+-------------+-------------+---------------
368+
// 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 (NR_NULLIFIER_INSERTION)
369+
// 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 (NR_NOTE_INSERTION)
370+
// 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 (NR_L2_TO_L1_MESSAGE)
371+
// 3 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 (SETUP)
372+
// 4 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 8 (R_NULLIFIER_INSERTION)
373+
// 5 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 8 (R_NOTE_INSERTION)
374+
// 6 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 8 (R_L2_TO_L1_MESSAGE)
375+
// 7 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 8 (APP_LOGIC)
376+
// 8 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 9 (TEARDOWN)
377+
// 9 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 (COLLECT_GAS_FEES)
378+
// 10 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 (TREE_PADDING)
379+
// 11 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 (CLEANUP)
380+
// 12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 (beyond phase range)
380381

381382
// Phase Table for Tx Trace
382383
pol constant sel_phase; // Selector for phase table
@@ -389,12 +390,9 @@ pol constant is_cleanup;
389390
pol constant is_revertible;
390391
pol constant read_pi_start_offset;
391392
pol constant read_pi_length_offset;
392-
pol constant sel_non_revertible_append_note_hash;
393-
pol constant sel_non_revertible_append_nullifier;
394-
pol constant sel_non_revertible_append_l2_l1_msg;
395-
pol constant sel_revertible_append_note_hash;
396-
pol constant sel_revertible_append_nullifier;
397-
pol constant sel_revertible_append_l2_l1_msg;
393+
pol constant sel_append_note_hash;
394+
pol constant sel_append_nullifier;
395+
pol constant sel_append_l2_l1_msg;
398396
pol constant next_phase_on_revert;
399397

400398
// ===== Section 12: Keccak round constants =====

barretenberg/cpp/pil/vm2/tx.pil

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,9 @@ namespace tx;
209209
is_revertible,
210210
read_pi_start_offset,
211211
read_pi_length_offset,
212-
sel_non_revertible_append_note_hash,
213-
sel_non_revertible_append_nullifier,
214-
sel_non_revertible_append_l2_l1_msg,
215-
sel_revertible_append_note_hash,
216-
sel_revertible_append_nullifier,
217-
sel_revertible_append_l2_l1_msg,
212+
sel_append_note_hash,
213+
sel_append_nullifier,
214+
sel_append_l2_l1_msg,
218215
next_phase_on_revert
219216
}
220217
in
@@ -228,12 +225,9 @@ namespace tx;
228225
precomputed.is_revertible,
229226
precomputed.read_pi_start_offset,
230227
precomputed.read_pi_length_offset,
231-
precomputed.sel_non_revertible_append_note_hash,
232-
precomputed.sel_non_revertible_append_nullifier,
233-
precomputed.sel_non_revertible_append_l2_l1_msg,
234-
precomputed.sel_revertible_append_note_hash,
235-
precomputed.sel_revertible_append_nullifier,
236-
precomputed.sel_revertible_append_l2_l1_msg,
228+
precomputed.sel_append_note_hash,
229+
precomputed.sel_append_nullifier,
230+
precomputed.sel_append_l2_l1_msg,
237231
precomputed.next_phase_on_revert
238232
};
239233

@@ -465,18 +459,16 @@ namespace tx;
465459
/***************************************************************************
466460
* Private Side Effect Insertions
467461
**************************************************************************/
468-
pol commit sel_revertible_append_note_hash; // @boolean
469-
pol commit sel_non_revertible_append_note_hash; // @boolean
470-
pol commit sel_revertible_append_nullifier; // @boolean
471-
pol commit sel_non_revertible_append_nullifier; // @boolean
472-
pol commit sel_revertible_append_l2_l1_msg; // @boolean
473-
pol commit sel_non_revertible_append_l2_l1_msg; // @boolean
474-
// The 6 above selectors are booleans thanks to #[READ_PHASE_SPEC] on active rows.
462+
pol commit sel_append_note_hash; // @boolean
463+
pol commit sel_append_nullifier; // @boolean
464+
pol commit sel_append_l2_l1_msg; // @boolean
465+
// The 3 above selectors are booleans thanks to #[READ_PHASE_SPEC] on active rows.
475466
// Furthermore, phase spec guarantees that they are mutually exclusive.
467+
// Whether such an append is revertible or not is determined by `is_revertible`.
476468

477469
// A tree selector means we need to get the tree value
478-
pol commit is_tree_insert_phase; // @boolean on active rows (follows from mutual exclusivity of the 6 above selectors)
479-
is_tree_insert_phase = sel_revertible_append_note_hash + sel_non_revertible_append_note_hash + sel_revertible_append_nullifier + sel_non_revertible_append_nullifier;
470+
pol commit is_tree_insert_phase; // @boolean on active rows (follows from mutual exclusivity of the above selectors)
471+
is_tree_insert_phase = sel_append_note_hash + sel_append_nullifier;
480472
pol commit leaf_value;
481473
// Shared column to track the inverse of the remaining side effects for note hashes, nullifiers, and L2 to L1 messages
482474
pol commit remaining_side_effects_inv;
@@ -491,7 +483,7 @@ namespace tx;
491483

492484
// ===== NOTE HASHES =====
493485
pol commit sel_try_note_hash_append; // @boolean (follows from definition)
494-
sel_try_note_hash_append = (sel - is_padded) * (sel_revertible_append_note_hash + sel_non_revertible_append_note_hash);
486+
sel_try_note_hash_append = (sel - is_padded) * sel_append_note_hash;
495487

496488
// If we are at the maximum emitted note hashes, we must revert
497489
pol REMAINING_NOTE_HASH_WRITES = constants.MAX_NOTE_HASHES_PER_TX - prev_num_note_hashes_emitted;
@@ -509,7 +501,9 @@ namespace tx;
509501
prev_note_hash_tree_size,
510502
prev_note_hash_tree_root,
511503
precomputed.zero, // Already siloed. (No need to pass address.)
512-
sel_revertible_append_note_hash, // Not unique for revertible note hashes.
504+
is_revertible, // Used as `sel_unique`: revertible note hashes need to be made unique with a nonce.
505+
// On rows where sel_note_hash_append == 1 (NR_NOTE_INSERTION or R_NOTE_INSERTION),
506+
// is_revertible is exactly the discriminator we want.
513507
prev_num_note_hashes_emitted,
514508
discard, // from tx_discard.pil virtual trace
515509
next_note_hash_tree_root
@@ -532,7 +526,7 @@ namespace tx;
532526

533527
// ===== NULLIFIERS =====
534528
pol commit sel_try_nullifier_append; // @boolean (follows from definition)
535-
sel_try_nullifier_append = (sel - is_padded) * (sel_revertible_append_nullifier + sel_non_revertible_append_nullifier);
529+
sel_try_nullifier_append = (sel - is_padded) * sel_append_nullifier;
536530

537531
pol commit nullifier_limit_error; // @boolean
538532
nullifier_limit_error * (1 - nullifier_limit_error) = 0;
@@ -594,7 +588,7 @@ namespace tx;
594588

595589
// ===== L2 - L1 Messages =====
596590
pol commit sel_try_l2_l1_msg_append; // @boolean (follows from definition)
597-
sel_try_l2_l1_msg_append = (sel - is_padded) * (sel_revertible_append_l2_l1_msg + sel_non_revertible_append_l2_l1_msg);
591+
sel_try_l2_l1_msg_append = (sel - is_padded) * sel_append_l2_l1_msg;
598592

599593
pol commit l2_l1_msg_contract_address;
600594
pol commit l2_l1_msg_recipient;

barretenberg/cpp/pil/vm2/tx_context.pil

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,12 @@ namespace tx;
330330
NOT_LAST_ROW * (1 - is_teardown') * (da_gas_limit - da_gas_limit') = 0;
331331

332332
// Selectors to allow prev => next state changes in the different phases
333-
pol SEL_CAN_EMIT_NOTE_HASH = is_public_call_request + sel_non_revertible_append_note_hash + sel_revertible_append_note_hash;
334-
pol SEL_CAN_EMIT_NULLIFIER = is_public_call_request + sel_non_revertible_append_nullifier + sel_revertible_append_nullifier;
333+
pol SEL_CAN_EMIT_NOTE_HASH = is_public_call_request + sel_append_note_hash;
334+
pol SEL_CAN_EMIT_NULLIFIER = is_public_call_request + sel_append_nullifier;
335335
pol SEL_CAN_WRITE_PUBLIC_DATA = is_public_call_request + is_collect_fee;
336336
pol SEL_CAN_WRITE_WRITTEN_PUBLIC_DATA_SLOTS = is_public_call_request;
337337
pol SEL_CAN_EMIT_PUBLIC_LOG = is_public_call_request;
338-
pol SEL_CAN_EMIT_L2_L1_MSG = is_public_call_request + sel_non_revertible_append_l2_l1_msg + sel_revertible_append_l2_l1_msg;
338+
pol SEL_CAN_EMIT_L2_L1_MSG = is_public_call_request + sel_append_l2_l1_msg;
339339
// The 6 above selectors are booleans on active rows due to #[READ_PHASE_SPEC] and
340340
// mutual exclusivity of the selectors on the right-hand side.
341341

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,12 @@ class BatchedHonkTranslatorTests : public ::testing::Test {
140140
m.add_entry(round, "ECC_OP_WIRE_" + std::to_string(i), G);
141141
}
142142
// DataBus entities:
143-
for (const auto& label : { "CALLDATA",
144-
"CALLDATA_READ_COUNTS",
145-
"SECONDARY_CALLDATA",
146-
"SECONDARY_CALLDATA_READ_COUNTS",
147-
"RETURN_DATA",
148-
"RETURN_DATA_READ_COUNTS" }) {
143+
for (const auto& label : { "KERNEL_CALLDATA",
144+
"KERNEL_CALLDATA_READ_COUNTS",
145+
"APP_CALLDATA",
146+
"APP_CALLDATA_READ_COUNTS",
147+
"RETURNDATA",
148+
"RETURNDATA_READ_COUNTS" }) {
149149
m.add_entry(round, label, G);
150150
}
151151
m.add_challenge(round, "eta");
@@ -160,9 +160,9 @@ class BatchedHonkTranslatorTests : public ::testing::Test {
160160

161161
// ── Round 2: MegaZK logderiv inverses + Z_PERM + translator Oink ─────────
162162
m.add_entry(round, "LOOKUP_INVERSES", G);
163-
m.add_entry(round, "CALLDATA_INVERSES", G);
164-
m.add_entry(round, "SECONDARY_CALLDATA_INVERSES", G);
165-
m.add_entry(round, "RETURN_DATA_INVERSES", G);
163+
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);
166166
m.add_entry(round, "Z_PERM", G);
167167
// Translator Oink: vk_hash, masking commitment, 10 wire commitments
168168
m.add_entry(round, "vk_hash", Fr);

0 commit comments

Comments
 (0)