Skip to content

op-core/fees: port the FastLZ and Fjord L1-cost cross-implementation fuzzers from op-e2e/opgeth #23424

Closed

Description

@sebastianst

Part of #20265 → #20257. Blocks #20275 (delete op-e2e/opgeth).

Problem

op-e2e/opgeth/fastlz_test.go holds the only checks of the Fjord fee math across implementations:

They test op-geth's types.FlzCompressLen / NewL1CostFunc / NewRollupCostData. Deleting the package (#20275) would drop them.

They are behind the cgo_test build tag and run only from the fuzz target in op-e2e/justfile, which CI does not invoke.

Work

  • Move the three fuzzers next to op-core/fees, retargeted to fees.FlzCompressLen, fees.NewRollupCostData and fees.L1CostFjord.
    • The cgo and contract-backed parts need a home that may import op-e2e/fastlz and the GasPriceOracle bindings. A test-only package under op-core/fees or a surviving op-e2e package both work.
    • Keep the build tag if cgo stays required.
  • FuzzFjordCostFunction currently calls the oracle on the package's in-process op-geth L2 (op_geth.go), which goes away with the package. Give it another backend: either an upstream simulated backend with the GasPriceOracle/L1Block predeploys and their fee storage set, or an op-reth L2.
  • Read the fee parameters from the op-core/L1Block layout, not op-geth's types.*Slot constants.
  • Optionally wire a short fuzz run into CI. It is cheap insurance for consensus-relevant math.

Acceptance criteria

🤖 Co-created with Claude Opus 5.5

Metadata

Metadata

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