eth: Add --historymode flag for configurable blockchain history pruning FIX #31277#31325
Closed
VolodymyrBg wants to merge 6 commits intoethereum:masterfrom
Closed
eth: Add --historymode flag for configurable blockchain history pruning FIX #31277#31325VolodymyrBg wants to merge 6 commits intoethereum:masterfrom
VolodymyrBg wants to merge 6 commits intoethereum:masterfrom
Conversation
Contributor
|
Closing in favor of #31365. I tried to build on this PR but it kind of goes in the wrong direction, and I'd have to undo most changes. |
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.
PR Description
This PR adds a new --historymode command-line flag to geth that allows users to configure how blockchain history is retained.
Fix #31277
#31277
Overview
The --historymode flag provides a way to configure how much of the blockchain history is retained by the node. Currently, there are two options:
This flag is conceptually similar to --syncmode and --gcmode, helping users better control disk usage and database size.
Implementation Details
Behavior
When --historymode=pruned is set:
This PR lays the groundwork for eventually making pruned mode the default, which will help reduce disk usage for regular nodes without sacrificing critical functionality.
Testing
The implementation has been tested with various combinations of flags to ensure proper behavior:
Tested on a local blockchain to ensure transaction history and state pruning worked as expected.