Skip to content

Commit

Permalink
Better Short field of forceprune (#4705)
Browse files Browse the repository at this point in the history
* forceprune cmd

* docs
  • Loading branch information
pysel authored Mar 23, 2023
1 parent ebd0329 commit 86ceb50
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/osmosisd/cmd/forceprune.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ const (
func forceprune() *cobra.Command {
cmd := &cobra.Command{
Use: "forceprune",
Short: "Example osmosisd forceprune -f 188000 -m 1000, which would keep blockchain and state data of last 188000 blocks (approximately 2 weeks) and ABCI responses of last 1000 blocks.",
Long: "Forceprune options prunes and compacts blockstore.db and state.db. One needs to shut down chain before running forceprune. By default it keeps last 188000 blocks (approximately 2 weeks of data) blockstore and state db (validator and consensus information) and 1000 blocks of abci responses from state.db. Everything beyond these heights in blockstore and state.db is pruned. ABCI Responses are stored in index db and so redundant especially if one is running pruned nodes. As a result we are removing ABCI data from state.db aggressively by default. One can override height for blockstore.db and state.db by using -f option and for abci response by using -m option. Example osmosisd forceprune -f 188000 -m 1000.",
Short: "Forceprune option prunes and compacts blockstore.db and state.db.",
Long: `Forceprune option prunes and compacts blockstore.db and state.db. One needs to shut down chain before running forceprune. By default it keeps last 188000 blocks (approximately 2 weeks of data) blockstore and state db (validator and consensus information) and 1000 blocks of abci responses from state.db. Everything beyond these heights in blockstore and state.db is pruned. ABCI Responses are stored in index db and so redundant especially if one is running pruned nodes. As a result we are removing ABCI data from state.db aggressively by default. One can override height for blockstore.db and state.db by using -f option and for abci response by using -m option.
Example:
osmosisd forceprune -f 188000 -m 1000,
which would keep blockchain and state data of last 188000 blocks (approximately 2 weeks) and ABCI responses of last 1000 blocks.`,
RunE: func(cmd *cobra.Command, args []string) error {
fullHeightFlag, err := cmd.Flags().GetString(fullHeight)
if err != nil {
Expand Down

0 comments on commit 86ceb50

Please sign in to comment.