[][src]Struct hbbft::dynamic_honey_badger::DynamicHoneyBadgerBuilder

pub struct DynamicHoneyBadgerBuilder<C, N> { /* fields omitted */ }

A Dynamic Honey Badger builder, to configure the parameters and create new instances of DynamicHoneyBadger.

Methods

impl<C, N> DynamicHoneyBadgerBuilder<C, N> where
    C: Contribution + Serialize + DeserializeOwned,
    N: NodeIdT + Serialize + DeserializeOwned
[src]

pub fn new() -> Self[src]

Returns a new DynamicHoneyBadgerBuilder configured to use the node IDs and cryptographic keys specified by netinfo.

pub fn era(&mut self, era: u64) -> &mut Self[src]

Sets the starting era to the given value.

pub fn epoch(&mut self, epoch: u64) -> &mut Self[src]

Sets the starting era to the given value.

pub fn max_future_epochs(&mut self, max_future_epochs: u64) -> &mut Self[src]

Sets the maximum number of future epochs for which we handle messages simultaneously.

pub fn subset_handling_strategy(
    &mut self,
    subset_handling_strategy: SubsetHandlingStrategy
) -> &mut Self
[src]

Sets the strategy to use when handling Subset output.

pub fn encryption_schedule(
    &mut self,
    encryption_schedule: EncryptionSchedule
) -> &mut Self
[src]

Sets the schedule to use for threshold encryption.

pub fn params(&mut self, params: Params) -> &mut Self[src]

Sets the parameters controlling Honey Badger's behavior and performance.

pub fn build(&mut self, netinfo: NetworkInfo<N>) -> DynamicHoneyBadger<C, N>[src]

Creates a new Dynamic Honey Badger instance with an empty buffer.

pub fn build_first_node<R: Rng>(
    &mut self,
    our_id: N,
    rng: &mut R
) -> Result<DynamicHoneyBadger<C, N>>
[src]

Creates a new DynamicHoneyBadger configured to start a new network as a single validator.

pub fn build_joining<R: Rng>(
    &mut self,
    our_id: N,
    secret_key: SecretKey,
    join_plan: JoinPlan<N>,
    rng: &mut R
) -> Result<(DynamicHoneyBadger<C, N>, Step<C, N>)>
[src]

Deprecated

Creates a new DynamicHoneyBadger configured to join the network at the epoch specified in the JoinPlan. This ignores the builder's configuration settings.

Deprecated: Please use DynamicHoneyBadger::new_joining instead.

Trait Implementations

impl<C, N: Ord> Default for DynamicHoneyBadgerBuilder<C, N>[src]

Auto Trait Implementations

impl<C, N> Send for DynamicHoneyBadgerBuilder<C, N> where
    C: Send,
    N: Send

impl<C, N> Sync for DynamicHoneyBadgerBuilder<C, N> where
    C: Sync,
    N: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

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

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.