feat(tests): cover SYSTEM_ADDRESS accessed via delegation and withdrawal (EIP-7928) - #3681
Merged
fselmo merged 2 commits intoSep 30, 2026
Conversation
fselmo
self-requested a review
September 30, 2026 21:45
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #3681 +/- ##
===================================================
+ Coverage 94.53% 94.62% +0.08%
===================================================
Files 624 624
Lines 37021 36976 -45
Branches 3349 3349
===================================================
- Hits 34999 34988 -11
+ Misses 1429 1397 -32
+ Partials 593 591 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Import SYSTEM_ADDRESS like the sibling modules, drop the inline conditional in the withdrawal post-state, pin the delegation target's absence from post-state, shorten the docstrings, and add both tests to test_cases.md.
fselmo
approved these changes
Sep 30, 2026
fselmo
left a comment
Contributor
There was a problem hiding this comment.
Thanks! This adds some good cases. Just cleaned it up a bit 👍🏼
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds EIP-7928 block-access-list tests for
SYSTEM_ADDRESS(0xff…fe) when it is genuinely accessed:test_block_access_lists_eip7702.py::test_bal_7702_delegation_to_system_addresstest_block_access_lists_eip4895.py::test_bal_withdrawal_to_system_address(zero and non-zero amount)Why / flow
SYSTEM_ADDRESSis excluded from the BAL only as the synthetic caller of the block's system calls; once it is actually accessed it must be recorded like any other address. Two access paths were untested:SYSTEM_ADDRESSloads the delegation target, soSYSTEM_ADDRESSmust appear in the BAL.SYSTEM_ADDRESSrecords the recipient regardless of amount, soSYSTEM_ADDRESSmust appear in the BAL.The existing
eip7702andeip4895BAL tests never route an access throughSYSTEM_ADDRESS, so neither path was covered. These were surfaced by cross-client differential testing - Erigon currently omitsSYSTEM_ADDRESSfrom the BAL on both paths, so its BAL hash diverges from the other clients (reported to Erigon; Sepolia glamsterdam / 3.7.x, not mainnet). Adding the coverage here so the spec suite catches it.Filling
Both fill and pass against the reference (EELS), which includes
SYSTEM_ADDRESSin all cases:ruff checkandruff formatclean.