pub enum ConsensusMessage {
Proposal {
round: ConsensusRound,
valid_round: Option<ConsensusRound>,
block_hash: Hash256,
},
NonNilPreVoted(ConsensusRound, Hash256),
NonNilPreCommitted(ConsensusRound, Hash256),
NilPreVoted(ConsensusRound),
NilPreCommitted(ConsensusRound),
}
Expand description
Consensus messages to propagate each other.
Note that all message are signed by DMS itself.
Variants§
Proposal
NonNilPreVoted(ConsensusRound, Hash256)
NonNilPreCommitted(ConsensusRound, Hash256)
NilPreVoted(ConsensusRound)
NilPreCommitted(ConsensusRound)
Trait Implementations§
Source§impl Clone for ConsensusMessage
impl Clone for ConsensusMessage
Source§fn clone(&self) -> ConsensusMessage
fn clone(&self) -> ConsensusMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ConsensusMessage
impl Debug for ConsensusMessage
Source§impl<'de> Deserialize<'de> for ConsensusMessage
impl<'de> Deserialize<'de> for ConsensusMessage
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DmsMessage for ConsensusMessage
impl DmsMessage for ConsensusMessage
Source§const DMS_TAG: &'static str = "consensus"
const DMS_TAG: &'static str = "consensus"
The tag for the DMS instance that handles this message. Read more
Source§fn commit(
&self,
dms_key: &DmsKey,
private_key: &PrivateKey,
) -> Result<MessageCommitmentProof, CryptoError>where
Self: Sized,
fn commit(
&self,
dms_key: &DmsKey,
private_key: &PrivateKey,
) -> Result<MessageCommitmentProof, CryptoError>where
Self: Sized,
Defines how to commit a message, by cryptographically signing it. Read more
Source§fn verify_commitment(
&self,
proof: &MessageCommitmentProof,
dms_key: &DmsKey,
) -> Result<(), CryptoError>
fn verify_commitment( &self, proof: &MessageCommitmentProof, dms_key: &DmsKey, ) -> Result<(), CryptoError>
It must match the
commit()
method if you implemented it.Source§impl PartialEq for ConsensusMessage
impl PartialEq for ConsensusMessage
Source§impl Serialize for ConsensusMessage
impl Serialize for ConsensusMessage
Source§impl ToHash256 for ConsensusMessage
impl ToHash256 for ConsensusMessage
fn to_hash256(&self) -> Hash256
impl Eq for ConsensusMessage
impl StructuralPartialEq for ConsensusMessage
Auto Trait Implementations§
impl Freeze for ConsensusMessage
impl RefUnwindSafe for ConsensusMessage
impl Send for ConsensusMessage
impl Sync for ConsensusMessage
impl Unpin for ConsensusMessage
impl UnwindSafe for ConsensusMessage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.