You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.7 KiB

  1. ---
  2. order: 5
  3. ---
  4. # Configure State-Sync
  5. State sync will continuously work in the background to supply nodes with chunked data when bootstrapping.
  6. > NOTE: Before trying to use state sync, see if the application you are operating a node for supports it.
  7. Under the state sync section in `config.toml` you will find multiple settings that need to be configured in order for your node to use state sync.
  8. Lets breakdown the settings:
  9. - `enable`: Enable is to inform the node that you will be using state sync to bootstrap your node.
  10. - `rpc_servers`: RPC servers are needed because state sync utilizes the light client for verification.
  11. - 2 servers are required, more is always helpful.
  12. - `temp_dir`: Temporary directory is store the chunks in the machines local storage, If nothing is set it will create a directory in `/tmp`
  13. The next information you will need to acquire it through publicly exposed RPC's or a block explorer which you trust.
  14. - `trust_height`: Trusted height defines at which height your node should trust the chain.
  15. - `trust_hash`: Trusted hash is the hash in the `BlockID` corresponding to the trusted height.
  16. - `trust_period`: Trust period is the period in which headers can be verified.
  17. > :warning: This value should be significantly smaller than the unbonding period.
  18. If you are relying on publicly exposed RPC's to get the need information, you can use `curl`.
  19. Example:
  20. ```bash
  21. curl -s https://233.123.0.140:26657/commit | jq "{height: .result.signed_header.header.height, hash: .result.signed_header.commit.block_id.hash}"
  22. ```
  23. The response will be:
  24. ```json
  25. {
  26. "height": "273",
  27. "hash": "188F4F36CBCD2C91B57509BBF231C777E79B52EE3E0D90D06B1A25EB16E6E23D"
  28. }
  29. ```