-
Notifications
You must be signed in to change notification settings - Fork 20.2k
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: remove slot dirtyness if it's set back to origin value #29731
core/state: remove slot dirtyness if it's set back to origin value #29731
Conversation
851912f
to
5005f21
Compare
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, lets see what benchmarkers say
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.
We could fix it here, but with the kind of journal that we have now, where we just linerarly pile events on events, it's not "free".
Might make sense to either apply this later on, in a non-linear journal, OR to do this check later on, during commit (?)
I would prefer to fix it there, namely the storage we finalize are truly dirty. It's a cleaner solution that we can make sure in each transaction frame the storage changes are correct and then we only need to care about the logic for merging the storage changes between different frames. |
…thereum#29731) * core/state: remove slot dirtiness if it's set back to origin value * core/state: suggestion from martin
…thereum#29731) * core/state: remove slot dirtiness if it's set back to origin value * core/state: suggestion from martin
This pull request reworks the dirty storage logic a bit, by handling one more corner case for revoking dirtiness.
The dirty marker of a storage slot will be revoked in these following two cases:
In these two cases, the storage slot shouldn't be regarded as dirty anymore.