feat(node/service): Delay sequencer's view of L1 chain#2568
Conversation
62782fd to
cd74237
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR implements a confirmation-delayed provider for the sequencer's L1 origin selector to prevent selecting L1 origins too close to the chain tip, reducing reorganization-related issues.
- Introduces
DelayedL1OriginSelectorProviderthat wraps the existing provider and delays block-by-number requests based on a configurable confirmation depth - Adds L1 head tracking to the sequencer context to enable the delay logic
- Updates sequencer configuration to include the L1 confirmation delay parameter
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
crates/node/service/src/service/core.rs |
Adds L1 head receiver to sequencer context |
crates/node/service/src/lib.rs |
Exports new DelayedL1OriginSelectorProvider type |
crates/node/service/src/actors/sequencer/origin_selector.rs |
Implements the delayed provider with confirmation depth logic |
crates/node/service/src/actors/sequencer/mod.rs |
Exports the new delayed provider type |
crates/node/service/src/actors/sequencer/config.rs |
Adds L1 confirmation delay configuration field |
crates/node/service/src/actors/sequencer/actor.rs |
Updates sequencer to use delayed provider and handle new configuration |
crates/node/service/src/actors/mod.rs |
Re-exports the delayed provider type |
abce415 to
0d67201
Compare
refcell
left a comment
There was a problem hiding this comment.
This doesn't update the derivation pipeline's view of the l1 chain though like the issue suggests right?
Yeah not yet. Just for the sequencer. The L1 conf depth in the derivation pipeline will be split into a separate ticket. |
## Overview Adds the confirmation-delayed provider for the sequencer's L1 origin selector. This provider holds a reference to the L1 chain's head, and delays any block-by-number requests by a configurable amount. This prevents the sequencer from selecting an origin too close to the tip of the chain, resulting in fewer L1 origin selections that are reorganized out. closes op-rs/kona#2401
## Overview Adds the confirmation-delayed provider for the sequencer's L1 origin selector. This provider holds a reference to the L1 chain's head, and delays any block-by-number requests by a configurable amount. This prevents the sequencer from selecting an origin too close to the tip of the chain, resulting in fewer L1 origin selections that are reorganized out. closes #2401
Overview
Adds the confirmation-delayed provider for the sequencer's L1 origin selector. This provider holds a reference to the L1 chain's head, and delays any block-by-number requests by a configurable amount. This prevents the sequencer from selecting an origin too close to the tip of the chain, resulting in fewer L1 origin selections that are reorganized out.
closes #2401