Skip to content

Conversation

@nerolation
Copy link
Contributor

@nerolation nerolation commented Dec 29, 2025

🗒️ Description

This PR adds three negative test cases that ensure clients reject blocks whose Block Access List contains an out-of-range block_access_index (len(transactions)+2). The suite covers (1) a spurious storage entry whose slot is also legitimately read by another transaction, (2) the same but with a legitimate write, and (3) no other transactions touching the slot. In all variants, the block must be rejected with INVALID_BLOCK_ACCESS_LIST, ensuring strict bounds-checking of BAL indices independent of whether the referenced (address, slot) is otherwise accessed in-block.

🔗 Related Issues or PRs

EIP clarification ethereum/EIPs#10990

✅ 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

@codecov
Copy link

codecov bot commented Dec 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (eips/amsterdam/eip-7928@dc1a0d2). Learn more about missing BASE report.

Additional details and impacted files
@@                    Coverage Diff                     @@
##             eips/amsterdam/eip-7928    #1953   +/-   ##
==========================================================
  Coverage                           ?   86.25%           
==========================================================
  Files                              ?      538           
  Lines                              ?    34561           
  Branches                           ?     3224           
==========================================================
  Hits                               ?    29809           
  Misses                             ?     4165           
  Partials                           ?      587           
Flag Coverage Δ
unittests 86.25% <ø> (?)

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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fselmo
Copy link
Contributor

fselmo commented Jan 1, 2026

@nerolation these looked interesting and you nerd sniped me into implementing these. I added it as a commit here, can you take a look to make sure it covers what you meant when you get some time? 👀

@fselmo fselmo added C-feat Category: an improvement or new feature A-test-tests Area: tests for packages/testing labels Jan 1, 2026
@nerolation
Copy link
Contributor Author

Great! Looks good to me!

@raxhvl
Copy link
Member

raxhvl commented Jan 1, 2026

I was also working on this; some additional cases that i think we should cover:

(1) adding various spurious fields, not just storage,

(2) All these spurious entries for the current transaction, system transaction, and out of bounds (id=3), just to be completely safe

image

@nerolation
Copy link
Contributor Author

nerolation commented Jan 1, 2026

Good points, I'm wondering if we should also test with additional fields like special_balance_change in the BAL, such that we make sure no additional fields are included in block_access_list.

Of course, this escalates quickly as it would also mean we'd add spurious, undefined fields to other parts of the BAL. Not sure how much that would actually be.

@fselmo
Copy link
Contributor

fselmo commented Jan 2, 2026

@raxhvl ah shoot. Did not know you were working on these also. Feel free to push some changes here. Otherwise I'll try to get to this tomorrow or Monday.

@raxhvl
Copy link
Member

raxhvl commented Jan 2, 2026

Im not sure if I have access to push changes here, but you can review my version here: raxhvl@e8d2594

I'm wondering if we should also test with additional fields like special_balance_change in the BAL, such that we make sure no additional fields are included in block_access_list.

@nerolation Do you mean for a BAL with only balance change MUST exclude all other fields ( nonce, code, storage) and so on for other fields?

@nerolation
Copy link
Contributor Author

@raxhvl more like BALs containing spurious fields e.g. balance_changes_spurious.

@fselmo fselmo added this to the amsterdam milestone Jan 5, 2026
Carsons-Eels pushed a commit to Carsons-Eels/execution-specs that referenced this pull request Jan 6, 2026
@fselmo
Copy link
Contributor

fselmo commented Jan 7, 2026

@raxhvl I was addressing these specific cases here. It looks like your changes are a lot more comprehensive and I believe covers all of these as well.

In the case it doesn't, I think we should just merge Toni's updates for the test cases here (I've removed my tests) and if you can PR your test cases after that, we can better clean up the test_cases.md and see what's still missing after that.

TL;DR:

  1. Merge just test_cases.md here (removed my tests)
  2. @raxhvl PRs his more comprehensive tests to eips/amsterdam/eip-7928
  3. Review PR from 2 and assess updates to test_cases.md / missing cases

@fselmo fselmo merged commit 87cba98 into ethereum:eips/amsterdam/eip-7928 Jan 7, 2026
9 checks passed
fselmo pushed a commit to fselmo/execution-specs that referenced this pull request Jan 12, 2026
fselmo pushed a commit to fselmo/execution-specs that referenced this pull request Jan 12, 2026
fselmo pushed a commit to fselmo/execution-specs that referenced this pull request Jan 15, 2026
fselmo pushed a commit to fselmo/execution-specs that referenced this pull request Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-tests Area: tests for packages/testing C-feat Category: an improvement or new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants