feat(test-benchmark): add precompile macro for precompile benchmarks#2591
Open
LouisTsai-Csie wants to merge 1 commit intoethereum:forks/amsterdamfrom
Open
feat(test-benchmark): add precompile macro for precompile benchmarks#2591LouisTsai-Csie wants to merge 1 commit intoethereum:forks/amsterdamfrom
LouisTsai-Csie wants to merge 1 commit intoethereum:forks/amsterdamfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #2591 +/- ##
===================================================
- Coverage 86.35% 86.24% -0.12%
===================================================
Files 599 599
Lines 36904 36984 +80
Branches 3771 3795 +24
===================================================
+ Hits 31868 31895 +27
- Misses 4485 4525 +40
- Partials 551 564 +13
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:
|
eb3c6a9 to
9e8d00a
Compare
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.
🗒️ Description
Precompile benchmark tests previously used
Op.STATICCALLastarget_opcode, which made the fixture metadata ambiguous: Every precompile showed the same opcode name. This PR introduces descriptive per-precompile labels (e.g.ECRECOVER,BN128_ADD,BLAKE2F) so the fixture_info.metadata.target_opcodefield clearly identifies which precompile is being benchmarked.A new
OpcodeTargetdataclass pairs a display name (written into the fixture) with the underlying opcode (used for--fixed-opcode-countvalidation):This keeps
OpcodeTargetgeneral-purpose: it is not precompile-specific. Any future benchmark that needs a human-readable label while counting a different EVM opcode can reuse it.A
Precompilehelper in the test helpers collects all precompile targets:The
_verify_target_opcode_countmethod resolvesOpcodeTarget.opcodefor the count lookup, so--fixed-opcode-countvalidation still works correctly against the realSTATICCALLcounts.🔗 Related Issues or PRs
N/A.
✅ Checklist
toxchecks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:uvx tox -e statictype(scope):.mkdocs servelocally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.@ported_frommarker.Cute Animal Picture