Skip to main content

Api & Sync

Explorer:

https://explorer.nodesync.top/Terra-Mainnet

API:

https://terra-api.nodesync.top

RPC:

https://terra-rpc.nodesync.top

Peers Scanner:

Auto-updated every 6 hours

Loading peers...

StateSync

sudo systemctl stop terrad 
cp $HOME/.terra/data/priv_validator_state.json $HOME/.terra/priv_validator_state.json.backup
terrad tendermint unsafe-reset-all --home $HOME/.terra --keep-addr-book

SNAP_RPC="https://terra-rpc.nodesync.top: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)

sed -i "/\[statesync\]/, /^enable =/ s/=.*/= true/;\
/^rpc_servers =/ s|=.*|= \"$SNAP_RPC,$SNAP_RPC\"|;\
/^trust_height =/ s/=.*/= $BLOCK_HEIGHT/;\
/^trust_hash =/ s/=.*/= \"$TRUST_HASH\"/" $HOME/.terra/config/config.toml
mv $HOME/.terra/priv_validator_state.json.backup $HOME/.terra/data/priv_validator_state.json

sudo systemctl restart terrad && sudo journalctl -u terrad -fo cat

Snapshot

sudo systemctl stop terrad

cp $HOME/.terra/data/priv_validator_state.json $HOME/.terra/priv_validator_state.json.backup

terrad tendermint unsafe-reset-all --home $HOME/.terra --keep-addr-book

curl -L https://snapshots.nodesync.top/Mainnet/Terra/terra_latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.terra

mv $HOME/.terra/priv_validator_state.json.backup $HOME/.terra/data/priv_validator_state.json

sudo systemctl restart terrad && sudo journalctl -u terrad -fo cat