[][src]Struct pbft_engine::config::PbftConfig

pub struct PbftConfig {
    pub members: Vec<PeerId>,
    pub block_publishing_delay: Duration,
    pub update_recv_timeout: Duration,
    pub exponential_retry_base: Duration,
    pub exponential_retry_max: Duration,
    pub idle_timeout: Duration,
    pub commit_timeout: Duration,
    pub view_change_duration: Duration,
    pub forced_view_change_interval: u64,
    pub max_log_size: u64,
    pub storage_location: String,

Contains the initial configuration loaded from on-chain settings and local configuration. The members list is required; all other settings are optional (defaults used in their absence)


members: Vec<PeerId>block_publishing_delay: Duration

How long to wait in between trying to publish blocks

update_recv_timeout: Duration

How long to wait for an update to arrive from the validator

exponential_retry_base: Duration

The base time to use for retrying with exponential backoff

exponential_retry_max: Duration

The maximum time for retrying with exponential backoff

idle_timeout: Duration

How long to wait for the next BlockNew + PrePrepare before determining primary is faulty Must be longer than block_publishing_delay

commit_timeout: Duration

How long to wait (after Pre-Preparing) for the node to commit the block before starting a view change (guarantees liveness by allowing the network to get "unstuck" if it is unable to commit a block)

view_change_duration: Duration

When view changing, how long to wait for a valid NewView message before starting a different view change

forced_view_change_interval: u64

How many blocks to commit before forcing a view change for fairness

max_log_size: u64

How large the PbftLog is allowed to get before being pruned

storage_location: String

Where to store PbftState ("memory" or "disk+/path/to/file")


impl PbftConfig[src]

pub fn default() -> Self[src]

pub fn load_settings(&mut self, block_id: BlockId, service: &mut dyn Service)[src]

Load configuration from on-chain Sawtooth settings.

Configuration loads the following settings: + sawtooth.consensus.pbft.members (required) + sawtooth.consensus.pbft.block_publishing_delay (optional, default 1000 ms) + sawtooth.consensus.pbft.idle_timeout (optional, default 30000 ms) + sawtooth.consensus.pbft.commit_timeout (optional, default 10000 ms) + sawtooth.consensus.pbft.view_change_duration (optional, default 5000 ms) + sawtooth.consensus.pbft.forced_view_change_interval (optional, default 100 blocks)


  • If block publishing delay is greater than the idle timeout
  • If the sawtooth.consensus.pbft.members setting is not provided or is invalid

Trait Implementations

impl Debug for PbftConfig[src]

Auto Trait Implementations

impl RefUnwindSafe for PbftConfig

impl Send for PbftConfig

impl Sync for PbftConfig

impl Unpin for PbftConfig

impl UnwindSafe for PbftConfig

Blanket Implementations

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

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

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

impl<T> DebugAny for T where
    T: Any + Debug

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

impl<T> UnsafeAny for T where
    T: Any