pub type UpgradeCertificate<TYPES> = SimpleCertificate<TYPES, UpgradeProposalData, UpgradeThreshold>;Expand description
Type alias for a UpgradeCertificate, which is a SimpleCertificate of UpgradeProposalData
Aliased Type§
pub struct UpgradeCertificate<TYPES> {
pub data: UpgradeProposalData,
vote_commitment: Commitment<UpgradeProposalData>,
pub view_number: ViewNumber,
pub signatures: Option<<<TYPES as NodeType>::SignatureKey as SignatureKey>::QcType>,
pub _pd: PhantomData<(TYPES, UpgradeThreshold)>,
}Fields§
§data: UpgradeProposalDataThe data this certificate is for. I.e the thing that was voted on to create this Certificate
vote_commitment: Commitment<UpgradeProposalData>commitment of all the votes this cert should be signed over
view_number: ViewNumberWhich 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 async fn is_relevant(&self, view_number: ViewNumber) -> Result<()>
pub async fn is_relevant(&self, view_number: ViewNumber) -> 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(
upgrade_certificate: &Option<Self>,
membership: &EpochMembership<TYPES>,
epoch: Option<EpochNumber>,
upgrade_lock: &UpgradeLock<TYPES>,
) -> Result<()>
pub async fn validate( upgrade_certificate: &Option<Self>, membership: &EpochMembership<TYPES>, epoch: Option<EpochNumber>, upgrade_lock: &UpgradeLock<TYPES>, ) -> Result<()>
Sourcepub fn upgrading_in(&self, view: ViewNumber) -> bool
pub fn upgrading_in(&self, view: ViewNumber) -> 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.