Copy wget -O ~/.realio-network/config/genesis.json https://realio.declab.pro/genesis.json --inet4-only
Copy wget -O ~/.realio-network/config/addrbook.json https://realio.declab.pro/addrbook.json --inet4-only
Copy PEERS = 73ef1c0f9bc77fd925decf7fa41f22a35b5dc76d@realio.declab.pro:26624
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" ~/.realio-network/config/config.toml
Copy # Reset tendermint chain
realio-networkd tendermint unsafe-reset-all
# Download and unpack the archive
curl -o - -L https://realio.declab.pro/latest.tar.lz4 | lz4 -c -d - | tar -x -C ~/.realio-network
Copy RPC = "https://realio.declab.pro:26622"
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 )
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\"|" ~/.realio-network/config/config.toml