pub trait AggregatableVote<TYPES: NodeType, VOTE: Vote<TYPES>, CERT: Certificate<TYPES, VOTE::Commitment, Voteable = VOTE::Commitment>> {
    // Required methods
    fn leader(
        &self,
        membership: &TYPES::Membership,
        epoch: TYPES::Epoch,
    ) -> Result<TYPES::SignatureKey>;
    fn make_cert_event(
        certificate: CERT,
        key: &TYPES::SignatureKey,
    ) -> HotShotEvent<TYPES>;
}
Expand description

Describes the functions a vote must implement for it to be aggregatable by the generic vote collection task

Required Methods§

source

fn leader( &self, membership: &TYPES::Membership, epoch: TYPES::Epoch, ) -> Result<TYPES::SignatureKey>

return the leader for this votes

§Errors

if the leader cannot be calculated

source

fn make_cert_event( certificate: CERT, key: &TYPES::SignatureKey, ) -> HotShotEvent<TYPES>

return the Hotshot event for the completion of this CERT

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<TYPES: NodeType> AggregatableVote<TYPES, SimpleVote<TYPES, DaData2<TYPES>>, SimpleCertificate<TYPES, DaData2<TYPES>, SuccessThreshold>> for DaVote2<TYPES>

source§

fn leader( &self, membership: &TYPES::Membership, epoch: TYPES::Epoch, ) -> Result<TYPES::SignatureKey>

source§

fn make_cert_event( certificate: DaCertificate2<TYPES>, key: &TYPES::SignatureKey, ) -> HotShotEvent<TYPES>

source§

impl<TYPES: NodeType> AggregatableVote<TYPES, SimpleVote<TYPES, NextEpochQuorumData2<TYPES>>, SimpleCertificate<TYPES, NextEpochQuorumData2<TYPES>, SuccessThreshold>> for NextEpochQuorumVote2<TYPES>

source§

fn leader( &self, membership: &TYPES::Membership, epoch: TYPES::Epoch, ) -> Result<TYPES::SignatureKey>

source§

fn make_cert_event( certificate: NextEpochQuorumCertificate2<TYPES>, _key: &TYPES::SignatureKey, ) -> HotShotEvent<TYPES>

source§

impl<TYPES: NodeType> AggregatableVote<TYPES, SimpleVote<TYPES, QuorumData2<TYPES>>, SimpleCertificate<TYPES, QuorumData2<TYPES>, SuccessThreshold>> for QuorumVote2<TYPES>

source§

fn leader( &self, membership: &TYPES::Membership, epoch: TYPES::Epoch, ) -> Result<TYPES::SignatureKey>

source§

fn make_cert_event( certificate: QuorumCertificate2<TYPES>, _key: &TYPES::SignatureKey, ) -> HotShotEvent<TYPES>

source§

impl<TYPES: NodeType> AggregatableVote<TYPES, SimpleVote<TYPES, QuorumData<TYPES>>, SimpleCertificate<TYPES, QuorumData<TYPES>, SuccessThreshold>> for QuorumVote<TYPES>

source§

fn leader( &self, membership: &TYPES::Membership, epoch: TYPES::Epoch, ) -> Result<TYPES::SignatureKey>

source§

fn make_cert_event( certificate: QuorumCertificate<TYPES>, _key: &TYPES::SignatureKey, ) -> HotShotEvent<TYPES>

source§

impl<TYPES: NodeType> AggregatableVote<TYPES, SimpleVote<TYPES, TimeoutData2<TYPES>>, SimpleCertificate<TYPES, TimeoutData2<TYPES>, SuccessThreshold>> for TimeoutVote2<TYPES>

source§

fn leader( &self, membership: &TYPES::Membership, epoch: TYPES::Epoch, ) -> Result<TYPES::SignatureKey>

source§

fn make_cert_event( certificate: TimeoutCertificate2<TYPES>, _key: &TYPES::SignatureKey, ) -> HotShotEvent<TYPES>

source§

impl<TYPES: NodeType> AggregatableVote<TYPES, SimpleVote<TYPES, UpgradeProposalData<TYPES>>, SimpleCertificate<TYPES, UpgradeProposalData<TYPES>, UpgradeThreshold>> for UpgradeVote<TYPES>

source§

fn leader( &self, membership: &TYPES::Membership, epoch: TYPES::Epoch, ) -> Result<TYPES::SignatureKey>

source§

fn make_cert_event( certificate: UpgradeCertificate<TYPES>, _key: &TYPES::SignatureKey, ) -> HotShotEvent<TYPES>

source§

impl<TYPES: NodeType> AggregatableVote<TYPES, SimpleVote<TYPES, ViewSyncCommitData2<TYPES>>, SimpleCertificate<TYPES, ViewSyncCommitData2<TYPES>, SuccessThreshold>> for ViewSyncCommitVote2<TYPES>

source§

fn leader( &self, membership: &TYPES::Membership, epoch: TYPES::Epoch, ) -> Result<TYPES::SignatureKey>

source§

fn make_cert_event( certificate: ViewSyncCommitCertificate2<TYPES>, key: &TYPES::SignatureKey, ) -> HotShotEvent<TYPES>

source§

impl<TYPES: NodeType> AggregatableVote<TYPES, SimpleVote<TYPES, ViewSyncFinalizeData2<TYPES>>, SimpleCertificate<TYPES, ViewSyncFinalizeData2<TYPES>, SuccessThreshold>> for ViewSyncFinalizeVote2<TYPES>

source§

fn leader( &self, membership: &TYPES::Membership, epoch: TYPES::Epoch, ) -> Result<TYPES::SignatureKey>

source§

fn make_cert_event( certificate: ViewSyncFinalizeCertificate2<TYPES>, key: &TYPES::SignatureKey, ) -> HotShotEvent<TYPES>

source§

impl<TYPES: NodeType> AggregatableVote<TYPES, SimpleVote<TYPES, ViewSyncPreCommitData2<TYPES>>, SimpleCertificate<TYPES, ViewSyncPreCommitData2<TYPES>, OneHonestThreshold>> for ViewSyncPreCommitVote2<TYPES>

source§

fn leader( &self, membership: &TYPES::Membership, epoch: TYPES::Epoch, ) -> Result<TYPES::SignatureKey>

source§

fn make_cert_event( certificate: ViewSyncPreCommitCertificate2<TYPES>, key: &TYPES::SignatureKey, ) -> HotShotEvent<TYPES>

Implementors§