State Sync
Fast Node Bootstrapping with State Sync on BitNet
To improve validator onboarding and reduce syncing time, BitNet supports Tendermint Core State Sync, allowing nodes to join the network by restoring the latest application state from trusted peers instead of replaying all historical blocks.
What is State Sync?
State Sync enables a new BitNet node to:
Download a recent snapshot of the network’s application state.
Skip downloading and replaying every block since genesis.
Join the consensus in minutes instead of days.
This drastically reduces disk usage and sync time, especially on mature networks with extensive history.
How State Sync Works
BitNet validators serve state snapshots, which are shared in binary chunks. Tendermint fetches and verifies these chunks using light client techniques. Once all chunks are applied, the node verifies the state root (appHash
) and proceeds with normal consensus participation.
Each snapshot includes:
height
: block height of the snapshotchunks
: number of binary chunkshash
: snapshot identifier (used for cross-node comparison)metadata
: optional binary data for verification
Enabling Snapshot Creation (Validator Setup)
Validators should enable periodic snapshots to assist new nodes. In app.toml
:
This setup:
Generates a snapshot every 1000 blocks
Keeps the last 2 snapshots to support syncing peers
Snapshot interval must be a multiple of pruning-keep-every
to avoid accidental pruning during snapshot creation.
State Sync Configuration (Joining as a New Node)
To configure a new node using state sync:
Fetch trusted block data:
Snapshot height from a trusted source
appHash
from that heightTwo RPC endpoints to sync from
Set up state sync in
config.toml
:
Run node:
Watch logs for confirmation:
Once all chunks are applied and verified, the node switches to fast sync mode, catching up remaining blocks before joining consensus.
Important Notes
State-synced nodes will not retain full block history. They start from the snapshot height.
Archive nodes should be maintained for historical data and audits.
It is safe to disable state sync after the node is fully synced to prevent unnecessary memory or CPU use:
Last updated