Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7d2df16
fix(archiver): distinguish RPC uncertainty from chain replacement and…
spalladino Sep 9, 2026
ea25fe6
fix(l1-artifacts): export the libraries the generic Rollup deployer h…
spalladino Sep 9, 2026
fd50722
fix(stdlib): measure checkpoint proposal size from its serialization
spalladino Sep 9, 2026
af8ccfc
fix(sequencer): reject a production config that cannot clear a mandat…
spalladino Sep 9, 2026
00a1235
fix(sequencer): budget the proposal send against the receive window, …
spalladino Sep 9, 2026
b881a5d
fix(validator): bound checkpoint validation and stop retries nobody r…
spalladino Sep 9, 2026
6f00664
fix(prover): join proof arrival with local completion before handing …
spalladino Sep 9, 2026
bd21163
test(prover): model parity and empty blocks the way the orchestrator …
spalladino Sep 9, 2026
4ef9a73
test: make three fixtures exercise what they claim to
spalladino Sep 9, 2026
198f554
fix(validator): separate an unexpected Inbox range-read failure from …
spalladino Sep 9, 2026
5397c7d
refactor: drop unused streaming Inbox plumbing
spalladino Sep 9, 2026
477df97
test(stdlib): drop an await on a synchronous tx hash
spalladino Sep 9, 2026
63b803a
refactor: drop dead resolution branch and global range-read log cache
spalladino Sep 9, 2026
632a856
fix(prover): publish a block's archive only once its fork is closed
spalladino Sep 9, 2026
2c0fbae
fix(validator): carry the duty budget through every checkpoint valida…
spalladino Sep 10, 2026
86cafd4
fix(archiver): keep an unreadable certified syncpoint from authorizin…
spalladino Sep 10, 2026
a87164c
docs(sequencer): state how far the Inbox capacity floor's fast-profil…
spalladino Sep 10, 2026
f13bb9e
fix(validator): charge a duty that ran out to nobody, rather than to …
spalladino Sep 10, 2026
f46347a
fix(validator): close the remaining gaps in the duty budget and the u…
spalladino Sep 10, 2026
d03049f
fix(sequencer): exempt the e2e cadence from the Inbox catch-up floor
spalladino Sep 10, 2026
97504b8
test(e2e): give proof_boundary a propagation budget that clears the I…
spalladino Sep 10, 2026
9a21000
fix(sequencer): do not start a tx poll the proposal send budget canno…
spalladino Sep 10, 2026
69e96fd
fix(sequencer): do not wait out a sub-slot the proposal send budget c…
spalladino Sep 10, 2026
2e73850
test(e2e): hold block production to force the same-block message consume
spalladino Sep 10, 2026
cd5d1f4
test(archiver): drain the block-triggered sync inside the local-block…
spalladino Sep 10, 2026
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
1 change: 1 addition & 0 deletions l1-contracts/l1-artifacts/scripts/generate-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ contracts=(
"EscapeHatch"
"SlashingProposer"
"EmpireBase"
"EpochProofExtLib"
"RollupOperationsExtLib"
"ValidatorOperationsExtLib"
"RewardExtLib"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use types::{
},
hash::{poseidon2_hash, poseidon2_hash_with_separator},
merkle_tree::{
append_only_tree::append_leaves_to_snapshot, compute_empty_tree_root, MerkleTree,
append_only_tree::append_leaves_to_snapshot, MerkleTree,
test_utils::SingleSubtreeMerkleTree,
},
proof::proof_data::{AvmV2ProofData, ProofData},
Expand Down Expand Up @@ -139,52 +139,6 @@ impl RollupFixtureBuilder {
(previous_snapshot, sibling_path_for_insertion)
}

pub fn build_l1_to_l2_message_subtree_for_insertion(
self,
slot_number: Field,
) -> (AppendOnlyTreeSnapshot, [Field; L1_TO_L2_MSG_TREE_HEIGHT - L1_TO_L2_MSG_SUBTREE_HEIGHT], AppendOnlyTreeSnapshot) {
// Create a subtree of size 4 filled with subtree roots before the current slot.
let new_slot_index = self.get_l1_to_l2_message_next_available_leaf_index(slot_number - 1)
as u32
>> L1_TO_L2_MSG_SUBTREE_HEIGHT;
let start_slot_index = new_slot_index - new_slot_index % 4;
let mut subtree_roots = [0; 4];
for i in start_slot_index..new_slot_index {
subtree_roots[i % 4] =
self.get_l1_to_l2_message_subtree_root(slot_number - 4 + i as Field);
}
let empty_subtree_root = compute_empty_tree_root::<L1_TO_L2_MSG_SUBTREE_HEIGHT>();
subtree_roots[new_slot_index % 4] = empty_subtree_root;

let mut tree = SingleSubtreeMerkleTree::<4, 2, L1_TO_L2_MSG_TREE_HEIGHT - L1_TO_L2_MSG_SUBTREE_HEIGHT>::new_tree_roots_at_index::<L1_TO_L2_MSG_SUBTREE_HEIGHT>(
subtree_roots,
start_slot_index as Field,
);
let previous_snapshot = AppendOnlyTreeSnapshot {
root: tree.get_root(),
next_available_leaf_index: self.get_l1_to_l2_message_next_available_leaf_index(
slot_number - 1,
),
};

// Get the sibling path for inserting the current l1-to-l2 messages.
let sibling_path_for_insertion = tree.get_sibling_path(new_slot_index as Field);

// Insert subtree of the current l1-to-l2 messages.
tree.update_leaf(
new_slot_index as Field,
self.get_l1_to_l2_message_subtree_root(slot_number),
);
let new_snapshot = AppendOnlyTreeSnapshot {
root: tree.get_root(),
next_available_leaf_index: self.get_l1_to_l2_message_next_available_leaf_index(
slot_number,
),
};

(previous_snapshot, sibling_path_for_insertion, new_snapshot)
}

/// Builds a per-block L1-to-L2 message bundle appended to an empty tree, returning
/// `(previous_snapshot, leaves, frontier_hint, new_snapshot)`. The resulting `new_snapshot` is exactly what the
/// block root circuit recomputes from the same inputs.
Expand Down Expand Up @@ -588,10 +542,6 @@ impl RollupFixtureBuilder {
}
}

fn get_l1_to_l2_message_subtree_root(_self: Self, slot_number: Field) -> Field {
slot_number * 7639901
}

fn get_l1_to_l2_message_next_available_leaf_index(_self: Self, slot_number: Field) -> Field {
(slot_number + 1) * (1 << L1_TO_L2_MSG_SUBTREE_HEIGHT) as Field
}
Expand Down
346 changes: 330 additions & 16 deletions yarn-project/archiver/src/archiver-sync.test.ts

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions yarn-project/archiver/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,12 @@ export class BlockAlreadyCheckpointedError extends Error {
export class InboxMessagePrefixChangedError extends Error {
constructor(
public readonly totalMessageCount: bigint,
public readonly expected: Fr,
/** The rolling hash the prefix was expected to have, when a caller knows it for this exact count. */
public readonly expected: Fr | undefined,
public readonly actual: Fr | undefined,
) {
super(
`Inbox message prefix at count ${totalMessageCount} changed from ${expected.toString()} to ` +
`Inbox message prefix at count ${totalMessageCount} changed from ${expected?.toString() ?? 'unavailable'} to ` +
`${actual?.toString() ?? 'unavailable'} while a replacement was being prepared`,
);
this.name = 'InboxMessagePrefixChangedError';
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/archiver/src/modules/data_store_updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ export class ArchiverDataStoreUpdater {
if (block === undefined || block.header.getBlockNumber() !== blockNumber) {
throw new Error(`Block ${blockNumber} is missing from the store`);
}
return BigInt(block.header.state.l1ToL2MessageTree.nextAvailableLeafIndex);
return blockLeafCount(block);
}

/**
Expand Down
Loading
Loading