Skip to content

opgeth-decoupling: create op-core/superchain and op-core/eip1559 (verbatim moves) #20259

Closed
2 of 2 issues completed

Description

@sebastianst

Part of #20257. See plan §7, §8 in the op-geth decoupling doc.

Goal

Extract two self-contained packages from op-geth into op-core/ without behavioural changes.

Scope

op-core/superchain/

  • Copy the entire superchain/ package from op-geth (superchain.go, chain.go, types.go, superchain-configs.zip, plus tests) verbatim.
  • Copy sync-superchain.sh and superchain-registry-commit.txt from op-geth repo root.
  • Merge op-service/superutil/chain_config.go into this package, renaming:
    • LoadOPStackChainConfigFromChainID → LoadChainConfigFromChainID (return type will be *opparams.ChainConfig once #[params sub-issue] lands; initially returns *params.ChainConfig and gets switched there).
  • Confirm the embedded superchain-configs.zip decoder works — it only depends on BurntSushi/toml, klauspost/compress/zstd, and stdlib.

op-core/eip1559/

  • Copy op-geth's consensus/misc/eip1559/eip1559_optimism.go verbatim.
  • Rename exported ValidateOptimismExtraData → ValidateExtraData (the Optimism prefix is redundant in an op-core package).
  • Keep EncodeHolocene1559Params, DecodeHolocene1559Params, DecodeJovianExtraData unchanged.
  • No external deps beyond errors.

Out of scope (handled by other sub-issues)

  • Swapping call-sites to use the new packages (that's the "swap call-sites" sub-issue).
  • The op-core/params.LoadChainConfig function lives in the params sub-issue.

Dependencies

None. Can start in parallel with other Phase 1 issues.

🤖 Generated by Claude Code

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