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:
OSNode homeProcess model
Linux/var/lib/ctmdctmd.service managed by systemd
macOS$HOME/.ctmddeploy.sh start background process with PID/log files

Quick start

Linux:
sudo ./deploy.sh install --moniker <your-node-moniker>
sudo ./deploy.sh state-sync
macOS:
./deploy.sh install --moniker <your-node-moniker>
./deploy.sh state-sync
The default flow targets mainnet:
ItemValue
Chain IDcontinuum_2184-1
Genesis URLhttps://resources.c8ntinuum.io/mainnet/genesis.json
Genesis SHA-256939cd10fe450f6826894f0d76e82ed5e90845d5f60aaae92f577cf50b83bb474
Peers URLhttps://resources.c8ntinuum.io/peers.json
Trust-height lag2000 blocks
Trust period168h0m0s
P2P port26656

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:
sudo env CTMD_GENESIS_URL=https://resources.c8ntinuum.io/testnet/genesis.json \
  ./deploy.sh install --moniker <your-node-moniker> --chain-id continuum_2185-1
macOS:
CTMD_GENESIS_URL=https://resources.c8ntinuum.io/testnet/genesis.json \
  ./deploy.sh install --moniker <your-node-moniker> --chain-id continuum_2185-1
Use the same genesis URL override when running state sync: Linux:
sudo env CTMD_GENESIS_URL=https://resources.c8ntinuum.io/testnet/genesis.json \
  ./deploy.sh state-sync
macOS:
CTMD_GENESIS_URL=https://resources.c8ntinuum.io/testnet/genesis.json \
  ./deploy.sh state-sync

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:
sudo ./deploy.sh state-sync \
  --rpc-1 https://<trusted-rpc-1> \
  --rpc-2 https://<trusted-rpc-2> \
  --p2p-host-1 <snapshot-peer-1> \
  --p2p-host-2 <snapshot-peer-2>
Options:
FlagDefaultPurpose
--lag N2000Blocks behind latest height for the trust point.
-y, --yesnoneAuto-confirm apply, reset, and start prompts.
--rpc-1 URLfirst RPC in peers.jsonOverride trusted RPC 1.
--rpc-2 URLsecond RPC in peers.jsonOverride trusted RPC 2.
--p2p-host-1 HOSTfirst peer host in peers.jsonOverride snapshot peer host 1.
--p2p-host-2 HOSTsecond peer host in peers.jsonOverride snapshot peer host 2.
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.
NetworkExplorer
Mainnethttps://ctmscan.io
Testnethttps://testnet.ctmscan.io
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:
FieldSectionValue
enable[statesync]true during sync, then false after catch-up.
rpc_servers[statesync]<rpc-1>,<rpc-2>
trust_height[statesync]Latest height minus lag.
trust_hash[statesync]Block hash at the trust height.
trust_period[statesync]Fixed script default 168h0m0s.
seeds[p2p]Seeds from peers.json, if present.
persistent_peers[p2p]Snapshot peers discovered from the trusted RPCs.
max_packet_msg_payload_size[p2p]10240
Nodes that should provide snapshots to the network need snapshots enabled in app.toml:
[state-sync]
snapshot-interval = 5000
snapshot-keep-recent = 2

Logs and artifacts

PathOSPurpose
sudo journalctl -u ctmd.serviceLinuxSync and runtime logs.
$HOME/.ctmd/state_sync.logmacOSState sync catch-up log.
$HOME/.ctmd/node.logmacOSPost-sync node log.
Check local sync status:
curl -s http://127.0.0.1:26657/status | jq .result.sync_info

Troubleshooting

IssueFix
RPC height or block hash cannot be fetchedConfirm the RPC responds to /status and /block?height=<height>.
No peers were discoveredConfirm the RPC /status response includes result.node_info.id.
No snapshots foundConfirm the snapshot peers are reachable on P2P port 26656; if needed, rerun with --lag 5000.
Local node is past the trust heightSkip state sync and let normal block sync continue, or choose an older trust point with a larger lag.