What's State Sync?

The Tendermint Core 0.34 release includes support for state sync, which allows a new node to join a network by fetching a snapshot of the application state at a recent height instead of fetching and replaying all historical blocks. This can reduce the time needed to sync with the network from days to minutes. Click Here For more infomation.

Starting New Node From State Sync

1. Install Binary (gaiad Version: )
We need to install the binary first and make sure that the version is the one currently in use on mainnet.

2. Enable State Sync
We can configure Tendermint to use state sync in $DAEMON_HOME/config/config.toml.

[state-sync]
enable = true
rpc_servers = "https://cosmos-rpc.icycro.org,https://cosmoshub.tendermintrpc.lava.build"
trust_height = 0 
trust_hash = ""
# 2/3 of unbonding time
trust_period = "168h"

3. Start the daemon: gaiad start
If you are resetting node, run gaiad unsafe-reset-all or gaiad tendermint unsafe-reset-all --home ~/.HOME before you start the daemon.

Enable Snapshot For State Sync

To make state sync works, we can enable snapshot in $DAEMON_HOME/config/app.toml

[state-sync]
# snapshot-interval specifies the block interval at which local state sync snapshots are
# taken (0 to disable). Must be a multiple of pruning-keep-every.
snapshot-interval = 1000
# snapshot-keep-recent specifies the number of recent snapshots to keep and serve (0 to keep all). Each snapshot is about 500MiB
snapshot-keep-recent = 2