Skip to content

Latest commit

 

History

History
45 lines (38 loc) · 1.58 KB

State-Sync.md

File metadata and controls

45 lines (38 loc) · 1.58 KB

State-Sync User Guide

Let's set variables:

SNAP_RPC="https://quicksilver-rpc.ytwofund.pro:443"

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)

Let's check if the data has been fetched:

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH

You should see the latest block height, a height 2000 blocks lower, and a trusted hash in the response.

Example: "4161072 4159072 E363899B6C4F60DB21619380F56D483BC269FC91BF13AEF8859309B233F17730"

We put the obtained data into config.toml:

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\"|" $HOME/.quicksilverd/config/config.toml

Stop the node:

systemctl stop quicksilverd.service

Reset the node's data:

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

Restart the service:

systemctl restart quicksilverd.service

If everything was done correctly, the synchronization with the network will start, which may not happen immediately, so you need to wait for some time.

You can also use an alternative method and use the Snapshot.

If you encounter any issues, please let us know at ytwofund@gmail.com.