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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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 !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.