Skip to content
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

refactor: update default pruning strategy #9859

Merged
merged 6 commits into from
Aug 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions store/types/pruning.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ const (
)

var (
// PruneDefault defines a pruning strategy where the last 100 heights are kept
// in addition to every 100th and where to-be pruned heights are pruned at
// every 10th height.
PruneDefault = NewPruningOptions(100, 100, 10)
// PruneDefault defines a pruning strategy where the last 362880 heights are
// kept in addition to every 100th and where to-be pruned heights are pruned
// at every 10th height. The last 362880 heights are kept assuming the typical
// block time is 5s and typical unbonding period is 21 days. If these values
alexanderbez marked this conversation as resolved.
Show resolved Hide resolved
// do not match the applications' requirements, use the "custom" option.
PruneDefault = NewPruningOptions(362880, 100, 10)

// PruneEverything defines a pruning strategy where all committed heights are
// deleted, storing only the current height and where to-be pruned heights are
Expand Down