State sync
sudo systemctl stop titand
cp $HOME/.titan/data/priv_validator_state.json $HOME/.titan/priv_validator_state.json.backup
titand tendermint unsafe-reset-all --home $HOME/.titan
peers="01cc7c20302234f45e8370500d16324ba82fca84@titan-testnet-peer.monkeylabs.me:35656,01cc7c20302234f45e8370500d16324ba82fca84@88.99.57.73:35656,60147143ee4783bed24250422f18e36ffe3850d8@172.81.132.74:26656,7db6a61f62edc467c39bab4ef26782ef9e2983fa@65.108.140.112:26656,6e9548bb27a97a765c1f1ac6d82c49d229313f9c@173.212.207.31:26656,956c6abcea4c104d93cf1f01db3323c7c55f0dda@51.91.70.90:56346,10b10662d05462f611783193fff0f6e7194659f2@172.93.106.85:26656,01cc7c20302234f45e8370500d16324ba82fca84@88.99.57.73:35656,a221d68514248fa66820d14c8e6492fc6fa747f6@88.198.110.214:26656,4b8d1c6b9347ce25be13b4a3bf598f7122a2e9fe@47.89.251.251:26656,59b8bf4b6f7b196fe99618de4301816e6347bfdc@135.181.144.149:26656"
SNAP_RPC="https://titan-testnet-rpc.monkeylabs.me:443"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.titan/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/.titan/config/config.toml
curl https://testnet-files.bonynode.online/titan/wasmPath_titan.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/
mv $HOME/.titan/priv_validator_state.json.backup $HOME/.titan/data/priv_validator_state.json
sudo systemctl restart titand && sudo journalctl -u titand -f
Last updated