triedb/pathdb: refactor state history write#32497
Merged
rjl493456442 merged 2 commits intoethereum:masterfrom Aug 26, 2025
Merged
triedb/pathdb: refactor state history write#32497rjl493456442 merged 2 commits intoethereum:masterfrom
rjl493456442 merged 2 commits intoethereum:masterfrom
Conversation
rjl493456442
commented
Aug 26, 2025
| }) | ||
| // Block until the frozen buffer is fully flushed out if the async flushing | ||
| // is not allowed, or if the oldest history surpasses the persisted state ID. | ||
| if dl.db.config.NoAsyncFlush || persistedID < oldest { |
Member
Author
There was a problem hiding this comment.
Originally, we need to explicitly wait until the buffer is fully flushed before the history tail truncation, if after truncation, the new tail history ID will be greater than the persistent ID
Now it's no longer required, as we skip the tail truncation in this case for simplicity.
87f8a26 to
bbebe46
Compare
MariusVanDerWijden
approved these changes
Aug 26, 2025
gballet
pushed a commit
to gballet/go-ethereum
that referenced
this pull request
Sep 11, 2025
This pull request refactors the internal implementation in path database a bit, specifically: - purge the state index data in batch - simplify the logic of state history construction and index, make it more readable
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 refactors the internal implementation in path database a bit,
specifically: