DKGPhase

Trait DKGPhase 

Source
pub trait DKGPhase<C: Curve, B: BoardPublisher<C>, T> {
    type Next: Send;

    // Required method
    fn run<'life0, 'async_trait>(
        self,
        board: &'life0 mut B,
        arg: T,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Next, DKGNodeError>> + Send + 'async_trait>>
       where C: 'async_trait,
             T: 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A DKG Phase.

Required Associated Types§

Source

type Next: Send

The next DKG Phase

Required Methods§

Source

fn run<'life0, 'async_trait>( self, board: &'life0 mut B, arg: T, ) -> Pin<Box<dyn Future<Output = Result<Self::Next, DKGNodeError>> + Send + 'async_trait>>
where C: 'async_trait, T: 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Executes this DKG Phase and publishes the required result to the board. The arg is specific to each phase.

Implementors§

Source§

impl<C, B, P> DKGPhase<C, B, &[BundledJustification<C>]> for P
where C: Curve, B: BoardPublisher<C> + Send, P: Phase3<C> + Send,

Source§

impl<C, B, P> DKGPhase<C, B, &[BundledResponses]> for P
where C: Curve, B: BoardPublisher<C> + Send, P: Phase2<C> + Send, P::Next: Send,

Source§

type Next = Phase2Result<C, <P as Phase2<C>>::Next>

Source§

impl<C, B, P> DKGPhase<C, B, &[BundledShares<C>]> for P
where C: Curve, B: BoardPublisher<C> + Send, P: Phase1<C> + Send, P::Next: Send,

Source§

type Next = <P as Phase1<C>>::Next

Source§

impl<C, B, R, F, P> DKGPhase<C, B, F> for P
where C: Curve, B: BoardPublisher<C> + Send, P: Phase0<C> + Send, P::Next: Send, R: RngCore, F: Fn() -> R + Send,

Source§

type Next = <P as Phase0<C>>::Next