Skip to content

opgeth-decoupling: split op-e2e/e2eutils/geth/wait.go into header-only and full-block variants #20272

Closed

Description

@sebastianst

Part of #20265 → #20257. See plan §11 and §13. This issue covers the shared op-e2e helpers that read L2 data. The call sites that use them are in #20273. Follow the sources-client rules in #20265, with #23417 as the worked example.

Problem

The helpers compile against upstream go-ethereum but break at runtime on L2:

  • Full-block fetches fail on the deposit (0x7E) and post-exec (0x7D) txs.
  • Upstream types.Receipt silently drops the OP receipt fields, which tests read.

Work

  • Wait helpers in geth/wait.go:
    • WaitForBlock, WaitForBlockToBeSafe and WaitForBlockToBeFinalized fetch full blocks. Nearly every caller discards the result or reads only header fields, so return *types.Header via HeaderByNumber.
    • WaitForL1OriginOnL2 reads the L1-info deposit and should use InfoAndFirstDeposit.
    • WaitForTransaction should return *optypes.Receipt when waiting on L2.
    • WaitUntilTransactionNotFound uses only the receipt lookup and needs nothing.
    • One caller sits outside op-e2e: op-deployer/.../cli/pcd_boot.go.
  • wait/blocks.go: BlockCaller requires BlockByNumber, and ForNextSafeBlock and ForBlockWithTimestamp use it against L2 sequencers. Switch them to headers.
  • Receipt helpers: these return upstream *types.Receipt, and their callers read OP fields such as L1Fee and the operator-fee fields.
  • Client seam: System.NodeClient(name) is a cached *ethclient.Client per role, used for both L1 and L2. There is no SystemConfig.L2Client.
    • Add an owned per-node sources.EthClient next to it, cached and closed with the system.
    • Do the same for the interop super-system's L2GethClient.
    • Helpers take the sources client rather than building their own.

geth/find.go and transactions/count.go are used only against L1 and stay as they are.

Acceptance criteria

  • No shared helper decodes L2 block bodies through *ethclient.Client. Callers that only need the height or header use header variants.
  • L2 receipt helpers return *optypes.Receipt.
  • Systems own their L2 sources clients.

Can start now. The §11 accessors landed in #20264.

🤖 Co-created with Claude Opus 5.5

Activity

  1. sebastianst commented on Nov 12, 2026

    @sebastianst
    MemberAuthor

    🤖 Fable says: Done by #23862: the wait helpers return headers, ForOPReceipt* return *optypes.Receipt, and e2esys.System.NodeSourceClient is the owned per-node sources client. One deviation from the text above: WaitForTransaction still returns *types.Receipt, because its callers read only Status. A forbidigo rule now rejects ethclient body, tx and receipt reads in the test trees.

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