-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix(trie): Fixes to pruning of MerkleChangeSets #18973
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
fix(trie): Fixes to pruning of MerkleChangeSets #18973
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, did you test with an existing config.toml to ensure that nodes won't break when upgrading to a version with these prune config changes?
Yup, tested locally with both empty |
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
Closes #18950
This PR contains a few related fixes:
Adds MerkleChangeSets pruning segment to the default set (it wasn't previously present)
Prune the StoragesTrieChangeSets table, not StoragesChangeSets
Allows for configuration of the MerkleChangeSets PruneMode. The PruneMode must be set for this segment, as we never want to keep the full history of trie changesets. The default is
Distance(10064)
. If someone really wanted to they could manually set it toBefore(0)
to keep all history.Because PruneModes now has a field which can't be None it doesn't make sense to have
none
oris_empty
methods. These have been removed.