-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
30 changes: 30 additions & 0 deletions
30
packages/docs/pages/operators/ledger/pruning-cometbft-blocks.mdx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Callout } from 'nextra-theme-docs' | ||
|
||
# Pruning CometBFT blocks | ||
|
||
The size of the CometBFT directory will grow with validator signatures, transactions, etc. | ||
|
||
The tool [CometPrune](https://github.com/ekhvalov/cometprune) can prune old blocks from your CometBFT directory. It reduces only the CometBFT data `${BASE_DIR}/${CHAIN_ID}/cometbft`, doesn't affect Namada's storage data `${BASE_DIR}/${CHAIN_ID}/db`. | ||
|
||
### Install CometPrune | ||
- Download the binary from [the release page](https://github.com/ekhvalov/cometprune/releases) | ||
|
||
- Or, build from the source | ||
```shell copy | ||
git clone [email protected]:ekhvalov/cometprune.git | ||
cd cometprune | ||
go install | ||
``` | ||
|
||
### Prune the blocks | ||
1. Stop the node | ||
|
||
2. Prune the blocks | ||
```shell copy | ||
cometprune --path ${BASE_DIR}/${CHAIN_ID}/cometbft/data --keep-blocks <amount of blocks to keep> | ||
``` | ||
<Callout> | ||
Leaving the last one block (`--keep-blocks 1`) is enough to restart the node. The tool will reject to delete all blocks, i.e. `--keep-blocks 0` doesn't work. | ||
</Callout> | ||
|
||
3. Restart the node |