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

Add prune sub command to provenanced #1208

Closed
4 tasks
arnabmitra opened this issue Nov 2, 2022 · 0 comments · Fixed by #1209
Closed
4 tasks

Add prune sub command to provenanced #1208

arnabmitra opened this issue Nov 2, 2022 · 0 comments · Fixed by #1209

Comments

@arnabmitra
Copy link
Contributor

arnabmitra commented Nov 2, 2022

Summary/Problem Definition

Both 0.45.x and 0.46.x makes a pruning subcommand available
see
cosmos/cosmos-sdk#12742 for more details
but tl;dr from parent issue

When updating pruning settings, the old states are not pruned automatically.
While there were efforts(https://github.com/cosmos/cosmos-sdk/issues/10942, https://github.com/cosmos/cosmos-sdk/pull/11064) to do that automatically on initialization, it would be helpful to support offline pruning through CLI command as well, which should be easier to implement.

This would be very helpful for provenance to
1.Reduce disk size
2. Do it offline, so doesn't affect node performance etc

Proposal

Add this to root.go in provenance

pruning.PruningCmd(newApp),

PR needs testing #1209

should result in output like

D[2022-11-01|20:55:18.132] Finished loading IAVL tree                   
pruning heights start from 1, end at 11252756

for testnet
cmd
prune --home '/Users/arnabmitra/Downloads/pio-test-home' --app-db-backend 'cleveldb' --pruning 'custom' --pruning-keep-recent 100 --pruning-keep-every 0 --pruning-interval 10
will update issue if process successfully completes.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

1 participant