feat(tests): tighten invalid-path BAL coverage for EIP-2935 and EIP-4788#2716
Merged
spencer-tb merged 2 commits intoethereum:forks/amsterdamfrom Apr 20, 2026
Conversation
spencer-tb
approved these changes
Apr 20, 2026
Contributor
spencer-tb
left a comment
There was a problem hiding this comment.
LGTM! I added an extra test here too, I would like to get it in the next release today so merging :D
cc @fselmo for extra eyes, anything else can be a follow up
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #2716 +/- ##
================================================
Coverage 86.26% 86.26%
================================================
Files 599 599
Lines 37038 37038
Branches 3795 3795
================================================
Hits 31949 31949
Misses 4525 4525
Partials 564 564
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:
|
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.
🗒️ Description
Tighten invalid path BAL assertions and add a missing 4788 invalid calldata test.
Tightening:
Add missing callee side
balance_changes=[]assertions for the invalid query + non-zero value paths in the EIP-2935 and EIP-4788 BAL tests.The caller/query side is already asserted, but
HISTORY_STORAGE_ADDRESS/BEACON_ROOTS_ADDRESShad no explicit callee balance expectation in these cases. Because BAL expectations only validate fields that are explicitly set, those callee balance changes were not being checked at all.New test:
test_bal_4788_invalid_calldata_size, symmetric to the existingtest_bal_2935_invalid_calldata_size. EIP-4788 requires exactly 32 bytes of calldata; parametrized overcalldata_size(0/31/33) *value(0/100) to verify the beacon roots contract reverts before any storage access with no balance transfer.Affected tests:
test_bal_2935_querytest_bal_2935_invalid_calldata_sizetest_bal_4788_querytest_bal_4788_invalid_calldata_size(new)No semantics change for the tightening, this only makes the existing tests stricter. The new test covers a pre-existing coverage gap.
🔗 Related Issues or PRs
N/A.
✅ Checklist
just statictype(scope):.