Source protocol
State Sync
Reset database
sudo systemctl stop sourced
sourced unsafe-reset-all --home $HOME/.source
Add peers and fill variables
PEERS="805c327443d9a2b425d16a402c23cb9cbfa36388@178.18.243.46:26656,286f9bb870bc927cee09b3981f39ffce41f2a8e9@173.249.1.72:26656,14b16a1393ff0c95ce0a563e2225fc6e414edda7@159.65.94.178:39656,c11b85deb59574812a7e6b9d6181df36bef15d2f@65.108.105.48:27656,252d071368bf93a866b1f191d4218473c97df3ab@65.108.157.181:23256,eced2139ee25834946b40a30a9469f247c9060a0@62.171.178.219:26656,f9c66449320c103f6c33b10f5926b20732a3bd10@194.60.201.69:26656"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.source/config/config.toml
RPC="http://178.18.243.46:26657/"
LAST_HEIGHT=$(curl -s $RPC/block | jq -r .result.block.header.height)
TRUST_HEIGHT=$((LAST_HEIGHT - 1000))
TRUST_HASH=$(curl -s "$RPC/block?height=$TRUST_HEIGHT" | jq -r .result.block_id.hash)
echo $LAST_HEIGHT $TRUST_HEIGHT $TRUST_HASH
Add variable values
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/.source/config/config.toml
Restart service and check logs
sudo systemctl restart sourced
sudo journalctl -u sourced -f -o cat
Public endpoints
Last updated