Repository navigation
Description
Part of #20257. See plan §1, §2, §3, §4, §5 in the op-geth decoupling doc.
Goal
Once the op-core/* packages exist, swap all relevant call-sites in the Go services so they stop reaching into op-geth internals. No behaviour change — just imports and types.
Scope
DepositTx construction / decoding
Replace the types.NewTx(&types.DepositTx{...}).MarshalBinary() pattern throughout op-node with optypes.DepositTx{...}.MarshalBinary() — the *types.Transaction wrapper is eliminated, we go straight from struct to []byte. Files to edit:
op-node/rollup/derive/deposits.go,deposit_log.go,parse_upgrade_transactions.goop-node/rollup/derive/*_upgrade_transactions.go(Ecotone, Fjord, Holocene, Isthmus, Jovian, Interop, Karst)op-node/rollup/interop/indexing/attributes.go
UnmarshalDepositLogEvent returns *optypes.DepositTx.
Transaction methods → helpers
tx.IsDepositTx()→optypes.IsDepositTx(tx)tx.SourceHash()/tx.Mint()/tx.IsSystemTx()→ decode raw bytes viaoptypes.UnmarshalDepositTxand read fields, or use helpers from opgeth-decoupling: create op-core/types (DepositTx and PostExecTx with differential tests, Receipt) #20262.tx.From()on a deposit tx (single call site inop-node/rollup/interop/indexing/attributes.go:105) → same pattern.tx.RollupCostData()→opfees.TxRollupCostData(tx).
PostExecTx call sites
op-node/rollup/derive/span_batch_tx.go,span_batch_txs.go,span_batch.go,batches.go:types.PostExecTxType→optypes.PostExecTxType.op-node/rollup/derive/span_batch_tx.go(convertToFullTx): thetypes.NewTx(&types.PostExecTx{...})construction goes straight fromoptypes.PostExecTx{...}to bytes viaMarshalBinary.op-chain-ops/pkg/sdm/andop-service/sources/flashblock_client.gohandle post-exec payloads as raw bytes only — no change needed.
Receipt (*optypes.Receipt) in op-service/txinclude
op-service/txinclude/interfaces.goEL.TransactionReceiptreturn type →*optypes.Receipt.op-service/txinclude/persistent.go,monitor.go,txbudget.go: update references.- Replace inline operator-fee math in
txbudget.goandisthmus_cost_oracle.gowithopfees.OperatorCost(gasUsed, scalar, constant). - Replace
types.NewL1CostFuncFjordwithopfees.NewL1CostFuncFjord.
OptimismConfig and ChainConfig
rollup.Config.ChainOpConfig *params.OptimismConfig→*opparams.OptimismConfig.rollup.Configgets any missing hardfork timestamp fields (KarstTime, InteropTime if not already present).op-service/eth/BlockAsPayloadandBlockAsPayloadEnv: replaceconfig *params.ChainConfigparameter with a localHardforkConfiginterface (IsCanyon(uint64) bool,IsIsthmus(uint64) bool). Callers passrollup.Configdirectly.
EIP-1559 helpers
op-node/rollup/derive/payload_util.go,rollup/interop/indexing/attributes.go,rollup/attributes/engine_consolidate.go: switch imports fromgithub.com/ethereum/go-ethereum/consensus/misc/eip1559togithub.com/ethereum-optimism/optimism/op-core/eip1559.
Superchain loader
op-service/superutil/is deleted (the function moved toop-core/superchainin opgeth-decoupling: create op-core/superchain and op-core/eip1559 (verbatim moves) #20259).op-node/rollup/superchain.go,op-node/chaincfg/chains.go: switch imports fromgithub.com/ethereum/go-ethereum/superchaintogithub.com/ethereum-optimism/optimism/op-core/superchain.
Dependencies
Blocked on: #20260 (op-core/params), #20261 (op-core/fees), #20262 (op-core/types), #20259 (op-core/superchain + op-core/eip1559).
🤖 Generated by Claude Code
Misc fork symbol swaps (added 2026-07)
One-off op-geth additions to general types/APIs, found by the upstream-build spike (doc §15). Derive current call sites by grepping the symbol — file lists go stale:
Transaction.SetBlobTxSidecar(op-service/signer): rebuild/attach the sidecar without the fork helper.types.NewIsthmusSigner(testutils, derive test utils): verify it matches upstreamNewPragueSignerfor user txs; swap or add an op-core signer helper.types.NewBlock(…, *BlockConfig)/types.DefaultBlockConfig(testutils): fork-changed signature; the upstream call drops the config arg.types.LogForStorage(op-chain-ops/crossdomain): upstream deleted it; inline the legacy RLP struct locally.
Note (2026-07): the per-file lists above in this issue predate Karst/Lagoon and are stale — treat them as historical hints and re-derive current sites by grepping the symbols (
types\.(DepositTx|PostExecTx),\.(IsDepositTx|IsSystemTx|SourceHash|Mint|RollupCostData)\(). See §§1–5 and §15 of the decoupling doc.
Activity
sebastianst commentedon Jun 15, 2026
🤖 Claude says: Note on the deposit/post-exec helper swaps in this issue's scope.
The
optypeshelpers you'll swap to (IsDepositTx(tx),SourceHash(tx),Mint(tx),IsSystemTx(tx),IsPostExecTx(tx)) are transition scaffolding — they operate on a go-ethereum*types.Transaction, which only holds a0x7E/0x7Dtx while the build still resolves to op-geth. They exist so call sites can drop their dependency on op-geth'sTransactionmethods before the L2 transaction representation changes in #20264. They are removed at the final cutover (#20266), so treat them as a stepping stone, not the destination — don't build new long-lived APIs on top of them.Where a call site can move directly to the durable shape in one step (it already has, or can cheaply get, the raw tx bytes), prefer decoding to
optypes.DepositTxviaUnmarshalDepositTxand reading struct fields, over routing through the*types.Transactionhelper.🤖 Generated by Claude Code
sebastianst commentedon Jul 20, 2026
🤖 Claude Fable 5 says: All three sub-issues are closed; what remains of this issue's own scope is tracked in #21901 (PostExecTx span-batch swap + the one-off fork symbols; the check-*
NewIsthmusSigneruses re-homed to #21746). This issue closes when #21901 lands.sebastianst commentedon Jul 21, 2026
🤖 Claude Fable 5 says: Done — all sub-issues closed and the remaining scope landed via #21791 (DepositTx + Transaction-method helpers) and #21904 (PostExecTx span-batch sites + the one-off fork symbols, closing #21901). The check-*
NewIsthmusSigneruses live on in #21746's scope. op-node/op-service/op-batcher no longer reference op-geth-fork transaction/params symbols outside the op-core differential tests.