Bitcanna
HomeOur State-Sync Server Setup
For your reference, the following are the state-sync related settings in our app.toml configuration file. Please note that this is provided for informational purposes only, and you are not required to replicate the same setup on your node.
# Prune Type
pruning = "custom"
# Prune Strategy
pruning-keep-every = 1000
# State-Sync Snapshot Strategy
snapshot-interval = 2000
snapshot-keep-recent = 2
Our state-sync RPC server for Bitcanna is:
https://bitcanna-rpc.stakeme.io
Instruction
One line script
wget https://raw.githubusercontent.com/ProNodes11/NodeGuides/main/StateSync/bitcanna-state-sync.sh && chmod +x bitcanna-state-sync.sh && ./bitcanna-state-sync.sh
Stop the node
sudo systemctl stop bcnad
Reset the node
bcnad tendermint unsafe-reset-all --keep-addr-book
Change config file
SNAP_RPC=https://bitcanna-rpc.stakeme.io
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.bcna/config/config.toml
Start the node
sudo systemctl restart bcnad
And check logs
sudo journalctl -fu bcnad -o cat
If everything goes well, your node should start syncing within 10 minutes.
Trouble-Shooting
If you are experiencing difficulty connecting to the state-sync server, please check the status of our RPC node to rule out any downtimes.
In case you are able to connect, but encountering AppHash errors, ensure that you are using the most recent version of the chain node during state-sync.
If you continue to experience issues, please do not hesitate to reach out to us in our Telegram chat for further assistance. Keep in mind that occasional unavailability of state-sync is a possibility