-
Notifications
You must be signed in to change notification settings - Fork 264
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
Delete empty account at BEACON_ROOTS_ADDRESS
#871
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## forks/cancun #871 +/- ##
================================================
- Coverage 69.96% 69.83% -0.13%
================================================
Files 610 610
Lines 34295 34773 +478
================================================
+ Hits 23993 24283 +290
- Misses 10302 10490 +188
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
EIP-4788 does not explicitly mention that the BEACON_ROOTS_ADDRESS if empty, should be deleted. However, it is implied in post EIP-161 networks
4938522
to
0201f2a
Compare
if account_exists_and_is_empty(state, BEACON_ROOTS_ADDRESS): | ||
destroy_account(state, BEACON_ROOTS_ADDRESS) |
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.
Hm, is it necessary to check again after running destroy_touched_empty_accounts
?
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.
Oh. This is an error. Will update.
The question of whether |
The way the |
Execution spec tests fix: ethereum/execution-spec-tests#425 Still looking into ethereum/tests. |
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.
This is by design unspecified because this cannot happen in practice.
Opened issue for this to be fixed in the |
EIP-7523 fixes this because then the |
but can it be non existent? |
Exactly. Most of the tests don't have the |
but then there is this option which is also legal - to just write storages without a silent call. it creates double reading. I think it would be better if: if there is no contract in the state. deploy contract to the state. make silent call / write storages |
What was wrong?
The current implementation of EIP-4788 did not delete the account at
BEACON_ROOTS_ADDRESS
if it is empty after being touched by the system message call. For example, in a case where the contract has not been deployed yet. EIP-4788 does not explicitly mention this deletion but it is implied post EIP-161How was it fixed?
Delete the account at
BEACON_ROOTS_ADDRESS
if it is empty.