pub struct MithrilCertificate {
pub hash: String,
pub previous_hash: String,
pub epoch: Epoch,
pub signed_entity_type: SignedEntityTypeMessagePart,
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
A Mithril certificate.
Message structure of a certificate
Fields§
§hash: String
Hash of the current certificate Computed from the other fields of the certificate aka H(Cp,n))
previous_hash: String
Hash 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: Epoch
Epoch of the Cardano chain
signed_entity_type: SignedEntityTypeMessagePart
The signed entity type of the message. aka BEACON(p,n)
metadata: CertificateMetadataMessagePart
Certificate metadata aka METADATA(p,n)
protocol_message: ProtocolMessage
Structured message that is used to create the signed message aka MSG(p,n) U AVK(n-1)
signed_message: String
Message that is signed by the signers aka H(MSG(p,n) || AVK(n-1))
aggregate_verification_key: String
Aggregate verification key The AVK used to sign during the current epoch aka AVK(n-2)
multi_signature: String
STM multi signature created from a quorum of single signatures from the signers aka MULTI_SIG(H(MSG(p,n) || AVK(n-1)))
genesis_signature: String
Genesis signature created from the original stake distribution aka GENESIS_SIG(AVK(-1))
Implementations§
source§impl CertificateMessage
impl CertificateMessage
sourcepub fn dummy() -> CertificateMessage
pub fn dummy() -> CertificateMessage
Return a dummy test entity (test-only).
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<CertificateMessage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CertificateMessage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for CertificateMessage
impl PartialEq for CertificateMessage
source§impl Serialize for CertificateMessage
impl Serialize for CertificateMessage
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl TryFrom<Certificate> for CertificateMessage
impl TryFrom<Certificate> for CertificateMessage
source§fn try_from(
certificate: Certificate,
) -> Result<CertificateMessage, <CertificateMessage as TryFrom<Certificate>>::Error>
fn try_from( certificate: Certificate, ) -> Result<CertificateMessage, <CertificateMessage as TryFrom<Certificate>>::Error>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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