#22985·optimism

op-node: Recovery reset seeds the cross-safe cache with the unsafe head

Author: ajsuttonCreated Sep 22, 2026Updated Sep 22, 2026

Claude: filed by Claude (AI assistant) from a review of ethereum-optimism/optimism#22982, on behalf of @ajsutton.

Summary

EngineController.forceReset seeds the cross-safe cache with whatever sync.FindL2Heads returns as Safe, without any check against the SuperAuthority. On two recovery paths FindL2Heads returns the unsafe head as Safe. On an interop chain the cache then holds a block that cross-chain verification never covered, and crossSafeFallback can publish it as the safe label.

This is not the ethereum-optimism/optimism#22845 path. On an ordinary L1 reorg, FindL2Heads walks strictly below the previous safe label, so the seeded value is a previously verified ancestor and ethereum-optimism/optimism#22982 is a complete fix there. Only the two recovery branches produce an unverified value.

Trace

Line numbers are on develop at ad1c8e12f43c7e9158bb5da127b0153c3e28d4ad.

  1. The two recovery branches return Safe = Unsafe, because OffsetELSafe is forced to 0 outside EL sync (op-node/service.go#L363-L366):
  2. onResetEngineRequest passes that value as both localSafe and crossSafe: engine_controller.go#L1432.
  3. forceReset stores it in the cross-safe cache with no authority check: engine_controller.go#L1265.
  4. crossSafeCache.Get validates only <= localSafeHead and EL canonicality (cross_safe_cache.go#L33-L57), both of which the seeded value satisfies, because the reset also set localSafeHead to it.
  5. crossSafeFallback therefore returns it whenever the verified head is ahead of local-safe (engine_controller.go#L296-L304), and SafeL2Head() reaches the EL as fc.SafeBlockHash, where op-geth applies SetSafe.

The reset path is reachable with a SuperAuthority registered: SyncDeriver.onResetEvent emits ResetEngineRequestEvent unconditionally (sync_deriver.go#L225-L230) and SyncDeriver is registered regardless of superAuthority (driver.go#L90-L105). The comment "This event is not used in interop" at engine_controller.go#L40-L44 is not enforced by code.

Spec rule

The initiating messages for all dependent executing messages MUST be resolved as safe before an L2 block can transition from being unsafe to safe.

interop/verifier.html#safety, specs 344a78a2812f0775027492250dee35358fd76dfa.

Impact

Low likelihood, safety consequence. Both triggers need a damaged or unusual execution client state (sync completed without finality, or an EL rewound behind its forkchoice). Not a regression: before ethereum-optimism/optimism#22982 the same branch returned localSafeHead, which is the same block.

Suggested fix

Gate the cache seed in forceReset on the SuperAuthority: when one is registered, seed only a block at or below FullyVerifiedL2Head, otherwise leave the cache empty so the fallback floors at finalized. A narrower alternative is to reject the recovery branches for interop chains instead of returning the unsafe head as safe.

Source: ethereum-optimism/optimism