-
Notifications
You must be signed in to change notification settings - Fork 21.4k
core/state: maintain destruction flag by default #26371
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
Conversation
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.
LGTM
This PR might be unnecessary. Please give me a bit more time to figure out if it's really required. |
Let's include it. It's still a required functionality |
I think this will be beneficial for #24916 too. Because with this PR, one can just "pretend" that an account was deleted and recreated, by marking it in the |
This changes moves the tracking of "deleted in this block" out from snap-only domain, so that it happens regardless of whether the execution is snapshot-backed or trie-backed.
Originally the destructed flag in stateDB is only maintained when snapshot
is enabled and alive. But it turns out that this flag is also required in PBSS.
For example:
The object was destructed then re-created. StateDB needs the signal
to cleanup the original storage which is unknown without this flag
This PR maintains this flag by default. The logic should not be changed.