feat(test-benchmark): accept float values for --gas-benchmark-values flag#2693
Open
mandeepmourya007 wants to merge 2 commits intoethereum:forks/amsterdamfrom
Open
feat(test-benchmark): accept float values for --gas-benchmark-values flag#2693mandeepmourya007 wants to merge 2 commits intoethereum:forks/amsterdamfrom
--gas-benchmark-values flag#2693mandeepmourya007 wants to merge 2 commits intoethereum:forks/amsterdamfrom
Conversation
The `just bench-gas` CI check is the bottleneck at ~18 minutes. To allow reducing the gas benchmark value below 1 Mgas (e.g., 0.5), change the `GasBenchmarkValues.root` type from `List[int]` to `List[Annotated[float, Gt(0)]]` and update `format_gas_limit_prefix` to handle fractional values. Closes ethereum#2673
--gas-benchmark-values flag
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #2693 +/- ##
================================================
Coverage 86.25% 86.26%
================================================
Files 599 599
Lines 37032 37038 +6
Branches 3795 3795
================================================
+ Hits 31943 31949 +6
Misses 4525 4525
Partials 564 564
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
|
Thank you for this PR. I have some feedback:
cc @danceratopz |
- Revert Justfile gas value to 1 (0.5M too low for BLS12 precompile tests) - Fix precision loss in format_gas_limit_prefix: use consistent decimal padding across all values for lexicographic sortability (0.25 no longer truncated to 0.2) - Add unit tests for float gas benchmark values (pytester CLI test and parametrized format_gas_limit_prefix test)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Accept fractional Mgas values in --gas-benchmark-values to speed up the bench-gas CI check. Changes GasBenchmarkValues.root from List[int] to
List[Annotated[float, Gt(0)]], adds int() cast at the multiplication boundary so all downstream code still receives int, updates
format_gas_limit_prefix to handle float formatting, and reduces the Justfile default from 1 to 0.5.
🔗 Related Issues or PRs
Fixes #2673
✅ Checklist
just static