Skip to content

Merge upstream changes until 2026-03-16#22

Merged
pdobacz merged 171 commits intoforks/monad_ninefrom
upstream
Apr 30, 2026
Merged

Merge upstream changes until 2026-03-16#22
pdobacz merged 171 commits intoforks/monad_ninefrom
upstream

Conversation

@pdobacz
Copy link
Copy Markdown
Collaborator

@pdobacz pdobacz commented Apr 30, 2026

Merging forks/amsterdam upstream branch until revision 6c68d09 as of 2026-03-16.

New (passing) tests, for MONAD_NINE from 13803 to 14238 tests. ported_static tests are many more, but they are painful to monadize (lots hardcoded), so passing on that for now.

IMPORTANT merge using a merge commit!!

marioevz and others added 30 commits February 12, 2026 22:34
…with `Bytecode` (ethereum#2201)

* refactor(testing): Allign `Initcode.gas_cost` to return the expected value.

* Refactor: small refactor

* refactor(tests): Initcode usages

* fix: review comments
Add INVALID_GASLIMIT substring mapping. Remove GAS_USED_OVERFLOW regex
since ethrex now uses a consistent "Gas allowance exceeded" message.
…reum state tries using deterministic deploy (ethereum#1976)

* feat: add worst-case depth attack benchmarks for Ethereum state tries

This PR introduces comprehensive benchmarks to test Ethereum clients under
worst-case scenarios involving extremely deep state and account tries.

The attack scenario:
- Pre-deployed contracts with deep storage tries (depth=9) maximizing traversal costs
- CREATE2-based deterministic addressing for reproducible benchmarks
- AttackOrchestrator contract that batches up to 2,510 attacks per transaction
- Tests measure state root recomputation impact when modifying deep slots

Key components:
- depth_9.sol, depth_10.sol: Contracts with deep storage tries
- s9_acc3.json: Pre-computed CREATE2 addresses and auxiliary accounts (15k contracts)
- AttackOrchestrator.sol: Optimized attack coordinator (3,650 gas per attack)
- deep_branch_testing.py: EEST test harness for pre-deployed contracts
- README.md: Complete documentation and setup instructions

Performance optimizations:
- Reduced gas forwarding from 50k to 3,650 per attack (8.3x throughput increase)
- MAX_ATTACKS_PER_TX increased from 303 to 2,510
- Precise EVM opcode cost analysis with safety margins
- Read init_code_hash directly from JSON instead of recompiling

Deployment setup and instructions available at:
https://gist.github.com/CPerezz/44d521c0f9e6adf7d84187a4f2c11978

This benchmark helps identify performance bottlenecks in state trie handling
and validates client implementations under extreme depth conditions.

* fix(AttackOrchestrator): increase gas forwarded to 5300 for SSTORE

The attack() call was forwarding only 3650 gas, which is insufficient
for SSTORE operations on cold storage slots. SSTORE requires:
- 2100 gas for cold slot access
- 2900 gas for zero-to-nonzero write
- Plus dispatch overhead (~200 gas)

Updated to forward 5300 gas to ensure SSTORE succeeds.

* feat(Verifier): add contract for post-attack storage verification

Adds a minimal Verifier contract that checks if a target contract's
deepest storage slot was updated to the expected attack value. This
enables the test to verify attack success without expensive post-state
checks on all attacked contracts.

The verify() function calls getDeepest() on the target and compares
the returned value against the expected attack value.

* refactor(deep_branch_testing): use CREATE2 address derivation and fix gas

Major refactor of the depth benchmark test for execute mode:

- Remove stubs dependency; derive contract addresses directly from
  init_code_hash + Nick's deployer using CREATE2 formula
- Deploy AttackOrchestrator and Verifier as part of test execution
- Dynamically compute NUM_CONTRACTS based on gas_benchmark_value
- Add verification transaction at end of block to confirm attack success
- Fix gas constants based on empirical measurements:
  - GAS_PER_ATTACK: 8014 -> 8050 (measured ~8042)
  - MAX_ATTACKS_PER_TX: 1990 -> 1980 (safety margin)
  - TX_OVERHEAD: 22900 -> 22600 (more accurate)

The previous gas constants caused all attack transactions to run out
of gas, as the 28 gas/attack shortfall compounded over 1990 attacks
to ~55k gas deficit.

* refactor(depth-benchmarks): download assets from GitHub, embed bytecode

- Embed AttackOrchestrator and Verifier bytecode directly in Python
- Add download_mined_asset() to fetch JSON/SOL files from GitHub
- Cache downloaded files locally in .cache/ directory
- Remove local .sol and .json asset files (now downloaded on demand)
- Update test parameters to use (10, 6) available from GitHub
- Add gist reference for contract sources

Contract sources: https://gist.github.com/CPerezz/8686da933fa5c045fbdf7c31e20e6c71
Mined assets: https://github.com/CPerezz/worst_case_miner/tree/master/mined_assets

* style: run ruff format on deep_branch_testing.py

* fix: add mypy type annotations for deep_branch_testing.py

* refactor(depth-benchmarks): code review improvements

- Remove unused ATTACK_SELECTOR constant
- Extract magic numbers to named constants (gas limits, fees, etc.)
- Add zero contracts validation to prevent edge case bugs
- Fix unused fork parameter (rename to _fork)
- Replace print warning with warnings.warn
- Fix docstring math discrepancy (~2,742 not 2,750)
- Fix line length issues and add proper type annotations

* feat(git): Add `CPerezz/worst_case_miner` submodule

* feat(tests/benchmarking): Update deep branch tests

* fix: Update test file description

* cleanup

* refactor: Simplify using new tools

* fix: Review comments

* fix(tests): Update submodule

* fix: review comments

---------

Co-authored-by: CPerezz <cperezz19@pm.me>
…thereum#2198)

* refactor: compute benchmark via gas cost calculator

* fix: logic issue

* fix: linting issue

* fix: apply changes

* refactor: remove hardcoded gas constant
…2122)

* refactor: use bytecode gas cost calculator

* feat: add stateful helper function

* refactor: update multi-opcode benchmark

* refactor: update single-opcode benchmark

* refactor: update stub account
…thereum#1872)

* feat: add contract calling benchmark

* feat: contract calling multiple account

* feat: contract calling benchmark

---------

Co-authored-by: LouisTsai <q1030176@gmail.com>
* feat(tests): EIP-198 modexp cases with truncated inputs

Test case authored by Category Labs team in category-labs/monad#2045

Co-authored-by: Baltoli <1329034+Baltoli@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Mario Vega <marioevz@gmail.com>

---------

Co-authored-by: Baltoli <1329034+Baltoli@users.noreply.github.com>
Co-authored-by: Mario Vega <marioevz@gmail.com>
Co-authored-by: danceratopz <danceratopz@gmail.com>
…st (ethereum#2224)

* Add pytest marker for repricing in test file

* Add repricing marker to account query tests

* refactor(tests): Account for fixed opcode count

* refactor(test-specs): Allow fixed opcode count generation without generator

* fix(tests): add correct inputs

* refactor: Use target_opcode field instead of new one

* fix: Create `_benchmark_opcode_count`

* fix: tox

* nit

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
* 🧪 test(EIP-7928): 2935 tests

* chore(test-types): Improve DevEx for BAL ``slot_changes`` expectation for any changes

* chore: clean up lint errors

* 🧪 test: fixes and additional test case

---------

Co-authored-by: raxhvl <raxhvl@users.noreply.github.com>
Co-authored-by: fselmo <fselmo2@gmail.com>
…ethereum#2170)

* feat(client_clis): add stream-mode opcode count support for geth t8n

* fix(test-types): strip geth blockTimestamp from transaction logs

* fix(test-types): ignore extra geth fields in FixtureTransactionLog

* fix(test-types): address review feedback for geth opcode count support

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…rks (ethereum#2226)

* fix(test-specs): Exclude full post-state, setup tx receipts on benchmarks

* fix: Receipts in blocks are a block property.
Port extcodehashEmpty_ParisFiller.yml, extCodeHashNonExistingAccountFiller.yml,
and extCodeHashAccountWithoutCodeFiller.yml to pytest-based tests covering:
- EXTCODEHASH/EXTCODESIZE of non-existent and codeless accounts
- EXTCODEHASH transition when value is sent mid-transaction
- EXTCODEHASH/EXTCODESIZE/EXTCODECOPY for account variants (nonce, balance,
  storage, single-byte code, selfdestruct)
- EXTCODEHASH of empty contracts created via CREATE/CREATE2
…reum#2169)

* feat(fixtures): add BlockchainEngineStatefulFixture format

Add a new fixture format for snapshot-based stateful Engine API testing.

- Reference an external snapshot instead of embedding genesis state.
- Include setup payloads for deploying contracts on top of the snapshot.
- Support partial state verification via post_state_diff.
- Auto-register via BaseFixture for deserialization without adding to fill.
- Add serialization round-trip tests in test_base.py and test_blockchain.py.

* Apply suggestions from code review

* Apply suggestion from @marioevz

* Apply suggestion from @marioevz

* Apply suggestion from @marioevz

* Apply suggestion from @marioevz

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
)

Co-authored-by: spencer-tb <spencer.tb@ethereum.org>
* feat(tests): port EXTCODEHASH self-reference static test

Port extCodeHashSelfFiller.json: EXTCODEHASH/EXTCODESIZE of the
currently executing account (Op.ADDRESS).

* Apply suggestions from code review

Co-authored-by: Mario Vega <marioevz@gmail.com>

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
…eum#2084)

* feat(fill): Add --dist loadgroup for xdist test grouping

- Enable pytest-xdist loadgroup distribution mode by default.
- Required for xdist_group markers to control worker assignment.

* feat(fixtures): Add nodeid helpers for cache keys and xdist grouping

- Add strip_fixture_format_from_nodeid() to extract base nodeid.
- Add get_all_fixture_format_names() for format name lookup.
- Used to ensure related fixture formats share cache keys.

* feat(fill): Add T8nOutputCache and xdist grouping for cache locality

- Add T8nOutputCache LRU cache class for storing t8n outputs.
- Add t8n_output_cache field to FillingSession.
- Add xdist_group markers during collection for --dist=loadgroup.
- Use t8n-cache-{hash} prefix to distinguish from user-defined groups.
- Strip cache-specific @t8n-cache-* suffix from nodeids in TestInfo.

* feat(specs): Integrate t8n output cache in BlockchainTest

- Add cache key helpers to BaseTest (_get_base_nodeid, _get_t8n_cache_key).
- Add _get_filling_session() to access cache from test instances.
- Cache t8n outputs in _generate_block_data() for reuse across formats.
- Skip caching for engine_x and engine_sync variants (different execution).

* test(fill): Add unit tests for t8n output cache

- Test T8nOutputCache LRU behavior, eviction, and hit/miss tracking.
- Test strip_fixture_format_from_nodeid for various nodeid patterns.
- Test get_all_fixture_format_names ordering and contents.
- Test cache key consistency across fixture format variants.
- Test _strip_xdist_group_suffix preserves non-cache group markers.

* test(fill): Add tests for xdist collection sorting behavior

Add tests to verify that test items are sorted during collection
to ensure deterministic cache hits. The tests demonstrate:

- Sorting groups related fixture formats by base nodeid.
- Without xdist, items are correctly sorted.
- With xdist, items are NOT sorted (BUG causing high variance).
- Expected vs actual behavior comparison.

The xfail test `test_xdist_sorting_required_for_cache_hits` asserts
the correct behavior (sorting with xdist) and fails until the fix
is applied.

* refactor(fill): Keep xdist grouping without sorting for cache testing

* refactor(testing): Use fixture format directly

* refactor(testing): Move properties

* fix(testing): Remove fixture_format as property of the spec

* fix(testing): Fill always count opcodes

* fix: typo

* feat(test-fill): Add xdist cache stats aggregation for terminal display

- Add helper methods to TransitionToolCacheStats for serialization.
- Initialize aggregated stats on xdist controller in pytest_configure.
- Send worker stats via workeroutput in fixture teardown.
- Add pytest_testnodedown hook to aggregate stats from workers.
- Update pytest_terminal_summary to display aggregated stats.

* fix(testing): reset cache counters to avoid double-counting stats

* fix(testing): use hash for xdist_group name to fix loadgroup scheduling

* refactor(testing): Simplify OutputCache to single-key design

* fix(testing): Clear cache data when test doesn't use caching

- Clear `_cache` in `remove_cache()` to prevent stale data leakage.
- Tests without `transition_tool_cache_key` (e.g., state_test) could
  previously retrieve cached results from prior tests via matching
  `call_counter` subkeys.

* feat(testing): Add cache-friendly sorting with slow-first grouping

Sort test items by (is_slow, base_nodeid, nodeid) to optimize execution:
- Slow tests first (LPT scheduling for xdist load balance).
- Related fixture formats grouped together (cache locality).
- Deterministic order within groups.

If ANY fixture format variant of a test is marked slow, ALL variants
are treated as slow to keep them grouped together for cache hits.

Reuses the base_nodeid cache for xdist marker generation to avoid
redundant strip_fixture_format_from_node calls.

* fix(testing): Clear cache data when test doesn't use caching

BlockchainEngineXFixture and BlockchainEngineSyncFixture had
can_use_cache=False which was dead code (never checked anywhere).
Replace with transition_tool_cache_key="" which is the actual mechanism
that controls caching — empty string means no caching.

* feat(testing): Add cache-friendly sorting with slow-first grouping

For StateTest specs with --generate-all-formats, the _from_state_test
label suffixes cause alphabetical sort to interleave cacheable and
non-cacheable formats: blockchain_test_engine_from_state_test (cacheable)
→ blockchain_test_engine_x_from_state_test (non-cacheable, clears cache)
→ blockchain_test_from_state_test (cacheable, but cache is gone).

Add has_cache_key to the sort key so cacheable formats cluster together
within each base nodeid group, ensuring the second cacheable format hits
the warm cache before any non-cacheable format clears it.

* fix(testing): Strip xdist group suffix from address entropy

node_id_for_entropy strips fixture format and fork names from the node
ID before hashing it for deterministic address generation. However, it
did not strip the xdist @group_name suffix (e.g., @t8n-cache-abc12345),
causing different addresses when running with vs without xdist workers.

Strip the suffix so addresses are deterministic regardless of whether
xdist is active.

* feat(testing): Improve t8n cache stats to show expected hit rate

Replace the raw hit/miss counts with an efficiency metric where 100%
means all tests that could have hit the cache did hit it. Track unique
cache keys to compute expected hits (total cacheable - unique keys).

Also filter subkey stats to only count cacheable tests, eliminating
phantom misses from non-cacheable tests that still interact with the
OutputCache after remove_cache().

Before: T8n cache: key_hits=6, key_misses=6 (50.0%), subkey_hits=6, subkey_misses=18 (25.0%)
After:  T8n cache: 100% hit rate (6/6 expected), 6 t8n calls saved

* fix(testing): Use subprocess mode for benchmark pytester fill tests.

Pydantic's ModelMetaclass caches __init__ wrappers for dynamically
created classes. When pytester runs multiple fill sessions in-process,
cached wrappers from an earlier session re-invoke __init__ re-entrantly
in later sessions, causing generate() to run twice per test and
doubling the opcode count.

- Switch fill tests to runpytest_subprocess() for process isolation.
- Normal `fill` runs are unaffected (each invocation is a fresh process).

* fix(testing): Merge duplicate pytest_testnodedown hooks.

The rebase introduced a second pytest_testnodedown definition for cache
stats aggregation, shadowing the existing timing logs hook. Extract the
cache stats logic into _aggregate_cache_stats() and call it from the
single hook.

* fix(testing): Remove unused methods and imports from BaseTest.

Remove dead code that was never called: _get_base_nodeid(),
_get_t8n_cache_key(), _get_filling_session() from BaseTest and
remove_opcode_count() from TransitionTool. Also remove the
now-unused strip_fixture_format_from_node import, TYPE_CHECKING
import, and guarded FillingSession import block from base.py.

* fix(testing): Add clear() method to OutputCache and fix docstrings.

Add a clear() method to OutputCache to encapsulate clearing the
internal _cache dict and resetting the key, instead of having
TransitionTool.remove_cache() reach into private members directly.

Also fix the set_cache docstring ("LRU behavior" → "single-key
eviction"), fix the cached_result truthiness check to use
`is not None` for defensive correctness, and fix the node()
docstring to say "pytest node" instead of "node ID".

* fix(testing): Strip xdist group suffix from pre-alloc group test IDs.

The @t8n-cache-* xdist group suffix was leaking into the test_id and
group_salt stored in pre-alloc groups, causing fixture output to differ
from runs without xdist. Use _strip_xdist_group_suffix() (already used
by node_to_test_info) on both the group_salt fallback and the test_id
passed to add_test_pre.

* test(testing): Add unit tests for OutputCache.

Test set_key eviction, get/set round-trip, hit/miss counter
accuracy, clear() behavior, and state across key changes.
Uses sentinel objects as lightweight stand-ins for
TransitionToolOutput.

* fix: typing

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
* chore(ci): switch benchmark fill from evmone to geth

* chore: remove duplicate benchmark tox environment

* chore: remove unnecessary comment that is now outdated

* chore: add PREVRANDAO as synonym for DIFFICULTY

---------

Co-authored-by: fselmo <fselmo2@gmail.com>
spencer-tb and others added 22 commits March 10, 2026 22:16
…reum#2452)

* feat(tests): add tests for address not warmed on aborted create

* refactor(tests): use create_opcode parameter directly instead of branching

* Apply suggestions from code review

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
…#2466)

* feat: t8n now can handle pre-fork typed txs via supports_tx_type

* fix: better logged message
…thereum#2457)

* feat(tests): port goevmlab regression tests for EELS consensus bugs (ethereum#1482)

* fix(tests): address review comments for goevmlab regression tests

* fix(tests): use pytest.mark.parametrize for create opcode

* fix(tests): remove redundant env=Environment() from tstore create context tests
* feat(tests): port stZeroKnowledge ECADD static tests

Port pointAddFiller.json and pointAddTruncFiller.json from
stZeroKnowledge into the existing test_ecadd.py test suite,
adding test vectors that were not already covered:

Valid: S1 doubling, S1+S1x2, S1+generator, truncated S1 input.
Invalid: valid+not-on-curve, not-on-curve+valid, both not-on-curve.

Also fix pre-existing bugs: missing commas in ported_from URL
lists (caused implicit string concatenation) and duplicate test
ID "Pplus1_2_plus_inf".

* fix: use ethereum/tests URLs instead of legacytests in ported_from

* fix(tests): add pr= link for ethereum#2477 to ecadd ported_from markers
* feat(fill): Customize fill with --chain-id

* Apply suggestions from code review

Co-authored-by: felipe <fselmo2@gmail.com>

* Add a default to help to round off docs

---------

Co-authored-by: felipe <fselmo2@gmail.com>
…um#2489)

* feat(tests): port stSLoadTest static test and delete original

The sloadGasCostFiller.json test measures cold SLOAD gas cost (2100),
which is already covered by test_account_storage_warm_cold_state in the
Berlin EIP-2930 access list tests. Add ported_from marker and delete
the static test directory.

* fix(tests): add pr= link to stSLoadTest ported_from marker
…m#2490)

* feat(tests): port MCOPY_memory_hashFiller repeated copy test

Add test_mcopy_repeated which performs the same MCOPY twice on memory
containing a known pattern and verifies the SHA3 hash after each copy.
Covers overlapping forward/backward moves where the second copy
operates on already-modified memory.

Delete the original MCOPY_memory_hashFiller.yml static test.

* fix(tests): add pr= link to MCOPY ported_from marker
)

* fix(benchmarks): correct gas accounting for call/callcode account

* feat(benchmark): ensure accounts read on each tx are different

* fix: linting issue

---------

Co-authored-by: LouisTsai <q1030176@gmail.com>
…reate_message` (ethereum#1399)

* fix: redundant storage destruction before account creation

* fix(spec): fix linting issues

---------

Co-authored-by: Guruprasad Kamath <guru241987@gmail.com>

### What was wrong?

The [`process_create_message`](https://github.com/ethereum/execution-specs/blob/4198b9c5996713b268aed602739d5aa40e277694/src/ethereum/prague/vm/interpreter.py#L161) function in `vm/interpreter.py` [calls](https://github.com/ethereum/execution-specs/blob/4198b9c5996713b268aed602739d5aa40e277694/src/ethereum/prague/vm/interpreter.py#L180-L187) `destroy_storage` to handle a "highly unlikely scenario" in which the account being created already has storage. However, **this scenario does not appear to be possible** given the contexts in which `process_create_message` is invoked:

* In [`process_message_call`](https://github.com/ethereum/execution-specs/blob/4198b9c5996713b268aed602739d5aa40e277694/src/ethereum/prague/vm/interpreter.py#L93), the storage of `message.current_target` is [checked](https://github.com/ethereum/execution-specs/blob/4198b9c5996713b268aed602739d5aa40e277694/src/ethereum/prague/vm/interpreter.py#L113) before [calling](https://github.com/ethereum/execution-specs/blob/4198b9c5996713b268aed602739d5aa40e277694/src/ethereum/prague/vm/interpreter.py#L124) `process_create_message`. If the account already has storage, an [`AddressCollision`](https://github.com/ethereum/execution-specs/blob/4198b9c5996713b268aed602739d5aa40e277694/src/ethereum/prague/vm/interpreter.py#L120) error is returned and the account is not created.

* Similarly, the [`generic_create`](https://github.com/ethereum/execution-specs/blob/4198b9c5996713b268aed602739d5aa40e277694/src/ethereum/prague/vm/instructions/system.py#L63) function used by the `CREATE*` family of opcodes also [checks](https://github.com/ethereum/execution-specs/blob/4198b9c5996713b268aed602739d5aa40e277694/src/ethereum/prague/vm/instructions/system.py#L109) for existing storage before [proceeding](https://github.com/ethereum/execution-specs/blob/4198b9c5996713b268aed602739d5aa40e277694/src/ethereum/prague/vm/instructions/system.py#L137) with account creation.

Therefore, it is not possible for `process_create_message` to be executed in a context where the current target's storage is already set. As a result, the call to `destroy_storage` seems unnecessary and negatively impacts code readability.
…em (ethereum#2475)

* feat(test-execute): Defer pre-alloc methods remote checks to batch them

* fix: Review comments

* fix: Add funded addresses to allocation immediately

---------

Co-authored-by: marioevz <marioevz@Marios-MacBook-Pro.local>
lint

Fix opcodes in generated python

Add comment with source code

Add inline source

Change Account to EOA

Improve fixture_to_python generator with reviewer feedback

- Use EOA(key=...) for sender instead of raw Address + secret_key
- Use pre.deploy_contract() for contract accounts (fallback to
  Account() for oversized code > 24576 bytes)
- Omit default transaction values (value=0, data=b"", nonce=0,
  access_list=[])
- Fix name collisions: + maps to _plus_, - maps to _minus_
- Conditionally import Hash only when needed
- Add @pytest.mark.slow for slow categories (stQuadraticComplexityTest,
  stStaticCall, stTimeConsuming)
- Remove code from post assertions — code doesn't change and just
  bloats the generated tests
- Fix func_doc IndexError when filler comment is "This " with no body
- Fix addr_vars lookup using padded vs unpadded address keys

lint

Use deploy_contract more

Defaults in Transaction object

feat: port stQuadratic, stStaticCall, stTimeConsuming

fix: convert some raw bytecodes

fix mismatchs

add slow markers

fix: improve fixture_to_python generator

- Merge pre-state across all fixture cases (fixes MissingAccountError)
- Derive valid_from from filler network field instead of fixture dir
- Deduplicate fixtures across fork directories (keep earliest fork)
- Parametrize `to` field for contract creation (to=None) support
- Escape docstrings containing backslashes or triple quotes
- Prevent ruff stack overflow with RUST_MIN_STACK=16777216
- Pad access list addresses to 40 hex chars
- Support both static/ and non-static/ fixture output layouts
- Add Amsterdam to FORK_ORDER
- Fix compare_fixtures.py: strip test_ prefix, skip ported_static/

fix(scripts): filter state_tests only in fixture_to_python.py

find_fixture_files() was picking up blockchain_tests fixtures which
share the same test names as state_tests, causing identity collisions
during dedup that resulted in 0 state_tests being generated.

feat(scripts): handle fork-divergent post-states in fixture_to_python

When a test has different expected post-states across forks (e.g.
precompile gas changes in Prague), generate separate test functions
per fork range with correct valid_from/valid_until markers.

- Refactor find_fixture_files into grouped variant that returns all
  fork paths per identity
- Add detect_fork_ranges() to compare post-state hashes across forks
- Generate _from_<fork> suffixed functions for divergent ranges
- Skip ranges beyond filler's valid_until to avoid empty fork ranges

Verified: 2180/2180 fixtures match in roundtrip comparison.

lint

Remove mcopy

feat(tests): port MCOPY_memory_hashFiller repeated copy test (ethereum#2490)

* feat(tests): port MCOPY_memory_hashFiller repeated copy test

Add test_mcopy_repeated which performs the same MCOPY twice on memory
containing a known pattern and verifies the SHA3 hash after each copy.
Covers overlapping forward/backward moves where the second copy
operates on already-modified memory.

Delete the original MCOPY_memory_hashFiller.yml static test.

* fix(tests): add pr= link to MCOPY ported_from marker

All tests ported

feat(tests): regenerate ported static tests with fork-range support

Regenerated all 2,180 ported test files using the updated
fixture_to_python.py script. Key improvements:

- Fork-divergent post-states: 88 tests with separate _from_<fork>
  functions when expected results differ across forks
- All 59 categories including slow tests (stQuadraticComplexityTest,
  stStaticCall, stTimeConsuming)
- Verified: 149,490 test cases passed, 0 failed
- Hasher compare: state_tests hashes match compiled_static exactly

chore: fix lint — ruff, mypy, tox-e-static pass

- Add RUST_MIN_STACK to tox static env for ruff stack overflow
- Fix ruff lint errors in fixture_to_python.py (docstrings, unused
  vars, dict comprehension)
- Add mypy: ignore-errors to 4 files with deeply nested Op chains
- Remove leftover debug script

fix: duplicated method

fix tox

refactor(tests): Evm bytes conversions

Reduce number of workers

Restore workflows

fix(tox): Ignore ported tests during json_loader

fix(tox): Ignore ported tests during json_loader
…ethereum#2487)

* fix: sstore benchmark tests

* fix: nonce managemnet issue

* feat: add repricing marker
Co-Authored-By: Claude claude-opus-4-6
@pdobacz pdobacz requested review from QEDK and mijovic as code owners April 30, 2026 11:27
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 30, 2026

Too many files changed for review. (3000 files found, 150 file limit)

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedrich@​13.9.4 ⏵ 14.3.398 +1100100100100
Updatedethereum-rlp@​0.1.4 ⏵ 0.1.5100 +1100100100100
Updatedethereum-types@​0.2.4 ⏵ 0.3.0100 +1100100100100

View full report

@pdobacz pdobacz merged commit c65142d into forks/monad_nine Apr 30, 2026
4 checks passed
@pdobacz pdobacz deleted the upstream branch April 30, 2026 12:13
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.