Visit the Secret Network Discord here and ask in #node-discussion or #node-support for help
A complete to go command that should fit most needs can be found at #fast-state-sync-script. Be aware that this script can also fail or cause problems. In that case please ask for help in the channels above.
Statesync is a module built into the Cosmos SDK to allow validators to rapidly join the network by syncing your node with a snapshot enabled RPC from a trusted block height.
This greatly reduces the time required for a node to sync with the network from days to minutes. The limitations of this are that there is not a full transaction history, just the most recent state that the state-sync RPC has stored. An advantage of state-sync is that the database is very small in comparison to a fully synced node, therefore using state-sync to re-sync your node to the network can help keep running costs lower by minimizing storage usage.
By syncing to the network with state-sync, a node can avoid having to go through all the upgrade procedures and can sync with the most recent binary only.
Mainnet Statesync
This documentation assumes you have followed the instructions forRunning a Full Node.
First, adjust the configuration to be compatible with state-sync:
Set IAVL-disable-fastnode
IAVL fast node must be disabled, otherwise the daemon will attempt to upgrade the database whil state sync is occuring.
Set the state-sync BLOCK_HEIGHT and fetch the TRUST_HASH from the snapshot RPC. The BLOCK_HEIGHT to sync is determined by finding the latest block that's a multiple of snapshot-interval.
Visit the Secret Network Discord here and ask in #node-discussion or #node-support for help
This will erase your node database. If you are already running validator, be sure you backed up your config/priv_validator_key.json prior to running unsafe-reset-all.
It is recommended to copy the signing state of the node by coping data/priv_validator_state.json and only running unsafe-reset-all to avoid potential double signing.
The code below stops the node, resets the temporary directory and resets the node into a fresh state.
When state-sync fails, you can restart the process and try again using the condensed script below. This usually fixes some of the random problems with it:
To safe time, you can use this script to quickly init everything you need for statesync. Please be aware that this might be dangerous if you have a validator.