Skip to content

Fix test_measure_gas tests for Amsterdam#2618

Draft
kclowes wants to merge 1 commit intoethereum:eips/amsterdam/eip-8037from
kclowes:fix/fix-gas-ported-tests
Draft

Fix test_measure_gas tests for Amsterdam#2618
kclowes wants to merge 1 commit intoethereum:eips/amsterdam/eip-8037from
kclowes:fix/fix-gas-ported-tests

Conversation

@kclowes
Copy link
Copy Markdown
Contributor

@kclowes kclowes commented Apr 3, 2026

🗒️ Description

Fix for stBadOpcode tests. Added a higher tx_gas value, and checks for gas values in Amsterdam and later.

🔗 Related Issues or PRs

#2601

✅ 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-->

Bytes("693c6139") + Hash(0x3B),
]
tx_gas = [16777216]
tx_gas = [20000000]
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.

After Amsterdam, tx.gas can exceed 16.7M, and the remainder will go in the reservoir to be used as state_gas.

{
"indexes": {"data": [0], "gas": -1, "value": -1},
"network": [">=Amsterdam"],
"result": {contract_12: Account(storage={0: 9089})},
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.

Amsterdam: REGULAR_GAS_CREATE = 9000 + 89 overhead (no state gas taken into account here)
Pre-Ams: REGULAR_GAS_CREATE = 32000 + 89 overhead

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (eips/amsterdam/eip-8037@b9f0afa). Learn more about missing BASE report.

Additional details and impacted files
@@                    Coverage Diff                     @@
##             eips/amsterdam/eip-8037    #2618   +/-   ##
==========================================================
  Coverage                           ?   87.39%           
==========================================================
  Files                              ?      476           
  Lines                              ?    27899           
  Branches                           ?     2685           
==========================================================
  Hits                               ?    24383           
  Misses                             ?     3042           
  Partials                           ?      474           
Flag Coverage Δ
unittests 87.39% <ø> (?)

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.

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.

1 participant