Skip to content

fix(testing): record converged gas optimization limit#2671

Open
RekCuy63 wants to merge 1 commit intoethereum:forks/amsterdamfrom
RekCuy63:fix-testing-converged-gas-limit
Open

fix(testing): record converged gas optimization limit#2671
RekCuy63 wants to merge 1 commit intoethereum:forks/amsterdamfrom
RekCuy63:fix-testing-converged-gas-limit

Conversation

@RekCuy63
Copy link
Copy Markdown

🗒️ Description

The gas optimization binary search already verifies the converged value with minimum_gas_limit, but the recorded gas_optimization field still used the last loop-local current_gas_limit.

When the final probe is a failing candidate, this stores a value that is one step below the actual minimum gas limit and propagates the wrong optimization result to the JSON output used by follow-up analysis.

This PR records minimum_gas_limit after convergence and adds a regression test to lock in the expected bookkeeping behavior.

🔗 Related Issues or PRs

N/A.

✅ 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

image

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.25%. Comparing base (47782b3) to head (04b6f79).

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #2671   +/-   ##
================================================
  Coverage            86.25%   86.25%           
================================================
  Files                  599      599           
  Lines                37032    37032           
  Branches              3795     3795           
================================================
  Hits                 31943    31943           
  Misses                4525     4525           
  Partials               564      564           
Flag Coverage Δ
unittests 86.25% <ø> (ø)

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