From a165d58f11cdcabda188a304760961edd4ed81c1 Mon Sep 17 00:00:00 2001 From: Derek Cofausper <256792747+decofe@users.noreply.github.com> Date: Thu, 16 Jul 2026 18:50:46 +0000 Subject: [PATCH 1/3] docs(spec): restore BatchOutput definition --- specs/spec.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/specs/spec.md b/specs/spec.md index 0440fd35f..3c523c7c8 100644 --- a/specs/spec.md +++ b/specs/spec.md @@ -1288,6 +1288,26 @@ pub struct L1StateRead { The state transition function produces: +```rust +pub struct BatchOutput { + /// Zone block hash transition (previous -> final) + pub block_transition: BlockTransition, + + /// Deposit queue processing + pub deposit_queue_transition: DepositQueueTransition, + + /// Withdrawal queue hash chain for this batch (0 if no withdrawals) + pub withdrawal_queue_hash: B256, + + /// Withdrawal batch index read from ZoneOutbox.lastBatch + pub last_batch_commitment: LastBatchCommitment, +} + +pub struct LastBatchCommitment { + pub withdrawal_batch_index: u64, +} +``` + | Field | Description | |-------|-------------| | `block_transition` | `prev_block_hash` to `next_block_hash` covering all blocks in the batch | From 1dcb1ee6552f8628ec2100d9f38d722e0f2b0abb Mon Sep 17 00:00:00 2001 From: Derek Cofausper <256792747+decofe@users.noreply.github.com> Date: Thu, 16 Jul 2026 18:52:49 +0000 Subject: [PATCH 2/3] docs(spec): move BatchOutput to common types --- specs/spec.md | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/specs/spec.md b/specs/spec.md index 3c523c7c8..79e1305a4 100644 --- a/specs/spec.md +++ b/specs/spec.md @@ -1288,26 +1288,6 @@ pub struct L1StateRead { The state transition function produces: -```rust -pub struct BatchOutput { - /// Zone block hash transition (previous -> final) - pub block_transition: BlockTransition, - - /// Deposit queue processing - pub deposit_queue_transition: DepositQueueTransition, - - /// Withdrawal queue hash chain for this batch (0 if no withdrawals) - pub withdrawal_queue_hash: B256, - - /// Withdrawal batch index read from ZoneOutbox.lastBatch - pub last_batch_commitment: LastBatchCommitment, -} - -pub struct LastBatchCommitment { - pub withdrawal_batch_index: u64, -} -``` - | Field | Description | |-------|-------------| | `block_transition` | `prev_block_hash` to `next_block_hash` covering all blocks in the batch | @@ -1593,6 +1573,17 @@ struct DepositQueueTransition { uint64 nextDepositNumber; } +struct BatchOutput { + BlockTransition blockTransition; + DepositQueueTransition depositQueueTransition; + bytes32 withdrawalQueueHash; + LastBatchCommitment lastBatchCommitment; +} + +struct LastBatchCommitment { + uint64 withdrawalBatchIndex; +} + struct TokenConfig { bool enabled; bool depositsActive; From a3829d5ad1589c2d2a6bc434bcc94d22ca2bf95e Mon Sep 17 00:00:00 2001 From: Derek Cofausper <256792747+decofe@users.noreply.github.com> Date: Fri, 17 Jul 2026 00:32:36 +0000 Subject: [PATCH 3/3] docs(spec): flatten withdrawal batch index --- specs/spec.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/specs/spec.md b/specs/spec.md index 79e1305a4..f57bd4260 100644 --- a/specs/spec.md +++ b/specs/spec.md @@ -1293,7 +1293,7 @@ The state transition function produces: | `block_transition` | `prev_block_hash` to `next_block_hash` covering all blocks in the batch | | `deposit_queue_transition` | Deposit queue progress from the previous `(processed_hash, deposit_number)` pair to the next `(processed_hash, deposit_number)` pair | | `withdrawal_queue_hash` | Hash chain of withdrawals finalized in this batch (`0` if none) | -| `last_batch_commitment` | `withdrawal_batch_index` read from `ZoneOutbox.lastBatch` | +| `withdrawal_batch_index` | Withdrawal batch index read from `ZoneOutbox.lastBatch` | ### Block Execution (Stateless prover execution function) @@ -1333,7 +1333,7 @@ The stateless execution function must reject the witness on any failed check, mi Require `TempoState.tempoBlockNumber == public_inputs.tempo_block_number`. If `anchor_block_number == tempo_block_number`, require `TempoState.tempoBlockHash == anchor_block_hash`. Otherwise, verify the parent-hash chain from `tempo_block_number` to `anchor_block_number` using `tempo_ancestry_headers`, ending at `anchor_block_hash`. 12. **Return the batch outputs.** - Set `block_transition.prev_block_hash = public_inputs.prev_block_hash` and `block_transition.next_block_hash = prev_block_hash` after the final block. Set `deposit_queue_transition.prev_processed_hash` and `deposit_queue_transition.prev_deposit_number` to the values captured before executing the batch, and set `deposit_queue_transition.next_processed_hash` and `deposit_queue_transition.next_deposit_number` to the final inbox processed hash and processed deposit number. Set `withdrawal_queue_hash` and `last_batch_commitment.withdrawal_batch_index` from the final `ZoneOutbox.lastBatch` state. + Set `block_transition.prev_block_hash = public_inputs.prev_block_hash` and `block_transition.next_block_hash = prev_block_hash` after the final block. Set `deposit_queue_transition.prev_processed_hash` and `deposit_queue_transition.prev_deposit_number` to the values captured before executing the batch, and set `deposit_queue_transition.next_processed_hash` and `deposit_queue_transition.next_deposit_number` to the final inbox processed hash and processed deposit number. Set `withdrawal_queue_hash` and `withdrawal_batch_index` from the final `ZoneOutbox.lastBatch` state. ### Tempo State Proofs @@ -1577,10 +1577,6 @@ struct BatchOutput { BlockTransition blockTransition; DepositQueueTransition depositQueueTransition; bytes32 withdrawalQueueHash; - LastBatchCommitment lastBatchCommitment; -} - -struct LastBatchCommitment { uint64 withdrawalBatchIndex; }