op-reth: pin OP engine defaults and audit deployments for reth v2.5.2 flag changes
Found while reviewing the reth v2.5.2 bump (#22495). Operator-facing changes inherited from upstream; op-reth sets no engine defaults of its own.
Defaults moved (visible in the CLI snapshot, cli.snap): --engine.persistence-threshold 2 → 7; --engine.memory-block-buffer-target default 0 → min(threshold, 5); --engine.persistence-backpressure-threshold (still 16) is now measured beyond the buffer target, so the stall point moves from 16 to ~21 unpersisted blocks. On 2 s or sub-second OP block times the DB tip lags the head by 5 blocks and up to 7 may be unpersisted: larger crash-recovery redo window and engine memory.
Startup constraints (EngineArgs::validate): buffer target must not exceed the threshold; masking blocks + buffer must stay below the threshold; --engine.txpool-prewarming conflicts with --engine.disable-state-cache. A deployment passing e.g. --engine.memory-block-buffer-target 5 --engine.persistence-threshold 2 now fails to start. --engine.sparse-trie-max-hot-slots / -storage-tries / -accounts were removed (clap rejects them) and the sparse_trie_retained_memory_bytes gauge is gone.
Env-activated flags: --engine.txpool-prewarming and --engine.sender-recovery-cache read RETH_ENGINE_TXPOOL_PREWARMING / RETH_ENGINE_SENDER_RECOVERY_CACHE. The recovery cache is populated by the network component on OP but never read: OpEvmConfig recovers senders directly (lib.rs), unlike EthEvmConfig.
Other: reth.toml bootnodes now takes precedence over the superchain-registry bootnodes; RocksDB keeps all files open when RLIMIT_NOFILE >= 128k.
Proposed: (1) pin OP-specific engine defaults with DefaultEngineValues::try_init (engine.rs) so upstream tuning churn shows up in our diff instead of silently; (2) audit deployed engine flags (k8s, devnets) before rolling out; (3) either wire SenderRecoveryCache into OpEvmConfig or make the flag a no-op on OP.
Co-created with Claude Fable 5.1
Source: ethereum-optimism/optimism