Skip to content

Conversation

@CPerezz
Copy link
Contributor

@CPerezz CPerezz commented Oct 27, 2025

Migrated benchmark tests from ethereum/execution-spec-tests#2256:

  • Added test_mixed_sload_sstore with configurable SLOAD/SSTORE ratios (50-50, 70-30, 90-10)
  • Added test_sload_empty_erc20_balanceof for pure SLOAD benchmarks
  • Added test_sstore_erc20_approve for pure SSTORE benchmarks
  • Support for parametrized contract counts (1, 5, 10, 20, 100)
  • Uses pre-deployed ERC20 contracts via address stubs for execute mode

These benchmarks stress test client implementations with state-heavy operations across multiple contracts to identify performance bottlenecks.

✅ 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: 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-->

@CPerezz CPerezz marked this pull request as ready for review October 28, 2025 09:51
Migrate benchmarks from ethereum/execution-spec-tests PR #2256
- Added test_mixed_sload_sstore with configurable ratios:
  50-50, 70-30, 90-10 SLOAD/SSTORE splits
- Added test_sload_empty_erc20_balanceof for SLOAD-only benchmark
- Added test_sstore_erc20_approve for SSTORE-only benchmark
- Tests use ERC20 function selectors (balanceOf, approve)
- Support for pre-deployed contracts via address_stubs
- Parameterized tests with num_contracts: 1, 5, 10, 20, 100

Follows package naming conventions from PR ethereum#1654
@CPerezz CPerezz force-pushed the feat/sstore-sload-mixed-benchmarks branch from 7ef448c to c338969 Compare October 28, 2025 10:36
- Add AddressStubs import from execute.pre_alloc
- Add type annotations for address_stubs parameter
- Add None checks before accessing address_stubs.root
- Fixes mypy errors for all benchmark test functions
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.

2 participants