Skip to main content

Node Snapshot

Chain ID: zgtendermint_16600-2 | Current Node Version: 0.3.1.alpha.1

Our ZeroGravity Snapshot Server Setup

SizeTimestamp
2.32 GBTue, 17 Sep 2024 06:11:10 GMT

We take one node snapshot every day. We then delete all the previous snapshots to free up the space on the file server.

The snapshot is designed for node opeartors to run an efficient node on ZeroGravity 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"

How To Process ZeroGravity Snapshot

sudo apt update
sudo apt install snapd -y
sudo snap install lz4

Stop your node

sudo systemctl stop 0gchaind

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 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. When in doubt, reach out to the project team.

# Back up priv_validator_state.json if needed
cp ~/.0gchain/data/priv_validator_state.json ~/.0gchain/priv_validator_state.json

cd $HOME
sudo rm -rf ~/.0gchain/data
sudo rm -rf ~/.0gchain/wasm

Decompress the snapshot to your database location. You database location will be something to the effect of ~/.0gchain depending on your node implemention.

The above solution requires you to download the compressed file, uncompressed it and then delete the original file. This requires extra storage space on your server. You can run the following combo command to stream the snapshot into your database location. For advanced users only:

Data

curl -o - -L https://config-t.noders.services/og/data.tar.lz4 | lz4 -d | tar -x -C ~/.0gchain

Wasm

Not supported
WARNING

If you run a validator node and the chain is in halt, it is time to replace the priv_validator_state.json file that you have backed up.

# Replace with the backed-up priv_validator_state.json
cp ~/.0gchain/priv_validator_state.json ~/.0gchain/data/priv_validator_state.json

If everything is good, now restart your node Make sure that your node is running

sudo systemctl restart 0gchaind
sudo journalctl -fu 0gchaind --no-hostname -o cat
ADVANCED ROUTE

We also have ZeroGravity state-sync service to help you bootstrap a node.