Skip to content

test(tests): inter-dependent tx tests for BAL parallelization#2851

Merged
marioevz merged 3 commits into
ethereum:forks/amsterdamfrom
fselmo:feat/more-bal-coverage
May 14, 2026
Merged

test(tests): inter-dependent tx tests for BAL parallelization#2851
marioevz merged 3 commits into
ethereum:forks/amsterdamfrom
fselmo:feat/more-bal-coverage

Conversation

@fselmo
Copy link
Copy Markdown
Contributor

@fselmo fselmo commented May 13, 2026

🗒️ Description

From ETH R&D @matkt:

https://discord.com/channels/595666850260713488/1364000387195076608/1504026078107275274

Add five new cross-tx parallelization-correctness tests:

  • test_bal_cross_tx_storage_chain — 8-tx fibonacci chain on one contract... each tx i ≥ 2 writes slot[i] = SLOAD(i-1) + SLOAD(i-2) -- transactions are dependent on previous 2. Catches clients that fail to apply prior txs BAL storage changes.
  • test_bal_cross_tx_deploy_then_call (@with_all_create_opcodes) — tx1 CREATE/CREATE2s a contract; tx2 CALLs it. Catches clients that hit an empty account because tx1's code_changes weren't applied.
  • test_bal_cross_tx_balance_dependency — tx1 sends value to a contract; tx2 calls the contract and SSTOREs SELFBALANCE. Catches clients that read the pre-block balance.
  • test_bal_7702_cross_tx_delegation_then_call — tx1 installs an EIP-7702 delegation on alice; tx2 and tx3 call alice to increment slot 0, using different senders. Catches clients that don't apply the delegation or skip the intermediate increment.
  • test_bal_cross_tx_funding_chain — Five-tx chain alicebobcharliedaneunicetarget where each intermediate starts empty and only becomes solvent once the prior tx's BAL balance_changes are applied; oog_minus_1 additionally exercises target's storage_reads when eunice's SSTORE OOGs one gas short.

✅ 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

Screenshot 2026-05-13 at 11 14 41

@fselmo fselmo requested review from marioevz, raxhvl and spencer-tb May 13, 2026 18:05
@fselmo fselmo added the C-test Category: test label May 13, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.94%. Comparing base (5c6cec7) to head (98fc341).
⚠️ Report is 5 commits behind head on forks/amsterdam.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           forks/amsterdam    #2851      +/-   ##
===================================================
- Coverage            90.01%   86.94%   -3.07%     
===================================================
  Files                  539      586      +47     
  Lines                32618    35767    +3149     
  Branches              3030     3362     +332     
===================================================
+ Hits                 29361    31098    +1737     
- Misses                2699     4010    +1311     
- Partials               558      659     +101     
Flag Coverage Δ
unittests 86.94% <ø> (-3.07%) ⬇️

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.

@fselmo fselmo added the A-tests Area: Consensus tests. label May 13, 2026
@fselmo fselmo changed the title feat(test): inter-dependent tx tests for BAL parallelization test(tests): inter-dependent tx tests for BAL parallelization May 13, 2026
Copy link
Copy Markdown
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

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

Looks good, I suggested some extra variations of the tests included. Let me know if the description of these tests are clear. Thanks!

Comment thread tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py Outdated
Comment thread tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py Outdated
Comment thread tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py Outdated
@fselmo fselmo removed the request for review from spencer-tb May 13, 2026 21:44
@fselmo fselmo requested a review from marioevz May 13, 2026 23:33
Copy link
Copy Markdown
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

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

Excellent tests, thanks!

@marioevz marioevz merged commit 267a2bd into ethereum:forks/amsterdam May 14, 2026
27 of 28 checks passed
@fselmo fselmo deleted the feat/more-bal-coverage branch May 14, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tests Area: Consensus tests. C-test Category: test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants