Trait EntryPoint

Source
pub trait EntryPoint<Id: PartyId> {
    type Protocol: Protocol<Id>;

    // Required methods
    fn entry_round_id() -> RoundId;
    fn make_round(
        self,
        rng: &mut dyn CryptoRngCore,
        shared_randomness: &[u8],
        id: &Id,
    ) -> Result<BoxedRound<Id, Self::Protocol>, LocalError>;
}
Expand description

A round that initiates a protocol.

This is a round that can be created directly; all the others are only reachable throud Round::finalize by the execution layer.

Required Associated Types§

Source

type Protocol: Protocol<Id>

The protocol implemented by the round this entry points returns.

Required Methods§

Source

fn entry_round_id() -> RoundId

Returns the ID of the round returned by Self::make_round.

Source

fn make_round( self, rng: &mut dyn CryptoRngCore, shared_randomness: &[u8], id: &Id, ) -> Result<BoxedRound<Id, Self::Protocol>, LocalError>

Creates the round.

session_id can be assumed to be the same for each node participating in a session. id is the ID of this node.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Id, B, M> EntryPoint<Id> for MisbehavingEntryPoint<Id, B, M>
where Id: PartyId, B: Behavior, M: Misbehaving<Id, B>,

Source§

impl<Id, T> EntryPoint<Id> for T
where Id: PartyId, T: ChainedSplit<Id> + ChainedMarker,