Skip to content

Feat: Osaka EVM json tests#105

Merged
mrLSD merged 4 commits intomasterfrom
feat/osaka-evm-json-tests
Feb 4, 2026
Merged

Feat: Osaka EVM json tests#105
mrLSD merged 4 commits intomasterfrom
feat/osaka-evm-json-tests

Conversation

@mrLSD
Copy link
Copy Markdown
Member

@mrLSD mrLSD commented Feb 4, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Broadened validation of transaction exit reasons across fork specs and improved error messages to include spec context.
    • Added handling for access-list and authorization-list incompatibilities in transaction validation.
  • Refactor

    • Removed obsolete EIP-7623 test code and related public items.
    • Consolidated test fixtures to a single source and simplified state test flows.
    • Revised intrinsic gas/floor calculation flow for clearer validation logic.

@mrLSD mrLSD self-assigned this Feb 4, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 4, 2026

Walkthrough

This pull request consolidates Ethereum spec test fixtures to a single v5.4.0 source, replaces the intrinsic_gas API with an intrinsic_gas_and_gas_floor dual-return API, removes the EIP-7623 module, and extends transaction validation and assertion logic to handle AccessList/AuthorizationList restrictions and new InvalidTxReason variants.

Changes

Cohort / File(s) Summary
CI/CD Fixture Consolidation
.github/workflows/rust.yml
Replaced multiple fixture URLs with a single v5.4.0/fixtures_stable.tar.gz source and removed additional fixture downloads and references (32-bit and standard paths).
Assertions & Test Flow
evm-tests/src/assertions.rs, evm-tests/src/state.rs
Added spec-aware assertion by changing assert_call_exit_exception(..., spec) signature; expanded accepted exit reasons to include PRE_FORK and new exception types; updated error messages to include spec/test context; call sites updated to pass spec.
Types: removed EIP-7623 & new errors
evm-tests/src/types/eip_7623.rs, evm-tests/src/types/mod.rs
Removed eip_7623 module and its constants/functions; added AuthorizationListNotSupportedForCreate and AccessListNotSupported variants to InvalidTxReason.
Transaction gas refactor & validation
evm-tests/src/types/transaction.rs
Replaced intrinsic_gas(...) with intrinsic_gas_and_gas_floor(...) -> (u64, u64) and updated validation to use both values; added checks returning AccessListNotSupported for AccessList txs on pre-Berlin specs and AuthorizationListNotSupportedForCreate for creates with authorization lists on Prague+; removed explicit EIP-7623 floor calc.

Sequence Diagram(s)

sequenceDiagram
  participant TestRunner as Test Runner
  participant State as PostState
  participant Tx as Transaction
  participant Validator as Validation
  participant Assertions as Assertions

  TestRunner->>State: prepare post-state & tx data
  TestRunner->>Tx: provide config & state for intrinsic check
  Tx->>Tx: intrinsic_gas_and_gas_floor(config, state)
  Tx-->>Validator: (intrinsic_gas, floor_gas)
  Validator->>Validator: check tx type vs spec (AccessList / AuthorizationList)
  alt invalid for spec
    Validator-->>Assertions: return InvalidTxReason (AccessListNotSupported / AuthorizationListNotSupportedForCreate)
  else valid
    Validator-->>Assertions: proceed with call/create and expected exit reason
  end
  Assertions->>TestRunner: assert result (spec-aware messages)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • birchmd
  • aleksuss

Poem

🐰 I hopped through fixtures, found one tidy trail,
I counted gas in pairs instead of a lone tail,
I sniffed AccessLists and Authorization knots,
I tossed EIP-7623 into old parking lots,
Now tests hop in order — a bright little tale. 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Feat: Osaka EVM json tests' is vague and generic, using broad terms that don't clearly convey the specific technical changes made in the changeset. Consider a more specific title that describes the main changes, such as 'Refactor: Consolidate Ethereum spec test fixtures and add Osaka validation checks' or 'Feat: Add Osaka EVM support with spec-aware transaction validation'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/osaka-evm-json-tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@mrLSD mrLSD added hard-fork HF-Osaka Osaks Hard Fork enhancement New feature or request ethereum-tests labels Feb 4, 2026
@mrLSD mrLSD added this to the v3.0.0 milestone Feb 4, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@evm-tests/src/assertions.rs`:
- Around line 437-444: The current catch-all for ExitReason::Succeed and
ExitReason::Revert prints an expected-exception value but does not fail the
test, allowing mismatches to pass; restore the original assertion logic around
expect_exception (or replace it with explicit handling) so that when handling
ExitReason::Succeed or ExitReason::Revert the code asserts
expect_exception.is_none() and panics with a clear message including
expect_exception, reason and name (use the existing symbols expect_exception,
reason, name, and the ExitReason::Succeed/ExitReason::Revert branches to locate
the code) — alternatively, if you prefer explicit handling, add a branch that,
when expect_exception.is_some(), panics with a descriptive message instead of
only printing.
🧹 Nitpick comments (1)
.github/workflows/rust.yml (1)

8-11: Consider adding tarball integrity verification.

While the workflow now depends on a specific external tarball, supply-chain safety can be improved by verifying its integrity. However, note that the SHA256 checksum for this artifact is not published in standard locations (release assets or checksum files). To implement this, you would need to:

  1. Manually download fixtures_stable.tar.gz from the v5.4.0 release
  2. Compute its SHA256: sha256sum fixtures_stable.tar.gz
  3. Add the hash as a workflow variable and verify it in the download step

This adds robustness but requires a one-time manual setup. If the release publishes checksums in the future, this becomes straightforward to implement.

Comment thread evm-tests/src/assertions.rs Outdated
@mrLSD mrLSD requested a review from aleksuss February 4, 2026 10:53
@mrLSD mrLSD merged commit 01ada85 into master Feb 4, 2026
7 checks passed
@mrLSD mrLSD deleted the feat/osaka-evm-json-tests branch February 4, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ethereum-tests hard-fork HF-Osaka Osaks Hard Fork

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants