Skip to content

feat(tests): EIP-7928 cover many storage changes for one account - #2985

Merged
spencer-tb merged 1 commit into
ethereum:forks/amsterdamfrom
pirapira:test/bal-many-storage-writes-single-account
Jun 15, 2026
Merged

spencer-tb merged 1 commit into
ethereum:forks/amsterdamfrom
pirapira:test/bal-many-storage-writes-single-account

Conversation

@pirapira

@pirapira pirapira commented Jun 13, 2026 •

Copy link
Copy Markdown
Member

🗒️ Description

Add test_bal_many_storage_writes_single_account to the EIP-7928 block-access-list suite, parametrized over 17, 32, and 128 distinct storage slots written by a single transaction to one contract.

Existing BAL storage tests touch at most a handful of slots per account — test_bal_cross_tx_storage_chain writes eight, one slot per transaction. This adds coverage for a much higher per-account, per-transaction storage-change cardinality: the block access list must record every slot, in ascending order, at a single block access index. It stresses any client that records or preloads an account's BAL storage keys into a fixed-size buffer.

This scenario was not covered by the existing suite and surfaced a fixed-size-buffer overflow in a stateless client implementation, so a post-mortem entry is also added in docs/writing_tests/post_mortems.md.

Filled clean for Amsterdam (blockchain + engine fixture formats); the produced BAL contains 17 / 32 / 128 storage changes for the recipient as expected.

🔗 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.

Cute Animal Picture

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

"Brown Bear Sitting" by Accretion Disc is licensed under CC BY 2.0. To view a copy of this license, visit https://creativecommons.org/licenses/by/2.0/?ref=openverse.

@codecov

codecov Bot commented Jun 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.53%. Comparing base (9d7738b) to head (114755b).

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #2985   +/-   ##
================================================
  Coverage            90.53%   90.53%           
================================================
  Files                  535      535           
  Lines                32895    32895           
  Branches              3022     3022           
================================================
  Hits                 29782    29782           
  Misses                2595     2595           
  Partials               518      518           
Flag Coverage Δ
unittests 90.53% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@pirapira pirapira changed the title test(amsterdam/eip7928): cover many storage changes for one account feat(tests): cover many storage changes for one account Jun 13, 2026
@pirapira

This comment was marked as resolved.

Add `test_bal_many_storage_writes_single_account`, parametrized over
17, 32, and 128 distinct storage slots written by a single transaction
to one contract.

Existing EIP-7928 BAL storage tests touch at most a handful of slots
per account (`test_bal_cross_tx_storage_chain` writes 8, one slot per
transaction). This adds coverage for a much higher per-account,
per-transaction storage-change cardinality, where the block access list
must record every slot in ascending order at a single block access
index. It stresses any client that records or preloads an account's BAL
storage keys into a fixed-size buffer.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pirapira pirapira changed the title feat(tests): cover many storage changes for one account feat(tests): EIP-7928 cover many storage changes for one account Jun 13, 2026
@pirapira
pirapira force-pushed the test/bal-many-storage-writes-single-account branch from b5c2753 to 114755b Compare June 13, 2026 14:01
@pirapira

This comment was marked as resolved.

@pirapira

This comment was marked as outdated.

@pirapira

This comment was marked as resolved.

@pirapira

This comment was marked as resolved.

@pirapira
pirapira marked this pull request as ready for review June 14, 2026 15:01
@pirapira
pirapira marked this pull request as draft June 14, 2026 15:02
@pirapira
pirapira marked this pull request as ready for review June 14, 2026 15:08

@spencer-tb spencer-tb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the tests! LGTM

@spencer-tb spencer-tb added C-feat Category: an improvement or new feature A-tests Area: Consensus tests. labels Jun 15, 2026
@spencer-tb
spencer-tb merged commit 5c7c53d into ethereum:forks/amsterdam Jun 15, 2026
24 checks passed
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-feat Category: an improvement or new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants