pub struct CertificateMessage {
pub hash: String,
pub previous_hash: String,
pub epoch: Epoch,
pub signed_entity_type: SignedEntityType,
pub metadata: CertificateMetadataMessagePart,
pub protocol_message: ProtocolMessage,
pub signed_message: String,
pub aggregate_verification_key: String,
pub multi_signature: String,
pub genesis_signature: String,
}Expand description
Message structure of a certificate
Fields§
§hash: StringHash of the current certificate Computed from the other fields of the certificate aka H(Cp,n))
previous_hash: StringHash of the previous certificate in the chain This is either the hash of the first certificate of the epoch in the chain Or the first certificate of the previous epoch in the chain (if the certificate is the first of its epoch) aka H(FC(n))
epoch: EpochEpoch of the Cardano chain
signed_entity_type: SignedEntityTypeThe signed entity type of the message. aka BEACON(p,n)
metadata: CertificateMetadataMessagePartCertificate metadata aka METADATA(p,n)
protocol_message: ProtocolMessageStructured message that is used to create the signed message aka MSG(p,n) U AVK(n-1)
signed_message: StringMessage that is signed by the signers aka H(MSG(p,n) || AVK(n-1))
aggregate_verification_key: StringAggregate verification key The AVK used to sign during the current epoch aka AVK(n-2)
multi_signature: StringSTM multi signature created from a quorum of single signatures from the signers aka MULTI_SIG(H(MSG(p,n) || AVK(n-1)))
genesis_signature: StringGenesis signature created from the original stake distribution aka GENESIS_SIG(AVK(-1))
Implementations§
Source§impl CertificateMessage
impl CertificateMessage
Sourcepub fn match_message(&self, message: &ProtocolMessage) -> bool
pub fn match_message(&self, message: &ProtocolMessage) -> bool
Check that the certificate signed message match the given protocol message.
Trait Implementations§
Source§impl Clone for CertificateMessage
impl Clone for CertificateMessage
Source§fn clone(&self) -> CertificateMessage
fn clone(&self) -> CertificateMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CertificateMessage
impl Debug for CertificateMessage
Source§impl<'de> Deserialize<'de> for CertificateMessage
impl<'de> Deserialize<'de> for CertificateMessage
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>,
Source§impl Dummy for CertificateMessage
impl Dummy for CertificateMessage
Source§fn dummy() -> Self
fn dummy() -> Self
Return a dummy CertificateMessage (test-only).
Source§impl PartialEq for CertificateMessage
impl PartialEq for CertificateMessage
Source§impl Serialize for CertificateMessage
impl Serialize for CertificateMessage
Source§impl TryFrom<Certificate> for CertificateMessage
impl TryFrom<Certificate> for CertificateMessage
Source§impl TryFrom<CertificateMessage> for Certificate
impl TryFrom<CertificateMessage> for Certificate
impl StructuralPartialEq for CertificateMessage
Auto Trait Implementations§
impl Freeze for CertificateMessage
impl RefUnwindSafe for CertificateMessage
impl Send for CertificateMessage
impl Sync for CertificateMessage
impl Unpin for CertificateMessage
impl UnwindSafe for CertificateMessage
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more