@aztec/sequencer-client 0.0.1-commit.2b2662070 → 0.0.1-commit.2c0ee1788

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,7 +48,7 @@ In a typical configuration without pipelining, a 72-second slot contains:
48
48
  - 1 last validator re-execution sub-slot (8 seconds)
49
49
  - 1 attestation and publishing period (17 seconds)
50
50
 
51
- With proposer pipelining enabled, the last validator re-execution sub-slot is still reserved, but the checkpoint finalization and L1 publishing budget is no longer subtracted when deciding how many block-building sub-slots fit in the slot.
51
+ With proposer pipelining enabled, the last validator re-execution sub-slot is still reserved, but L1 publishing is deferred to the target slot and removed from the current slot budget. Attestation collection is completed inside the build slot itself, so the proposer can send the L1 transaction immediately at the target-slot boundary.
52
52
 
53
53
  ### The Fixed Sub-Slot Model
54
54
 
@@ -89,7 +89,8 @@ timeReservedAtEnd (normal mode) = blockDuration (last sub-slot for
89
89
  + checkpointFinalizationTime
90
90
 
91
91
  timeReservedAtEnd (pipelining) = assembleTime
92
- + propagationTime (proposal must reach validators before the slot flips)
92
+ + 2 * propagationTime (proposal out + attestations back)
93
+ + blockDuration (last-block re-execution)
93
94
 
94
95
  timeAvailableForBlocks = slotDuration - initializationOffset - timeReservedAtEnd
95
96
 
@@ -110,47 +111,45 @@ This means:
110
111
 
111
112
  **The same slot with proposer pipelining enabled:**
112
113
  ```
113
- timeReservedAtEnd = 1s + 2s = 3s
114
- timeAvailableForBlocks = 72s - 2s - 3s = 67s
115
- numberOfBlocks = floor(67s / 8s) = 8 blocks
114
+ timeReservedAtEnd = 1s + 2*2s + 8s = 13s
115
+ timeAvailableForBlocks = 72s - 2s - 13s = 57s
116
+ numberOfBlocks = floor(57s / 8s) = 7 blocks
116
117
  ```
117
118
 
118
- The extra two block opportunities come from not charging the current slot for checkpoint finalization and L1 publishing.
119
+ The extra two block opportunities come from not charging the current slot for L1 publishing. The proposal broadcast, attestation round-trip, and last-block re-execution are now all reserved inside the build slot so that attestations are in hand at the slot boundary.
119
120
 
120
121
  ### Pipelining Mode
121
122
 
122
- When proposer pipelining is enabled, the sequencer uses the current wall-clock slot to build the checkpoint for the **next target slot**.
123
+ When proposer pipelining is enabled, the sequencer uses the current wall-clock slot to build the checkpoint for the **next target slot**, and finishes collecting attestations before the slot boundary so that L1 publishing can happen immediately at the target-slot boundary.
123
124
 
124
125
  It helps to think in terms of two different slots:
125
126
 
126
- - **Wall-clock slot N-1**: The sequencer initializes checkpoint `N`, builds its blocks, and validators re-execute the last block
127
- - **Target slot N**: Checkpoint `N` is proposed, attestations are gathered, and the L1 transaction is submitted
127
+ - **Wall-clock slot N-1**: The sequencer initializes checkpoint `N`, builds its blocks, validators re-execute the last block, and attestations are gathered
128
+ - **Target slot N**: The checkpoint is submitted to L1
128
129
 
129
130
  So the work is split like this:
130
131
 
131
- - **During slot N-1**: Initialization, block building, and last-block re-execution
132
- - **Near the end of slot N-1**: The checkpoint proposal is broadcast so validators can start the last re-execution as slot `N` begins.
133
- - **During slot N**: Validators finish re-executing, send attestations, the proposer collects them, and the checkpoint is submitted to L1 before slot `N` reaches its publish cutoff
132
+ - **During slot N-1**: Initialization, block building, last-block re-execution, proposal broadcast, and attestation collection
133
+ - **At the start of slot N**: The L1 transaction is submitted attestations are already in hand
134
134
 
135
- In other words, pipelining does not mean "do everything for slot N earlier". It specifically moves **block production and block re-execution** earlier, while **checkpoint proposal, attestation gathering, and L1 submission** remain aligned with slot `N`.
135
+ In other words, pipelining moves **block production, block re-execution, proposal broadcast, and attestation collection** into the build slot, while **L1 submission** happens aligned with slot `N`. With default values (72s slot, 6s block, 2s p2p, 1s assemble), the last build-slot block finishes at `T = slotDuration - timeReservedAtEnd = 61s`, the proposer broadcasts the checkpoint at `T=62s` after `assembleTime=1s`, and attestations are in hand by `T=72s` (the slot boundary).
136
136
 
137
137
  **Example: building checkpoint 12 while wall-clock time is in slot 11**
138
138
  ```
139
139
  Slot 11 (wall clock):
140
140
  - Build blocks that will make up checkpoint 12
141
- - Validators re-execute the last block of checkpoint 12
142
141
  - Broadcast checkpoint 12 proposal
143
- - Collect checkpoint 12 attestations
142
+ - Validators re-execute the last block of checkpoint 12
143
+ - Collect checkpoint 12 attestations (all complete before slot 11 ends)
144
144
 
145
145
  Slot 12 (target/submission slot):
146
- - Collect attestations for checkpoint 12 until slot 12 reaches its L1 publish cutoff
147
- - Submit checkpoint 12 to L1
146
+ - Submit checkpoint 12 to L1 at the slot boundary
148
147
  ```
149
148
 
150
- For timetable purposes, this changes two things:
149
+ For timetable purposes:
151
150
 
152
- - `maxNumberOfBlocks` is computed by reserving only the final validator re-execution sub-slot
153
- - `initializeDeadline` no longer subtracts checkpoint finalization time; it only requires enough time for initialization, execution, and validator re-execution
151
+ - `maxNumberOfBlocks` is computed by reserving assembly + round-trip p2p + last-block re-execution at the end of the slot
152
+ - `initializeDeadline` no longer subtracts checkpoint finalization time; it only requires enough time for initialization and two execution windows
154
153
 
155
154
  In code, that means:
156
155
 
@@ -162,7 +161,7 @@ initializeDeadline (pipelining) =
162
161
  slotDuration - initializationOffset - 2 * minExecutionTime
163
162
  ```
164
163
 
165
- The fixed sub-slot deadlines themselves do not change. Pipelining only changes how much of the slot is considered available for block building.
164
+ The fixed sub-slot deadlines themselves do not change. Pipelining only changes how much of the slot is considered available for block building, and when the broadcast and attestation windows close.
166
165
 
167
166
  ## The Sequencer's Work
168
167