Skip to content

feat(spec-spec, tests): Implement eip-8246 and testing scenario#2842

Open
LouisTsai-Csie wants to merge 76 commits into
ethereum:eips/amsterdam/eip-8246from
LouisTsai-Csie:implement-eip-8246
Open

feat(spec-spec, tests): Implement eip-8246 and testing scenario#2842
LouisTsai-Csie wants to merge 76 commits into
ethereum:eips/amsterdam/eip-8246from
LouisTsai-Csie:implement-eip-8246

Conversation

@LouisTsai-Csie

@LouisTsai-Csie LouisTsai-Csie commented May 12, 2026

Copy link
Copy Markdown
Collaborator

🗒️ Description

Implement EIP-8246: https://forkcast.org/eips/8246

🔗 Related Issues or PRs

issue #2821

✅ Checklist

  • All: Ran fast static checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    just static
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.
  • Tests: For PRs implementing a missed test case, update the post-mortem document to add an entry the list.
  • Ported Tests: All converted JSON/YML tests from ethereum/tests or tests/static have been assigned @ported_from marker.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@codecov

codecov Bot commented May 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.01%. Comparing base (87c52b4) to head (b510ef9).

Additional details and impacted files
@@                   Coverage Diff                    @@
##           eips/amsterdam/eip-8246    #2842   +/-   ##
========================================================
  Coverage                    90.01%   90.01%           
========================================================
  Files                          539      539           
  Lines                        32618    32623    +5     
  Branches                      3030     3030           
========================================================
+ Hits                         29361    29366    +5     
  Misses                        2699     2699           
  Partials                       558      558           
Flag Coverage Δ
unittests 90.01% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

fselmo and others added 6 commits May 13, 2026 09:25
…thereum#2844)

* feat(spec-specs): Add transfer log for all `CALL*` and `SELFDESTRUCT`

fix(spec-specs): correct CR issues, fix formatting

fix(spec-specs): inline `execute_code()` to `process_message()`

chore(spec-specs): backport changes

fix(spec-specs): trim out whitespace in topic hash to match tests

feat(spec-specs): add selfdestruct event topic and logging function

feat(spec-specs): selfdestruct to self emits selfdestruct event

feat(spec-specs): define call success constant

feat(spec-specs): emit selfdestruct finalization log for remaining balance

* fix(spec-specs): emit account closure logs in lexicographical order

* feat(test-tests): add eip-7708 eth transfer log tests

test(test-tests): add selfdestruct topic and use empty account

test(test-tests): add nested calls log ordering test

feat(test-tests): add selfdestruct finalization test

fix(test-tests): use spaces in event signature to match spec

* fix(spec-specs): Refactor topic strings to match EIP

* fix(spec-tests): formatting fixes so static checks pass

* fix(spec-specs): Move account closure log emission before priority fee charges (ethereum#2059)

* fix(spec-specs): Move account closure log emission before priority fee charges

* fix(spec-specs): formatting and spelling tweaks

* fix(spec-specs): remove duplicate WriteInStaticContext check

* refactor(spec-specs): align memory expansion with other opcodes

* fix(testing/test): Fix unit test expectation

* refactor(spec-specs): move post-mining coinbase balance calculation

---------

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

* feat(test-specs): add extra eip-7708 test coverage (ethereum#2062)

* feat(test-specs): add/refactor tests, add mainnet marked, checklist, coverage check

* feat(test-specs): add fork transition test for selfdestruct logs

* fix: tests

* chore(test-specs): fix fork transition tests

* test(test-specs): add code deposit oog test case

---------

Co-authored-by: carsons-eels <carson@ethereum.org>
Co-authored-by: Mario Vega <marioevz@gmail.com>

* feat(spec,test): EIP-7708 spec updates for self as target (ethereum#2086)

* fix(spec,text): Updates to EIP-7708 spec for bal-devnet-2

- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx
- fix(spec,test): EIP-7708, only emit on transfers to other accounts
- Add more tests that match these edge cases

* feat(test): tests for finalization selfdest + bal transfer in lexicographic order

* fix: changes from comments on PR ethereum#2086

* add more variants to test_selfdestruct_same_tx_via_call

* fix: docstring

* refactor: improvements from comments on PR ethereum#2086

* Update test to use dynamic addresses

---------

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

* feat(test): extend EIP-7708 tests from cases in tracker (ethereum#1875) (ethereum#2106)

- Add CREATE2 support via with_all_create_opcodes marker
- Add tests for SELFDESTRUCT to coinbase - revealed a change needed since
  the last update was made to the EIP that should be included in the
  currect refspec (miner fees paid before finalization LOG2).

* fix(test): Use new ``pre_alloc_mutable`` marker for eip7708 test (ethereum#2199)

* fix(test): Update test to account for recent Initcode updates

* 🧹 chore: Remove duplicate test (ethereum#2210)

Co-authored-by: raxhvl <raxhvl@users.noreply.github.com>

* ♻️ refactor(tests): Rename EIP 7708 selfdestruct log to burn (ethereum#2211)

* ♻️ refactor: Rename selfdestruct log to burn

* 🥢 nit:

* chore(tests): fix stale selfdestruct references and rename to burn

---------

Co-authored-by: raxhvl <raxhvl@users.noreply.github.com>
Co-authored-by: spencer-tb <spencer.tb@ethereum.org>

* fix(specs): Merge issues

* fix(tests): Merge issues

* refactor(test-forks): Add EIP-7708

* refactor(tests): Condition EIP-7708 tests to EIP inclusion

* feat(tests): EIP-7708 - finalization burn log ordering + coinbase fee no-log (ethereum#2717)

* feat(tests): EIP-7708 - multi-account finalization burn log ordering

Adds a dedicated test that proves finalization burn logs are emitted
in lexicographical address order when multiple accounts are marked for
deletion in the same transaction.

Parametrized over N in {2, 5}. N accounts are created and
SELFDESTRUCT'd in the same tx, then funded via payer contracts called
in REVERSE sorted address order with distinct nonzero amounts. Each
destroyed account ends with a unique nonzero balance at finalization,
so ordering by address vs. by call order is always distinguishable.

Addresses issue ethereum#2691.

* feat(tests): EIP-7708 - coinbase priority fee must not emit transfer log

Adds a dedicated test proving the coinbase priority fee payment does
not produce a Transfer log.

A contract CALLs the coinbase address with nonzero value while the tx
pays a nonzero priority fee to that same coinbase. Only the
CALL-with-value must produce a Transfer log; the priority fee credit
happens outside the EVM as a protocol-level balance change.

An implementation that hooks every balance addition (instead of only
CALL / SELFDESTRUCT / tx-level value transfers) would emit an extra
Transfer log for the fee and fail the exact-log assertion.

Addresses issue ethereum#2692.

* feat(tests): add single account multi transfer test

* fix(tests): minor nit

---------

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

* fix(tests): rename GAS_CODE_DEPOSIT_PER_BYTE to CODE_DEPOSIT_PER_BYTE

Align EIP-7708 selfdestruct finalization test with the gas constant
rename on forks/amsterdam.

* fix(tests): EIP-7708 + 8037 cross-EIP fixes

* feat(tests): Add EIP-7708 checks to 6780 tests (ethereum#2743)

* feat(tests): Add EIP-7708 checks to 6780 tests

* fix: add another call and properly accumulate so that burn logs are validated

* fix(tests): Review fixes

---------

Co-authored-by: carsons-eels <carson@ethereum.org>

* feat(tests): cover EIP-7708 CREATE log rollback on outer revert (ethereum#2785)

* feat(tests): cover EIP-7708 CREATE log rollback on outer revert

Mirror `test_inner_call_succeeds_outer_reverts_no_log` for the bal-devnet-5 update that brings CREATE/CREATE2 under EIP-7708. A factory CREATEs a child with value (the deployment succeeds and a `factory -> created` log is emitted in the child frame) and then REVERTs; the receipt must record no logs because the outer revert discards the factory's frame along with every log it produced.

* feat(tests): Review comments

---------

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

* fix(specs-spec, tests): CR comment fixes

* Apply suggestion from @marioevz

---------

Co-authored-by: spencer-tb <spencer.tb@ethereum.org>
Co-authored-by: Mario Vega <marioevz@gmail.com>
Co-authored-by: spencer <spencer.taylor-brown@ethereum.org>
Co-authored-by: felipe <fselmo2@gmail.com>
Co-authored-by: raxhvl <raxhvl@users.noreply.github.com>
Co-authored-by: raxhvl <10168946+raxhvl@users.noreply.github.com>
Co-authored-by: danceratopz <danceratopz@gmail.com>
…ut refunds (ethereum#2840)

* feat(spec-specs): Implement EIP-7778 Block Gas Accounting without Refunds (ethereum#1401)

* feat(specs): add eip-7778 implementation

* fix(specs) spliting receipt gas from block gas

* revert receipt_gas_used

* make sure that the calldata floor cost overwrites the tx gas before refund

* receipt gas used after refunds

* clarify variable naming @gurukamath

* revert to using gas used after refunds for cumulative gas in receipt and add gasSpent to receipt

* spec(amsterdam): fix code formatting

---------

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

* fix(tests): fix legacy tests to run with eip-7778 (ethereum#2048)

* fix(tests): fix legacy tests to run with eip-7778

* fix(tests): check gas_spent and gas_used after Amsterdam

* feat(spec-tests): add basic eip7778 test (ethereum#2045)

* feat(spec-tests): add eip-7778 tests for calldata checks (ethereum#2060)

* feat(spec-tests): add eip-7778 for calldata checks

* feat(spec-tests): post review - use code gas_cost function

Co-authored-by: Louis Tsai <72684086+LouisTsai-Csie@users.noreply.github.com>

* Apply suggestions from code review

---------

Co-authored-by: Louis Tsai <72684086+LouisTsai-Csie@users.noreply.github.com>
Co-authored-by: Mario Vega <marioevz@gmail.com>

* fix(tests): Fix gas used/spent in EIP-7702 tests (ethereum#2068)

* feat(spec-specs): use post refund gas in receipts in EIP-7778 (ethereum#2073)

* fix(test): Update refspec for EIP-7778 to match latest revision (ethereum#2093)

* feat(test-forks): Add EIP-7778

* refactor(tests): Condition EIP-7778 tests to EIP inclusion

* fix(test): use deterministic iteration order for refund types

The set iteration in `build_refund_tx` is non-deterministic due to
Python's hash randomization, causing fixture output to vary between
runs. Sort by enum value to ensure reproducible fixtures.

* doc: remove changelog md

* fix: broken auth tx benchmark

* doc: add eip checklist

* fix: typo

* Update tests/benchmark/compute/scenario/test_transaction_types.py

* Apply suggestions from code review

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

---------

Co-authored-by: Toni Wahrstätter <51536394+nerolation@users.noreply.github.com>
Co-authored-by: Guruprasad Kamath <guru241987@gmail.com>
Co-authored-by: Guruprasad Kamath <48196632+gurukamath@users.noreply.github.com>
Co-authored-by: Mario Vega <marioevz@gmail.com>
Co-authored-by: felipe <fselmo2@gmail.com>
Co-authored-by: spencer-tb <spencer.tb@ethereum.org>
…um#2849)

`FixtureDownloader.get_cache_path` versions the on-disk cache directory
by release tag only when the release URL's owner/repo appears in
`SUPPORTED_REPOS`. Otherwise it falls through to the unversioned
`cache_folder / "other" / <archive_name>` path.

When the BAL fixture release was moved from
`ethereum/execution-spec-tests` to `ethereum/execution-specs` for
`tests-bal@v7.1.0`, the new URL stopped being recognized as a release
URL. A v7.0.0 download from a prior session, cached at
`other/fixtures_bal/`, kept satisfying every subsequent request,
including ones for v7.1.0. Consumers got stale fixtures with no warning.

Add `ethereum/execution-specs` to `SUPPORTED_REPOS` so its release URLs
hit the versioned cache path. Add regression tests covering
`is_release_url` against every supported repo and asserting the new
entry is present.

Discovered while validating ethrex against tests-bal@v7.1.0: 76
SD-related ef-tests appeared to fail due to a spec mismatch, but the
client was actually executing v7.1.0 semantics against v7.0.0 fixtures
served by the stale cache. After clearing
`~/.cache/ethereum-execution-spec-tests/cached_downloads/` all 2145
amsterdam tests pass.
…cell in `test_varying_calldata_costs` (ethereum#2852)

`STORAGE_CLEAR` refund is zero on revert, so `gas_used_pre_refund == gas_used_post_refund` and the `(post, pre)` interval that `DATA_FLOOR_BETWEEN_TX_GAS_BEFORE_AND_AFTER` requires is empty. Replace the runtime `pytest.skip()` with the `filter_combinations` marker introduced in ethereum#2543, which runs in `pytest_collection_modifyitems` and can express predicates across covariant-marker-injected and inline parametrize axes uniformly.

Keeps `with_all_refund_types()` so new refund types added to the fork in future automatically participate, preserves the original three-decorator parametrize stack, and produces byte-identical fixture IDs and content vs the pre-refactor branch (verified via `diff` on `varying_calldata_costs.json` keys and bodies). The two infeasible items per fork are now deselected at collection time rather than skipped at runtime.
@marioevz marioevz requested a review from gurukamath May 13, 2026 21:52

@marioevz marioevz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good overall. I think we need to take care of failing tests in ./tests/cancun/eip6780_selfdestruct before eventually merging into forks/amsterdam (if this gets included in a devnet).

Comment thread tests/amsterdam/eip8246_selfdestruct_no_burn/test_selfdestruct_no_burn.py Outdated
Comment thread tests/amsterdam/eip8246_selfdestruct_no_burn/test_selfdestruct_no_burn.py Outdated
Comment thread src/ethereum/forks/amsterdam/state_tracker.py Outdated
fselmo and others added 3 commits May 13, 2026 16:41
…thereum#2679)

* feat(test-cli): Add support for testing block building via simulator

- Test build building via ``testing_buildBlockV1``, validating the built block, and re-consuming against the client

* chore: pretty diff BALs on errors

* refactor(test): cleanup based on comments on PR ethereum#2679

* chore: cleanup from comments on PR ethereum#2679

* chore: initial docs for build-block

* chore: e2e run for block-building tests; tighten up docs
…2837)

* (Claude): add eth transfer cases for repricing

* refactor: split test based on pre-alloc

* refactor: bump execution cost for contract ether reception

* chore: remove unnecessary parametrization

* refactor: move new benchmark under stateful folder

* fix: apply suggested changes

* feat: add receipt check

* (Claude): add distinct senders

* (Claude): do not limit distinct senders

* (Claude): add uniq jumpdest contract test

* refactor unique contract code receiver case

---------

Co-authored-by: LouisTsai <q1030176@gmail.com>
…um#2851)

* feat(test): inter-dependent tx tests for BAL parallelization

* chore: move 7702 test to 7702 BAL test file

* feat(test): extend test cases based on comments on PR ethereum#2851
@LouisTsai-Csie LouisTsai-Csie marked this pull request as ready for review May 14, 2026 16:08
kclowes and others added 3 commits May 14, 2026 11:15
)

* feat(src): Initial EIP-7843 (SLOTNUM) Implementation (ethereum#2007)

* feat(amsterdam): Implement EIP-7843 SLOTNUM opcode

* mario feedback

* fix(tests): minor fixes and updates for eip7843 (ethereum#2057)

* fix(tests): minor updates to eip-7843 following ethereum#2007

* fix: account for slotnum in genesis creation

* fix: append slot_number in fixture_loader.py

* execution-api 7843 pr 731 implemented (ethereum#2101)

* src(fix): framework bug fix for slotnum (ethereum#2108)

* refactor(tests): Condition EIP-7843 tests to EIP inclusion

* fix(specs): align EIP-7843 SLOTNUM gas references with renamed constants

Replace stale GAS_BASE reference with GasCosts.OPCODE_SLOTNUM (= BASE)
to match the opcode gas naming convention used across block
instructions on forks/amsterdam. Also update the test-fork mixin to use
gas_costs.BASE instead of the retired gas_costs.GAS_BASE.

* Remove stray header_bal_hash_required checks

* Remove unneeded eip7843 spec.py

---------

Co-authored-by: felix <felix314159@users.noreply.github.com>
Co-authored-by: felipe <fselmo2@gmail.com>
Co-authored-by: marioevz <marioevz@gmail.com>
Co-authored-by: spencer-tb <spencer.tb@ethereum.org>
…` for keccak (ethereum#2370)

* use hashlib

* test(crypto): cover keccak backend dispatch in `ethereum.crypto.hash`

Add tests that verify the active backend matches published Keccak-256
and Keccak-512 vectors, both backends produce byte-identical output, and
the pycryptodome fallback engages cleanly when `hashlib.new("keccak-256")`
is patched to raise. Also covers EEST `Bytes.keccak256` and
`trie.keccak256` routing.

Without the fallback dispatch these tests fail (or, on Pythons whose
hashlib lacks Keccak entirely, the test session aborts at collection),
so the suite drives the fix that follows.

* fix(crypto): fall back to pycryptodome when hashlib lacks Keccak

OpenSSL only gained default-provider Keccak in 3.2.0 (Nov 2023). LTS
3.0.x and 3.1.x, still shipped by Debian 12 and RHEL 9, do not provide
it, so `hashlib.new("keccak-256", ...)` raises `ValueError` there and
every call to `keccak256` crashes.

At module import time, probe with `hashlib.new("keccak-256", b"")`. On
`ValueError`, rebind the digest helpers to pycryptodome's bundled
implementation. The probe is more reliable than checking
`hashlib.algorithms_available`, which omits some OpenSSL-provider
digests on python-build-standalone builds.

Route the EEST keccak helpers in `base_types.Bytes.keccak256` and
`test_types.trie.keccak256` through `ethereum.crypto.hash`, so the
dispatch lives in one place. Widen `keccak256` and `keccak512` parameter
types from `Bytes | bytearray` to `bytes | bytearray` so the EEST `Bytes`
subclass passes through without coercion.

* fix(crypto): define keccak digest helpers unconditionally for docc

The previous `try/except` block defined `_keccak256_digest` and
`_keccak512_digest` inside its branches. `docc`'s static analyzer does
not traverse `try/except` at module scope when discovering module-level
names, so it could not resolve the references from `keccak256` and
`keccak512`, breaking the `Build Documentation` job with:

    docc.plugins.references.ReferenceError: in `src/ethereum/crypto/hash.py`,
    undefined identifier: `ethereum.crypto.hash._keccak256_digest`

Define the helpers unconditionally at module scope and branch on a
module-level `_USE_HASHLIB` flag inside their bodies. The probe runs
once at import; the runtime branch adds about 20ns per call, dwarfed by
the hash itself. `pycryptodome` is now imported unconditionally, which
is free since it is already a hard dep via `elliptic_curve.py`.

Update the dispatch tests to assert on `_USE_HASHLIB` instead of the
presence of `_pycryptodome_keccak` (now always imported).

* Fix keccak-256 initialization in test function

* code review feedback

* update docc

---------

Co-authored-by: danceratopz <danceratopz@gmail.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <sam@binarycake.ca>
…thereum#2850)

* ✨ feat(specs,tests): Implement EIP-7954 (ethereum#2276)

* ✨ feat: Tests for new contract size

* ✨ feat: Gas metering of initcode

* ✨ feat: Transition, Mainnet tests

* 🧹 chore: Names

* fix: use gas constant instead of hard-coded number

* fix: remove references to old_max that are not in tests

* fix: align with other forks; use 2*code_size for initcode size

* chore: fix lint

* refactor: simplify gas calculation with gas cost API; add post check

* refactor: use opcode metadata for gas calc

* feat(test): add max_code with max_init_code in same test

* refactor: simplify calls to compute_create_address; no conditional necessary

* 🧹 chore: Simplify docstring

* 🧹 chore: Simplify opcode based testing

* 🧹 chore: Better names

* 🧹 chore: types

* version

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

* feat(test): use deterministic deploy for similar contracts

* refactor: use same max-size self-checking contract for tests

- DRY max size contract for mainnet by including the superset in one
  and removing subset tests

---------

Co-authored-by: raxhvl <raxhvl@users.noreply.github.com>
Co-authored-by: fselmo <fselmo2@gmail.com>

* fix(tests): Failing initcode test (ethereum#2355)

* refactor(tests): remove gas metering test moved to EIP-8037

The 2D gas metering test for max initcode size via CREATE is an
EIP-8037 concern and now lives in the 8037 test suite. The 7954 max
initcode enforcement is covered by test_max_initcode_size_via_create.

* fix(tests): Merge issues

* refactor(tests): Condition EIP-7954 to EIP Inclusion

* refactor(tests): gate pre-EIP-7954 code size tests before EIP7954

These ported_static tests hardcode sizes around the pre-EIP-7954
24 KiB MAX_CODE_SIZE / 48 KiB MAX_INITCODE_SIZE limits, so paths
that previously failed now succeed on Amsterdam and break their
Account.NONEXISTENT expectations. I marked them valid_before(EIP7954).
The remaining 22 params still cover EIP-2929 warming on Amsterdam.
Equivalent Amsterdam-side coverage is provided by
eip7954_increase_max_contract_size/test_max_code_size.py and
test_max_initcode_size.py, which size against fork.max_code_size() /
fork.max_initcode_size() and follow the same creation-tx, CREATE,
and CREATE2 paths with the new limits.

* fix(tests): cover warm-after-failed-create over max code size

---------

Co-authored-by: raxhvl <10168946+raxhvl@users.noreply.github.com>
Co-authored-by: raxhvl <raxhvl@users.noreply.github.com>
Co-authored-by: fselmo <fselmo2@gmail.com>
Co-authored-by: Mario Vega <marioevz@gmail.com>
Co-authored-by: spencer-tb <spencer.tb@ethereum.org>
Comment thread src/ethereum/forks/amsterdam/state_tracker.py Outdated
Comment thread src/ethereum/forks/amsterdam/state_tracker.py Outdated
Comment thread src/ethereum/forks/amsterdam/state_tracker.py Outdated
Comment thread src/ethereum/forks/amsterdam/fork.py Outdated
for address in tx_output.accounts_to_delete:
destroy_account(tx_state, address)
destroy_storage(tx_state, address)
modify_state(tx_state, address, preserve_account_balance)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If modify_state ends up calling destroy_account (zero-balance case), destroy_storage runs twice. Not a huge issue but something to be kept in mind

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I will keep it as is, but let me know if you have any suggestion!

@gurukamath gurukamath May 20, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not just call destroy_storage in convert_to_balance_only_account like destroy_account currently does? That way, the diff in fork.py looks cleaner as well. Otherwise, this looks good to me.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Great idea, i will add a new commit.

kclowes and others added 4 commits May 15, 2026 17:29
…eum#2862)

* fix(tests): drop gas_price from EIP-7702 txs in BAL 7702 tests

EIP-7702 (type-4) transactions don't have a gas_price field; remove
the stray gas_price=0xA from txs that include an authorization_list.

* fix(test-types): prevent tx type > 2 from defining ``gas_price`` in tests

---------

Co-authored-by: fselmo <fselmo2@gmail.com>
* feat(tests): complete EIP-7928 testing checklist

* feat(tests): transition tests for EIP-7928 (BALs)

* fix(test-types,test-fixtures): pass through rlp to engine modifier; rename as future issue
@marioevz

Copy link
Copy Markdown
Member

Checking the list of failing tests for the current fill in Amsterdam, they all look like expected failures because of the behavior change.

I recommend we track these in the EIP tracking issue #2821, tackle them in separate PRs to merge to eips/amsterdam/eip-8246, and merge this PR as is after addressing the spec comments.

kclowes and others added 2 commits May 19, 2026 14:28
…tion (ethereum#2858)

* feat(tests): EIP-7843 Add test cases for multi-blocks and fork transition

* PR feedback

* doc: update comment

---------

Co-authored-by: 蔡佳誠 Louis Tsai <72684086+LouisTsai-Csie@users.noreply.github.com>
…hereum#2871)

Add `test_3tx_mixed_gas_regimes` exercising the EIP-7778 identity
`block.gas_used == sum_i max(pre_refund_i, floor_i)` across a block
where each tx hits a different regime:

  tx1: SSTORE-set fresh slot (no refund, pre_refund > floor)
  tx2: SSTORE-clear x10 (normal refund, refund not clipped to floor)
  tx3: 1000 zero-byte calldata to STOP (floor binds upward)

Per-tx sender balances are also asserted so the floor-binding tx
locks in `floor * gas_price` (not `pre_refund * gas_price`), the
multi-tx accumulator bug EIP-7778 prevents. The 2-tx
`test_multi_transaction_gas_accounting` never combines a refund-
bearing tx with a floor-binding tx in the same block.
@LouisTsai-Csie LouisTsai-Csie marked this pull request as draft May 19, 2026 09:02
Self-hosted runners persist `$GOMODCACHE` (`/data/gh-home/go/pkg/mod`)
across jobs, so the `actions/setup-go` cache restore extracts a tarball
on top of files that already exist and emits hundreds of `tar: Cannot
open: File exists` lines before bailing out with `Failed to restore`.
The build still succeeds because the on-disk modules are reused, but
the log noise is alarming and the ~500 MB cache download is wasted.

Set `GOMODCACHE` and `GOCACHE` to `${{ runner.temp }}/go/...` before
each `setup-go` invocation so the cache always lands in an empty,
job-scoped directory. Behaviour on GitHub-hosted runners is unchanged;
self-hosted runners stop colliding without losing the GHA cache.
nanookclaw and others added 25 commits June 2, 2026 10:19
… (EIP-7778) (ethereum#2949)

In test_multi_transaction_gas_accounting, a block whose included transaction
exceeds the remaining block gas was expected to fail only with the block-level
BlockException.GAS_USED_OVERFLOW. A client may legitimately report the same
condition at the transaction level: EELS raises GasUsedExceedsLimitError (an
InvalidTransaction subclass) when `tx.gas > gas_available`, and evmone reports
it as a rejected transaction (GAS_LIMIT_REACHED).

List both BlockException.GAS_USED_OVERFLOW and
TransactionException.GAS_ALLOWANCE_EXCEEDED as acceptable so either
categorization passes.
…wcase erigon statetest bug (ethereum#2951)

* feat: erigon support for 'consume direct'

* feat: add minimal test to showcase erigon statetest behavior differs from other clients
…b/) (ethereum#2962)

* chore: ignore local memory files (CLAUDE.local.md, .mb/, mb/)

These are local-only AI memory and notes files; ignore them so they do not show up as untracked in working trees.

* chore: exclude local memory files from codespell

Skip CLAUDE.local.md and the .mb/mb memory-bank dirs so codespell does not scan local-only AI memory and notes files (which may be present as symlinks).
Add a `FinalDecoratorHygiene` lint rule that flags any leaf dataclass (a
`@dataclass` or `@slotted_freezable` class never used as a base) that is
missing `@final`. Marking leaf dataclasses `@final` lets `mypyc` bypass
the vtable for method calls and property accessors.

The rule scans the whole specification once at the first fork position:
every fork's modules plus the shared modules such as `ethereum.state` and
`ethereum.trace`, including each package's `__init__.py`. Register the rule
in `vulture_whitelist.py` since lints are discovered dynamically.
…m#2901)

Co-authored-by: Ben Adams <thundercat@illyriad.co.uk>
Co-authored-by: felix <felix314159@users.noreply.github.com>
Co-authored-by: fselmo <fselmo2@gmail.com>
Co-authored-by: Stefan <22667037+qu0b@users.noreply.github.com>
Co-authored-by: Mario Vega <marioevz@gmail.com>
Co-authored-by: kclowes <kclowes@users.noreply.github.com>
Co-authored-by: carsons-eels <carson@ethereum.org>
Co-authored-by: Leo Lara <leolara@users.noreply.github.com>
Co-authored-by: danceratopz <danceratopz@gmail.com>
Co-authored-by: Paweł Bylica <pawel@hepcolgum.band>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: marioevz <11726710+marioevz@users.noreply.github.com>
Co-authored-by: kclowes <6540608+kclowes@users.noreply.github.com>
…thereum#2970)

`build_refund_tx` iterated `set(fork.refund_types())`, whose order
depends on Python's per-process string-hash randomization (no
`PYTHONHASHSEED` is set in this repo). Different `fill` invocations
therefore appended the extra `PUSH0` from the
`AUTHORIZATION_EXISTING_AUTHORITY` branch either before or after the
`STORAGE_CLEAR` SSTOREs, producing two different bytecodes and — via
`contract_address_from_hash` — two different deployment addresses for
the same test, and hence two different pre-state allocations and
state roots.

Sort by enum-member name inside the iteration so the bytecode (and
therefore the contract address) is deterministic across runs.
* ✨ feat(test): selfdestruct a drity account

* nit

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

* nit

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

* nit

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

* nit

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

* nit

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

* ✨ feat: Parameterise success / revert

* 🧹 chore: lint

* 🐞 fix: 8037 pricing change; forward all gas

---------

Co-authored-by: raxhvl <raxhvl@users.noreply.github.com>
Co-authored-by: Mario Vega <marioevz@gmail.com>
…tstrapped (ethereum#2944)

* feat(execute): skip the deterministic factory deploy (and dependent tests) when it can't be bootstrapped

The deterministic deployment proxy is bootstrapped in an autouse session
fixture via a keyless transaction with a fixed gas limit. On chains where the
contract-creation intrinsic gas exceeds that limit (so the keyless tx can never
be mined), the deploy aborted the entire execute session, blocking even tests
that never use the factory.

- Pre-flight the deploy with `eth_estimateGas`: if the network requires more
  gas for the creation than the keyless tx's fixed gas limit, raise instead of
  attempting it (no funding tx, no doomed send, no inclusion wait).
- Make the session fixture best-effort: warn instead of raising, so tests that
  don't need the factory still run.
- Skip a test that requests a deterministic deployment when the factory is
  unavailable.
- Add `EthRPC.estimate_gas` for the pre-flight.

* chore: update comment

---------

Co-authored-by: LouisTsai <q1030176@gmail.com>
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.