Skip to content

opgeth-decoupling: wire op-core/superchain across the monorepo (decouple from op-geth superchain) #21485

Closed

Description

@sebastianst

Sub-issue of #20271. Implements the superchain slice of the op-core decoupling (see §6–§7 of the op-geth decoupling doc): make the monorepo use the in-repo op-core/superchain package only, so no Go code imports github.com/ethereum/go-ethereum/superchain.

After this lands, op-geth's bundled superchain-registry is no longer synced or consumed by the monorepo, so the op-geth cross-check is removed (not kept as transition scaffolding).

Scope

Swap all consumers → op-core/superchain

github.com/ethereum/go-ethereum/superchain → github.com/ethereum-optimism/optimism/op-core/superchain:

Remove the op-geth cross-checks

  • op-core/superchain/init.go: drop the op-geth cross-commit check (the last in-package importer); rename VerifyEmbeddedCommit → VerifyEmbeddedBundle (SHA256-only).
  • op-core/params/load_test.go: replace TestGethChainConfigMatchesOpGeth (differential vs op-geth) with a self-contained TestGethChainConfigMapping.

Delete op-service/superutil/

Last op-geth superchain importer outside op-core. Migrate its one consumer op-chain-ops/cmd/op-simulate/main.go to op-core/params.LoadChainConfigFromChainID(...).GethChainConfig().

Build wiring (supersedes the sync-superchain note in #20271)

op-node and ~13 other binaries now embed superchain-configs.zip at compile time. Rather than auditing every just recipe and Dockerfile individually, the zip is regenerated inside the shared op-stack-go Docker builder stage (ops/docker/op-stack-go/Dockerfile) from the superchain-registry submodule data (un-ignored into the build context), git-free, and verified against the committed .sha256. To enable that, op-core/superchain/sync-superchain.sh is reworked: git-free REPO_ROOT, dual default(verify)/refresh modes, and the bundle no longer embeds the SR commit (so it's reproducible from data alone — no commit to thread into Docker). justfile (build-go prereq, refresh-mode bump) and CircleCI prep-superchain (refresh mode) are updated to match.

Out of scope

The other slices of #20271 — eip1559 and fees — are unaffected and tracked separately.

🤖 Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    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