Skip to content

Conversation

@ScottyPoi
Copy link
Contributor

@ScottyPoi ScottyPoi commented Dec 5, 2025

WIP

Implement a minimal test runner to run state_tests and blockchain_tests from execution-spec-tests submodule.

Includes:

  • executionSpecTestLoader.ts
    • Loads test fixtures from ethereum-spec-tests or a specified subdirectory
      • use env variable TEST_PATH to specify specific test directory
    • Generates common for test fork
      • Simple common for single fork test
      • common + transition logic for transition fork tests
  • executionSpecState.spec.ts
    • Setup pre-state
    • Build and run test tx
      • If tx fails
        • Validate error message
    • Validate post-state
  • executionSpecBlockchain.spec.ts
    • Setup blockchain from genesis
    • Validate pre-state
    • Build and run test blocks
      • If blocks fails
        • Validate error message
    • Validate chain head via lastBlockhash
    • Validate post-state accounts info

Additionally:

  • block / tx
    • Updates osaka eip list to include 7892
    • Fix for 7892 blob gas validation
    • Adjust error messages to match expected errors from spec tests.
  • blockchain
    • Adjustment of blockchain.dbManager.getBlock method
      • removed setHardfork from block/header construction
        • not compatible with test scenario / examples
        • changing this did not break any tests, but did expose a flawed example!
    • Fix blockchain example (simple.ts)
      • This example was flawed. We put 2 blocks in a blockchain and then retrieved them using the blockchain iterator. However, the blocks retrieved did not match the original blocks! Removing setHardfork from the example fixed this discrepancy. Now the example actually makes sense.

@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 27.27273% with 64 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.24%. Comparing base (f47112c) to head (effa132).

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 88.26% <66.66%> (-0.18%) ⬇️
blockchain 88.95% <100.00%> (+0.09%) ⬆️
common 93.38% <ø> (ø)
evm 62.01% <ø> (ø)
mpt 90.11% <ø> (ø)
statemanager 78.10% <ø> (ø)
static 91.35% <ø> (ø)
tx 88.02% <100.00%> (+0.01%) ⬆️
util 84.94% <ø> (ø)
vm 62.74% <16.21%> (-2.34%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

📦 Bundle Size Analysis

Package Size (gzip) Δ
binarytree 30.1 KB ⚪ ±0%
block 45.5 KB 🔴 +0.1 KB (+0.19%)
blockchain 52.4 KB 🟢 -0.0 KB (-0.05%)
client 181.7 KB ⚪ ±0%
common 44.9 KB 🔴 +0.0 KB (+0.02%)
devp2p 76.4 KB ⚪ ±0%
e2store 30.3 KB ⚪ ±0%
ethash 8.4 KB ⚪ ±0%
evm 201.4 KB ⚪ ±0%
genesis 519.5 KB ⚪ ±0%
mpt 55.1 KB ⚪ ±0%
rlp 7.2 KB ⚪ ±0%
statemanager 57.2 KB ⚪ ±0%
testdata 60.2 KB ⚪ ±0%
tx 87.1 KB 🔴 +0.1 KB (+0.12%)
util 61.8 KB ⚪ ±0%
vm 61.3 KB ⚪ ±0%
wallet 14.0 KB ⚪ ±0%

Generated by bundle-size workflow

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