dePortal

v1.0

Celestia

Celestia is a modular data-availability (DA) network that makes it possible for anyone to launch their own blockchain securely.

State Sync

State Sync allows you to rapidly bootstrap a new node by syncing state machine snapshots at a given height, rather than downloading and replaying the entire blockchain history from genesis.

Status

Active

Block Height

1

Set state sync variables

Fetch the latest block height, choose a trust height, and get the corresponding trust hash from the RPC endpoint.

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \ BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \ TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) && \ echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
2

Stop your node and reset state

Stop the Celestia node service and perform an unsafe reset while keeping the address book.

sudo systemctl stop celestia-appd && celestia-appd tendermint unsafe-reset-all --home ~/.celestia-app --keep-addr-book
3

Configure persistent peers

Set a reliable state sync peer in the Tendermint configuration.

peers="db0bd477721da7ee228a9075ee691634570fc810@celestia-mainnet.denodes.xyz" sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.celestia-app/config/config.toml
4

Enable state sync in config

Enable state sync and configure RPC servers, trust height, and trust hash in config.toml.

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\"\"|" ~/.celestia-app/config/config.toml
5

Start your node and follow logs

Restart the node service and monitor logs to verify that state sync starts and the node begins syncing from the trusted height.

sudo systemctl restart celestia-appd && sudo journalctl -fu celestia-appd -o cat

Frequently Asked Questions

What is State Sync?

State Sync bootstraps a node by fetching recent application state from trusted RPC servers instead of replaying blocks from genesis, so you can join the network quickly while the node backfills as needed.

When should I use State Sync?

Use State Sync when you want a lightweight network based start with minimal disk IO or when snapshots are not available. Prefer snapshots if you need predictable restore speed or immediate historical data.

What are the prerequisites?

Run a compatible binary for the target network, keep system time accurate, and provide two or more reliable RPC endpoints that expose state sync parameters, then allow outbound peers in your firewall.

What are trust height and trust hash?

The trust height is a recent block you choose as a checkpoint, and the trust hash is that block's commitment used to verify the snapshot of state so the node can safely validate forward from there.

How long does it take?

Most nodes complete State Sync in minutes to under an hour depending on CPU, disk, bandwidth, and peer quality, then finish catching up to head and filling any missing historical data.

What if it fails to start?

Recheck the trust height and hash, confirm your node version matches the network, try different RPC providers or peers, then clear the data directory except keys and config and retry with fresh parameters.