Statesync

  • Network Type: Testnet
  • Chain-id: latanda-testnet-1
  • Current Node version:
  • sudo systemctl stop latandad
    cp $HOME/.latanda/data/priv_validator_state.json $HOME/.latanda/priv_validator_state.json.backup
    latandad comet unsafe-reset-all --home $HOME/.latanda --keep-addr-book
    SNAP_RPC="https://rpc-t.latanda.vinjan-inc.com"
    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/.latanda/config/config.toml
    sudo systemctl restart latandad
    sudo journalctl -u latandad -f -o cat