Skip to content

chore(tests): reduce Amsterdam ported_static skip list (480 to 258) - #2996

Merged
marioevz merged 6 commits into
ethereum:forks/amsterdamfrom
leolara:leolara/fix-ported-static-amsterdam
Jun 24, 2026
Merged

chore(tests): reduce Amsterdam ported_static skip list (480 to 258)#2996
marioevz merged 6 commits into
ethereum:forks/amsterdamfrom
leolara:leolara/fix-ported-static-amsterdam

Conversation

@leolara

@leolara leolara commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

🗒️ Description

Reduce the Amsterdam tests/ported_static/ skip list from 480 to 258
entries. PR #2969 made the transaction gas limit automatic, adding a
state-gas reservoir on EIP-8037 forks, which fixes a large class of
these tests directly.

Every change here is independent of the exact EIP-8037 gas constants. It
either removes a skip entry or unsets an incidental transaction
gas_limit, so the test rides the implicit limit and the reservoir from
#2969. The reduction comes in four parts:

  1. Unskip cases that now pass (33). After feat(test-specs): Allow automatic transaction gas-limit #2969, tests that leave the
    transaction gas limit unset get the implicit limit plus reservoir.

  2. Drop obsolete entries (10). Size-limit tests deselected by
    EIP-7954, and stale parametrization ids.

  3. Unset incidental tx gas_limit (116). An explicit gas_limit that
    was incidental: enough on older forks, short on Amsterdam.

  4. Fork-conditional per-slot unset (63). Mixed files where only some
    gas parametrizations broke; unset the affected slot on EIP-8037 only.

The gas-measurement, warm_after_fail, and refund re-pins, which pin
values derived from the current EIP-8037 constants, are split out to
leolara/fix-ported-static-amsterdam-repins for a follow-up PR once the
constants settle. Keeping them out of this PR makes it stable against
another recalibration.

Every change was filled across all valid forks and passes strict mypy
and ruff.

🔗 Related Issues or PRs

Follows #2969.

✅ 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

cute animal

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.19%. Comparing base (babe45c) to head (29fc787).
⚠️ Report is 8 commits behind head on forks/amsterdam.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           forks/amsterdam    #2996      +/-   ##
===================================================
+ Coverage            92.82%   93.19%   +0.36%     
===================================================
  Files                  620      624       +4     
  Lines                36719    36926     +207     
  Branches              3342     3377      +35     
===================================================
+ Hits                 34086    34413     +327     
+ Misses                1773     1716      -57     
+ Partials               860      797      -63     
Flag Coverage Δ
unittests 93.19% <ø> (+0.36%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@leolara
leolara requested a review from spencer-tb June 17, 2026 11:17
@leolara
leolara marked this pull request as ready for review June 17, 2026 11:17
@leolara
leolara force-pushed the leolara/fix-ported-static-amsterdam branch from c7dea6c to ed4cb40 Compare June 17, 2026 12:16
@leolara leolara changed the title chore(tests): prune Amsterdam ported_static skip list (480 to 437) chore(tests): reduce Amsterdam ported_static skip list (480 to 305) Jun 17, 2026
@leolara leolara changed the title chore(tests): reduce Amsterdam ported_static skip list (480 to 305) chore(tests): reduce Amsterdam ported_static skip list (480 to 258) Jun 17, 2026
@leolara leolara changed the title chore(tests): reduce Amsterdam ported_static skip list (480 to 258) chore(tests): reduce Amsterdam ported_static skip list (480 to 247) Jun 18, 2026
@leolara leolara changed the title chore(tests): reduce Amsterdam ported_static skip list (480 to 247) chore(tests): reduce Amsterdam ported_static skip list (480 to 226) Jun 18, 2026
@leolara

leolara commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Progress summary (updated)

This PR is now scoped to the changes that are independent of the exact EIP-8037 gas constants. Each one is either an unskip or an incidental-gas_limit unset, so the test rides the automatic transaction gas limit and the state-gas reservoir from #2969. None pins a constant-derived value, so a future recalibration cannot break this PR. Current state: skip list 480 to 258 (222 cleared), filled across all valid forks.

Cleared, by approach

Approach Entries
Now pass after #2969 (no edit) 33
Obsolete entries removed 10
Unset incidental transaction gas_limit 116
Fork-conditional per-slot gas unset 63
Total 222

Split out to a follow-up

The gas-measurement, warm_after_fail, and refund re-pins (the further reduction from 258 to 229 in the earlier version of this PR) are moved to leolara/fix-ported-static-amsterdam-repins. They pin values derived from the current EIP-8037 constants, so they belong in a separate PR filled once the constants settle.

Still skipped (258)

Dominated by:

  • multi_param_per_d — the MCOPY sweep and the point_mul precompile sweeps, whose OoG boundary needs a per-d recompute.
  • gas-measurement and refund tests whose stored value or whole transaction shifts under EIP-8037.
  • oog_by_design, bytecode_baked, other.

Reviving these needs a gas-budget change (not the same scenario), a per-d boundary recompute, or per-frame state-gas work.

@leolara leolara changed the title chore(tests): reduce Amsterdam ported_static skip list (480 to 226) chore(tests): reduce Amsterdam ported_static skip list (480 to 213) Jun 19, 2026
leolara added 5 commits June 19, 2026 16:33
PR ethereum#2969 made the transaction gas limit automatic. On EIP-8037 forks
the implicit limit now carries a state-gas reservoir, so tests that
leave the transaction gas limit unset receive enough headroom and stop
running out of gas under the two-dimensional gas model.

Filling tests/ported_static/ for Amsterdam without the skip list shows
33 of these entries pass across all fixture variants. Remove them from
amsterdam_skip_list.txt and recompute the per-section counts and the
total, from 480 down to 447. Two sections become empty and are dropped,
stCallDelegateCodesHomestead and stRecursiveCreate.

Most of the cleared cases are the _suicide_end family. They set only
the environment gas limit and rely on the implicit transaction gas
limit, so the reservoir restores their pre-Amsterdam behaviour.
These 10 entries match no test collected on Amsterdam, so the conftest
never skips anything for them. They are dead weight in the list.

Eight are size-limit tests under stCodeSizeLimit and
stEIP3860_limitmeterinitcode. They carry valid_before("EIP7954"), and
Amsterdam includes EIP-7954, so pytest deselects them and they never
reach the skip step. Both sections empty out and are dropped.

Two are stCreateTest/test_create_address_warm_after_fail cases pinned
to a create-code-too-big-v1 parametrization that no longer exists after
the test was reparametrized.

Recompute the section counts and the total, from 447 down to 437.
PR ethereum#2969 computes the transaction gas limit automatically and adds a
state-gas reservoir on EIP-8037 forks. These 69 files set an explicit
transaction gas_limit that was incidental: it sufficed on older forks,
but on Amsterdam the state-gas component pushed the transaction over its
budget and broke the test. Leaving the gas limit unset gives each
transaction the implicit limit plus reservoir, which restores the
recorded full-execution behaviour.

Drop the transaction gas_limit from these files, together with the
helpers it orphaned (tx_gas lists, an intrinsic-gas computation) and
three now-unused fork-conditional bumps that the unset limit supersedes.
Filling them across every valid fork passes all variants with no
residual failures, so remove their 116 entries from
amsterdam_skip_list.txt. Total 437 down to 321.
test_no_src_account_create and its 1559 variant assert an
INSUFFICIENT_ACCOUNT_FUNDS rejection at gas index g1 (210000). On
Amsterdam EIP-8037 raises the creation intrinsic gas above that budget,
so the transaction is rejected for gas before the funds check and the
assertion fails.

Make the g1 budget fork-conditional: leave the gas limit unset on
EIP-8037 forks, where the implicit limit plus reservoir clears the
intrinsic and the intended funds rejection fires again. Earlier forks
keep the original 210000. Filling across every valid fork passes all
variants, so remove the 16 g1 entries from amsterdam_skip_list.txt.
Total 321 down to 305.
Extend the per-parametrization fix from no_src_account_create to eight
more mixed files. Each sets the skip-listed gas slot to None on EIP-8037,
so that parametrization gets the implicit limit plus reservoir, while the
other slots and earlier forks keep their explicit gas.

These slots recorded a full-execution result that broke on Amsterdam when
the state-gas component pushed the transaction over its budget. The
stZeroKnowledge point_mul tests run out of gas because they SSTORE the
precompile result, which EIP-8037 makes more expensive; the precompile
call itself is unchanged, so unsetting restores the recorded success
state.

Filling across every valid fork passes all variants with no failures, so
remove the 47 entries from amsterdam_skip_list.txt. Total 305 down to 258.
@leolara
leolara force-pushed the leolara/fix-ported-static-amsterdam branch from 8209510 to 924c30f Compare June 19, 2026 10:33
@leolara leolara changed the title chore(tests): reduce Amsterdam ported_static skip list (480 to 213) chore(tests): reduce Amsterdam ported_static skip list (480 to 234) Jun 19, 2026
@leolara leolara changed the title chore(tests): reduce Amsterdam ported_static skip list (480 to 234) chore(tests): reduce Amsterdam ported_static skip list (480 to 232) Jun 19, 2026
@leolara leolara changed the title chore(tests): reduce Amsterdam ported_static skip list (480 to 232) chore(tests): reduce Amsterdam ported_static skip list (480 to 228) Jun 19, 2026
@leolara leolara changed the title chore(tests): reduce Amsterdam ported_static skip list (480 to 228) chore(tests): reduce Amsterdam ported_static skip list (480 to 229) Jun 22, 2026

@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.

I think this PR does a good job in pointing out which tests try to store gas at a certain point during execution, but the proposed solution is to simply introduce a new constant instead of fixing the issue and making it future proof.

I think the steps forward should be:

  1. We keep the changes in this PR that simply remove the gas_limit from the transaction, since those effectively remove constants and make the tests more resilient.
  2. Move the changes that introduce new constants into a new branch/issue so we can start tackling them one by one via a proper update to the test.

For (2) I think we need to create a claude skill and this should be an agentic process.

4: 1,
5: 1,
12: 32028,
12: (7028 if fork.is_eip_enabled(8037) else 32028),

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.

This doesn't look like a permanent solution IMO – we are going have to come back on the next gas repricing to re-disable it.

I would rather only re-enable these tests if we are doing dynamic recalculation of these values via a rewrite.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I understand, I will change this to only send the tests that don't need specific repricing.

Then, perhaps I can think of a way to abstract this out, like to say declaratively what we want to happen with the gas and that gets automatically calculated, I don't know how difficult is that.

@leolara
leolara force-pushed the leolara/fix-ported-static-amsterdam branch from 823587c to 5927cdb Compare June 24, 2026 08:35
@leolara leolara changed the title chore(tests): reduce Amsterdam ported_static skip list (480 to 229) chore(tests): reduce Amsterdam ported_static skip list (480 to 258) Jun 24, 2026

@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.

LGTM, I ported the failing tests to the newer python ECADD+ECMUL framework, so we can proceed to merge. Thanks!

@marioevz
marioevz merged commit 8dca7a7 into ethereum:forks/amsterdam Jun 24, 2026
18 checks passed
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