You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
kona-node,safedb,perf: persist safe-head updates once per L1 block #23480
Part of ethereum-optimism/protocol-team#442 (long-term Kona improvements).
Timing
This is a long-term optimization, not a completion requirement for the current SafeDB integration (#23473).
Scope
Supersedes #23112 — op-node: write the safe-head DB once per L1 block, not per safe head for the ongoing Kona-only optimization. Carry forward the design from that proposal and superseded #22528: persist the SafeDB update once per L1 block after derivation moves past it, instead of persisting every safe-head advance at the same L1 key.
Design this for kona-node only; op-node is not changed. Preserve existing RPC answers and these constraints:
Queries must see pending, not-yet-persisted updates: superroot_atTimestamp expects history for every block at or below local-safe.
Finalized must never advance beyond the database on disk. Buffering writes must preserve persistence-before-finalization ordering.
Resets, shutdowns, restarts, and write failures must not leave pending updates silently lost or serve inconsistent history.
Gap detection and interval-based storage are tracked separately in #23659. This issue changes write frequency, not how missing coverage is represented. Coordinate the designs if combined; neither optimization requires the other.
Done and testing
The buffering, flush boundary, query visibility, and finalization ordering are designed and agreed with the Kona owners.
Multiple safe-head advances at one L1 block result in one persistence operation when derivation passes that block, with identical RPC answers.
Unit tests cover pending-read visibility, flush timing, persistence-before-finalization, resets, shutdown/restart behavior, and write failures using injected storage.
Acceptance coverage verifies complete-history parity with op-node across steady derivation, reset/reorg, and restart.
The current integration passed its 24-hour persistence soak and #23479 is closed. Final evidence. The deployed merged build was validated as-is; this does not implement buffered writes or once-per-L1 persistence. This issue remains open as deferred long-term work under ethereum-optimism/protocol-team#442; none of its implementation checkboxes are completed by the soak.
changed the title [-]kona-safedb,op-node: write once per L1 block and gap detection[/-][+]kona-safedb: write once per L1 block and gap detection[/+]on Oct 22, 2026
changed the title [-]kona-safedb: write once per L1 block and gap detection[/-][+]kona-safedb: persist safe-head updates once per L1 block[/+]on Oct 26, 2026
changed the title [-]kona-safedb: persist safe-head updates once per L1 block[/-][+]kona-node,safedb,perf: persist safe-head updates once per L1 block[/+]on Oct 26, 2026
🤖 Claude Opus 5.5 says: Two findings from the shelved op-node prototype for #23112 that may help the kona design:
Flush points. Keep the pending entry in memory, where queries can see it. Write it when a safe head arrives for a different L1 block, when derivation is idle at the L1 head, before a reset truncates the database, and on close.
Finalization ordering. Flushing before every forkchoice update undid the batching on the derive path. Only a forkchoice update that moves finalized has to flush first: after a restart, derivation re-derives an unwritten safe head above finalized, but never one below it, so that one would leave a permanent gap.
Activity
einar-oplabs commentedon Oct 22, 2026
Design context: the January discussion of a first-class derivation record, including recording every L1 block so gaps are observable and the DerivationDB name, is on Notion: https://app.notion.com/p/oplabs/Derivation-Persistence-SafeDB-2e8f153ee16280548875e0e628b85d94
[-]kona-safedb,op-node: write once per L1 block and gap detection[/-][+]kona-safedb: write once per L1 block and gap detection[/+][-]kona-safedb: write once per L1 block and gap detection[/-][+]kona-safedb: persist safe-head updates once per L1 block[/+][-]kona-safedb: persist safe-head updates once per L1 block[/-][+]kona-node,safedb,perf: persist safe-head updates once per L1 block[/+]sebastianst commentedon Nov 4, 2026
🤖 Claude Opus 5.5 says: Two findings from the shelved op-node prototype for #23112 that may help the kona design:
einar-oplabs commentedon Nov 13, 2026
This is a long-term goal. Unassigning for now.