Skip to content

feat(op-node): default syncmode.offset-el-safe to 12h#21033

Merged
teddyknox merged 1 commit into
developfrom
pcw109550/el-offset-flag-default
May 27, 2026
Merged

feat(op-node): default syncmode.offset-el-safe to 12h#21033
teddyknox merged 1 commit into
developfrom
pcw109550/el-offset-flag-default

Conversation

@pcw109550
Copy link
Copy Markdown
Member

@pcw109550 pcw109550 commented May 26, 2026

Summary

  • Default --syncmode.offset-el-safe from 0 to 12h, matching the OP Mainnet sequencing window (SeqWindowSize = 3600 L1 blocks × 12s). Activates the offset mechanism from op-node: offset_derived for EL-sync safe/finalized retraction #19972.
  • Drop the Check() rejection of a nonzero offset under non-EL sync modes; NewSyncConfig now warns and zeros the offset instead, so the new default is non-breaking for CL-sync deployments.

Background

After EL sync completes, op-node sets safe = finalized = unsafe tip without any derivation having validated that range — a correctness bug raised in #17631. #19972 added --syncmode.offset-el-safe to retract safe/finalized by a configurable duration and let derivation forward-validate, but it shipped with a 0 default, leaving the bug latent.

Why 12h

Refer #17631 (comment)

Related

Set --syncmode.offset-el-safe to a nonzero default so safe and finalized
heads no longer collapse onto the unsafe tip when EL sync completes (the
correctness bug from #17631).

12h matches the OP Mainnet sequencing window: past the seq window,
derivation can deterministically validate the retracted range, giving
the minimum offset that restores safe/finalized correctness without
demanding the multi-day derivation backlog a 168h default would impose.

Also relax the validator: when --syncmode != execution-layer, log a
warning and zero the offset instead of erroring, so the new default is
non-breaking for CL-sync deployments.
@pcw109550 pcw109550 requested a review from sebastianst May 26, 2026 14:29
@pcw109550 pcw109550 marked this pull request as ready for review May 26, 2026 14:31
@pcw109550 pcw109550 requested a review from a team as a code owner May 26, 2026 14:31
@teddyknox teddyknox self-requested a review May 26, 2026 19:08
Copy link
Copy Markdown
Contributor

@karlfloersch karlfloersch left a comment

Choose a reason for hiding this comment

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

I'd recommend also getting approval from others, but I'm personally in favor of this change.

The only reason we didn't set it to 12 hours initially was to keep usage of the feature as opt-in. However, I think we really should set default behavior to 12h because a zero offset is a significant foot gun.

@pcw109550
Copy link
Copy Markdown
Member Author

Currently running a sync test at op-sepolia-opn-geth-f-synctest-0, using baked image op-node/v1.18.3-pr21033.0 from this commit 6e8006b. EL Syncing from genesis is in progress.

Copy link
Copy Markdown
Contributor

@teddyknox teddyknox left a comment

Choose a reason for hiding this comment

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

LGTM.

@teddyknox teddyknox added this pull request to the merge queue May 27, 2026
Merged via the queue into develop with commit 318838e May 27, 2026
98 checks passed
@teddyknox teddyknox deleted the pcw109550/el-offset-flag-default branch May 27, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

op-node: On the Initial EL Sync UX and Correctness

3 participants