Skip to main content

TimeoutMsg

Struct TimeoutMsg 

Source
pub struct TimeoutMsg {
    pub format_version: u8,
    pub view: u64,
    pub high_qc_view: u64,
    pub finalized_height: u64,
    pub voter: Address,
    pub signature: CompositeSignature,
    pub public_key: CompositePublicKey,
}
Expand description

A pacemaker timeout broadcast.

Sent by a replica when its local view timer expires. Receivers of a TimeoutMsg for a strictly higher view than their local view advance their local view to match — this is the channel that prevents permanent view divergence under partial synchrony.

2f+1 TimeoutMsgs for the same view aggregate into a TimeoutCertificate which the next leader attaches to its proposal so receivers can verify that view N was abandoned and the new view N+1 is safe to extend.

Fields§

§format_version: u8

Wire-format version. Must equal TIMEOUT_MSG_FORMAT_VERSION.

§view: u64

The view that timed out at the sender.

§high_qc_view: u64

The view of the highest Prepare QC the sender has observed. The new leader uses max{high_qc_view} over the 2f+1 signers to pick which branch to extend (Jolteon vote rule). Receivers use this to verify that the proposal’s parent QC view ≥ that maximum (safe_to_extend).

§finalized_height: u64

The sender’s highest finalized block height. Receivers that are behind this height engage block-sync immediately — fetched blocks carry their Commit QC embedded in consensus_proof.proof_data, so a Byzantine lie here is harmless (the sync simply finds nothing verifiable and aborts).

§voter: Address

Voter’s address (must be a registered validator).

§signature: CompositeSignature

Composite (Ed25519 + ML-DSA-65) signature over the canonical payload.

§public_key: CompositePublicKey

Composite public key the message was signed under. Bound against the validator’s registered hybrid key on receipt to prevent forgery.

Implementations§

Source§

impl TimeoutMsg

Source

pub fn new( view: u64, high_qc_view: u64, finalized_height: u64, voter: Address, signature: CompositeSignature, public_key: CompositePublicKey, ) -> Self

Creates a new timeout message at the canonical wire-format version.

Source

pub fn signing_payload(&self) -> Vec<u8>

Canonical signing payload for this message. Used both at sign time and at verification time; any divergence between the two would let signatures pass round-trip without binding to the view.

Layout:

  • 15-byte ASCII domain tag TENZRO_TIMEOUT:
  • 1-byte format version
  • 8-byte little-endian view
  • 8-byte little-endian high_qc_view
  • 8-byte little-endian finalized_height
  • 32-byte voter address
Source

pub fn verify(&self, validator_set: &ValidatorSet) -> Result<()>

Verifies this timeout message against the validator set.

Checks performed:

  1. Wire-format version matches the current pinned version.
  2. high_qc_view < view (a replica cannot have observed a QC at a view greater than the one it is currently timing out on; that would imply it already advanced past the timing-out view).
  3. Voter is a registered, active validator.
  4. Embedded composite public key matches the validator’s registered classical and PQ keys exactly (key-substitution defence).
  5. Hybrid signature verifies against the canonical payload.

Trait Implementations§

Source§

impl Clone for TimeoutMsg

Source§

fn clone(&self) -> TimeoutMsg

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
Source§

impl Debug for TimeoutMsg

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for TimeoutMsg

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for TimeoutMsg

Source§

impl PartialEq for TimeoutMsg

Source§

fn eq(&self, other: &TimeoutMsg) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for TimeoutMsg

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for TimeoutMsg

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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