Struct tendermint::config::StatesyncConfig [−][src]
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
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for StatesyncConfig
impl Send for StatesyncConfig
impl Sync for StatesyncConfig
impl Unpin for StatesyncConfig
impl UnwindSafe for StatesyncConfig
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V