Trait AggregatableVote

Source
pub trait AggregatableVote<TYPES: NodeType, VOTE: Vote<TYPES>, CERT: Certificate<TYPES, VOTE::Commitment, Voteable = VOTE::Commitment>> {
    // Required methods
    fn leader(
        &self,
        membership: &EpochMembership<TYPES>,
    ) -> impl Future<Output = 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: &EpochMembership<TYPES>, ) -> impl Future<Output = 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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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§

async fn leader( &self, membership: &EpochMembership<TYPES>, ) -> 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§

async fn leader( &self, membership: &EpochMembership<TYPES>, ) -> 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§

async fn leader( &self, membership: &EpochMembership<TYPES>, ) -> 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§

async fn leader( &self, membership: &EpochMembership<TYPES>, ) -> 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§

async fn leader( &self, membership: &EpochMembership<TYPES>, ) -> 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§

async fn leader( &self, membership: &EpochMembership<TYPES>, ) -> 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§

async fn leader( &self, membership: &EpochMembership<TYPES>, ) -> 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§

async fn leader( &self, membership: &EpochMembership<TYPES>, ) -> 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§

async fn leader( &self, membership: &EpochMembership<TYPES>, ) -> Result<TYPES::SignatureKey>

Source§

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

Implementors§