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: boolState 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: u64Trust height. See rpc_servers above.
trust_hash: StringTrust hash. See rpc_servers above.
trust_period: StringTrust period. See rpc_servers above.
discovery_time: TimeoutTime to spend discovering snapshots before initiating a restore.
temp_dir: StringTemporary 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 moreSource§impl Debug for StatesyncConfig
impl Debug for StatesyncConfig
Source§impl<'de> Deserialize<'de> for StatesyncConfig
impl<'de> Deserialize<'de> for StatesyncConfig
Source§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>,
Source§impl PartialEq for StatesyncConfig
impl PartialEq for StatesyncConfig
Source§impl Serialize for StatesyncConfig
impl Serialize for StatesyncConfig
impl Eq for StatesyncConfig
impl StructuralPartialEq for StatesyncConfig
Auto Trait Implementations§
impl Freeze for StatesyncConfig
impl RefUnwindSafe for StatesyncConfig
impl Send for StatesyncConfig
impl Sync for StatesyncConfig
impl Unpin for StatesyncConfig
impl UnwindSafe for StatesyncConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.