Skip to content

opgeth-decoupling: return opparams.ChainConfig from op-devstack's L2 ChainConfig() #23655

Closed

Description

@sebastianst

Part of #20265. op-devstack hands tests the go-ethereum config of an L2 network: stack.Network.ChainConfig() *params.ChainConfig, which sysgo's L2 networks implement as c.genesis.Config.GethChainConfig(). After the cutover (#20266) that config carries only the Ethereum fork schedule, and its OP-unaware methods (ElasticityMultiplier, BaseFeeChangeDenominator, LatestFork, …) return Ethereum values. That still compiles, so the ratchet can't see it — the footgun docs/ai/opgeth-decoupling.md §5 describes for embedding.

One site already relies on it: the interop load test sizes its gas target with l2B.Config.ElasticityMultiplier() (relay_test.go#L59, invalid_msg_test.go#L124, used at schedule.go#L281). op-geth returns the chain's EIP-1559 elasticity (typically 6); upstream returns Ethereum's 2, tripling the target. Even today the genesis value is stale once Holocene moves elasticity into SystemConfig and header extraData.

  • Return *opparams.ChainConfig from the L2 networks' ChainConfig() (L1 networks keep the go-ethereum config), so an OP-value read off it either works or fails to compile.
  • Load test: decode elasticity from the unsafe head's extraData with op-core/eip1559.DecodeOptimismExtraData.

🤖 Co-created with Claude Opus 5.5

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions