Skip to content

feat(tests): Add tests for ecadd/ecmul/ecpairing constant gas repricing#1738

Merged
marioevz merged 4 commits into
ethereum:forks/osakafrom
pdobacz:tests/bn254
Nov 27, 2025
Merged

feat(tests): Add tests for ecadd/ecmul/ecpairing constant gas repricing#1738
marioevz merged 4 commits into
ethereum:forks/osakafrom
pdobacz:tests/bn254

Conversation

@pdobacz
Copy link
Copy Markdown
Contributor

@pdobacz pdobacz commented Nov 3, 2025

🗒️ Description

The precompiles were repriced in Istanbul. There are legacy tests covering this but are hard to port, while (given static tests) we're only missing pre-istanbul price calculation coverage.

This test fills this gap but doesn't otherwise port the legacy test.

🔗 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 adding an entry to CHANGELOG.md.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Nov 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.08%. Comparing base (fa1a2bb) to head (ba08ad7).
⚠️ Report is 16 commits behind head on forks/osaka.

Additional details and impacted files
@@               Coverage Diff               @@
##           forks/osaka    #1738      +/-   ##
===============================================
- Coverage        86.08%   86.08%   -0.01%     
===============================================
  Files              743      743              
  Lines            44072    44076       +4     
  Branches          3891     3891              
===============================================
+ Hits             37938    37941       +3     
- Misses            5656     5657       +1     
  Partials           478      478              
Flag Coverage Δ
unittests 86.08% <ø> (-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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Collaborator

@LouisTsai-Csie LouisTsai-Csie left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines +41 to +44
if fork < Istanbul:
gas = gas_pre_istanbul
else:
gas = gas_post_istanbul
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just a nit:

Suggested change
if fork < Istanbul:
gas = gas_pre_istanbul
else:
gas = gas_post_istanbul
gas = gas_pre_istanbul if fork < Istanbul else gas_post_istanbul

Copy link
Copy Markdown
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

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

Some comments, thanks!

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 test belongs in the byzantium folder IMO.

Comment thread tests/frontier/precompiles/test_bn254.py Outdated
@marioevz marioevz merged commit 2bd9dc4 into ethereum:forks/osaka Nov 27, 2025
12 checks passed
@pdobacz pdobacz deleted the tests/bn254 branch November 28, 2025 17:06
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.

4 participants