Skip to content

Commit f3e5328

Browse files
committed
docs(fast-inbox): state circuits and stdlib inbox comments on their own terms (A-1432)
1 parent 7db1054 commit f3e5328

17 files changed

Lines changed: 31 additions & 40 deletions

File tree

noir-projects/noir-protocol-circuits/crates/rollup-lib/src/abis/mod.nr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// TODO: Move to types/src/abis/rollup/
2-
// `l1_to_l2_message_sponge` is declared first because the serde `#[derive(...)]` macro requires a field type's module
3-
// to be declared before any struct that embeds it (see the ordering note in `types/src/lib.nr`).
2+
// `l1_to_l2_message_sponge` is declared first because the `#[derive(Serialize, Deserialize)]` macros require a field
3+
// type's module to be declared before any struct that embeds it (see the ordering note in `types/src/lib.nr`).
44
mod l1_to_l2_message_sponge;
55
mod l1_to_l2_message_bundle;
66
mod public_chonk_verifier_public_inputs;

noir-projects/noir-protocol-circuits/crates/rollup-lib/src/abis/root_rollup_public_inputs.nr

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ pub struct RootRollupPublicInputs {
1818
// The out hash of the first checkpoint in the epoch is inserted at index 0, the second at index 1, and so on.
1919
pub out_hash: Field,
2020
// Inbox rolling-hash chain segment consumed across the epoch: the chain value before the first checkpoint's
21-
// messages and after the last checkpoint's. Continuity within the range is enforced by the checkpoint merges;
22-
// L1 passes both through to proof verification without validating them until the Fast Inbox flip.
21+
// messages and after the last checkpoint's. Continuity within the range is enforced by the checkpoint merges.
2322
pub previous_inbox_rolling_hash: Field,
2423
pub end_inbox_rolling_hash: Field,
2524
// Checkpoint header hashes for each checkpoint in this epoch.

noir-projects/noir-protocol-circuits/crates/rollup-lib/src/block_merge/utils/validate_consecutive_block_rollups.nr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ fn assert_prev_block_rollups_follow_on_from_each_other(
4242
"Mismatched timestamps: expected right.timestamp to match left.timestamp",
4343
);
4444

45-
// TODO: Consider extracting into its own function:
46-
4745
// `is_first_block` originates from the first block root only, and is propagated through all merge steps via the
4846
// left rollup only (see merge_block_rollups.nr). We prevent the right rollup from carrying it, so it's impossible
4947
// for any block but the first to propagate `is_first_block == true` up to the checkpoint root.

noir-projects/noir-protocol-circuits/crates/rollup-lib/src/checkpoint_merge/utils/validate_consecutive_checkpoint_rollups.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn assert_rollups_follow_on_from_each_other(
3131

3232
// The inbox rolling-hash chain must be continuous across consecutive checkpoints: the right checkpoint's chain must
3333
// start where the left checkpoint's chain ended. An end-only anchor would let a prover restart the chain from an
34-
// earlier bucket and re-insert already-consumed messages, so continuity is enforced here (see AZIP-22).
34+
// earlier bucket and re-insert already-consumed messages, so continuity is enforced here.
3535
assert_eq(
3636
left.end_inbox_rolling_hash,
3737
right.start_inbox_rolling_hash,

noir-projects/noir-protocol-circuits/crates/rollup-lib/src/checkpoint_root/checkpoint_root_rollup.nr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ global ALLOWED_PREVIOUS_VK_INDICES: [u32; 7] = [
2929

3030
pub struct CheckpointRootRollupPrivateInputs {
3131
pub(crate) previous_rollups: [RollupHonkProofData<BlockRollupPublicInputs>; 2],
32-
// Inbox parity proof over the checkpoint's L1-to-L2 messages. One variable-size proof per checkpoint (AZIP-22 Fast
33-
// Inbox): the checkpoint root is the only circuit that sees the whole checkpoint's message commitments.
32+
// Inbox parity proof over the checkpoint's L1-to-L2 messages. One variable-size proof per checkpoint: the
33+
// checkpoint root is the only circuit that sees the whole checkpoint's message commitments.
3434
pub(crate) inbox_parity: UltraHonkProofData<ParityPublicInputs>,
3535
pub(crate) hints: CheckpointRootRollupHints,
3636
}

noir-projects/noir-protocol-circuits/crates/rollup-lib/src/checkpoint_root/checkpoint_root_single_block_rollup.nr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ global ALLOWED_PREVIOUS_VK_INDICES: [u32; 4] = [
3232

3333
pub struct CheckpointRootSingleBlockRollupPrivateInputs {
3434
pub(crate) previous_rollup: RollupHonkProofData<BlockRollupPublicInputs>,
35-
// Inbox parity proof over the checkpoint's L1-to-L2 messages. One variable-size proof per checkpoint (AZIP-22 Fast
36-
// Inbox): the checkpoint root is the only circuit that sees the whole checkpoint's message commitments.
35+
// Inbox parity proof over the checkpoint's L1-to-L2 messages. One variable-size proof per checkpoint: the
36+
// checkpoint root is the only circuit that sees the whole checkpoint's message commitments.
3737
pub(crate) inbox_parity: UltraHonkProofData<ParityPublicInputs>,
3838
pub(crate) hints: CheckpointRootRollupHints,
3939
}

noir-projects/noir-protocol-circuits/crates/rollup-lib/src/checkpoint_root/components/checkpoint_rollup_public_inputs_composer.nr

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,8 @@ impl<let NumBlobs: u32> CheckpointRollupPublicInputsComposer<NumBlobs> {
117117
new_archive: merged_rollup.new_archive,
118118
previous_out_hash: self.previous_out_hash,
119119
new_out_hash,
120-
// Sourced from the inbox parity proof (parity moved to the checkpoint root in AZIP-22 Fast Inbox), which
121-
// commits to the same message list behind the L1-checked `in_hash`. Checkpoint merges assert continuity
122-
// across checkpoints (`right.start == left.end`).
120+
// Sourced from the inbox parity proof, which commits to the same message list behind the L1-checked
121+
// `in_hash`. Checkpoint merges assert continuity across checkpoints (`right.start == left.end`).
123122
start_inbox_rolling_hash: self.parity.start_rolling_hash,
124123
end_inbox_rolling_hash: self.parity.end_rolling_hash,
125124
checkpoint_header_hashes,

noir-projects/noir-protocol-circuits/crates/rollup-lib/src/parity/inbox_parity.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub struct InboxParityPrivateInputs<let S: u32> {
2828

2929
/// The Inbox Parity circuit recomputes, for one checkpoint, the Inbox rolling-hash chain over the checkpoint's real
3030
/// L1-to-L2 messages and absorbs the same real messages into the message-bundle sponge. It replaces the parity base +
31-
/// parity root family with a single variable-size proof per checkpoint (AZIP-22 Fast Inbox / A-1376 topology).
31+
/// parity root family with a single variable-size proof per checkpoint.
3232
///
3333
/// This circuit:
3434
/// - Chains the `num_msgs` real messages into the rolling hash (two sha256 compressions per leaf)

yarn-project/ethereum/src/contracts/rollup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ export type EpochProofPublicInputArgs = {
6868
previousArchive: `0x${string}`;
6969
endArchive: `0x${string}`;
7070
outHash: `0x${string}`;
71-
/** Inbox rolling hash before the epoch's first checkpoint; unvalidated by L1 until the Fast Inbox flip. */
71+
/** Inbox rolling hash before the epoch's first checkpoint's messages. */
7272
previousInboxRollingHash: `0x${string}`;
73-
/** Inbox rolling hash after the epoch's last checkpoint; unvalidated by L1 until the Fast Inbox flip. */
73+
/** Inbox rolling hash after the epoch's last checkpoint's messages. */
7474
endInboxRollingHash: `0x${string}`;
7575
proverId: `0x${string}`;
7676
};

yarn-project/ivc-integration/src/base_parity_inputs.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
* Run with: BASE_PARITY_BENCH_DIR=./bench-out yarn workspace @aztec/ivc-integration test src/base_parity_inputs.test.ts
66
*
7-
* The parity base/root circuits were replaced by the single variable-size InboxParity circuit (AZIP-22 Fast Inbox);
8-
* this benchmark now targets the 256-message rung (`InboxParity256`), matching the old base-parity circuit's size. The
7+
* The parity base/root circuits were replaced by the single variable-size InboxParity circuit; this benchmark now
8+
* targets the 256-message rung (`InboxParity256`), matching the old base-parity circuit's size. The
99
* output files keep their legacy `parity_base.json` / `witness.gz` names because `ci_benchmark_ultrahonk_circuits.sh`
1010
* locates inputs as `${circuit_name}.json` with `circuit_name=parity_base`.
1111
*/

0 commit comments

Comments
 (0)