Snapshot & State sync
Snapshot
sudo systemctl stop allorad
cp $HOME/.allorad/data/priv_validator_state.json $HOME/.allorad/priv_validator_state.json.backup
allorad tendermint unsafe-reset-all --home ~/.allorad/ --keep-addr-book
curl https://snapshot.syanodes.my.id/allora/snapshot-allora.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.allorad
mv $HOME/.allorad/priv_validator_state.json.backup $HOME/.allorad/data/priv_validator_state.json
sudo systemctl restart allorad && sudo journalctl -fu allorad -o cat
State Sync
sudo systemctl stop allorad
cp $HOME/.allorad/data/priv_validator_state.json $HOME/.allorad/priv_validator_state.json.backup
allorad tendermint unsafe-reset-all --home $HOME/.allorad
peers="[email protected]:26756,[email protected]:26656,[email protected]:26662,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:32001,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:21656,[email protected]:26500,[email protected]:29656,[email protected]:26656,[email protected]:32010,[email protected]:56286,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:46656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:32011,[email protected]:26656,[email protected]:46656,[email protected]:26656,[email protected]:27656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:32012,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26664,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26654,[email protected]:26656,[email protected]:26656,[email protected]:32002,[email protected]:26656,[email protected]:26656,[email protected]:26643,[email protected]:26670,[email protected]:26656,[email protected]:26656,[email protected]:56286"
SNAP_RPC="https://allora-t-rpc.syanodes.my.id:443"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.allorad/config/config.toml
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 && sleep 2
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/.allorad/config/config.toml
mv $HOME/.allorad/priv_validator_state.json.backup $HOME/.allorad/data/priv_validator_state.json
sudo systemctl restart allorad && sudo journalctl -fu allorad -o cat
Last updated