Gravity-Bridge

$0+
0 ratings

for version v3.0.0

set variable to bonded.zone RPC

RPC="https://rpc.kichain.postcapitalist.io/:26652"

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="cef1c8e062b13dfd1c9a3cd97d2b32396d44f6aa@peer.kichain.postcapitalist.io:37656"

sed -i.bak -e "s/^persistent_peers =./persistent_peers = \"$peers\"/" $HOME/.kid/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/.kid/config/config.toml

stop the node and reset (this command is for bcnad launched as a service)

sudo systemctl stop kid && kid unsafe-reset-all

start the node and check logs (this command is for bcnad launched as a service) and check logs

sudo systemctl restart kid && sudo journalctl -u kid -f -o cat

$
I want this!
Copy product URL
$0+

Gravity-Bridge

0 ratings
I want this!