Type Alias hotshot_types::simple_certificate::UpgradeCertificate
source · pub type UpgradeCertificate<TYPES> = SimpleCertificate<TYPES, UpgradeProposalData<TYPES>, UpgradeThreshold>;
Expand description
Type alias for a UpgradeCertificate
, which is a SimpleCertificate
of UpgradeProposalData
Aliased Type§
struct UpgradeCertificate<TYPES> {
pub data: UpgradeProposalData<TYPES>,
vote_commitment: Commitment<UpgradeProposalData<TYPES>>,
pub view_number: <TYPES as NodeType>::Time,
pub signatures: Option<<<TYPES as NodeType>::SignatureKey as SignatureKey>::QcType>,
pub _pd: PhantomData<(TYPES, UpgradeThreshold)>,
}
Fields§
§data: UpgradeProposalData<TYPES>
The data this certificate is for. I.e the thing that was voted on to create this Certificate
vote_commitment: Commitment<UpgradeProposalData<TYPES>>
commitment of all the votes this cert should be signed over
view_number: <TYPES as NodeType>::Time
Which view this QC relates to
signatures: Option<<<TYPES as NodeType>::SignatureKey as SignatureKey>::QcType>
assembled signature for certificate aggregation
_pd: PhantomData<(TYPES, UpgradeThreshold)>
phantom data for THRESHOLD
and TYPES
Implementations§
source§impl<TYPES: NodeType> UpgradeCertificate<TYPES>
impl<TYPES: NodeType> UpgradeCertificate<TYPES>
sourcepub fn temp_is_relevant(
&self,
view_number: TYPES::Time,
decided_upgrade_certificate: Option<Self>
) -> Result<()>
pub fn temp_is_relevant( &self, view_number: TYPES::Time, decided_upgrade_certificate: Option<Self> ) -> Result<()>
Determines whether or not a certificate is relevant (i.e. we still have time to reach a decide)
§Errors
Returns an error when the certificate is no longer relevant
sourcepub async fn is_relevant(
&self,
view_number: TYPES::Time,
decided_upgrade_certificate: Arc<RwLock<Option<Self>>>
) -> Result<()>
pub async fn is_relevant( &self, view_number: TYPES::Time, decided_upgrade_certificate: Arc<RwLock<Option<Self>>> ) -> Result<()>
Determines whether or not a certificate is relevant (i.e. we still have time to reach a decide)
§Errors
Returns an error when the certificate is no longer relevant
sourcepub async fn validate<V: Versions>(
upgrade_certificate: &Option<Self>,
quorum_membership: &TYPES::Membership,
upgrade_lock: &UpgradeLock<TYPES, V>
) -> Result<()>
pub async fn validate<V: Versions>( upgrade_certificate: &Option<Self>, quorum_membership: &TYPES::Membership, upgrade_lock: &UpgradeLock<TYPES, V> ) -> Result<()>
sourcepub fn upgrading_in(&self, view: TYPES::Time) -> bool
pub fn upgrading_in(&self, view: TYPES::Time) -> bool
Given an upgrade certificate and a view, tests whether the view is in the period where we are upgrading, which requires that we propose with null blocks.