Repository navigation
Description
Part of #20257. See plan §11 and §13 in the op-geth decoupling doc.
Goal
Make op-e2e, the op-devstack DSL and op-acceptance-tests read L2 chain data in a way that still works after the go.mod flip (#20266). These call sites compile against upstream go-ethereum. At runtime they fail to decode L2 blocks, or they silently lose the OP receipt fields. The opgeth-ratchet type-check (#23407) cannot catch these failures. Fork-only symbol uses are tracked in #23405.
This issue is the index; the sub-issues hold the detail.
Rules for L2 reads
#23417 (kona proof harness) is the worked example.
- Bodies, txs and receipts go through
op-service/sources. Upstreamethclientcannot decode deposit (0x7E) or post-exec (0x7D) txs, and upstreamtypes.Receiptdrops the OP fields. So L2 reads use the class-partitioned accessors onsources.EthClient/apis.EthClient:InfoAndUserTxsBy*,InfoAndDepositsBy*andInfoAndFirstDepositBy*. Receipts come fromFetchReceiptsorTransactionReceipt, which return*optypes.Receipt. Headers viaethclientare fine.InfoAndTxsBy*is for L1 only. - Filter receipts in lockstep. The partitioned lists drop the synthetic txs, so
txs[i]no longer lines up withreceipts[i]. Drop the0x7E/0x7Dreceipts by type before you pair them. - No accessor returns post-exec (
0x7D) txs. This is deliberate (§11). Tests that count a block's txs, or that assume the only synthetic tx is the leading deposit, need care on Lagoon+ presets. The first test that must read the0x7Dtx is the trigger to addInfoAndPostExecTx. - A helper owns its clients. Test helpers create one
ethclient.Clientand onesources.EthClientper engine or node, together with it, and close them in itsClose. Call sites don't dial, attach or build their own. - Swap op-geth-only tx helpers to op-core when you touch a site. For example:
types.Transaction.UnmarshalBinary/DepositTxTypeon deposits →optypes.UnmarshalDepositTx/optypes.DepositTxType;tx.RollupCostData()/NewRollupCostData→fees.TxRollupCostData/fees.NewRollupCostData;NewL1CostFuncFjord→fees.L1CostFjord. The op-core predicates that take a*types.Transactionare transition scaffolding and are deleted at the cutover (§2). Prefer decoding from the deposits accessor over asking a generic tx whether it is a deposit. The inventory of these symbol uses is in opgeth-decoupling: swap fork-only symbols in test, test-support and DSL code to op-core #23405.
Missing partitioned accessors, such as *ByLabel variants or a paired user-tx/receipt fetch, are added to op-service/sources by the swap PR that first needs them, not up front.
Remaining work
| Area | Tracked in | State |
|---|---|---|
op-devstack DSL and op-acceptance-tests L2 InfoAndTxsBy* reads |
#23425 | #23863 in review |
Port the FastLZ/Fjord-cost fuzzers from op-e2e/opgeth |
#23424 | #23864 (draft, merges after #23863) |
Delete op-e2e/opgeth |
#20275 | #23864 |
| Fork-only symbol swaps in tests and the DSL | #23405 | #23863 and #23864 together |
op-devstack's L2 ChainConfig() returns opparams.ChainConfig |
#23655 | in progress |
Rule 1 is enforced by a forbidigo lint rule: ethclient body, tx and receipt reads are rejected in the test trees unless annotated as an L1 or L2-user-tx read.
Tracked elsewhere
rust/kona/tests/proofs(formerlyop-e2e/actions/proofs): kona/tests/proofs: read the L2 chain over RPC #23417 (closes kona/tests/proofs: read the L2 chain over RPC instead of the in-process chain #23343) and opgeth-decoupling: migrate the kona proof harness off the in-process op-geth L2 EL #21905. TheBlockModifierchange in opgeth-decoupling: migrate direct L2 ethclient call sites in op-e2e #20273 touches those tests, so coordinate.- In-process op-geth L2 EL, the op-geth-pinned system tests, and the pre-Regolith tests (op-e2e: Remove pre-Regolith tests and/or fix op-reth's system tx return type #21451): opgeth-decoupling: retire the in-process op-geth L2 EL in op-e2e system tests and op-devstack/sysgo #21744.
Done
- Shared op-e2e helpers (opgeth-decoupling: split op-e2e/e2eutils/geth/wait.go into header-only and full-block variants #20272): header-returning wait helpers,
ForOPReceipt*, and an owned per-nodeNodeSourceClient(op-e2e,kona: read L2 data through op-service/sources #23862). - System, faultproofs, action-test and kona-proof L2 call sites (opgeth-decoupling: migrate direct L2 ethclient call sites in op-e2e #20273): op-e2e,kona: read L2 data through op-service/sources #23862, and op-e2e: read batched L2 blocks as payloads #23876 for the action-test batcher payload path and
BlockModifier. - §11 accessors, and
*optypes.ReceiptfromTransactionReceipt/FetchReceipts(opgeth-decoupling: make op-service/sources the OP-aware eth client #20264). - The sysgo audit (opgeth-decoupling: audit op-devstack/sysgo direct ethclient calls (L1 vs L2) #20274, closed). Every
ethclientthere dials L1, and the DSL's bridge L2 client reads only headers and receipt logs. - Some sites in the earlier list no longer exist:
op-e2e/actions/proofsmoved torust/kona/tests/proofs.op-e2e/interop/interop_test.gowas deleted.conductor/system_adminrpc_test.gohas no L2 block reads.
Acceptance criteria
- No test, helper or DSL code reads L2 block bodies or txs through
ethclientorInfoAndTxsBy*. - L2 receipts whose OP fields are read come from sources as
*optypes.Receipt. - Shared helpers own their sources client, so no call site builds its own.
op-e2e/opgethis deleted, and its fuzzers run againstop-core/fees.- The §13 grep recipe finds only L1 or header-equivalent uses.
🤖 Co-created with Claude Opus 5.5
Activity
sebastianst commentedon Jun 15, 2026
🤖 Claude says: Two things to fold into the test migration (from the #21356 discussion).
1. Receipt index-correlation breaks under the class-partitioned accessors. Some L2-block iterators correlate
txs[i]withreceipts[i]by position across the full list — e.g.op-acceptance-tests/tests/jovian/da_footprint.godoesfor i, tx := range txs { if tx.IsDepositTx() { continue }; …receipts[i]… }. Once these migrate toInfoAndUserTxs(#20264), which drops the synthetic0x7E/0x7Dtxs, the indices shift relative to a full receipts list and the correlation silently misaligns. These tests must filter receipts in lockstep (or use a paired(userTx, receipt)accessor). Audit everyInfoAndTxsBy*L2 iterator for positional receipt access during the migration.2. Lagoon adds a trailing
0x7Dpost-exec tx to L2 blocks. PostExecTx (sequencer rebates) is a canonical block tx in Lagoon, so L2 block tx lists on Lagoon+ chains contain a0x7Dentry in addition to the leading0x7Edeposit. Tests that fetch full L2 blocks on Lagoon+ presets need the same routing treatment as deposits — covered by migrating to the partitioned accessors, but flag any test that assumes the only synthetic tx is the first-position deposit.🤖 Generated by Claude Code
sebastianst commentedon Oct 14, 2026
🤖 Fable says: Two more op-e2e action-helper L2 call sites that fail under upstream go-ethereum (
ethclient.BlockByNumberon L2 blocks, same deposit-tx decoding failure as theuser.gosites above), found while porting the kona proof harness in #23417:op-e2e/actions/helpers/l2_batcher.go#L257(ActL2BatchBuffer) and#L291(ActAddBlockByNumber): the action-test batcher fetches every block it batches as a fullethclientblock and hands it to the channel out after theBlockModifierhooks. Every action test that batches goes through here, so this is the largest single L2ethclientconsumer in the action helpers. Fix shape: fetch throughop-service/sources(raw payload orInfoAndTxs*) and build whatChannelOut.AddBlockneeds from that.The proofs harness itself (
rust/kona/tests/proofs) is covered by #23417 / #21905.geoknee commentedon Nov 3, 2026
Work in flight:
#23862
#23863
#23864
sebastianst commentedon Nov 13, 2026
🤖 Fable says: All sub-issues are closed; #23864 landed the last three (#20275, #23424, #23405). Closing.