pub enum Plan<P: PublicKey> {
Prepare {
round: Round,
},
Propose {
round: Round,
},
Forward {
round: Round,
recipients: Recipients<P>,
},
}Expand description
Describes how a payload should be broadcast to the network.
Variants§
Prepare
Early broadcast of a held term-start candidate to all participants.
Requested when a crate::Handoff::Stage candidate is held for its
parent’s certification. The proposer has not voted for the candidate
and may still abandon it for one built on a replacement parent, so
this plan commits to nothing. A relay may defer the send to the
matching Plan::Propose.
Propose
Broadcast of a proposed block to all participants.
Requested before the proposer’s notarize vote is durable: a proposer that crashes and restarts may emit this plan again with a different payload for the same round. Consumers must tolerate multiple candidates per round (at most one is ever referenced by the proposer’s signed votes).
The proposer’s notarize vote follows this plan. A relay that already
sent the payload for the matching Plan::Prepare does not send it again.
Forward
Forward a block to a specific set of peers.
Requested only for a proposal already backed by a certificate. Forwarding is best-effort help for lagging peers and advertises nothing about the sender’s own state, so it needs no durability ordering.
Fields
recipients: Recipients<P>The recipients to forward the block to.
Auto Trait Implementations§
impl<P> Freeze for Plan<P>where
Recipients<P>: Freeze,
impl<P> RefUnwindSafe for Plan<P>where
Recipients<P>: RefUnwindSafe,
impl<P> Send for Plan<P>where
Recipients<P>: Send,
impl<P> Sync for Plan<P>where
Recipients<P>: Sync,
impl<P> Unpin for Plan<P>where
Recipients<P>: Unpin,
impl<P> UnsafeUnpin for Plan<P>where
Recipients<P>: UnsafeUnpin,
impl<P> UnwindSafe for Plan<P>where
Recipients<P>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more