Skip to content

kona-node,safedb: serve optimism_safeHeadAtL1Block #23475

Closed

Description

@einar-oplabs

Part of #23473.

Scope

Replace the MethodNotFound stub for optimism_safeHeadAtL1Block in rust/kona/crates/node/rpc/src/rollup.rs with a real handler backed by kona-safedb. The answer is the highest entry at or below the requested L1 block, in the same response shape as op-node (eth.SafeHeadResponse: the L1 block and the L2 safe head).

Remove the comment that says the method is unnecessary post-interop.

Done

  • Handler returns the recorded safe head for L1 blocks inside the recorded range.
  • Below the first entry and when the database is disabled, the handler returns the error shape chosen in the config sub-issue.
  • Response matches op-node for the same L1 block on a devstack network (checkSafeHeadConsistent).
  • Unit tests cover in-range, below-range, above-tip, and disabled.

Status evidence: merged #23590 implements the handler and in-range, below-range, above-tip, disabled-state, and parameter-decoding tests. #23585 reports the direct parity scenarios passing locally before the final integration revisions; all six parity cases have now passed native CI on #23818 (53f6a13500), with the deliberate wrong-key control also verified. Review and merging of the follow-up remain pending.

Status — 2026-10-29

24-hour soak passed on 2026-10-29: 7,454/7,454 SafeDB queries matched op-node: 7,422 consecutive queries across L1 12,014,303–12,021,724 plus 32 older queries, with zero RPC errors/mismatches and all 5,758 prior answers unchanged. The upper bound was safe on both nodes at 19:51:48 UTC, beyond the 19:50:49 UTC soak endpoint. Kona retained its original PVC and had zero container restarts after the controlled pod recreation. Final evidence.

This supplies final merged-build live optimism_safeHeadAtL1Block parity evidence. The separate six-case reset/reorg/resync package and wrong-key control now pass in #23818; the soak itself did not establish those results. Merging remains tracked in #23473.

Activity

  1. self-assigned this
    on Oct 16, 2026
  2. changed the title [-]kona-node: serve optimism_safeHeadAtL1Block from kona-safedb[/-] [+]kona-node,safedb: serve optimism_safeHeadAtL1Block[/+] on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions