State Sync Info
Instructions ( Please Read This )
- Before using it, you can check the rpc url first whether it's down or notsudo systemctl stop bcnad
bcnad tendermint unsafe-reset-all --home $HOME/.bcna --keep-addr-book
STATE_SYNC_RPC="https://bitcanna-rpc.genznodes.dev:443"
LATEST_HEIGHT=$(curl -s $STATE_SYNC_RPC/block | jq -r .result.block.header.height)
SYNC_BLOCK_HEIGHT=$(($LATEST_HEIGHT - 2000))
SYNC_BLOCK_HASH=$(curl -s "$STATE_SYNC_RPC/block?height=$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $SYNC_BLOCK_HEIGHT $SYNC_BLOCK_HASH
PEERS="[email protected]:32656"
sed -i -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.bcna/config/config.toml
sed -i -e "s|^enable *=.*|enable = true|" $HOME/.bcna/config/config.toml
sed -i -e "s|^rpc_servers *=.*|rpc_servers = \"$STATE_SYNC_RPC,$STATE_SYNC_RPC\"|" \
$HOME/.bcna/config/config.toml
sed -i -e "s|^trust_height *=.*|trust_height = $SYNC_BLOCK_HEIGHT|" \
$HOME/.bcna/config/config.toml
sed -i -e "s|^trust_hash *=.*|trust_hash = \"$SYNC_BLOCK_HASH\"|" \
$HOME/.bcna/config/config.toml
sudo systemctl restart bcnad
journalctl -fu bcnad -o cat
systemctl --user restart bcnad
journalctl --user -fu bcnad -o cat
++ Instructions
sed -i -e "s|^enable *=.*|enable = false|" $HOME/.bcna/config/config.toml
PEERS=""
sed -i -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.bcna/config/config.toml
1. Post failed: ...: context deadline exceeded
error="post failed: Post "https://bitcanna-rpc.genznodes.dev:443": context deadline exceeded"