← Back to Apollo Validator

AtomOne State Sync

Fast node synchronization via state sync protocol. No need to sync from genesis.

State Sync allows your node to sync by downloading a recent state snapshot from peers, without replaying all historical blocks. This is typically faster than block-by-block sync.

State Sync

WARNING: This will reset your node data. If you are running a validator, back up priv_validator_state.json FIRST.
1Stop the node
sudo systemctl stop atomoned
2Run state sync
SNAP_RPC=https://rpc.atomone.apollo-validator.eu:443
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.atomone/config/config.toml
3Reset node data
atomoned tendermint unsafe-reset-all --home /root/.atomone
4Download addrbook
wget -O $HOME/.atomone/config/addrbook.json "https://snapshots.apollo-validator.eu/atomone/addrbook.json"
5Start node
sudo systemctl restart atomoned && journalctl -fu atomoned -n1000 -o cat

Useful Links

gRPCgrpc.atomone.apollo-validator.eu:443
Snapshotssnapshot.html

Powered by Apollo Validator.