Quicksilver- Snapshot

Block Height: 6173098
Size: 1.3G
Snapshot time: 2024-02-28 13:20:21 (UTC)
Snapshot age: 5 hours ago
File: snapshot.tar.lz4
Pruning: custom
Indexer: null

# Set variables
PROJECT_NAME=quicksilver
PROJECT_TYPE=mainnet
PROJECT_SERVICE=quicksilverd
PROJECT_BINARY=quicksilverd
PROJECT_FOLDER=~/.quicksilver

# Install lz4
sudo apt update
sudo apt-get install snapd lz4 -y

# Disable State Sync
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1false|" ${PROJECT_FOLDER}/config/config.toml

# Stop and reset node
sudo systemctl stop ${PROJECT_SERVICE}
cp ${PROJECT_FOLDER}/data/priv_validator_state.json ${PROJECT_FOLDER}/priv_validator_state.json.backup
rm -rf ${PROJECT_FOLDER}/data
${PROJECT_BINARY} tendermint unsafe-reset-all --home ${PROJECT_FOLDER} --keep-addr-book

# Download Snapshot
SNAPSHOT_NAME=$(curl -s https://snapshots.f-staking.com/${PROJECT_NAME}/${PROJECT_TYPE}/ | egrep -o ">snapshot.*\.tar.lz4" | tr -d ">" | tail -n 1)
curl -o - -L https://snapshots.f-staking.com/${PROJECT_NAME}/${PROJECT_TYPE}/${SNAPSHOT_NAME}  | lz4 -c -d - | tar -x -C ${PROJECT_FOLDER}

# Restart Node
sudo systemctl restart ${PROJECT_SERVICE}
journalctl -u ${PROJECT_SERVICE} -f