Skip to content

Conversation

mediocregopher
Copy link
Collaborator

@mediocregopher mediocregopher commented Oct 13, 2025

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 to Before(0) to keep all history.

  • Because PruneModes now has a field which can't be None it doesn't make sense to have none or is_empty methods. These have been removed.

@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Oct 13, 2025
Copy link
Collaborator

@shekhirin shekhirin left a 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?

@mediocregopher
Copy link
Collaborator Author

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 reth.toml and a reth.toml having other pruning settings, it all worked fine 👍

Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
@mediocregopher mediocregopher merged commit 458d380 into 18460-trie-changesets Oct 14, 2025
32 checks passed
@mediocregopher mediocregopher deleted the mediocregopher/18950-trie-cs-more-pruning branch October 14, 2025 08:08
@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants