pub struct StateSyncConfig {
pub rpc_servers: Vec<String>,
pub trust_height: u64,
pub trust_hash: String,
pub trust_period: Duration,
pub discovery_time: Duration,
pub chunk_request_timeout: Duration,
pub chunk_fetchers: u64,
}
Fields§
§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_hash: String
§trust_period: Duration
§discovery_time: Duration
Time to spend discovering snapshots before initiating a restore.
chunk_request_timeout: Duration
The timeout duration before re-requesting a chunk, possibly from a different peer (default: 1 minute).
chunk_fetchers: u64
The number of concurrent chunk fetchers to run (default: 1).
Implementations§
Source§impl StateSyncConfig
impl StateSyncConfig
pub fn rpc_servers(self, rpc_servers: Vec<String>) -> Self
pub fn trust_height(self, trust_height: u64) -> Self
pub fn trust_hash(self, trust_hash: &str) -> Self
pub fn trust_period(self, trust_period: Duration) -> Self
pub fn discovery_time(self, discovery_time: Duration) -> Self
pub fn chunk_request_timeout(self, chunk_request_timeout: Duration) -> Self
pub fn chunk_fetchers(self, chunk_fetchers: u64) -> Self
Trait Implementations§
Source§impl Clone for StateSyncConfig
impl Clone for StateSyncConfig
Source§fn clone(&self) -> StateSyncConfig
fn clone(&self) -> StateSyncConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StateSyncConfig
impl Debug 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
Mutably borrows from an owned value. Read more