pub struct ConsensusBasedTotalOrderBroadcast<V: Clone + Ord, L: VolatileLink<Carried<V>> = PerfectLink<Carried<V>>> { /* private fields */ }Expand description
A totally ordered log, agreed by one consensus instance per round.
Implementations§
Source§impl<V: Clone + Ord> ConsensusBasedTotalOrderBroadcast<V>
impl<V: Clone + Ord> ConsensusBasedTotalOrderBroadcast<V>
Sourcepub fn new(
me: NodeId,
peers: impl IntoIterator<Item = NodeId>,
timing: Timing,
) -> Self
pub fn new( me: NodeId, peers: impl IntoIterator<Item = NodeId>, timing: Timing, ) -> Self
A totally ordered log among peers, over perfect links.
timing is the consensus beneath’s: its detect_after must exceed heartbeat plus the
network’s delivery bound, or the perfect failure detector under flooding consensus accuses a
correct process and agreement can break.
Source§impl<V: Clone + Ord, L: VolatileLink<Carried<V>>> ConsensusBasedTotalOrderBroadcast<V, L>
impl<V: Clone + Ord, L: VolatileLink<Carried<V>>> ConsensusBasedTotalOrderBroadcast<V, L>
Trait Implementations§
Source§impl<V: Clone + Ord, L: VolatileLink<Carried<V>>> Protocol for ConsensusBasedTotalOrderBroadcast<V, L>
impl<V: Clone + Ord, L: VolatileLink<Carried<V>>> Protocol for ConsensusBasedTotalOrderBroadcast<V, L>
Source§type Meta = Infallible
type Meta = Infallible
Keeps nothing durably. The fail-recovery variant is the one that does.
Source§type Msg = Wire<<BestEffortBroadcast<Data<V>, L> as Protocol>::Msg, <FloodingConsensus<BTreeSet<(NodeId, V)>> as Protocol>::Msg>
type Msg = Wire<<BestEffortBroadcast<Data<V>, L> as Protocol>::Msg, <FloodingConsensus<BTreeSet<(NodeId, V)>> as Protocol>::Msg>
What crosses the wire to a peer running the same protocol.
Source§type Scope = Infallible
type Scope = Infallible
Scopes whose boundaries this protocol’s guarantees depend on, and which it can observe. Read more
Source§type Entry = Infallible
type Entry = Infallible
The durable entries this protocol appends: what accumulates.
Source§fn on_cmd(&mut self, cmd: Cmd<V>, cx: &mut ProtoCx<'_, Self>)
fn on_cmd(&mut self, cmd: Cmd<V>, cx: &mut ProtoCx<'_, Self>)
Handle a request from the layer above.
Source§fn on_msg(&mut self, from: NodeId, msg: Self::Msg, cx: &mut ProtoCx<'_, Self>)
fn on_msg(&mut self, from: NodeId, msg: Self::Msg, cx: &mut ProtoCx<'_, Self>)
Handle a message received from
from.Source§fn on_timer(&mut self, id: TimerId, cx: &mut ProtoCx<'_, Self>)
fn on_timer(&mut self, id: TimerId, cx: &mut ProtoCx<'_, Self>)
Handle a timer that fired somewhere in this protocol or in what it composes. Read more
Source§fn on_init(&mut self, cx: &mut ProtoCx<'_, Self>)
fn on_init(&mut self, cx: &mut ProtoCx<'_, Self>)
Begin, on a first start — when nothing has been written down. Read more
§fn on_recovery(
&mut self,
_cx: &mut Cx<'_, Self::Msg, Self::Ind, Self::Note, Self::Meta, Self::Entry>,
)
fn on_recovery( &mut self, _cx: &mut Cx<'_, Self::Msg, Self::Ind, Self::Note, Self::Meta, Self::Entry>, )
Resume after a crash, reading what survived. Read more
§fn on_scope_event(
&mut self,
_scope: Self::Scope,
_cx: &mut Cx<'_, Self::Msg, Self::Ind, Self::Note, Self::Meta, Self::Entry>,
)
fn on_scope_event( &mut self, _scope: Self::Scope, _cx: &mut Cx<'_, Self::Msg, Self::Ind, Self::Note, Self::Meta, Self::Entry>, )
Handle a boundary of a scope this protocol’s guarantees depend on — its end, or the
beginning of the one that succeeds it. Read more
Source§impl<V: Clone + Ord, L: VolatileLink<Carried<V>>> TotalOrderLog<V> for ConsensusBasedTotalOrderBroadcast<V, L>
impl<V: Clone + Ord, L: VolatileLink<Carried<V>>> TotalOrderLog<V> for ConsensusBasedTotalOrderBroadcast<V, L>
Auto Trait Implementations§
impl<V, L> Freeze for ConsensusBasedTotalOrderBroadcast<V, L>where
L: Freeze,
impl<V, L> RefUnwindSafe for ConsensusBasedTotalOrderBroadcast<V, L>where
V: RefUnwindSafe,
L: RefUnwindSafe,
impl<V, L> Send for ConsensusBasedTotalOrderBroadcast<V, L>
impl<V, L> Sync for ConsensusBasedTotalOrderBroadcast<V, L>
impl<V, L> Unpin for ConsensusBasedTotalOrderBroadcast<V, L>
impl<V, L> UnsafeUnpin for ConsensusBasedTotalOrderBroadcast<V, L>where
L: UnsafeUnpin,
impl<V, L> UnwindSafe for ConsensusBasedTotalOrderBroadcast<V, L>
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
Mutably borrows from an owned value. Read more