Skip to main content

ConsensusOutMessage

Enum ConsensusOutMessage 

Source
pub enum ConsensusOutMessage {
    Vote(Vote),
    Proposal {
        block: Block,
        proposer: Address,
        round: u64,
        view: u64,
        high_qc_view: u64,
        timeout_certificate: Option<TimeoutCertificate>,
        no_endorsement_certificate: Option<NoEndorsementCertificate>,
    },
    Timeout(TimeoutMsg),
    NoEndorsement(NoEndorsementMsg),
}
Expand description

Messages the consensus engine needs to broadcast via gossipsub. Uses an mpsc channel to avoid a circular crate dependency: tenzro-consensus cannot import tenzro-network.

Variants§

§

Vote(Vote)

A vote this node cast that peers must receive to form quorum

§

Proposal

A block proposal the leader is broadcasting to all validators. timeout_certificate is Some(_) only when the leader is recovering from a view timeout — it carries 2f+1 timeout signatures from the previous view so peers can verify the new view was legitimately abandoned (Jolteon vote rule, DiemBFT v4 §3.5).

no_endorsement_certificate is Some(_) when the leader is proposing a new block at view N+1 after view N timed out — it carries f+1 no-endorsement signatures from view N proving the predecessor’s QC was not withheld. MonadBFT (arXiv:2502.20692) — closes the tail-fork MEV vulnerability. If absent, receivers must require the proposal to repropose the high-tip block; a fresh block with neither a NEC nor a high-tip parent is rejected.

high_qc_view is the leader’s local highest-Prepare-QC view at the moment of proposing (#171, Aptos SyncInfo pattern). Receivers use it to fast-forward their own high_qc_view if the proposer is ahead, which shrinks the gap a lagging replica has to close before it can vote. Must satisfy high_qc_view < view.

Fields

§block: Block
§proposer: Address
§round: u64
§view: u64
§high_qc_view: u64
§timeout_certificate: Option<TimeoutCertificate>
§no_endorsement_certificate: Option<NoEndorsementCertificate>
§

Timeout(TimeoutMsg)

A pacemaker timeout broadcast emitted on local view-timer expiry. Carries the sender’s current view so a lagging peer can fast-forward (DiemBFT v4 §3.5 backward-sync channel; phase 1 of #164).

§

NoEndorsement(NoEndorsementMsg)

A no-endorsement attestation broadcast emitted on local view-timer expiry. Aggregates into an f+1 NoEndorsementCertificate that the next leader attaches to its proposal when proposing a new block (MonadBFT, arXiv:2502.20692).

Trait Implementations§

Source§

impl Clone for ConsensusOutMessage

Source§

fn clone(&self) -> ConsensusOutMessage

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more