Skip to main content
Follow this guide to join an existing network through statesync. To quickly spin up a fresh full node and join in the network, it’s recommended to sync through state sync.

State Sync

State sync 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.

Clean Up

If you are not starting a node from fresh, then you need to do some backups and clean ups.
Note: This step is not needed for fresh nodes.
Assuming your sei home directory is $HOME/.sei, back up priv_validator_key.json and priv_validator_state.json:
Reset the state:
Finally, remove the existing data and wasm folders and restore the priv_validator_state.json:

Statesync script

Set up the RPC servers for primary and secondary endpoints. You can use one of these RPC endpoints for Statesyning For STATE_SYNC_RPC, pick:
  • mainnet (pacific-1): https://sei-rpc.polkachu.com:443 or https://rpc.sei-apis.com:443
  • testnet (atlantic-2): https://sei-testnet-rpc.polkachu.com:443 or https://rpc-testnet.sei-apis.com:443
For STATE_SYNC_PEER, pick the below as persistent-peers:
  • mainnet (pacific-1):
  • testnet (atlantic-2):
The script sets up trust_height and trust_hash automatically. Each statesync snapshot is created at a certain block height. The script uses the best practice here and sets the trust height to be earlier than the latest snapshot block height to avoid backward verifications. Script that you can use:
state_sync.sh
Finally start the daemon:

Troubleshooting statesync

Q: I can’t connect to the state sync url. A: Try another statesync url in that case and inform us in the Sei Tech Chat. Q: The statesync finishes, but immediately get AppHash errors upon regular block syncing: A: Make sure that you use the latest version of the chain node when you state-sync. Q: The statesync randomly stops. A: State-sync can be flaky at times, just try again. Please give it around 4-5 tries. Join our Sei Tech Chat for help if you have any issues.