Skip to content

Commit 450d47b

Browse files
committed
Cleanup.
1 parent ce76375 commit 450d47b

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ pub struct BlockRollupPublicInputs {
4747

4848
// Root of the tree composed of all `out_hash` values from txs in this block. This root is combined with the
4949
// `out_hash` values from other blocks within the same checkpoint to form a wonky tree. The `out_hash` roots from
50-
// all checkpoints in an epoch then form another wonky tree, whose root becomes the final **root** `out_hash` stored
51-
// on L1.
50+
// all checkpoints in an epoch then form another tree, whose root becomes the final **root** `out_hash` inserted
51+
// into the Outbox on L1.
5252
pub out_hash: Field,
5353

5454
// Accumulated fees for all blocks in this block range.

noir-projects/noir-protocol-circuits/crates/rollup-lib/src/checkpoint_merge/tests/consecutive_checkpoint_rollups_tests.nr

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,30 @@ use types::{
77
traits::Empty,
88
};
99

10+
// -- checkpoint header hashes ---
11+
12+
#[test]
13+
fn accumulated_checkpoint_header_hashes_from_both_sides() {
14+
let mut builder = TestBuilder::new(
15+
CHECKPOINT_MERGE_ROLLUP_VK_INDEX,
16+
2,
17+
CHECKPOINT_MERGE_ROLLUP_VK_INDEX,
18+
2,
19+
);
20+
21+
let checkpoint_header_hashes = [123, 456, 7890, 12345];
22+
23+
builder.left_rollup.checkpoint_header_hashes[0] = checkpoint_header_hashes[0];
24+
builder.left_rollup.checkpoint_header_hashes[1] = checkpoint_header_hashes[1];
25+
builder.right_rollup.checkpoint_header_hashes[0] = checkpoint_header_hashes[2];
26+
builder.right_rollup.checkpoint_header_hashes[1] = checkpoint_header_hashes[3];
27+
28+
let pi = builder.execute();
29+
builder.assert_expected_public_inputs(pi);
30+
31+
assert_eq(pi.checkpoint_header_hashes, pad_end(checkpoint_header_hashes));
32+
}
33+
1034
// --- out_hashes ---
1135

1236
#[test]

0 commit comments

Comments
 (0)