feat(test): Increase BAL coverage with tests and BAL expectations for some existing#2834
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #2834 +/- ##
===================================================
+ Coverage 88.62% 90.01% +1.38%
===================================================
Files 577 539 -38
Lines 35659 32618 -3041
Branches 3490 3030 -460
===================================================
- Hits 31604 29361 -2243
+ Misses 3492 2699 -793
+ Partials 563 558 -5
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:
|
marioevz
left a comment
There was a problem hiding this comment.
LGTM, just a couple of comments, thanks!
from comments on PR ethereum#2834
Thanks! Both great suggestions. Applied here just now 👀 |
from comments on PR ethereum#2834
from comments on PR ethereum#2834
raxhvl
left a comment
There was a problem hiding this comment.
Great work on increasing BAL coverage :)
|
Thanks @raxhvl. I've addressed everything here. I think some of these can come in another PR. We should really do a review back through the Can you do a final review here? |
I found it useful for BALs for sure. If you can suggest this in a testing meeting, we can see how the team feels 👀 |
|
Ah I still need an approve from someone with |
🗒️ Description
evm-breakeraudit that were added in this PR (5/18):#167:test_bal_7702_invalid_authority_has_code_authorization— auth fails because authority has pre-existing non-delegation code; authority loaded then rejected, must appear in BAL with empty changeset.
#180:test_bal_7702_multi_hop_delegation_chain— A→B→C delegation chain; CALL(A) resolves one hop only, third address must not appear in BAL.#165:test_bal_create_storage_op_then_selfdestruct_same_tx— same-tx CREATE/CREATE2 + SLOAD/SSTORE on slot B + SELFDESTRUCT; slot B must appear in storage_reads, never storage_changes, anddestroyed contract has no nonce/code changes.
#165:test_bal_create2_selfdestruct_then_recreate_same_block— Tx1 CREATE2+SELFDESTRUCT then Tx2 CREATE2 at same address; Tx1 entry has no nonce/code changes, Tx2 entry has fresh nonce+code at thesame address.
#165:test_selfdestruct_send_to_sender— pre-existing contract SELFDESTRUCTs to tx.sender; sender's BAL entry coalesces nonce_changes (as sender) and balance_changes (as beneficiary).Bonus: I changed all the
fork.header_bal_hash_required()checks in tests that append a BAL expectation tofork.is_eip_enabled(7928), now that this API is available, as I think it is more readable / desirable this way.✅ Checklist
just 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