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: u8Wire-format version. Must equal TIMEOUT_MSG_FORMAT_VERSION.
view: u64The view that timed out at the sender.
high_qc_view: u64The 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: u64The 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: AddressVoter’s address (must be a registered validator).
signature: CompositeSignatureComposite (Ed25519 + ML-DSA-65) signature over the canonical payload.
public_key: CompositePublicKeyComposite public key the message was signed under. Bound against the validator’s registered hybrid key on receipt to prevent forgery.
Implementations§
Source§impl TimeoutMsg
impl TimeoutMsg
Sourcepub fn new(
view: u64,
high_qc_view: u64,
finalized_height: u64,
voter: Address,
signature: CompositeSignature,
public_key: CompositePublicKey,
) -> Self
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.
Sourcepub fn signing_payload(&self) -> Vec<u8> ⓘ
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
Sourcepub fn verify(&self, validator_set: &ValidatorSet) -> Result<()>
pub fn verify(&self, validator_set: &ValidatorSet) -> Result<()>
Verifies this timeout message against the validator set.
Checks performed:
- Wire-format version matches the current pinned version.
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).- Voter is a registered, active validator.
- Embedded composite public key matches the validator’s registered classical and PQ keys exactly (key-substitution defence).
- Hybrid signature verifies against the canonical payload.
Trait Implementations§
Source§impl Clone for TimeoutMsg
impl Clone for TimeoutMsg
Source§fn clone(&self) -> TimeoutMsg
fn clone(&self) -> TimeoutMsg
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TimeoutMsg
impl Debug for TimeoutMsg
Source§impl<'de> Deserialize<'de> for TimeoutMsg
impl<'de> Deserialize<'de> for TimeoutMsg
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for TimeoutMsg
Source§impl PartialEq for TimeoutMsg
impl PartialEq for TimeoutMsg
Source§fn eq(&self, other: &TimeoutMsg) -> bool
fn eq(&self, other: &TimeoutMsg) -> bool
self and other values to be equal, and is used by ==.