@aztec/sequencer-client 0.0.1-commit.993d240 → 0.0.1-commit.9a89641

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.
Files changed (106) hide show
  1. package/README.md +40 -41
  2. package/dest/client/sequencer-client.d.ts +16 -3
  3. package/dest/client/sequencer-client.d.ts.map +1 -1
  4. package/dest/client/sequencer-client.js +18 -14
  5. package/dest/config.d.ts +9 -4
  6. package/dest/config.d.ts.map +1 -1
  7. package/dest/config.js +29 -15
  8. package/dest/global_variable_builder/fee_predictor.d.ts +1 -1
  9. package/dest/global_variable_builder/fee_predictor.d.ts.map +1 -1
  10. package/dest/global_variable_builder/fee_predictor.js +11 -1
  11. package/dest/global_variable_builder/fee_provider.d.ts +1 -1
  12. package/dest/global_variable_builder/fee_provider.d.ts.map +1 -1
  13. package/dest/global_variable_builder/fee_provider.js +27 -5
  14. package/dest/global_variable_builder/global_builder.d.ts +3 -16
  15. package/dest/global_variable_builder/global_builder.d.ts.map +1 -1
  16. package/dest/global_variable_builder/global_builder.js +2 -25
  17. package/dest/index.d.ts +2 -2
  18. package/dest/index.d.ts.map +1 -1
  19. package/dest/index.js +1 -1
  20. package/dest/publisher/config.d.ts +5 -1
  21. package/dest/publisher/config.d.ts.map +1 -1
  22. package/dest/publisher/config.js +11 -1
  23. package/dest/publisher/l1_to_l2_messaging.d.ts +21 -0
  24. package/dest/publisher/l1_to_l2_messaging.d.ts.map +1 -0
  25. package/dest/publisher/l1_to_l2_messaging.js +70 -0
  26. package/dest/publisher/l1_tx_failed_store/failed_tx_store.d.ts +48 -8
  27. package/dest/publisher/l1_tx_failed_store/failed_tx_store.d.ts.map +1 -1
  28. package/dest/publisher/l1_tx_failed_store/failed_tx_store.js +68 -1
  29. package/dest/publisher/l1_tx_failed_store/file_store_failed_tx_store.d.ts +2 -2
  30. package/dest/publisher/l1_tx_failed_store/file_store_failed_tx_store.d.ts.map +1 -1
  31. package/dest/publisher/l1_tx_failed_store/file_store_failed_tx_store.js +4 -2
  32. package/dest/publisher/l1_tx_failed_store/index.d.ts +2 -2
  33. package/dest/publisher/l1_tx_failed_store/index.d.ts.map +1 -1
  34. package/dest/publisher/l1_tx_failed_store/index.js +1 -0
  35. package/dest/publisher/sequencer-publisher.d.ts +39 -10
  36. package/dest/publisher/sequencer-publisher.d.ts.map +1 -1
  37. package/dest/publisher/sequencer-publisher.js +403 -75
  38. package/dest/publisher/write_json.d.ts +11 -0
  39. package/dest/publisher/write_json.d.ts.map +1 -0
  40. package/dest/publisher/write_json.js +57 -0
  41. package/dest/sequencer/automine/automine_factory.d.ts +5 -3
  42. package/dest/sequencer/automine/automine_factory.d.ts.map +1 -1
  43. package/dest/sequencer/automine/automine_factory.js +2 -1
  44. package/dest/sequencer/automine/automine_sequencer.d.ts +43 -5
  45. package/dest/sequencer/automine/automine_sequencer.d.ts.map +1 -1
  46. package/dest/sequencer/automine/automine_sequencer.js +209 -19
  47. package/dest/sequencer/automine/index.d.ts +3 -0
  48. package/dest/sequencer/automine/index.d.ts.map +1 -0
  49. package/dest/sequencer/automine/index.js +2 -0
  50. package/dest/sequencer/checkpoint_proposal_job.d.ts +28 -15
  51. package/dest/sequencer/checkpoint_proposal_job.d.ts.map +1 -1
  52. package/dest/sequencer/checkpoint_proposal_job.js +158 -117
  53. package/dest/sequencer/events.d.ts +16 -4
  54. package/dest/sequencer/events.d.ts.map +1 -1
  55. package/dest/sequencer/index.d.ts +1 -3
  56. package/dest/sequencer/index.d.ts.map +1 -1
  57. package/dest/sequencer/index.js +0 -2
  58. package/dest/sequencer/missing_committee.d.ts +72 -0
  59. package/dest/sequencer/missing_committee.d.ts.map +1 -0
  60. package/dest/sequencer/missing_committee.js +139 -0
  61. package/dest/sequencer/requests_tracker.d.ts +22 -0
  62. package/dest/sequencer/requests_tracker.d.ts.map +1 -0
  63. package/dest/sequencer/requests_tracker.js +33 -0
  64. package/dest/sequencer/sequencer.d.ts +113 -28
  65. package/dest/sequencer/sequencer.d.ts.map +1 -1
  66. package/dest/sequencer/sequencer.js +352 -162
  67. package/dest/test/index.d.ts +3 -3
  68. package/dest/test/index.d.ts.map +1 -1
  69. package/dest/test/utils.d.ts +15 -1
  70. package/dest/test/utils.d.ts.map +1 -1
  71. package/dest/test/utils.js +18 -1
  72. package/package.json +29 -28
  73. package/src/client/sequencer-client.ts +20 -14
  74. package/src/config.ts +32 -16
  75. package/src/global_variable_builder/fee_predictor.ts +11 -1
  76. package/src/global_variable_builder/fee_provider.ts +27 -5
  77. package/src/global_variable_builder/global_builder.ts +2 -34
  78. package/src/index.ts +1 -10
  79. package/src/publisher/config.ts +22 -1
  80. package/src/publisher/l1_to_l2_messaging.ts +85 -0
  81. package/src/publisher/l1_tx_failed_store/failed_tx_store.ts +114 -7
  82. package/src/publisher/l1_tx_failed_store/file_store_failed_tx_store.ts +4 -3
  83. package/src/publisher/l1_tx_failed_store/index.ts +1 -1
  84. package/src/publisher/sequencer-publisher.ts +430 -86
  85. package/src/publisher/write_json.ts +78 -0
  86. package/src/sequencer/README.md +16 -6
  87. package/src/sequencer/automine/README.md +18 -4
  88. package/src/sequencer/automine/automine_factory.ts +8 -1
  89. package/src/sequencer/automine/automine_sequencer.ts +229 -21
  90. package/src/sequencer/automine/index.ts +6 -0
  91. package/src/sequencer/checkpoint_proposal_job.ts +177 -132
  92. package/src/sequencer/events.ts +16 -3
  93. package/src/sequencer/index.ts +0 -2
  94. package/src/sequencer/missing_committee.ts +192 -0
  95. package/src/sequencer/requests_tracker.ts +43 -0
  96. package/src/sequencer/sequencer.ts +382 -176
  97. package/src/test/index.ts +2 -2
  98. package/src/test/utils.ts +33 -0
  99. package/dest/sequencer/chain_state_overrides.d.ts +0 -61
  100. package/dest/sequencer/chain_state_overrides.d.ts.map +0 -1
  101. package/dest/sequencer/chain_state_overrides.js +0 -98
  102. package/dest/sequencer/timetable.d.ts +0 -101
  103. package/dest/sequencer/timetable.d.ts.map +0 -1
  104. package/dest/sequencer/timetable.js +0 -231
  105. package/src/sequencer/chain_state_overrides.ts +0 -162
  106. package/src/sequencer/timetable.ts +0 -295
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Sequencer Client
2
2
 
3
- The sequencer client is the proposer-side counterpart to the [validator client](../validator-client/README.md): it builds checkpoints, broadcasts the block and checkpoint proposals that validators attest to, and publishes the resulting checkpoint to L1. It runs on any node whose configured validator address has been selected as proposer for the current (or next) slot.
3
+ The sequencer client is the proposer-side counterpart to the [validator client](../validator-client/README.md): it builds checkpoints, broadcasts the block and checkpoint proposals that validators attest to, and publishes the resulting checkpoint to L1. It runs on any node whose configured validator address has been selected as proposer for the target slot.
4
4
 
5
- A single instance owns the entire proposer flow for one slot: deciding whether to propose, building several L2 blocks one after another, signing them, gossiping them, collecting attestations from the committee, and submitting the final checkpoint to L1 in one Multicall3 transaction together with governance and slashing votes.
5
+ A single instance owns the proposer flow for one slot: deciding whether to propose, building several L2 blocks one after another, signing them, gossiping them, collecting attestations from the committee, and submitting the final checkpoint to L1 in one Multicall3 transaction together with governance and slashing votes.
6
6
 
7
- The sequencer does **not** decide what is in the next block on its own. It composes the work of several other subsystems: the [tx pool](../p2p/README.md) supplies transactions, the [validator client](../validator-client/README.md) owns operator keys and contains the `CheckpointBuilder` that actually executes them, the [archiver](../archiver/README.md) provides the L2 chain state needed to anchor each block, the [epoch cache](../epoch-cache/README.md) answers proposer/committee lookups, and the [slasher](../slasher/README.md) supplies offenses to vote on.
7
+ The sequencer does **not** decide what is in the next block on its own. It composes the work of several subsystems: the [tx pool](../p2p/README.md) supplies transactions, the [validator client](../validator-client/README.md) owns operator keys and contains the `CheckpointBuilder` that actually executes them, the [archiver](../archiver/README.md) provides the L2 chain state needed to anchor each block, the [epoch cache](../epoch-cache/README.md) answers proposer/committee lookups, and the [slasher](../slasher/README.md) supplies offenses to vote on.
8
8
 
9
9
  ## Key Concepts
10
10
 
@@ -14,8 +14,8 @@ The Aztec consensus design splits each Aztec slot into multiple L2 blocks. This
14
14
 
15
15
  - **Slot** — a fixed time window (e.g. 72 s) during which one proposer is allowed to build.
16
16
  - **Block** — a single batch of transactions, executed and validated as a unit, with its own header.
17
- - **Checkpoint** — the collection of all blocks built within one slot. The proposer commits to a checkpoint on L1 by submitting a `propose` transaction containing the aggregated header, the blocks' tx effects (as blobs), and the committee attestations.
18
- - **Sub-slot** — a fixed-duration window within the slot during which one block is built. Sub-slots are equal in length and have deadlines fixed relative to the start of the slot.
17
+ - **Checkpoint** — the collection of all blocks built for one target slot. The proposer commits to a checkpoint on L1 by submitting a `propose` transaction containing the aggregated header, the blocks' tx effects (as blobs), and the committee attestations.
18
+ - **Sub-slot** — a fixed-duration window during which one block is built. Sub-slots are equal in length and have deadlines fixed relative to the build frame.
19
19
 
20
20
  Several blocks per slot is intentional: it amortizes the fixed L1 cost of a checkpoint over more transactions, and it lets the rest of the network reach a usable state-root much sooner than the full L1 confirmation latency.
21
21
 
@@ -26,26 +26,27 @@ There are two tips the sequencer cares about:
26
26
  - The **proposed chain** is the set of blocks that have been broadcast over p2p but not yet committed to L1. Both the sequencer and validators push these blocks into the archiver so the rest of the node can serve them.
27
27
  - The **checkpointed chain** is the set of checkpoints that have landed on L1, recovered from `CheckpointProposed` events.
28
28
 
29
- Within a slot, the proposer adds blocks to the proposed chain as it goes. Only the last block within the slot is bundled with a `CheckpointProposal` that committee members attest to; intermediate blocks are accepted onto the proposed chain by virtue of the proposer's signature alone, and every node that wants to follow the proposed chain re-executes them. See the [validator client README](../validator-client/README.md) for the consumer side.
29
+ Within a slot, the proposer adds blocks to the proposed chain as it goes. Only the last block is bundled with a `CheckpointProposal` that committee members attest to; intermediate blocks are accepted onto the proposed chain by virtue of the proposer's signature alone, and every node that wants to follow the proposed chain re-executes them. See the [validator client README](../validator-client/README.md) for the consumer side.
30
30
 
31
31
  ### Proposer Pipelining
32
32
 
33
- The legacy ("non-pipelined") flow has the proposer for slot `N` build, attest, and publish inside slot `N`. The proposer spends most of `N` collecting attestations and waiting for the L1 transaction to be mined, leaving a long idle window. Pipelining, [proposed in this discussion](https://github.com/AztecProtocol/governance/discussions/8), removes that idle window: the proposer for slot `N` builds blocks during slot `N - 1`, finishes attestation collection before the slot boundary, and submits the L1 transaction at the start of slot `N`.
33
+ Pipelining ([proposed in this discussion](https://github.com/AztecProtocol/governance/discussions/8)) is the only mode the production sequencer runs in. The proposer for slot `N` builds blocks and broadcasts the checkpoint proposal during slot `N - 1`; the committee re-executes the final block, sends attestations back, and the proposer targets L1 submission for the start of slot `N`. This removes the long idle window a naive flow would have inside slot `N`, where the proposer would otherwise spend most of the slot collecting attestations and waiting for the L1 transaction to mine.
34
34
 
35
- Pipelining shifts the work like this:
35
+ Each phase lands in this slot:
36
36
 
37
- | Phase | Non-pipelined | Pipelined |
38
- | ---------------------------------- | ------------- | ---------------- |
39
- | Block building | slot `N` | slot `N - 1` |
40
- | Last-block re-execution | slot `N` | slot `N - 1` |
41
- | Attestation collection | slot `N` | slot `N - 1` * |
42
- | L1 submission | slot `N` | slot `N` |
37
+ | Phase | Slot |
38
+ | ----------------------- | ------------ |
39
+ | Block building | slot `N - 1` |
40
+ | Checkpoint proposal | slot `N - 1` |
41
+ | Committee validation | slot `N - 1` |
42
+ | Attestation collection | slot `N - 1` \* |
43
+ | L1 submission | slot `N` |
43
44
 
44
- \* The pipelined timing model reserves enough end-of-slot budget for attestations to be in hand by the slot boundary, but the enforced deadline (`checkpointAttestationDeadline`) actually extends to `2 * aztecSlotDuration - l1PublishingTime`, so a late attestation can still spill into the target slot.
45
+ \* The ideal timing path reserves enough budget for attestations to be in hand before the ideal L1 send time. The hard `attestation_deadline` is also the latest useful L1 publish time; validators must finish validation and sign by then for inactivity/slashing purposes.
45
46
 
46
- In practice, "non-pipelined mode" is being removed; this README treats pipelining as the default. The toggle still exists (`enableProposerPipelining`) because `EpochCache` consults it when looking up the proposer for the next L1 slot — when pipelining is enabled, the sequencer asks the cache for the proposer of `slot + 1` rather than `slot`.
47
+ `EpochCache` always looks up the pipelined target proposer, so the sequencer asks the cache for the proposer of `slot + 1` (`PROPOSER_PIPELINING_SLOT_OFFSET = 1`) rather than `slot`. Building runs during the wall-clock slot; the checkpoint commits to the target slot.
47
48
 
48
- The pipelining flow introduces two failure modes that block building has to handle:
49
+ This flow introduces two failure modes that block building has to handle:
49
50
 
50
51
  - **Pipeline depth** is bounded to 2 (`checkpointNumber ≤ confirmedCheckpoint + 2`). Building further ahead would require trusting more in-flight parent proposals than the design allows.
51
52
  - **Pipelined parent invalidation**: if the parent checkpoint we built on top of fails to land cleanly on L1, the next proposer's work is discarded (`pipelined-checkpoint-discarded` event) and an `invalidate` request is enqueued for the parent.
@@ -89,19 +90,19 @@ The pipelining flow introduces two failure modes that block building has to hand
89
90
 
90
91
  `Sequencer` (`src/sequencer/sequencer.ts`) drives one slot at a time using a `RunningPromise` that ticks every `sequencerPollingIntervalMS` (default 500 ms). On each tick it:
91
92
 
92
- 1. Asks the [epoch cache](../epoch-cache/README.md) for the slot at the next L1 block, and, when pipelining, for the *target* slot (`slot + 1`). Building runs during the wall-clock slot; the checkpoint commits to the target slot.
93
+ 1. Asks the [epoch cache](../epoch-cache/README.md) for the slot at the next L1 block and for the *target* slot (`slot + 1`). Building runs during the wall-clock slot; the checkpoint commits to the target slot.
93
94
  2. Calls `prepareCheckpointProposal`, which:
94
95
  - Dedupes against the last slot we tried to propose for.
95
96
  - Runs `checkSync()` — verifies world-state, l2 block source, p2p, and l1-to-l2 message source agree on the parent tip.
96
97
  - Checks the escape hatch (governance-controlled freeze) for the target epoch.
97
98
  - Calls `checkCanPropose(targetSlot)` to verify one of our configured validator addresses is the elected proposer.
98
99
  - Falls back to `considerInvalidatingCheckpoint()` if we are *not* the proposer but a previous checkpoint is stuck with bad attestations and the slot is far enough along to invalidate (`secondsBeforeInvalidatingBlockAsCommitteeMember` / `…AsNonCommitteeMember`).
99
- - Refuses to build further than two checkpoints ahead of the confirmed tip when pipelining.
100
+ - Refuses to build further than two checkpoints ahead of the confirmed tip.
100
101
  - Builds L1 `eth_call` simulation overrides (so `Rollup.canProposeAt` sees the expected pending tip when we are building on a pipelined parent or invalidating).
101
102
  - Calls `publisher.canProposeAt(...)` — if L1 rejects the simulated propose, abort early.
102
103
  3. Constructs a `CheckpointProposalJob` and calls `.execute()`, parking the returned `pendingL1Submission` on the sequencer so `stop()` can await it without re-entering the loop.
103
104
 
104
- Each state transition flows through `setState()`, which calls `timetable.assertTimeLeft()`. If the slot has advanced past the deadline for the new state, this throws `SequencerTooSlowError` and the slot is abandoned.
105
+ Each state transition flows through `setState()`, which records the state, emits `state-changed`, and updates metrics — nothing else. Timing is not enforced through states: the work loop and the job query explicit deadlines from the `ProposerTimetable` (the build-entry gate via `getBuildStartDeadline`, sub-slot selection via `selectNextSubslot`, attestation collection and L1 publishing bounded by `getAttestationDeadline`). When a deadline is hit, the slot is abandoned and marked as attempted so it is not retried.
105
106
 
106
107
  The sequencer is a `TypedEventEmitter<SequencerEvents>`. The most useful events are:
107
108
 
@@ -148,9 +149,9 @@ Inside `execute()`:
148
149
  - Broadcasts the `CheckpointProposal` via p2p.
149
150
  3. **Attestation collection** (`waitForAttestationsAndEnqueueSubmissionAsync`) runs in the background:
150
151
  - Transitions to `COLLECTING_ATTESTATIONS`. Reads the committee from `EpochCache`, computes the quorum (`2/3 + 1`), and waits for that many attestations on p2p. The validator client adds the proposer's own signature.
151
- - If pipelining: `waitForValidParentCheckpointOnL1()` waits for the archiver to confirm the parent we built on top of has landed on L1 with matching hash and valid attestations. If not, the work is dropped (`pipelined-checkpoint-discarded`) and we enqueue an invalidation for the parent so the next proposer doesn't repeat the same mistake.
152
- - Computes `submitAfter`: `getTimestampForSlot(targetSlot)` when pipelining (so the Multicall3 mines inside the target slot — EIP-712 signatures are bound to a slot and would silently fail if mined outside it), otherwise "now".
153
- - Calls `publisher.sendRequestsAt(submitAfter)`, which sleeps until the deadline, re-runs each request's `preCheck` against fresh L1 state, and submits the bundled Multicall3.
152
+ - `waitForValidParentCheckpointOnL1()` waits for the archiver to confirm the parent we built on top of has landed on L1 with matching hash and valid attestations. If not, the work is dropped (`pipelined-checkpoint-discarded`) and we enqueue an invalidation for the parent so the next proposer doesn't repeat the same mistake.
153
+ - Computes `submitAfter` as `getTimestampForSlot(targetSlot)` so the Multicall3 mines inside the target slot — EIP-712 signatures are bound to a slot and would silently fail if mined outside it.
154
+ - Calls `publisher.sendRequestsAt(submitAfter)`, which targets the ideal L1 send time, re-runs each request's `preCheck` against fresh L1 state, and submits the bundled Multicall3.
154
155
 
155
156
  ### Per-block loop (`buildBlocksForCheckpoint`)
156
157
 
@@ -158,7 +159,7 @@ The per-block loop is the heart of the building flow:
158
159
 
159
160
  ```
160
161
  loop:
161
- timing = timetable.canStartNextBlock(secondsIntoSlot)
162
+ timing = timetable.selectNextSubslot(targetSlot, now)
162
163
  if !timing.canStart: break
163
164
  if blocksBuilt >= maxBlocksPerCheckpoint: break
164
165
 
@@ -170,7 +171,7 @@ loop:
170
171
 
171
172
  if result is 'insufficient-txs' or 'insufficient-valid-txs':
172
173
  if isLastBlock or no deadline: break
173
- else: continue (try next sub-slot)
174
+ else: wait until this sub-slot deadline, then continue (try next sub-slot)
174
175
  if result is error: halt
175
176
 
176
177
  blockProposal = validatorClient.createBlockProposal(block)
@@ -184,18 +185,19 @@ loop:
184
185
  waitUntilNextSubSlot(timing.deadline)
185
186
  ```
186
187
 
187
- The deadlines passed to `CheckpointBuilder.buildBlock` are absolute timestamps (`slotStart + timing.deadline`). The builder uses these as hard caps on tx execution, so a slow block cannot eat into the next sub-slot.
188
+ The deadlines passed to `CheckpointBuilder.buildBlock` are absolute timestamps. The builder uses these as hard caps on tx execution, so a slow block cannot eat into the next sub-slot.
188
189
 
189
- `maxBlocksPerCheckpoint` (the timetable's `maxNumberOfBlocks`) and `perBlockAllocationMultiplier` (default 1.2) are passed in opts so that the builder can redistribute the remaining checkpoint budget (L2 gas, DA gas, blob fields, tx count) across the remaining blocks. See [validator-client/README.md § Block Building Limits](../validator-client/README.md#block-building-limits) for the redistribution math; the sequencer only sets the inputs.
190
+ `maxBlocksPerCheckpoint` (bounded by the timetable's `getMaxBlocksPerCheckpoint()` and the configured cap) and `perBlockAllocationMultiplier` (default 1.2) are passed in opts so that the builder can redistribute the remaining checkpoint budget (L2 gas, DA gas, blob fields, tx count) across the remaining blocks. See [validator-client/README.md § Block Building Limits](../validator-client/README.md#block-building-limits) for the redistribution math; the sequencer only sets the inputs.
190
191
 
191
192
  ### Timetable
192
193
 
193
- `SequencerTimetable` (`src/sequencer/timetable.ts`) is a thin wrapper around `CheckpointTiming` (from `@aztec/stdlib/timetable`). It owns two responsibilities:
194
+ The sequencer builds a `ProposerTimetable` (from `@aztec/stdlib/timetable`) directly from its config and the L1 constants. Key getters:
194
195
 
195
- - **Sub-slot scheduling**: `canStartNextBlock(secondsIntoSlot)` finds the next sub-slot with at least `minExecutionTime` remaining and returns its deadline and whether it is the last sub-slot. If we are running late, sub-slots are skipped; we never start a block we cannot finish.
196
- - **Per-state deadlines**: `getMaxAllowedTime(state)` returns the latest seconds-into-slot value a state is allowed to be entered; `assertTimeLeft()` enforces it.
196
+ - **Sub-slot scheduling**: `selectNextSubslot(slot, now)` finds the next sub-slot with at least `minBlockDuration` remaining and returns its absolute deadline and whether it is the last sub-slot. If we are running late, sub-slots are skipped; we never start a block we cannot finish.
197
+ - **Build-entry gate**: `getBuildStartDeadline(slot)` is the latest useful time to start building for a target slot; past it, the work loop abandons the slot without building.
198
+ - **Consensus bounds**: the inherited `ConsensusTimetable` getters (`getAttestationDeadline`, the proposal/attestation receive windows) bound attestation collection, L1 publishing, and p2p ingress.
197
199
 
198
- See [`src/sequencer/README.md`](src/sequencer/README.md) for the full timing model, including the pipelining math and the failure-mode walkthroughs.
200
+ See the [Block Building Timetable Spec](../stdlib/src/timetable/README.md) for the full timing model, including the ideal/deadline split for checkpoint proposals, the consensus-only receive deadline, and the failure-mode walkthroughs.
199
201
 
200
202
  ### SequencerPublisher
201
203
 
@@ -206,8 +208,8 @@ Key entry points:
206
208
  - `canProposeAt(archive, msgSender, simulationOverridesPlan?)` — eth_call simulation of `Rollup.canProposeAt`. The sequencer runs this before deciding to build.
207
209
  - `enqueueProposeCheckpoint(checkpoint, attestations, attestationsSignature, opts)` — adds the propose call, with a `preCheck` that re-validates the proposal against real L1 state when it is finally sent (catches drift between build time and submit time).
208
210
  - `enqueueInvalidateCheckpoint`, `enqueueGovernanceCastSignal`, `enqueueSlashingActions` — the rest of the actions a proposer may bundle.
209
- - `sendRequests()` — immediately flushes the queue as one Multicall3 transaction.
210
- - `sendRequestsAt(submitAfter)` — sleeps (cancellable) until `submitAfter`, runs each request's `preCheck` (dropping those that fail), and then calls `sendRequests()`, which filters expired requests, sorts the remainder, and submits one Multicall3. Pipelining is implemented entirely by passing `getTimestampForSlot(targetSlot)` here.
211
+ - `sendRequests(targetSlot?)` — immediately flushes the queue as one Multicall3 transaction. Used by the `AutomineSequencer` for synchronous in-slot publishing.
212
+ - `sendRequestsAt(targetSlot)` — the production (pipelined) path: sleeps (cancellable) until the ideal L1 send time, runs each request's `preCheck` (dropping those that fail), and then calls `sendRequests(targetSlot)`, which filters expired requests, sorts the remainder, and submits one Multicall3 that mines inside the target slot.
211
213
 
212
214
  `SequencerPublisherFactory` produces one publisher per attempt, wrapping an L1 publisher (EOA + `L1TxUtils`) leased from `PublisherManager`. Leases free the publisher when the job completes so multiple validator addresses on the same node can take turns without conflicts.
213
215
 
@@ -243,12 +245,9 @@ The configuration object is `SequencerConfig` (`src/sequencer/config.ts` + `src/
243
245
 
244
246
  | Option / env var | Default | Purpose |
245
247
  | --- | --- | --- |
246
- | `blockDurationMs` / `SEQ_BLOCK_DURATION_MS` | unset | Length of one sub-slot in ms. `undefined` falls back to single-block-per-slot mode (used by tests / sandbox). |
247
- | `enforceTimeTable` / `SEQ_ENFORCE_TIME_TABLE` | true | If false, deadlines are not enforced and a single block is built with unbounded time. |
248
+ | `blockDurationMs` / `SEQ_BLOCK_DURATION_MS` | 3000 ms | Length of one sub-slot in ms. Required: the sequencer always runs the enforced timetable. The derived `maxBlocksPerCheckpoint = floor((aztecSlotDuration checkpointInitializationTime (checkpointAssembleTime + 2·p2pPropagationTime + blockDuration)) / blockDuration)`; a slot may legitimately fit a single block when that floor is 1. |
248
249
  | `attestationPropagationTime` / `SEQ_ATTESTATION_PROPAGATION_TIME` | 2 s | One-way p2p estimate fed to the timetable. |
249
- | `l1PublishingTime` / `SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT` | full L1 slot | Time reserved for the L1 tx to land. |
250
250
  | `sequencerPollingIntervalMS` / `SEQ_POLLING_INTERVAL_MS` | 500 | Work-loop tick rate. |
251
- | `enableProposerPipelining` / `SEQ_ENABLE_PROPOSER_PIPELINING` | false | When true, the sequencer builds for `slot + 1`. The flag lives in shared `PipelineConfig` and is read by `EpochCache`, not by the sequencer directly. |
252
251
 
253
252
  ### Behavior
254
253
 
@@ -271,7 +270,7 @@ The full list (including test/fault-injection hooks like `pauseProposingForSlots
271
270
  - **Out of sync**: `checkSync` fails → governance/slashing votes still go out via `tryVoteWhenSyncFails`, but no block is built.
272
271
  - **Insufficient txs in a sub-slot**: `CheckpointBuilder.buildBlock` returns `insufficient-txs`. The sub-slot is skipped without committing state; the next sub-slot retries. On the last sub-slot, if `buildCheckpointIfEmpty` is true, the block is still built with whatever is available (possibly zero txs).
273
272
  - **Sub-slot deadline exceeded**: `CheckpointBuilder` enforces the deadline and stops executing further txs. The block is finalized with whatever fit.
274
- - **Timetable deadline exceeded**: `assertTimeLeft` throws `SequencerTooSlowError`. The current slot is abandoned and the loop resets to `IDLE`.
273
+ - **Build start deadline exceeded**: the work loop abandons the slot before building and marks it as attempted so the same checkpoint is not retried. Inside the job, sub-slot and attestation deadlines bound their own phases.
275
274
  - **Pipelined parent fails on L1**: `waitForValidParentCheckpointOnL1` returns false. The whole proposal is discarded (`pipelined-checkpoint-discarded`), the parent is enqueued for invalidation, and the L1 submission for *this* checkpoint is not sent.
276
275
  - **L1 submission reverts or expires**: `checkpoint-publish-failed` is emitted with the individual action results so observability can break down which actions in the Multicall3 went through and which didn't.
277
276
 
@@ -281,7 +280,7 @@ The full list (including test/fault-injection hooks like `pauseProposingForSlots
281
280
  | --- | --- |
282
281
  | How does the work loop decide whether to propose? | `src/sequencer/sequencer.ts` → `prepareCheckpointProposal`, `checkCanPropose` |
283
282
  | How does a checkpoint get built block-by-block? | `src/sequencer/checkpoint_proposal_job.ts` → `proposeCheckpoint`, `buildBlocksForCheckpoint` |
284
- | How do sub-slot deadlines work? | `src/sequencer/timetable.ts` + `src/sequencer/README.md` |
283
+ | How do sub-slot deadlines work? | `@aztec/stdlib` `ProposerTimetable` + [`stdlib/src/timetable/README.md`](../stdlib/src/timetable/README.md) |
285
284
  | How does an L1 transaction get scheduled and submitted? | `src/publisher/sequencer-publisher.ts` → `sendRequestsAt` |
286
285
  | How does pipelining wait for the parent to land? | `src/sequencer/checkpoint_proposal_job.ts` → `waitForValidParentCheckpointOnL1` |
287
286
  | How do governance and slashing votes get into the L1 tx? | `src/sequencer/checkpoint_voter.ts` |
@@ -300,7 +299,7 @@ yarn workspace @aztec/sequencer-client test
300
299
  The integration tests of interest are:
301
300
 
302
301
  - `src/sequencer/sequencer.test.ts` — work-loop behavior, escape-hatch and invalidation fallbacks.
303
- - `src/sequencer/checkpoint_proposal_job.test.ts` — full per-slot job, both pipelined and non-pipelined.
302
+ - `src/sequencer/checkpoint_proposal_job.test.ts` — full per-slot job, including pipelined parent validation and discard paths.
304
303
  - `src/sequencer/checkpoint_proposal_job.timing.test.ts` — sub-slot timing and skip behavior under simulated clock drift.
305
- - `src/sequencer/timetable.test.ts` — pure math against `CheckpointTiming`.
304
+ - `stdlib/src/timetable/*.test.ts` — pure math against `ConsensusTimetable` / `ProposerTimetable`.
306
305
  - `src/publisher/sequencer-publisher.test.ts` — request ordering, `sendRequestsAt`, preCheck re-runs.
@@ -62,12 +62,25 @@ export declare class SequencerClient {
62
62
  * @param config - New parameters.
63
63
  */
64
64
  updateConfig(config: SequencerConfig & Partial<ValidatorClientFullConfig>): void;
65
- /** Starts the sequencer. */
65
+ /**
66
+ * Starts (or resumes) the sequencer, validator, publishers, and metrics. Each underlying start is
67
+ * idempotent, so this is safe to call after a previous {@link pause} to resume building and publishing.
68
+ * The publisher manager is started before the sequencer's poll loop so publishing is ready before the
69
+ * sequencer first tries to publish to L1.
70
+ */
66
71
  start(): Promise<void>;
67
72
  /**
68
- * Stops the sequencer from processing new txs.
73
+ * Stops the sequencer, validator, publishers, and metrics for good, draining in-flight work. This is the
74
+ * final teardown path: stopping the validator client closes its slashing-protection database. For a
75
+ * restartable pause (e.g. around a test clock warp) use {@link pause} instead.
69
76
  */
70
77
  stop(): Promise<void>;
78
+ /**
79
+ * Gracefully pauses block production, waiting for in-flight work to finish rather than interrupting it,
80
+ * while leaving the validator, publishers, and metrics running so the sequencer can be resumed with
81
+ * {@link start}. Used by tests that pause sequencers around an L1 clock warp.
82
+ */
83
+ pause(): Promise<void>;
71
84
  /** Triggers an immediate run of the sequencer, bypassing the polling interval. */
72
85
  trigger(): Promise<void> | undefined;
73
86
  getSequencer(): Sequencer;
@@ -78,4 +91,4 @@ export declare class SequencerClient {
78
91
  get validatorAddresses(): EthAddress[] | undefined;
79
92
  get maxL2BlockGas(): number | undefined;
80
93
  }
81
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VxdWVuY2VyLWNsaWVudC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NsaWVudC9zZXF1ZW5jZXItY2xpZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFFckUsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBSWhELE9BQU8sRUFBRSxLQUFLLE9BQU8sRUFBRSxTQUF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AC,EAAE,UAAU,CAAC;QACxB,SAAS,EAAE,SAAS,EAAE,CAAC;QACvB,eAAe,CAAC,EAAE,SAAS,CAAC;QAC5B,YAAY,EAAE,eAAe,CAAC;QAC9B,qBAAqB,EAAE,qBAAqB,CAAC;KAC9C,4BAsGF;IAED;;;OAGG;IACI,YAAY,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,yBAAyB,CAAC,QAI/E;IAED;;;;;OAKG;IACU,KAAK,kBAKjB;IAED;;;;OAIG;IACU,IAAI,kBAKhB;IAED;;;;OAIG;IACU,KAAK,kBAEjB;IAED,kFAAkF;IAC3E,OAAO,8BAEb;IAEM,YAAY,IAAI,SAAS,CAE/B;IAED,qFAAqF;IAC9E,2BAA2B,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAErE;IAED,iFAAiF;IACjF,UAAU,IAAI,OAAO,GAAG,SAAS,CAEhC;IAED,IAAI,kBAAkB,IAAI,UAAU,EAAE,GAAG,SAAS,CAEjD;IAED,IAAI,aAAa,IAAI,MAAM,GAAG,SAAS,CAEtC;CACF"}
@@ -1,6 +1,5 @@
1
1
  import { MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT } from '@aztec/constants';
2
2
  import { EpochCache } from '@aztec/epoch-cache';
3
- import { isAnvilTestChain } from '@aztec/ethereum/chain';
4
3
  import { getPublicClient } from '@aztec/ethereum/client';
5
4
  import { GovernanceProposerContract, RollupContract } from '@aztec/ethereum/contracts';
6
5
  import { PublisherManager } from '@aztec/ethereum/publisher-manager';
@@ -60,8 +59,7 @@ import { Sequencer } from '../sequencer/index.js';
60
59
  l1RpcUrls: rpcUrls,
61
60
  l1ChainId: chainId,
62
61
  viemPollingIntervalMS: config.viemPollingIntervalMS,
63
- ethereumSlotDuration: config.ethereumSlotDuration,
64
- enableProposerPipelining: config.enableProposerPipelining
62
+ ethereumSlotDuration: config.ethereumSlotDuration
65
63
  }, {
66
64
  dateProvider: deps.dateProvider
67
65
  });
@@ -78,13 +76,6 @@ import { Sequencer } from '../sequencer/index.js';
78
76
  });
79
77
  const ethereumSlotDuration = config.ethereumSlotDuration;
80
78
  const globalsBuilder = deps.globalVariableBuilder;
81
- // When running in anvil, assume we can post a tx up until one second before the end of an L1 slot.
82
- // Otherwise, we need the full L1 slot duration for publishing to ensure inclusion.
83
- // In theory, the L1 slot has an initial 4s phase where the block is propagated, so we could
84
- // reduce the publishing time allowance. However, we prefer being conservative.
85
- // See https://www.blocknative.com/blog/anatomy-of-a-slot#7 for more info.
86
- const l1PublishingTimeBasedOnChain = isAnvilTestChain(config.l1ChainId) ? 1 : ethereumSlotDuration;
87
- const l1PublishingTime = config.l1PublishingTime ?? l1PublishingTimeBasedOnChain;
88
79
  const { maxL2BlockGas, maxDABlockGas, maxTxsPerBlock } = capPerBlockLimits(config, rollupManaLimit, log);
89
80
  const l1Constants = {
90
81
  l1GenesisTime,
@@ -95,7 +86,6 @@ import { Sequencer } from '../sequencer/index.js';
95
86
  };
96
87
  const sequencer = new Sequencer(publisherFactory, validatorClient, globalsBuilder, p2pClient, worldStateSynchronizer, slasherClient, l2BlockSource, l1ToL2MessageSource, checkpointsBuilder, l1Constants, deps.dateProvider, epochCache, rollupContract, {
97
88
  ...config,
98
- l1PublishingTime,
99
89
  maxL2BlockGas,
100
90
  maxDABlockGas,
101
91
  maxTxsPerBlock
@@ -113,20 +103,34 @@ import { Sequencer } from '../sequencer/index.js';
113
103
  this.checkpointsBuilder.updateConfig(config);
114
104
  this.validatorClient?.updateConfig(config);
115
105
  }
116
- /** Starts the sequencer. */ async start() {
106
+ /**
107
+ * Starts (or resumes) the sequencer, validator, publishers, and metrics. Each underlying start is
108
+ * idempotent, so this is safe to call after a previous {@link pause} to resume building and publishing.
109
+ * The publisher manager is started before the sequencer's poll loop so publishing is ready before the
110
+ * sequencer first tries to publish to L1.
111
+ */ async start() {
117
112
  await this.validatorClient?.start();
113
+ await this.publisherManager.start();
118
114
  this.sequencer.start();
119
115
  this.l1Metrics?.start();
120
- await this.publisherManager.start();
121
116
  }
122
117
  /**
123
- * Stops the sequencer from processing new txs.
118
+ * Stops the sequencer, validator, publishers, and metrics for good, draining in-flight work. This is the
119
+ * final teardown path: stopping the validator client closes its slashing-protection database. For a
120
+ * restartable pause (e.g. around a test clock warp) use {@link pause} instead.
124
121
  */ async stop() {
125
122
  await this.sequencer.stop();
126
123
  await this.validatorClient?.stop();
127
124
  await this.publisherManager.stop();
128
125
  this.l1Metrics?.stop();
129
126
  }
127
+ /**
128
+ * Gracefully pauses block production, waiting for in-flight work to finish rather than interrupting it,
129
+ * while leaving the validator, publishers, and metrics running so the sequencer can be resumed with
130
+ * {@link start}. Used by tests that pause sequencers around an L1 clock warp.
131
+ */ async pause() {
132
+ await this.sequencer.pause();
133
+ }
130
134
  /** Triggers an immediate run of the sequencer, bypassing the polling interval. */ trigger() {
131
135
  return this.sequencer.trigger();
132
136
  }
package/dest/config.d.ts CHANGED
@@ -3,7 +3,7 @@ import { type L1ReaderConfig } from '@aztec/ethereum/l1-reader';
3
3
  import { type ConfigMappingsType } from '@aztec/foundation/config';
4
4
  import { type KeyStoreConfig } from '@aztec/node-keystore/config';
5
5
  import { type P2PConfig } from '@aztec/p2p/config';
6
- import { type ChainConfig, type PipelineConfig, type SequencerConfig } from '@aztec/stdlib/config';
6
+ import { type ChainConfig, type SequencerConfig } from '@aztec/stdlib/config';
7
7
  import { type ValidatorClientConfig } from '@aztec/validator-client/config';
8
8
  import { type SequencerPublisherConfig, type SequencerTxSenderConfig } from './publisher/config.js';
9
9
  export * from './publisher/config.js';
@@ -18,8 +18,11 @@ export declare const DefaultSequencerConfig: {
18
18
  buildCheckpointIfEmpty: false;
19
19
  publishTxsWithProposals: false;
20
20
  perBlockAllocationMultiplier: number;
21
+ perBlockDAAllocationMultiplier: number;
21
22
  redistributeCheckpointBudget: true;
22
- enforceTimeTable: true;
23
+ blockDurationMs: number;
24
+ l1PublishingTime: number;
25
+ checkpointProposalSyncGraceSeconds: number;
23
26
  attestationPropagationTime: number;
24
27
  secondsBeforeInvalidatingBlockAsCommitteeMember: number;
25
28
  secondsBeforeInvalidatingBlockAsNonCommitteeMember: number;
@@ -31,7 +34,9 @@ export declare const DefaultSequencerConfig: {
31
34
  injectFakeAttestation: false;
32
35
  injectHighSValueAttestation: false;
33
36
  injectUnrecoverableSignatureAttestation: false;
37
+ injectYParityAttestation: false;
34
38
  fishermanMode: false;
39
+ governanceProposerForcePayloadVote: false;
35
40
  shuffleAttestationOrdering: false;
36
41
  skipPushProposedBlocksToArchiver: false;
37
42
  skipPublishingCheckpointsPercent: number;
@@ -40,11 +45,11 @@ export declare const DefaultSequencerConfig: {
40
45
  /**
41
46
  * Configuration settings for the SequencerClient.
42
47
  */
43
- export type SequencerClientConfig = SequencerPublisherConfig & KeyStoreConfig & ValidatorClientConfig & SequencerTxSenderConfig & SequencerConfig & L1ReaderConfig & ChainConfig & PipelineConfig & Pick<P2PConfig, 'txPublicSetupAllowListExtend'> & Pick<L1ContractsConfig, 'ethereumSlotDuration' | 'aztecSlotDuration' | 'aztecEpochDuration'>;
48
+ export type SequencerClientConfig = SequencerPublisherConfig & KeyStoreConfig & ValidatorClientConfig & SequencerTxSenderConfig & SequencerConfig & L1ReaderConfig & ChainConfig & Pick<P2PConfig, 'txPublicSetupAllowListExtend'> & Pick<L1ContractsConfig, 'ethereumSlotDuration' | 'aztecSlotDuration' | 'aztecEpochDuration'>;
44
49
  export declare const sequencerConfigMappings: ConfigMappingsType<SequencerConfig>;
45
50
  export declare const sequencerClientConfigMappings: ConfigMappingsType<SequencerClientConfig>;
46
51
  /**
47
52
  * Creates an instance of SequencerClientConfig out of environment variables using sensible defaults for integration testing if not set.
48
53
  */
49
54
  export declare function getConfigEnvVars(): SequencerClientConfig;
50
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvY29uZmlnLnRzIl0sIm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K,qBAAqB,EAAiC,MAAM,gCAAgC,CAAC;AAE3G,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAG7B,MAAM,uBAAuB,CAAC;AAE/B,cAAc,uBAAuB,CAAC;AACtC,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BA,CAAC;AAEpC;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,GAC1D,cAAc,GACd,qBAAqB,GACrB,uBAAuB,GACvB,eAAe,GACf,cAAc,GACd,WAAW,GACX,IAAI,CAAC,SAAS,EAAE,8BAA8B,CAAC,GAC/C,IAAI,CAAC,iBAAiB,EAAE,sBAAsB,GAAG,mBAAmB,GAAG,oBAAoB,CAAC,CAAC;AAE/F,eAAO,MAAM,uBAAuB,EAAE,kBAAkB,CAAC,eAAe,CAoMvE,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,kBAAkB,CAAC,qBAAqB,CASnF,CAAC;AAEF;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,qBAAqB,CAExD"}
package/dest/config.js CHANGED
@@ -1,11 +1,12 @@
1
1
  import { l1ContractsConfigMappings } from '@aztec/ethereum/config';
2
2
  import { l1ReaderConfigMappings } from '@aztec/ethereum/l1-reader';
3
- import { booleanConfigHelper, getConfigFromMappings, numberConfigHelper, optionalNumberConfigHelper, pickConfigMappings } from '@aztec/foundation/config';
3
+ import { booleanConfigHelper, floatConfigHelper, getConfigFromMappings, numberConfigHelper, optionalNumberConfigHelper, pickConfigMappings } from '@aztec/foundation/config';
4
4
  import { EthAddress } from '@aztec/foundation/eth-address';
5
5
  import { keyStoreConfigMappings } from '@aztec/node-keystore/config';
6
6
  import { p2pConfigMappings } from '@aztec/p2p/config';
7
7
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
8
- import { DEFAULT_MAX_BLOCKS_PER_CHECKPOINT, chainConfigMappings, pipelineConfigMappings, sharedSequencerConfigMappings } from '@aztec/stdlib/config';
8
+ import { DEFAULT_BLOCK_DURATION_MS, DEFAULT_MAX_BLOCKS_PER_CHECKPOINT, chainConfigMappings, sharedSequencerConfigMappings } from '@aztec/stdlib/config';
9
+ import { MIN_PER_BLOCK_ALLOCATION_MULTIPLIER, MIN_PER_BLOCK_DA_ALLOCATION_MULTIPLIER } from '@aztec/stdlib/gas';
9
10
  import { DEFAULT_P2P_PROPAGATION_TIME } from '@aztec/stdlib/timetable';
10
11
  import { validatorClientConfigMappings } from '@aztec/validator-client/config';
11
12
  import { sequencerPublisherConfigMappings, sequencerTxSenderConfigMappings } from './publisher/config.js';
@@ -18,9 +19,12 @@ export * from './publisher/config.js';
18
19
  minTxsPerBlock: 1,
19
20
  buildCheckpointIfEmpty: false,
20
21
  publishTxsWithProposals: false,
21
- perBlockAllocationMultiplier: 1.2,
22
+ perBlockAllocationMultiplier: MIN_PER_BLOCK_ALLOCATION_MULTIPLIER,
23
+ perBlockDAAllocationMultiplier: MIN_PER_BLOCK_DA_ALLOCATION_MULTIPLIER,
22
24
  redistributeCheckpointBudget: true,
23
- enforceTimeTable: true,
25
+ blockDurationMs: DEFAULT_BLOCK_DURATION_MS,
26
+ l1PublishingTime: 12,
27
+ checkpointProposalSyncGraceSeconds: 2 * (DEFAULT_BLOCK_DURATION_MS / 1000),
24
28
  attestationPropagationTime: DEFAULT_P2P_PROPAGATION_TIME,
25
29
  secondsBeforeInvalidatingBlockAsCommitteeMember: 144,
26
30
  secondsBeforeInvalidatingBlockAsNonCommitteeMember: 432,
@@ -32,7 +36,9 @@ export * from './publisher/config.js';
32
36
  injectFakeAttestation: false,
33
37
  injectHighSValueAttestation: false,
34
38
  injectUnrecoverableSignatureAttestation: false,
39
+ injectYParityAttestation: false,
35
40
  fishermanMode: false,
41
+ governanceProposerForcePayloadVote: false,
36
42
  shuffleAttestationOrdering: false,
37
43
  skipPushProposedBlocksToArchiver: false,
38
44
  skipPublishingCheckpointsPercent: 0,
@@ -75,7 +81,12 @@ export const sequencerConfigMappings = {
75
81
  perBlockAllocationMultiplier: {
76
82
  env: 'SEQ_PER_BLOCK_ALLOCATION_MULTIPLIER',
77
83
  description: 'Per-block gas budget multiplier for both L2 and DA gas. Budget per block is (checkpointLimit / maxBlocks) * multiplier.' + ' Values greater than one allow early blocks to use more than their even share, relying on checkpoint-level capping for later blocks.',
78
- ...numberConfigHelper(DefaultSequencerConfig.perBlockAllocationMultiplier)
84
+ ...floatConfigHelper(DefaultSequencerConfig.perBlockAllocationMultiplier)
85
+ },
86
+ perBlockDAAllocationMultiplier: {
87
+ env: 'SEQ_PER_BLOCK_DA_ALLOCATION_MULTIPLIER',
88
+ description: 'Per-block budget multiplier applied to DA gas and blob fields in place of perBlockAllocationMultiplier.' + ' Defaults higher than the general multiplier so the largest contract class deploy fits a single block.',
89
+ ...floatConfigHelper(DefaultSequencerConfig.perBlockDAAllocationMultiplier)
79
90
  },
80
91
  redistributeCheckpointBudget: {
81
92
  env: 'SEQ_REDISTRIBUTE_CHECKPOINT_BUDGET',
@@ -89,7 +100,7 @@ export const sequencerConfigMappings = {
89
100
  },
90
101
  feeRecipient: {
91
102
  env: 'FEE_RECIPIENT',
92
- parseEnv: (val)=>AztecAddress.fromString(val),
103
+ parseEnv: (val)=>AztecAddress.fromStringUnsafe(val),
93
104
  description: 'Address to receive fees.'
94
105
  },
95
106
  acvmWorkingDirectory: {
@@ -100,20 +111,20 @@ export const sequencerConfigMappings = {
100
111
  env: 'ACVM_BINARY_PATH',
101
112
  description: 'The path to the ACVM binary'
102
113
  },
103
- enforceTimeTable: {
104
- env: 'SEQ_ENFORCE_TIME_TABLE',
105
- description: 'Whether to enforce the time table when building blocks',
106
- ...booleanConfigHelper(DefaultSequencerConfig.enforceTimeTable)
107
- },
108
114
  governanceProposerPayload: {
109
115
  env: 'GOVERNANCE_PROPOSER_PAYLOAD_ADDRESS',
110
116
  description: 'The address of the payload for the governanceProposer',
111
117
  parseEnv: (val)=>EthAddress.fromString(val)
112
118
  },
119
+ governanceProposerForcePayloadVote: {
120
+ env: 'GOVERNANCE_PROPOSER_FORCE_PAYLOAD_VOTE',
121
+ description: 'Keep signalling the configured governance payload even if a proposal referencing it was already executed.',
122
+ ...booleanConfigHelper(DefaultSequencerConfig.governanceProposerForcePayloadVote)
123
+ },
113
124
  l1PublishingTime: {
114
125
  env: 'SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT',
115
- description: 'How much time (in seconds) we allow in the slot for publishing the L1 tx (defaults to 1 L1 slot).',
116
- ...optionalNumberConfigHelper()
126
+ description: 'How much time in seconds to allow in the slot for publishing the L1 transaction.',
127
+ ...numberConfigHelper(DefaultSequencerConfig.l1PublishingTime)
117
128
  },
118
129
  fakeProcessingDelayPerTxMs: {
119
130
  description: 'Used for testing to introduce a fake delay after processing each tx'
@@ -167,6 +178,10 @@ export const sequencerConfigMappings = {
167
178
  description: 'Inject an attestation with an unrecoverable signature (for testing only)',
168
179
  ...booleanConfigHelper(DefaultSequencerConfig.injectUnrecoverableSignatureAttestation)
169
180
  },
181
+ injectYParityAttestation: {
182
+ description: 'Inject a non-proposer attestation slot in yParity form in the packed L1 tuple (for testing only)',
183
+ ...booleanConfigHelper(DefaultSequencerConfig.injectYParityAttestation)
184
+ },
170
185
  fishermanMode: {
171
186
  env: 'FISHERMAN_MODE',
172
187
  description: 'Whether to run in fisherman mode: builds blocks on every slot for validation without publishing to L1',
@@ -183,7 +198,7 @@ export const sequencerConfigMappings = {
183
198
  ...booleanConfigHelper(DefaultSequencerConfig.buildCheckpointIfEmpty)
184
199
  },
185
200
  skipPushProposedBlocksToArchiver: {
186
- description: 'Skip pushing proposed blocks to archiver (default: true)',
201
+ description: 'Skip pushing proposed blocks to archiver (test only)',
187
202
  ...booleanConfigHelper(DefaultSequencerConfig.skipPushProposedBlocksToArchiver)
188
203
  },
189
204
  minBlocksForCheckpoint: {
@@ -217,7 +232,6 @@ export const sequencerClientConfigMappings = {
217
232
  ...l1ReaderConfigMappings,
218
233
  ...sequencerTxSenderConfigMappings,
219
234
  ...sequencerPublisherConfigMappings,
220
- ...pipelineConfigMappings,
221
235
  ...pickConfigMappings(l1ContractsConfigMappings, [
222
236
  'ethereumSlotDuration',
223
237
  'aztecSlotDuration',
@@ -34,4 +34,4 @@ export declare class FeePredictor {
34
34
  private getAssumedManaUsed;
35
35
  private computeGasFees;
36
36
  }
37
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVlX3ByZWRpY3Rvci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2dsb2JhbF92YXJpYWJsZV9idWlsZGVyL2ZlZV9wcmVkaWN0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFvRCxLQUFLLGNBQWMsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBR2xILE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBRTVELE9BQU8sRUFFTCxPQUFPLEVBRVAsaUJBQWlCLEVBR2xCLE1BQU0sbUJBQW1CLENBQUM7QUFlM0I7Ozs7O0dBS0c7QUFDSCxxQkFBYSxZQUFZO0lBU3JCLE9BQU8sQ0FBQyxRQUFRLENBQUMsY0FBYztJQUMvQixPQUFPLENBQUMsUUFBUSxDQUFDLFlBQVk7SUFDN0IsT0FBTyxDQUFDLFFBQVEsQ0FBQyxZQUFZO0lBVi9CLE9BQU8sQ0FBQyxXQUFXLENBQXNDO0lBQ3pELE9BQU8sQ0FBQyxtQkFBbUIsQ0FBcUI7SUFFaEQsT0FBTyxDQUFDLFFBQVEsQ0FBQyxZQUFZLENBQVM7SUFDdEMsT0FBTyxDQUFDLFFBQVEsQ0FBQyxhQUFhLENBQVM7SUFDdkMsT0FBTyxDQUFDLFFBQVEsQ0FBQyxvQkFBb0IsQ0FBUztJQUU5QyxZQUNt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or.d.ts","sourceRoot":"","sources":["../../src/global_variable_builder/fee_predictor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoD,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGlH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAEL,OAAO,EAEP,iBAAiB,EAGlB,MAAM,mBAAmB,CAAC;AAe3B;;;;;GAKG;AACH,qBAAa,YAAY;IASrB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAV/B,OAAO,CAAC,WAAW,CAAsC;IACzD,OAAO,CAAC,mBAAmB,CAAqB;IAEhD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAS;IAE9C,YACmB,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE;QAAE,cAAc,EAAE,CAAC,IAAI,CAAC,EAAE;YAAE,SAAS,CAAC,EAAE,MAAM,CAAA;SAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;KAAE,EACpF,YAAY,EAAE,YAAY,EAC3C,MAAM,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,oBAAoB,EAAE,MAAM,CAAA;KAAE,EAKtF;IAED,yEAAyE;IACnE,mBAAmB,CAAC,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAG1E;YAGa,QAAQ;YASR,UAAU;IAiDxB,wFAAwF;IACxF,OAAO,CAAC,kBAAkB;IAuB1B,OAAO,CAAC,kBAAkB;IAW1B,OAAO,CAAC,cAAc;CAmBvB"}
1
+ {"version":3,"file":"fee_predictor.d.ts","sourceRoot":"","sources":["../../src/global_variable_builder/fee_predictor.ts"],"names":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this.cachedL1BlockNumber) {
37
37
  this.cachedL1BlockNumber = blockNumber;
38
- this.cachedState = this.fetchState(blockNumber);
38
+ // Reset the cached block number on failure so a transient L1 RPC error does not leave a
39
+ // rejected promise cached for this block, which would replay the same rejection on every
40
+ // subsequent call until the next L1 block arrives. Only clear it if it still points at the
41
+ // block this attempt was for, so a stale rejection from an older block cannot wipe a marker
42
+ // a newer call already advanced (which would also defeat the monotonic block-number guard).
43
+ this.cachedState = this.fetchState(blockNumber).catch((err)=>{
44
+ if (this.cachedL1BlockNumber === blockNumber) {
45
+ this.cachedL1BlockNumber = undefined;
46
+ }
47
+ throw err;
48
+ });
39
49
  }
40
50
  return this.cachedState;
41
51
  }
@@ -18,4 +18,4 @@ export declare class FeeProviderImpl implements FeeProvider {
18
18
  getCurrentMinFees(): Promise<GasFees>;
19
19
  getPredictedMinFees(manaUsage?: ManaUsageEstimate): Promise<GasFees[]>;
20
20
  }
21
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVlX3Byb3ZpZGVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZ2xvYmFsX3ZhcmlhYmxlX2J1aWxkZXIvZmVlX3Byb3ZpZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFFOUQsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFFNUQsT0FBTyxFQUFFLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQy9ELE9BQU8sS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBR3BELE9BQU8sS0FBSyxFQUFFLDJCQUEyQixFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFFdkUsOEV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