State sync lets a node bootstrap from a recent application snapshot instead of replaying every block from genesis. Use deploy.sh state-sync for normal c8ntinuum installs; the hosted script and peer-list source are listed in Deployment Scripts. The script resolves trusted RPC endpoints and snapshot peers, patches the node config, resets local chain data, starts the node, waits for catch-up, then disables state sync again.
State sync wipes the local data/ directory. Back up anything you need before confirming the reset.

Prerequisites

  • Managed install and node home created by deploy.sh install --moniker <moniker>
  • curl, jq, and sed
  • Network access to trusted CometBFT RPC endpoints and P2P snapshot peers
Default homes:

Quick start

Linux:
macOS:
The default flow targets mainnet:

Testnet

Install the node with the testnet chain ID first. deploy.sh state-sync reads the chain ID from the initialized home, so the chain selection happens during install, not as a state-sync flag. The peers file is shared across networks and selected by the installed chain ID. Linux:
macOS:
Use the same genesis URL override when running state sync: Linux:
macOS:

Custom endpoints

deploy.sh state-sync reads RPCs and snapshot peers from https://resources.c8ntinuum.io/peers.json, selected by chain ID. Override individual endpoints when you need private infrastructure:
Options: The trust period is fixed at 168h0m0s, and snapshot peer addresses use P2P port 26656.

What the script does

  1. Detects the host OS and node home.
  2. Verifies required commands and the initialized node home.
  3. Reads the installed chain ID from client.toml and resolves trusted RPCs and P2P snapshot peers.
  4. Stops the Linux service, or checks for a running local process on macOS.
  5. Downloads and verifies genesis.json.
  6. Repairs chain ID settings in app.toml, client.toml, and config.toml.
  7. Fetches the latest height from RPC 1 and computes trust_height = latest_height - lag.
  8. Fetches the trust_hash at the trust height.
  9. Patches [statesync], [mempool], and [p2p].
  10. Resets local data with unsafe-reset-all --keep-addr-book.
  11. Starts the node and waits until catch-up completes or the node reaches the trusted RPC tip.
  12. Sets [statesync].enable = false.
  13. Restarts the service on Linux or starts the managed background node on macOS.

Trust verification

Before confirming the run, verify the printed Trust Height and Trust Hash against an independent source. The script uses RPC 1 to compute the trust point, so an explorer or third RPC gives you a better safety check. Look up the block at the printed trust height and compare its block hash to the printed trust hash. The comparison is case-insensitive. If the hashes do not match, do not continue.

Config written

deploy.sh state-sync writes these fields in config.toml: Nodes that should provide snapshots to the network need snapshots enabled in app.toml:

Logs and artifacts

Check local sync status:

Troubleshooting