Skip to content

refactor(test-benchmark): update test_account_access, add keccak256 overhead scenario#2947

Draft
LouisTsai-Csie wants to merge 1 commit into
ethereum:forks/amsterdamfrom
LouisTsai-Csie:refactor-account-access-bench
Draft

refactor(test-benchmark): update test_account_access, add keccak256 overhead scenario#2947
LouisTsai-Csie wants to merge 1 commit into
ethereum:forks/amsterdamfrom
LouisTsai-Csie:refactor-account-access-bench

Conversation

@LouisTsai-Csie
Copy link
Copy Markdown
Collaborator

🗒️ Description

The original test_account_access targets contracts created by the Bittrex controller factory. This requires CREATE address calculations, introducing significant overhead and hard to precisely control over EXP and KECCAK256 inputs.

For this PR, we replaced those contracts with minimal contracts containing only a STOP opcode, created via CREATE2 with a deterministic factory. To isolate the account access opcode execution time, we need to subtract the keccak256 overhead. We do this with a separate benchmark using identical inputs and the same number of keccak256 operations.

🔗 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

Put a link to a cute animal picture inside the parenthesis-->

@LouisTsai-Csie LouisTsai-Csie self-assigned this Jun 2, 2026
@LouisTsai-Csie LouisTsai-Csie added C-refactor Category: refactor A-test-benchmark Area: execution_testing.benchmark and tests/benchmark labels Jun 2, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.50%. Comparing base (abf6ff6) to head (81272f4).
⚠️ Report is 2 commits behind head on forks/amsterdam.

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #2947   +/-   ##
================================================
  Coverage            90.49%   90.50%           
================================================
  Files                  535      535           
  Lines                32430    32407   -23     
  Branches              3012     3011    -1     
================================================
- Hits                 29349    29331   -18     
+ Misses                2563     2559    -4     
+ Partials               518      517    -1     
Flag Coverage Δ
unittests 90.50% <ø> (+<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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-benchmark Area: execution_testing.benchmark and tests/benchmark C-refactor Category: refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant