Skip to content

opgeth-decoupling: keep upstream-clean packages compiling against the latest go-ethereum #23526

Closed as not planned

Description

@sebastianst

Part of #20257.

The opgeth-ratchet check type-checks against the upstream go-ethereum version op-geth is based on (v1.17.2). Downstream modules that decouple ahead of #20266 move to the latest upstream go-ethereum, and Go's minimum version selection then compiles the monorepo's packages against that version too. They need at least v1.17.7 anyway: op-service/sources uses the backported Header.BlockAccessListHash. But the monorepo code they import has drifted from current upstream APIs, and nothing checks for it.

Against go-ethereum v1.17.7 and v1.17.8 (with the op-core transition code from #23525 removed; verified 2026-10-20 on develop@056afb5):

  • op-service/eth: L1ChainConfigByChainID uses params.HoleskyChainConfig, which upstream removed. Fix: drop Holesky (shut down).
  • op-core/genesis: storageRoot calls StateDB.Commit(block, deleteEmpty, noStorageWiping); upstream's is Commit(rules, block). Fix: compute the storage root with trie.StackTrie (same API in op-geth and v1.17.8); the existing directStorageRoot test helper is the oracle.
  • op-chain-ops/foundry: the StateDB interface pins DumpToCollector's return type, which upstream changed to ([]byte, error). Fix: take *state.StateDB and call DumpToCollector as a statement, which compiles against both. Reached by downstream modules through op-chain-ops/genesis.

Gate

Extend opgeth-ratchet with a second pass: every package whose import closure contains no allowlisted package must also type-check against a pinned recent upstream go-ethereum release, with no allowlist. The set is derived, not curated, so a package that becomes upstream-clean is covered automatically. Bump the pin with upstream releases. Where a signature change can't be bridged in a shared package, move the code behind a seam (or into the transitional op-geth package) rather than allowlisting it.

Rebasing op-geth onto a newer upstream base isn't an option: the op-geth binary is end of life, and it would pull the drift into the fork-dependent code too.

Done when

The three sites above compile against both op-geth and the latest upstream go-ethereum, and CI enforces it for every upstream-clean package.

🤖 Co-created with Claude Opus 5.5

Activity

  1. self-assigned this
    on Oct 21, 2026
  2. sebastianst commented on Oct 22, 2026

    @sebastianst
    MemberAuthor

    🤖 Claude Opus 5.5 says: Not planned as a pre-cutover effort. Downstream repos will wait for the go.mod cutover (#20266), whose upstream bump adapts the drifted call sites (DumpToCollector, NewHTTPHandlerStack) directly, without two-version helpers. Of the work here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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