core/state: remove slot dirtyness if it's set back to origin value#29731
Merged
karalabe merged 2 commits intoMay 10, 2024
Conversation
851912f to
5005f21
Compare
karalabe
approved these changes
May 8, 2024
Member
karalabe
left a comment
There was a problem hiding this comment.
LGTM, lets see what benchmarkers say
holiman
reviewed
May 8, 2024
Contributor
holiman
left a comment
There was a problem hiding this comment.
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 (?)
Member
Author
|
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. |
Member
Author
This was referenced Jun 5, 2024
jorgemmsilva
pushed a commit
to iotaledger/go-ethereum
that referenced
this pull request
Jun 17, 2024
…thereum#29731) * core/state: remove slot dirtiness if it's set back to origin value * core/state: suggestion from martin
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Feb 25, 2026
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Mar 6, 2026
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Mar 6, 2026
AnilChinchawale
pushed a commit
to XinFinOrg/XDPoSChain
that referenced
this pull request
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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.