Skip to content

feat(sequencer): seal payloads on freeze notifications from execution layer - #6557

Merged
haardikk21 merged 10 commits into
mainfrom
fahim/implement-el-payload-freeze-signal-to-cl
Nov 12, 2026
Merged

haardikk21 merged 10 commits into
mainfrom
fahim/implement-el-payload-freeze-signal-to-cl

Conversation

@fahimahmedx

@fahimahmedx fahimahmedx commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • The 150 ms deadline remains the fallback if no usable notification arrives.
  • The next block still starts on its normal schedule.
  • This applies to unified sequencers; split EL/CL deployments are unchanged.

Searcher problem solved

image

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.rs reproduces both cases. It runs the execution node as base sequencer launches it with the production engine and sequencer actors, and a simulated searcher whose reaction reaches the sequencer 85 ms after block B is gossiped.

Sequencer Block B gossiped Reaction reaches sequencer Reaction lands in
Early broadcast 8 ms 100 ms B+1 (36 of 36)
Seal deadline only 152 ms 244 ms B+2 (36 of 36)

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.

Metric Type Labels What it shows
reth_base_node_sequencer_seals_total counter trigger: ready_hint, deadline Payloads fetched with getPayload, by what prompted the request. Hit rate is ready_hint / total.
reth_base_node_sequencer_get_payload_offset_seconds histogram trigger When getPayload was requested.
reth_base_node_sequencer_build_start_offset_seconds histogram none When the block's build was requested from the engine. With the getPayload offset, 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 − the getPayload offset of B.
reth_base_node_sequencer_payload_ready_hints_dropped_total counter reason: already_sealing, inactive, no_build, payload_id_mismatch, parent_mismatch, pre_denim, lagged Hints that did not trigger a seal. already_sealing means the deadline fetched the payload first.
reth_base_builder_payload_ready_hints_sent_total counter result: delivered, no_receiver Hints the payload builder published.

Validation

  • 429 tests passed, including native-builder integration tests with real signed transactions.
  • Targeted lint, formatting, dependency, and no_std checks passed.

Full-system validation

Tested on a local devnet with real EL/CL nodes, three conductors, a receiving validator, and L1.

  • Early broadcasting, missing notifications, slow builds, leader transfers, and automatic failover all passed.
  • 22 ETH transfers succeeded and became safe through L1 derivation.
  • Next-block timing and committed history were preserved.

The chart shows local, instrumented dev-build measurements under light load. These are not mainnet latency estimates.

type=routine
risk=low
impact=sev5

@cb-heimdall

cb-heimdall commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Heimdall Review Status

Requirement Status More Info
Reviews ✅ 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
1 if authored by an app that is not allowlisted and lacks verified human attribution 0
Sum 1

@fahimahmedx
fahimahmedx force-pushed the fahim/implement-el-payload-freeze-signal-to-cl branch from 4126eec to 620a3cb Compare November 10, 2026 20:37
@fahimahmedx fahimahmedx changed the title feat(sequencer): seal payloads on execution freeze notifications feat(sequencer): seal payloads on freeze notifications from execution layer Nov 10, 2026
@haardikk21

Copy link
Copy Markdown
Collaborator

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:

  • a counter of seals by trigger (ready_hint vs deadline), so we can see the hit rate and catch hints that silently stop arriving
  • a histogram of when getPayload is requested relative to the slot start (or the scheduled build start), which is effectively the gossip offset

Optionally, a counter of hints dropped by reason (stale id or parent, already sealing, lagged) would make mismatches easy to debug.

@haardikk21 haardikk21 added the ci:system Run the Depot system-test suite for this PR label Nov 11, 2026
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),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

Copy link
Copy Markdown
Contributor

The early-seal path looks safe for block production. Hints are fixed-size and sent with a non-blocking broadcast::send. A hint is only acted on when its payload id, parent hash, active state and Denim activation all match. Lag or a closed channel falls back to the existing seal deadline, and getPayload still waits for the in-progress build through AwaitInProgress. I found no Critical halt or stall triggers.

One new finding, posted inline: BaseNodeRunner::launch creates the hint channel for every runner-based node, including the standalone builder and the dev, rpc and follow nodes. Split EL/CL deployments therefore publish hints that nobody reads and count them as no_receiver, which contradicts "split deployments are unchanged". This sits alongside the existing comment about resubscribe making the delivered count meaningless in the unified binary.

@haardikk21
haardikk21 added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 930bd44 Nov 12, 2026
29 checks passed
@haardikk21
haardikk21 deleted the fahim/implement-el-payload-freeze-signal-to-cl branch November 12, 2026 14:45
haardikk21 pushed a commit that referenced this pull request Nov 12, 2026
… 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:system Run the Depot system-test suite for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants