-
Notifications
You must be signed in to change notification settings - Fork 414
feat(tests): add invalid BAL tests for spurious block_access_index #1953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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
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:
|
|
@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? 👀 |
|
Great! Looks good to me! |
tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_invalid.py
Outdated
Show resolved
Hide resolved
tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_invalid.py
Outdated
Show resolved
Hide resolved
|
Good points, I'm wondering if we should also test with additional fields like 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. |
|
@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. |
|
Im not sure if I have access to push changes here, but you can review my version here: raxhvl@e8d2594
@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? |
|
@raxhvl more like BALs containing spurious fields e.g. |
|
@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 TL;DR:
|

🗒️ 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 withINVALID_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
toxchecks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:uvx tox -e 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