Skip to content
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

core/state: maintain destruction flag by default #26371

Merged
merged 2 commits into from
Dec 28, 2022

Conversation

rjl493456442
Copy link
Member

@rjl493456442 rjl493456442 commented Dec 19, 2022

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.

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rjl493456442
Copy link
Member Author

This PR might be unnecessary. Please give me a bit more time to figure out if it's really required.

@rjl493456442
Copy link
Member Author

Let's include it. It's still a required functionality

@holiman holiman added this to the 1.11.0 milestone Dec 28, 2022
@holiman
Copy link
Contributor

holiman commented Dec 28, 2022

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 stateObjectsDestruct, and thus implement full storage clearing that works for snap and trie-backed both.

@holiman holiman merged commit c87f321 into ethereum:master Dec 28, 2022
shekhirin pushed a commit to shekhirin/go-ethereum that referenced this pull request Jun 6, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants