Skip to content

alloy-op-evm: generate fork test cases from single chronology list - #22137

Open
claude[bot] wants to merge 8 commits into
developfrom
claude/alloy-op-evm-fork-test-macros
Open

alloy-op-evm: generate fork test cases from single chronology list#22137
claude[bot] wants to merge 8 commits into
developfrom
claude/alloy-op-evm-fork-test-macros

Conversation

@claude

@claude claude Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Requested by Sebastian Stammler · Slack thread

Summary

Follow-up to #22130.

Before: every fork-parameterized test in alloy-op-evm's env module carried a hand-maintained stack of #[test_case] attributes, plus a separately hand-written FORK_CHRONOLOGY const and FakeHardfork constructor list — all of which can silently go stale as forks are added.

After: a single with_fork_chronology! macro owns the fork list (one row per fork: case name, OpHardfork, OpSpecId, activation kind, OP mainnet activation timestamp or _ if unscheduled) and generates FORK_CHRONOLOGY, the FakeHardfork constructors, and all fork-parameterized tests via fake_fork_cases! / mainnet_fork_cases!. Adding a fork is one row; scheduling its mainnet timestamp (replacing _ with the constant) automatically adds its mainnet test case. Drift between the list and the generated items is impossible by construction, since everything expands from the same rows.

Notes:

  • Coverage delta: the blob-pinning test grows from 5 to 11 cases — it now covers the full chronology, including pre-Ecotone negative assertions that no blob env is present. The other converted tests keep their exact case sets.
  • cargo test output still names every case (env::tests::<test>::<fork>), byte-identical to what test_case generated.
  • The test-case dev-dependency is no longer used by this crate and is removed (other workspace crates still use it).

Overlap note: draft PR #22134 renames OpSpecId::INTEROP to LAGOON, which touches the chronology's last entry — whichever of the two lands second needs a trivial rebase of the Lagoon row.


Generated by Claude Code

cliff0412 and others added 7 commits June 19, 2026 15:26
Brings the PR branch up to date with develop, picking up the fixed
op-reth-compact-codec CI job that syncs the superchain-registry
submodule when building the base side.

Co-Authored-By: Claude
Co-authored-by: Sebastian Stammler <seb@oplabs.co>
- Parameterize the blob-pinning test over Ecotone, Isthmus, and Jovian
  to cover the activation boundary and the post-Jovian DA-footprint case.
- Delete the now-unused RollupConfig::spec_id along with kona-genesis's
  revm feature and optional op-revm dependency; spec resolution comes
  from the shared alloy-op-evm helper.
- Check for a missing payload gas limit before computing the next block
  base fee in the stateless executor.

Co-Authored-By: Claude
Co-authored-by: Sebastian Stammler <seb@oplabs.co>
- Drop op-revm from kona-genesis's entry in the SP1 guest workspace
  lockfile, mirroring the root Cargo.lock after the revm feature removal
  (fixes the kona-build-sp1-elfs --locked check).
- Cover Lagoon and Karst in the parameterized blob-pinning test so it
  spans all forks from Ecotone onward per its doc comment.

Co-Authored-By: Claude
Co-authored-by: Sebastian Stammler <seb@oplabs.co>
Removing kona-genesis's revm feature also deactivated the op-revm?/serde
forward, so the guest resolution no longer enables serde on the revm
crate family. Drop the now-inactive serde (and phf/alloy-eips) dep lines
from those entries and prune the phf subtree packages that lost their
last referent, matching cargo's own re-resolution.

Co-Authored-By: Claude
Co-authored-by: Sebastian Stammler <seb@oplabs.co>
…acro

Replace the hand-maintained test_case stacks and FORK_CHRONOLOGY const
with a single with_fork_chronology! macro that owns the fork list and
drives FORK_CHRONOLOGY, the FakeHardfork constructors, and generated
per-fork #[test] cases (fake_fork_cases! / mainnet_fork_cases!), so a
new fork is added in exactly one place. The blob-pinning test now covers
the full chronology, asserting no blob env exists before Ecotone. The
test-case dev-dependency is no longer used by this crate.

Co-Authored-By: Claude
Co-authored-by: Sebastian Stammler <seb@oplabs.co>
@claude
claude Bot requested review from a team as code owners July 30, 2026 21:00
Resolves the env.rs conflict from the squash-merge of #22130: develop's
env.rs is identical to this branch's merge parent, so the branch side
(the chronology-macro rewrite) is kept wholesale.

Co-Authored-By: Claude
Co-authored-by: Sebastian Stammler <seb@oplabs.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants