cosmprund
is a tool designed to prune a Tendermint database of blocks and a Cosmos-SDK application database of all but the last X versions.
This helps users avoid the need to state sync every few days.
While it currently supports a subset of modules, it effectively prunes the default SDK module and the Osmosis added module.
Note that due to inefficiencies in IAVL and the simple approach of this tool, pruning large nodes can take a significant amount of time. The team is working on integrating this functionality natively into the Cosmos-SDK and Tendermint.
git clone https://github.com/binaryholdings/cosmprund.git
cd cosmprund
git reset --hard d3bf3d8
make build
sudo du -ah --block-size=1G / 2>/dev/null | sort -rh | head -n 20
# Stop node
sudo systemctl stop initiad
# Prune
./build/cosmprund prune ~/.initia/data
# Restart node
sudo systemctl restart initiad
sudo journalctl -u initiad -f --no-hostname -o cat
sudo du -ah --block-size=1G / 2>/dev/null | sort -rh | head -n 20
- Initia is not officially supported yet so this will not prune your
application.db