description | cover | coverY |
---|---|---|
bitsong-2b |
94.35797665369651 |
for version v0.11.0
set variable to bonded.zone RPC
RPC="http://wisdom.bonded.zone:26957"
set variables $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
this is one command
LATEST_HEIGHT=$(curl -s $RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \
TRUST_HASH=$(curl -s "$RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
check variables
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
if output is something like this one, then continue to the next step
1769362 1768362 311AFA4925B213B366879589640F4CA03CCB58841DBE2CE85A7FC1D19BBEB909
configure persistent peers
peers="[email protected]:26956"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.bitsongd/config/config.toml
this is one command
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$RPC,$RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.bitsongd/config/config.toml
stop and reset the node (this command is for bitsongd launched as a service)
sudo systemctl stop bitsongd && bitsongd tendermint unsafe-reset-all --home $HOME/.bitsongd --keep-addr-book
start the node and check logs (this command is for bitsongd launched as a service)
sudo systemctl restart bitsongd && sudo journalctl -u bitsongd -f -o cat