feat(test-benchmark): add eth transfer cases for repricing#2837
Conversation
|
Changes: I split the original ether transfer test into two: Question: After review, i notice the scenario of |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #2837 +/- ##
================================================
Coverage 86.94% 86.94%
================================================
Files 586 586
Lines 35767 35767
Branches 3362 3362
================================================
Hits 31098 31098
Misses 4010 4010
Partials 659 659
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:
|
fselmo
left a comment
There was a problem hiding this comment.
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?
|
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 |
|
Claude and I added a distinct EOA sender with uv run python -c "
from tests.benchmark.stateful.bloatnet.test_transaction_types import (SENDER_BASE_KEY)
from execution_testing import EOA
out_path = 'tests/benchmark/stateful/bloatnet/fixtures/sender_addresses.txt'
with open(out_path, 'w') as f:
for i in range(SENDER_COUNT):
f.write(EOA(key=15000 + i).hex() + '\n')
print(f'wrote {SENDER_COUNT} addresses to {out_path}')
"Gas benchmark target: NethermindEth/gas-benchmarks#144 |
|
@jochem-brouwer i think the account generated in gas-benchmark does not align with the one in EELS. Based on your code section, the pk range starts from uv run python -c "
from tests.benchmark.stateful.bloatnet.test_transaction_types import (SENDER_BASE_KEY)
from execution_testing import EOA
out_path = 'tests/benchmark/stateful/bloatnet/fixtures/sender_addresses.txt'
with open(out_path, 'w') as f:
for i in range(SENDER_COUNT):
f.write(EOA(key=15000 + i).hex() + '\n') # the pk range from 15,000 to 15,000+sender_count
print(f'wrote {SENDER_COUNT} addresses to {out_path}')But in the EELS code, the sender pk starts from I will change EELS implementation in this PR to align with gas-benchmarks address. Edit: I notice that the first address in |
147b123 to
6d1dd69
Compare
…2837) * (Claude): add eth transfer cases for repricing * refactor: split test based on pre-alloc * refactor: bump execution cost for contract ether reception * chore: remove unnecessary parametrization * refactor: move new benchmark under stateful folder * fix: apply suggested changes * feat: add receipt check * (Claude): add distinct senders * (Claude): do not limit distinct senders * (Claude): add uniq jumpdest contract test * refactor unique contract code receiver case --------- Co-authored-by: LouisTsai <q1030176@gmail.com>
|
Hi Louis, sorry, I copied an old version of the pkey generated code, and removed a constant without checking if the generated code was correct. This is the code to generate the file uv run python -c "
from tests.benchmark.stateful.bloatnet.test_transaction_types import (
SENDER_BASE_KEY, SENDER_COUNT,
)
from execution_testing import EOA
out_path = 'tests/benchmark/stateful/bloatnet/fixtures/sender_addresses.txt'
with open(out_path, 'w') as f:
for i in range(SENDER_COUNT):
f.write(EOA(key=SENDER_BASE_KEY + i).hex() + '\n')
print(f'wrote {SENDER_COUNT} addresses to {out_path}')
"
(I edited SENDER_BASE_KEY instead of SENDER_COUNT it seems 🤦 ) Sorry about that, this gave extra work which was not necessary, will check code next time I comment it. Thanks for checking and catching this!! 😄 👍 (it should thus not be a problem, and you noted this, the posted code is wrong but the code in the PR is right and there is thus no problem) |
🗒️ Description
We have ether transfer benchmarks, but they're incomplete. We're missing:
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
just 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