Struct ConsensusConfig

Source
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

Source

pub fn timeout_commit(self, timeout_commit: Duration) -> Self

Source

pub fn timeout_propose(self, timeout_propose: Duration) -> Self

Source

pub fn timeout_propose_delta(self, timeout_propose_delta: Duration) -> Self

Source

pub fn timeout_prevote(self, timeout_prevote: Duration) -> Self

Source

pub fn timeout_prevote_delta(self, timeout_prevote_delta: Duration) -> Self

Source

pub fn timeout_precommit(self, timeout_precommit: Duration) -> Self

Source

pub fn timeout_precommit_delta(self, timeout_precommit_delta: Duration) -> Self

Source

pub fn double_sign_check_height(self, double_sign_check_height: u64) -> Self

Source

pub fn skip_timeout_commit(self, skip_timeout_commit: bool) -> Self

Source

pub fn create_empty_blocks(self, create_empty_blocks: bool) -> Self

Source

pub fn create_empty_blocks_interval( self, create_empty_blocks_interval: Duration, ) -> Self

Source

pub fn peer_gossip_sleep_duration( self, peer_gossip_sleep_duration: Duration, ) -> Self

Source

pub fn peer_query_maj23_sleep_duration( self, peer_query_maj23_sleep_duration: Duration, ) -> Self

Source

pub fn discard_abci_responses(self, discard_abci_responses: bool) -> Self

Trait Implementations§

Source§

impl Clone for ConsensusConfig

Source§

fn clone(&self) -> ConsensusConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ConsensusConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ConsensusConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more