pub struct ConsensusConfig {Show 14 fields
pub timeout_propose: Duration,
pub timeout_propose_delta: Duration,
pub timeout_prevote: Duration,
pub timeout_prevote_delta: Duration,
pub timeout_precommit: Duration,
pub timeout_precommit_delta: Duration,
pub timeout_commit: Duration,
pub double_sign_check_height: u64,
pub skip_timeout_commit: bool,
pub create_empty_blocks: bool,
pub create_empty_blocks_interval: Duration,
pub peer_gossip_sleep_duration: Duration,
pub peer_query_maj23_sleep_duration: Duration,
pub discard_abci_responses: bool,
}
Fields§
§timeout_propose: Duration
How long we wait for a proposal block before prevoting nil
timeout_propose_delta: Duration
How much timeout_propose increases with each round
timeout_prevote: Duration
How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil)
timeout_prevote_delta: Duration
How much the timeout_prevote increases with each round
timeout_precommit: Duration
How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil)
timeout_precommit_delta: Duration
How much the timeout_precommit increases with each round
timeout_commit: Duration
How long we wait after committing a block, before starting on the new height (this gives us a chance to receive some more precommits, even though we already have +2/3).
double_sign_check_height: u64
How many blocks to look back to check existence of the node’s consensus votes before joining consensus When non-zero, the node will panic upon restart if the same consensus key was used to sign {double_sign_check_height} last blocks. So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic.
skip_timeout_commit: bool
Make progress as soon as we have all the precommits (as if TimeoutCommit = 0)
create_empty_blocks: bool
EmptyBlocks mode and possible interval between empty blocks
create_empty_blocks_interval: Duration
§peer_gossip_sleep_duration: Duration
Reactor sleep duration parameters
peer_query_maj23_sleep_duration: Duration
§discard_abci_responses: bool
Set to true to discard ABCI responses from the state store, which can save a considerable amount of disk space. Set to false to ensure ABCI responses are persisted. ABCI responses are required for /block_results RPC queries, and to reindex events in the command-line tool.
Implementations§
Source§impl ConsensusConfig
impl ConsensusConfig
pub fn timeout_commit(self, timeout_commit: Duration) -> Self
pub fn timeout_propose(self, timeout_propose: Duration) -> Self
pub fn timeout_propose_delta(self, timeout_propose_delta: Duration) -> Self
pub fn timeout_prevote(self, timeout_prevote: Duration) -> Self
pub fn timeout_prevote_delta(self, timeout_prevote_delta: Duration) -> Self
pub fn timeout_precommit(self, timeout_precommit: Duration) -> Self
pub fn timeout_precommit_delta(self, timeout_precommit_delta: Duration) -> Self
pub fn double_sign_check_height(self, double_sign_check_height: u64) -> Self
pub fn skip_timeout_commit(self, skip_timeout_commit: bool) -> Self
pub fn create_empty_blocks(self, create_empty_blocks: bool) -> Self
pub fn create_empty_blocks_interval( self, create_empty_blocks_interval: Duration, ) -> Self
pub fn peer_gossip_sleep_duration( self, peer_gossip_sleep_duration: Duration, ) -> Self
pub fn peer_query_maj23_sleep_duration( self, peer_query_maj23_sleep_duration: Duration, ) -> Self
pub fn discard_abci_responses(self, discard_abci_responses: bool) -> Self
Trait Implementations§
Source§impl Clone for ConsensusConfig
impl Clone for ConsensusConfig
Source§fn clone(&self) -> ConsensusConfig
fn clone(&self) -> ConsensusConfig
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more