pub struct StatesyncConfig {
pub enable: bool,
pub rpc_servers: Vec<String>,
pub trust_height: u64,
pub trust_hash: String,
pub trust_period: String,
pub discovery_time: Timeout,
pub temp_dir: String,
}
Expand description
statesync configuration options
Fields§
§enable: bool
State sync rapidly bootstraps a new node by discovering, fetching, and restoring a state machine snapshot from peers instead of fetching and replaying historical blocks. Requires some peers in the network to take and serve state machine snapshots. State sync is not attempted if the node has any local state (LastBlockHeight > 0). The node will have a truncated block history, starting from the height of the snapshot.
rpc_servers: Vec<String>
RPC servers (comma-separated) for light client verification of the synced state machine and retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding header hash obtained from a trusted source, and a period during which validators can be trusted.
For Cosmos SDK-based chains, trust-period should usually be about 2/3 of the unbonding time (~2 weeks) during which they can be financially punished (slashed) for misbehavior.
trust_height: u64
Trust height. See rpc_servers
above.
trust_hash: String
Trust hash. See rpc_servers
above.
trust_period: String
Trust period. See rpc_servers
above.
discovery_time: Timeout
Time to spend discovering snapshots before initiating a restore.
temp_dir: String
Temporary directory for state sync snapshot chunks, defaults to the OS tempdir (typically /tmp). Will create a new, randomly named directory within, and remove it when done.
Trait Implementations§
Source§impl Clone for StatesyncConfig
impl Clone for StatesyncConfig
Source§fn clone(&self) -> StatesyncConfig
fn clone(&self) -> StatesyncConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more