Repository navigation
feat(sequencer): seal payloads on freeze notifications from execution layer - #6557
Conversation
✅ Heimdall Review Status
|
4126eec to
620a3cb
Compare
|
The design looks right to me: the hint is matched on payload id and parent hash, the 150 ms deadline stays as the fallback, and the child build is still pinned to the parent's timestamp. One request before merge: please add metrics. As written we can't tell in production how often early seal fires or how much earlier blocks go out, and we'll need both to report the impact to searchers. At minimum:
Optionally, a counter of hints dropped by reason (stale id or parent, already sealing, lagged) would make mismatches easy to debug. |
Count seals by trigger, record when getPayload and gossip happen relative to the slot start, and count frozen-payload hints sent by the builder and dropped by the sequencer.
| payload_ready: self | ||
| .payload_ready | ||
| .as_ref() | ||
| .map(broadcast::Receiver::resubscribe), |
There was a problem hiding this comment.
resubscribe leaves the original receiver in RollupNode::payload_ready alive and never read, so sender.send always succeeds: base_builder_payload_ready_hints_sent_total{result="no_receiver"} can never fire in the unified binary, and delivered counts hints even when no sequencer actor is consuming them. Moving the receiver into the actor (e.g. self.payload_ready.take() if self can be borrowed mutably here) would make the metric reflect real delivery.
…ed payload id Track the frozen hint on the payload handle so it cannot outlive its build, and treat a hint as having lost to the deadline only when it matches no active build.
It stopped at the handoff to the network actor rather than the publish, so it added little over the getPayload offset.
A Denim build reads the transaction pool once, after the build is requested, so this offset is the deadline for landing in that block.
Cover build starts recorded outside the ticker, assert the getPayload offset is taken before the request, and describe the build start offset as part of the searcher reaction window.
| } = self; | ||
| let mut base_node = BaseNode::new(rollup_args); | ||
| let (payload_ready_tx, payload_ready) = broadcast::channel(PAYLOAD_READY_CAPACITY); | ||
| base_node.payload_ready = Some(payload_ready_tx); |
There was a problem hiding this comment.
launch() now creates the channel for every runner-based node, not just the unified sequencer. That includes the standalone bin/builder via run(), which drops payload_ready, and dev/rpc/follow. So in split EL/CL deployments every frozen sequencer build sends a hint and increments payload_ready_hints_sent_total{result="no_receiver"}. This contradicts the PR's "split deployments are unchanged" and the unit test's claim that split deployments "configure no channel and must not report hints". Consider creating the sender only when the caller asks for the receiver, for example with an opt-in on BaseNodeRunner that sequencer.rs uses.
|
The early-seal path looks safe for block production. Hints are fixed-size and sent with a non-blocking One new finding, posted inline: |
… layer (backport #6557 to v1.5.5) (#6567) * feat(sequencer): seal payloads on execution freeze notifications Backport of #6557 to releases/v1.5.5. * test(builder): exercise native payload-ready wiring * test(sequencer): cover searcher next-block inclusion with early broadcast * docs: update the docs index for frozen payload notifications * chore(payload): order the tokio dependency by line length * feat(sequencer): add early-seal metrics Count seals by trigger, record when getPayload and gossip happen relative to the slot start, and count frozen-payload hints sent by the builder and dropped by the sequencer. * docs(runner): note the exported prefix of early-seal metrics * fix(sequencer): seal early when a hinted rebuild reuses the last sealed payload id Track the frozen hint on the payload handle so it cannot outlive its build, and treat a hint as having lost to the deadline only when it matches no active build. * refactor(sequencer): drop the gossip offset metric It stopped at the handoff to the network actor rather than the publish, so it added little over the getPayload offset. * feat(sequencer): record when each block build starts in its slot A Denim build reads the transaction pool once, after the build is requested, so this offset is the deadline for landing in that block. * fix(sequencer): measure slot start from the parent timestamp on the release branch The isolated-sequencer schedule delay that block_deadline applies on main is not on releases/v1.5.5. * test(sequencer): pin when early-seal offsets are taken Cover build starts recorded outside the ticker, assert the getPayload offset is taken before the request, and describe the build start offset as part of the searcher reaction window. * docs: restamp the runner README in the docs index * test(builder): stop deriving multiplex smoke timestamps from wall clock (#6455) Denim activated on mainnet, so the smoke test's wall-clock-based payload attributes became post-Denim attributes, which the engine rejects unless they carry the BaseTime update deposit at tx[1]. Anchor the build timestamp to the last legacy block slot before Denim activation instead: past every scheduled fork and still pre-Denim, so a single legacy block stays valid regardless of when the test runs. Amp-Thread-ID: https://ampcode.com/threads/T-09d6a81e-204d-45bb-a227-69764d686e37 Co-authored-by: Amp <[email protected]> (cherry picked from commit 407af44) --------- Co-authored-by: Julian Meyer <[email protected]> Co-authored-by: Amp <[email protected]>
Summary
When a Denim block finishes building, the execution layer notifies the consensus layer. This starts
getPayload, conductor commit, and gossip immediately instead of waiting for the 150 ms seal deadline.Searcher problem solved
Before this change, a block that froze early was still gossiped only after the 150 ms seal deadline. A searcher reacting to block B reached the sequencer after block B+1's build had started, so its transaction landed in B+2. With early broadcast the searcher receives B soon after it freezes and can land in B+1.
etc/systems/tests/early_broadcast.rsreproduces both cases. It runs the execution node asbase sequencerlaunches it with the production engine and sequencer actors, and a simulated searcher whose reaction reaches the sequencer 85 ms after block B is gossiped.Times are medians since the scheduled start of block B's build, from 12 local dev-build runs. Block B+1's build starts at 200 ms.
Metrics
Exported by the unified sequencer. Offsets are measured from the block's scheduled build start, which is its parent's timestamp.
reth_base_node_sequencer_seals_totaltrigger:ready_hint,deadlinegetPayload, by what prompted the request. Hit rate isready_hint / total.reth_base_node_sequencer_get_payload_offset_secondstriggergetPayloadwas requested.reth_base_node_sequencer_build_start_offset_secondsgetPayloadoffset, it gives roughly how long a searcher has to react to block B and still land in B+1: 200 ms + this for B+1 − thegetPayloadoffset of B.reth_base_node_sequencer_payload_ready_hints_dropped_totalreason:already_sealing,inactive,no_build,payload_id_mismatch,parent_mismatch,pre_denim,laggedalready_sealingmeans the deadline fetched the payload first.reth_base_builder_payload_ready_hints_sent_totalresult:delivered,no_receiverValidation
no_stdchecks passed.Full-system validation
Tested on a local devnet with real EL/CL nodes, three conductors, a receiving validator, and L1.
The chart shows local, instrumented dev-build measurements under light load. These are not mainnet latency estimates.
type=routine
risk=low
impact=sev5