State sync
In order to use this feature, you will have to edit a couple of things inside your ~/.realio-network/config/config.toml file,
under the statesync section:
-
Enable state sync by setting
enable=true -
Set the RPC addresses from where to get the snapshots using the
rpc_serversfield:- See Peer & Seeds information in order to get RPC addresses in our discord group
-
Get a trusted chain height, and the associated block hash. To do this, you will have to:
-
Get the current chain height by running:
curl -s <rpc-endpoint>/commit | jq "{height: .result.signed_header.header.height}" -
Once you have the current chain height, get a height that is a little lower (200 blocks) than the current one.
To do this you can execute:curl -s <rpc-endpoint>/commit?height=<your-height> | jq "{height: .result.signed_header.header.height, hash: .result.signed_header.commit.block_id.hash}"# Example# curl -s <rpc-endpoint>/commit?height=100000 | jq "{height: .result.signed_header.header.height, hash: .result.signed_header.commit.block_id.hash}" -
Now that you have a trusted height and block hash, use those values as the
trust_heightandtrust_hashvalues. Also, make sure they're the right values for the Realio Network version you're starting to synchronize:State sync height range RealioNetwork version 19195000+v1.7.0 -
Here is an EXAMPLE (no not copy!) of what the
statesyncsection of your~/.realio-network/config/config.tomlfile should look like in the end (thetrust_heightandtrust_hashshould contain your values instead):enable = truerpc_servers = "0.0.0.0:26657"trust_height = 100trust_hash = "E8ED7A890A64986246EEB02D7D8C4A6D497E3B60C0CAFDDE30F2EE385204C314"trust_period = "336h0m0s"
-
-
Add peers to
~/.realio-network/config/config.tomlfile:
Our discord group is a great source for getting peer information from the community. After joining the Discord Group, look for the #testnet-seeds-peers channel or the #mainnet-seeds-peers channel and ask the current members for one if needed.
Add these seeds here to the ~/.realio-network/config/config.toml file
seeds = "....."
peers = "....."