Our state-sync RPC server for Celestia is:
https://celestia-mainnet.stakingcabin.com:443
Our app.toml settings related to state-sync is as follows. This is for you information only. You do not need to follow the same setup on your node.
# Prune Type
pruning = "custom"
# These are applied if and only if the pruning strategy is custom.
pruning-keep-recent = "3000"
pruning-interval = "10"
Create a reusable shell script such as state_sync.sh with the following code. The code will fetch important state-sync information (such as block height and trust hash) from our server and update your config.toml file accordingly.
#!/bin/bash
STATE_SYNC_RPC=https://celestia-mainnet.stakingcabin.com:443
LATEST_HEIGHT=$(curl -s $STATE_SYNC_RPC/block | jq -r .result.block.header.height)
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000))
TRUST_HASH=$(curl -s "$STATE_SYNC_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo -e "Modifying $HOME/.celestia-app/config/config.toml based on the following values:"
echo -e "RPC Address: $STATE_SYNC_RPC"
echo -e "Latest Block Height: $LATEST_HEIGHT"
echo -e "Sync Block Height: $BLOCK_HEIGHT"
echo -e "Trust Hash: $TRUST_HASH"
sed -i \
-e "s|^enable *=.*|enable = true|" \
-e "s|^rpc_servers *=.*|rpc_servers = \"$STATE_SYNC_RPC,$STATE_SYNC_RPC\"|" \
-e "s|^trust_height *=.*|trust_height = $BLOCK_HEIGHT|" \
-e "s|^trust_hash *=.*|trust_hash = \"$TRUST_HASH\"|" \
$HOME/.celestia-app/config/config.toml
Grant user the privilege to execute script and then run the script:
chmod 700 state_sync.sh
./state_sync.sh
Stop the node:
sudo systemctl stop celestia
Reset the node:
# On some tendermint chains
celestia-appd unsafe-reset-all
# On other tendermint chains
celestia-appd tendermint unsafe-reset-all --home $HOME/.celestia-app --keep-addr-book
Start node:
sudo systemctl start celestia
If everything goes well, your node should start syncing within 10 minutes.
You can add this peer to your persistent peers:
c5a23c66db975038c4eb131f65717059f597fe59@celestia-mainnet.stakingcabin.com:21656