Skip to content

feat(benchmarks): add eth transfer cases for repricing#2837

Open
jochem-brouwer wants to merge 8 commits into
ethereum:forks/amsterdamfrom
jochem-brouwer:eth-transfer-bench-repricing
Open

feat(benchmarks): add eth transfer cases for repricing#2837
jochem-brouwer wants to merge 8 commits into
ethereum:forks/amsterdamfrom
jochem-brouwer:eth-transfer-bench-repricing

Conversation

@jochem-brouwer
Copy link
Copy Markdown
Member

@jochem-brouwer jochem-brouwer commented May 12, 2026

🗒️ Description

We have ether transfer benchmarks, but they're incomplete. We're missing:

  • Non-existing EOA
  • Existing EOA (balance-only, zero nonce, no code)
  • Contract account

For the latter two cases, we want to use pre-existing accounts from perf-devnet-3, mainnet, or jochemnet snapshots instead of creating them during pre-allocation. This keeps the accounts outside the client cache and prevents benchmark skewing.

Verification on gas-benchmarks with 300M: https://github.com/NethermindEth/gas-benchmarks/actions/runs/25720366344/job/75519841684

🔗 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
Copy link
Copy Markdown
Collaborator

LouisTsai-Csie commented May 12, 2026

Changes:

I split the original ether transfer test into two: test_ether_transfer (the existing one) and test_ether_transfer_on_receiver (new). This avoids skipping test parametrization. In addition, the latest implementation now accounts for the execution cost of Bittrex-created contracts.

Question:

After review, i notice the scenario of diff_to_nonexistent in test_ether_transfers_onchain_receivers is the same as empty_account x diff_acc_to_diff_acc parametrization in test_ether_transfers benchmark

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.01%. Comparing base (44923d4) to head (6892eb2).
⚠️ Report is 3 commits behind head on forks/amsterdam.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           forks/amsterdam    #2837      +/-   ##
===================================================
+ Coverage            88.62%   90.01%   +1.38%     
===================================================
  Files                  577      539      -38     
  Lines                35659    32618    -3041     
  Branches              3490     3030     -460     
===================================================
- Hits                 31604    29361    -2243     
+ Misses                3492     2699     -793     
+ Partials               563      558       -5     
Flag Coverage Δ
unittests 90.01% <ø> (+1.38%) ⬆️

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.

@LouisTsai-Csie LouisTsai-Csie marked this pull request as ready for review May 12, 2026 06:05
Copy link
Copy Markdown
Contributor

@fselmo fselmo left a comment

Choose a reason for hiding this comment

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

I'm not really sure how to properly test this (I can't locally) but I left some things I had questions on and some nits. @LouisTsai-Csie can you give a proper sanity check on the actual test run here? If so, can you give a final approve / review here?

Comment thread tests/benchmark/stateful/bloatnet/test_transaction_types.py Outdated
Comment thread tests/benchmark/stateful/bloatnet/test_transaction_types.py Outdated
Comment thread tests/benchmark/stateful/bloatnet/test_transaction_types.py
Comment thread tests/benchmark/stateful/bloatnet/test_transaction_types.py Outdated
Comment thread tests/benchmark/stateful/bloatnet/test_transaction_types.py Outdated
@LouisTsai-Csie
Copy link
Copy Markdown
Collaborator

LouisTsai-Csie commented May 13, 2026

Nice review and thanks @fselmo , we could not test it out without snapshot, i will test it in gas-benchmarks, review and merge.

Edit: this is the latest benchmark payload generation with receipt check, it is a successful run: https://github.com/NethermindEth/gas-benchmarks/actions/runs/25806153732/job/75809369217

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.

3 participants