State Sync

Table of Contents

Stop Existing Process

$ sudo systemctl stop umeed

Reset Local Database

$ umeed tendermint unsafe-reset-all

Set Block Interval

$ INTERVAL=1000 # modify as you see fit

Set Necessary Parameters

$ RPC=""
$ LATEST_HEIGHT=$(curl -s $RPC/block | jq -r .result.block.header.height);
$ TRUST_HASH=$(curl -s "$RPC/block?height=$TRUST_HEIGHT" | jq -r .result.block_id.hash)
$ PEERS=",,,"

Try our tool to get most updated, reachable peers.

Populate the Values in config.toml

$ sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true|; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$RPC,$RPC\"|; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$TRUST_HEIGHT|; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.umee/config/config.toml
$ sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.umee/config/config.toml

Restart the Process

$ sudo systemctl restart umeed