Skip to main content

Snapshot

When a new node joins a network, it can use a snapshot — a compressed backup of the chain's data — to quickly synchronize with the current state. Snapshots expedite the process, reducing the need to download and verify every transaction from the beginning.

📘How to Use

Select a snapshot from the list to view the relevant configuration commands.

# Stop the service
sudo systemctl stop story-testnet.service story-testnet-geth.service

# Reset the data and save validator state
cp $HOME/.story/story/data/priv_validator_state.json $HOME/.story/story/priv_validator_state.json.backup
rm -rf $HOME/.story/story/data
rm -rf $HOME/.story/geth/odyssey/geth/chaindata

# Download the latest snapshot and recover validator state
curl -L https://snapshots.kjnodes.com/story-testnet/snapshot_latest_geth.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.story/geth
curl -L https://snapshots.kjnodes.com/story-testnet/snapshot_latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.story/story
mv $HOME/.story/story/priv_validator_state.json.backup $HOME/.story/story/data/priv_validator_state.json

# Restart the service and check the log
sudo systemctl start story-testnet.service story-testnet-geth.service
sudo journalctl -fu story-testnet-geth.service -o cat
sudo journalctl -fu story-testnet.service -o cat