Skip to content

refactor(tests): Leftover manual gas calculation/hard-coded gas costs#2222

Open
marioevz wants to merge 4 commits intoethereum:forks/amsterdamfrom
marioevz:remaining-gas-issues
Open

refactor(tests): Leftover manual gas calculation/hard-coded gas costs#2222
marioevz wants to merge 4 commits intoethereum:forks/amsterdamfrom
marioevz:remaining-gas-issues

Conversation

@marioevz
Copy link
Member

@marioevz marioevz commented Feb 17, 2026

🗒️ Description

- test_initcode.py

Remove manual gas calculation of the CREATE/CREATE2 opcodes.

- Remove hard-coded gas cost in CodeGasMeasure

CodeGasMeasure had a hard-coded gas cost of the Op.GAS opcode (2). This is now replaced with a dynamic calculation of the cost of the opcode.

🔗 Related Issues or PRs

N/A.

✅ Checklist

  • All: Ran fast tox checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    uvx tox -e 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-->

@marioevz marioevz requested a review from spencer-tb February 17, 2026 00:34
@marioevz marioevz force-pushed the remaining-gas-issues branch from c11b686 to 91b0a5b Compare February 17, 2026 00:36
@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.07%. Comparing base (fce7a9a) to head (91b0a5b).

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #2222   +/-   ##
================================================
  Coverage            86.07%   86.07%           
================================================
  Files                  599      599           
  Lines                39472    39472           
  Branches              3780     3780           
================================================
  Hits                 33977    33977           
  Misses                4862     4862           
  Partials               633      633           
Flag Coverage Δ
unittests 86.07% <ø> (ø)

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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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