Skip to content

opgeth-decoupling: wire op-node onto op-core/eip1559 and op-service/txinclude onto op-core/fees #21500

Closed

Description

@sebastianst

Sub-issue of #20271, breaking out the eip1559 and fees import swaps. (The superchain part was broken out into #21485 and landed in #21487.)

Part of the op-geth decoupling effort — §4 (fees) and §8 (eip1559).

eip1559 — op-node onto op-core/eip1559

Swap github.com/ethereum/go-ethereum/consensus/misc/eip1559 → github.com/ethereum-optimism/optimism/op-core/eip1559 in every op-node consumer:

op-core/eip1559 (landed in #20268) was missing ValidateOptimismExtraData, which op-node uses. Add it — verbatim from op-geth, keeping the name for a pure import-path swap, consistent with the already-present DecodeOptimismExtraData — plus a unit test.

Corrections vs the #20271 scope: the rollup/interop/indexing/attributes.go site listed there no longer uses eip1559, and system_config.go (not originally listed) does.

fees — op-service/txinclude onto op-core/fees

In op-service/txinclude/txbudget.go and op-service/txinclude/cost_oracle.go (the isthmus_cost_oracle.go referenced on #20271, since renamed):

  • types.NewL1CostFuncFjord → opfees.NewL1CostFuncFjord
  • tx.RollupCostData() → opfees.TxRollupCostData(tx)

The op-core L1CostFunc signature is func(RollupCostData, blockTime uint64) *big.Int — op-geth's internal Fjord func returned a second calldataGasUsed value that the monorepo always discarded, so op-core drops it. Fjord ignores blockTime.

The inline operator-fee arithmetic (the third item in #20271's fees scope) was already migrated to opfees.OperatorCostJovian in a prior change, so that part is done.

Out of scope (tracked elsewhere)

  • op-batcher/batcher/types.go's tx.RollupCostData() swap — part of the op-batcher → op-service/sources migration (§11).
  • The txinclude test files keep op-geth's types.NewL1CostFuncFjord as an independent differential oracle (a live cross-check that op-core matches op-geth) until the final cutover.
  • op-e2e action helpers needing EncodeOptimismExtraData / DecodeHoloceneExtraData — §13 test migration.

🤖 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