Loading...

Snapshot

Network odyssey-0
Block 700,783
Pruning custom 100/0/10
Indexer kv
Frequency every 24 hours
Timestamp 20/11/2024 17:03 UTC
Age 13 hours ago
Download story_latest.tar.lz4 (25G)
Download (Geth) story_geth_latest.tar.lz4 (17G)

The snapshot is designed for node opeartors to run an efficient node on Story chain. To make the snapshot as small as possible while still viable as a validator, we use the following setting to save on the disk space. It might be helpful for you to sync with our snapshot periodically because Tendermint chain storage grows over time regardless of the pruning. Since we periodically state-sync our snapshot nodes, you might notice that sometimes the size of our snapshot is surprisingly small.
app.toml
# Prune Type
pruning = "custom"

# Prune Strategy
pruning-keep-recent = "100"
pruning-keep-every = "0"
pruning-interval = "10"
config.toml
indexer = "null"

Install lz4 if needed

sudo apt update
sudo apt install lz4

Stop the service and reset the data

Reset your node. This will erase your node database. If you are already running validator, be sure you backed up your `priv_validator_key.json` prior to running the the command. The command does not wipe the file. However, you should have a backup of it already in a safe location.

WARNING: If you use this snapshot on a validator node during a chain halt, make sure you back up priv_validator_state.json and then replace it after the snapshot is extracted but before you start the node process. This is very important in order to avoid double-sign.
# Stop your node 
sudo systemctl stop story

# Back up priv_validator_state.json if needed
cp $HOME/.story/story/data/priv_validator_state.json $HOME/.story/story/priv_validator_state.json.backup

# Reset tendermint chain
story tendermint unsafe-reset-all --home $HOME/.story/story --keep-addr-book

Download latest snapshot

# Download the Story snapshot 
wget -O story_latest.tar.lz4 https://story-testnet-snapshot.tienthuattoan.com/story_latest.tar.lz4

# Decompress the snapshot 
lz4 -c -d story_latest.tar.lz4 | tar -x -C $HOME/.story/story

# Download the Geth snapshot
wget -O story_geth_latest.tar.lz4 https://story-testnet-snapshot.tienthuattoan.com/story_geth_latest.tar.lz4

# Delete Geth old data
rm -rf $HOME/.story/geth/odyssey/geth/chaindata
mkdir -p $HOME/.story/geth/odyssey/geth

# Decompress the Geth snapshot 
lz4 -c -d story_geth_latest.tar.lz4 | tar -x -C $HOME/.story/geth/odyssey/geth

# Replace with the backed-up priv_validator_state.json
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 restart story
sudo journalctl -u story -f

sudo systemctl restart story-geth
sudo journalctl -u story-geth -f

Remove downloaded snapshot to free up space

rm story_latest.tar.lz4
rm story_geth_latest.tar.lz4