-
Notifications
You must be signed in to change notification settings - Fork 415
feat(spec,test): EIP-7708 spec updates for self as target #2086
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
feat(spec,test): EIP-7708 spec updates for self as target #2086
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## eips/amsterdam/eip-7708 #2086 +/- ##
===========================================================
- Coverage 86.14% 84.14% -2.01%
===========================================================
Files 599 642 +43
Lines 39491 42267 +2776
Branches 3782 4066 +284
===========================================================
+ Hits 34021 35566 +1545
- Misses 4848 5971 +1123
- Partials 622 730 +108
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:
|
8fa8d42 to
a76f905
Compare
a76f905 to
1213282
Compare
1213282 to
70d5a42
Compare
jochem-brouwer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked tests, they look good but left a few nit comments and commented on one test where I think it is not tested what is intended.
Here are some extra cases to add:
- Ensure CALLCODE does not emit any logs
- Ensure SELFDESTRUCT to COINBASE emits the correct logs
This specific case will: 1. Invoke selfdestruct (address is coinbase), this could burn eth if coinbase has funds already (the contract created is thus sending to Op.ADDRESS, but the block.coinbase is set such that this matches the created address). 2. Pay the priority fees to coinbase and 3. Destroy coinbase. - Ensure that in all 3 create situations (tx create, CREATE, CREATE2) the logs are emitted correctly
- Invoking selfdestruct in the same contract multiple times (parametrize sending to self (burn), other addresses, and then burn again). This should either burn or emit transfer logs.
- Send via selfdestruct funds to a contract already marked for selfdestruct.
- Ensure that a transaction which 7702-delegates an account, which calls that account, which itself does SELFDESTRUCT, does not do the burn logs (as it does not burn since contract is not created)
- Ensure that if any action done in current tx, which reverts, that the logs are also deleted
Let me know if I can assist 😄 👍
tests/amsterdam/eip7708_eth_transfer_logs/test_selfdestruct_logs.py
Outdated
Show resolved
Hide resolved
tests/amsterdam/eip7708_eth_transfer_logs/test_selfdestruct_logs.py
Outdated
Show resolved
Hide resolved
tests/amsterdam/eip7708_eth_transfer_logs/test_selfdestruct_logs.py
Outdated
Show resolved
Hide resolved
tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py
Outdated
Show resolved
Hide resolved
This is quite helpful, thank you 👍🏼. Imo, we should track these cases in the tracker for this EIP here. Or feel free to push here if you have permissions or PR to this branch. My goal here is to update the spec and provide enough tests to get a new release out and get clients to agree. Anything beyond this I think we can make subsequent PRs with more test cases. Wdyt?
The more the merrier 🙂! Thank you for the review! I will look into updating this tomorrow. Much appreciated 🙏🏼 |
marioevz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments, thanks!
tests/amsterdam/eip7708_eth_transfer_logs/test_selfdestruct_logs.py
Outdated
Show resolved
Hide resolved
tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py
Outdated
Show resolved
Hide resolved
tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py
Outdated
Show resolved
Hide resolved
f3d0672 to
6b9199e
Compare
- fix(spec,test): EIP-7708 emit selfdestruct logs only in same tx - fix(spec,test): EIP-7708, only emit on transfers to other accounts - Add more tests that match these edge cases
db5b412 to
c069c11
Compare
marioevz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for these tests! And many thanks to @jochem-brouwer for your review!
I think we can go ahead and merge as-is, and add any remaining tests to the tracker #1875, in order to (a) be able to release soon, and (b) keep this PR from growing out of proportion.
done #1875 (comment) 👍🏼 |
fb17a68
into
ethereum:eips/amsterdam/eip-7708
🗒️ Description
SELFDESTRUCT
CALL and Transactions
Also added some more test cases for coverage emitting transfer logs when not in the same tx, self destruct logs when in same tx, combo of transfer and selfdestruct logs across fork transition, update tests to reflect above changes
closes #2088
✅ 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