Skip to main content

ConsensusSource

Trait ConsensusSource 

Source
pub trait ConsensusSource:
    Send
    + Sync
    + 'static {
Show 14 methods // Required methods fn decided_leaf<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Leaf2> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn decided_state<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<Arc<ValidatedState>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn state<'life0, 'async_trait>( &'life0 self, view: ViewNumber, ) -> Pin<Box<dyn Future<Output = Option<Arc<ValidatedState>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn state_and_delta<'life0, 'async_trait>( &'life0 self, view: ViewNumber, ) -> Pin<Box<dyn Future<Output = StateAndDelta<SeqTypes>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn undecided_leaves<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Vec<Leaf2>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn current_epoch<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<EpochNumber>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn membership_coordinator<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = EpochMembershipCoordinator<SeqTypes>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn upgrade_lock<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = UpgradeLock<SeqTypes>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn submit_transaction<'life0, 'async_trait>( &'life0 self, tx: Transaction, ) -> Pin<Box<dyn Future<Output = Result<Commitment<Transaction>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn update_leaf<'life0, 'async_trait>( &'life0 self, leaf: Leaf2, state: Arc<ValidatedState>, delta: Option<Arc<Delta>>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn current_proposal_participation<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = HashMap<PubKey, f64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn proposal_participation<'life0, 'async_trait>( &'life0 self, epoch: EpochNumber, ) -> Pin<Box<dyn Future<Output = HashMap<PubKey, f64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn current_vote_participation<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = HashMap<PubKey, f64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn vote_participation<'life0, 'async_trait>( &'life0 self, epoch: EpochNumber, ) -> Pin<Box<dyn Future<Output = HashMap<PubKey, f64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}

Required Methods§

Source

fn decided_leaf<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Leaf2> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn decided_state<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<Arc<ValidatedState>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn state<'life0, 'async_trait>( &'life0 self, view: ViewNumber, ) -> Pin<Box<dyn Future<Output = Option<Arc<ValidatedState>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn state_and_delta<'life0, 'async_trait>( &'life0 self, view: ViewNumber, ) -> Pin<Box<dyn Future<Output = StateAndDelta<SeqTypes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn undecided_leaves<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Vec<Leaf2>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn current_epoch<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<EpochNumber>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn membership_coordinator<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = EpochMembershipCoordinator<SeqTypes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn upgrade_lock<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = UpgradeLock<SeqTypes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn submit_transaction<'life0, 'async_trait>( &'life0 self, tx: Transaction, ) -> Pin<Box<dyn Future<Output = Result<Commitment<Transaction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The commitment the accepting node reports, which the submit API returns.

Source

fn update_leaf<'life0, 'async_trait>( &'life0 self, leaf: Leaf2, state: Arc<ValidatedState>, delta: Option<Arc<Delta>>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

How catchup pushes a state it recovered from storage back into memory.

Source

fn current_proposal_participation<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = HashMap<PubKey, f64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn proposal_participation<'life0, 'async_trait>( &'life0 self, epoch: EpochNumber, ) -> Pin<Box<dyn Future<Output = HashMap<PubKey, f64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn current_vote_participation<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = HashMap<PubKey, f64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn vote_participation<'life0, 'async_trait>( &'life0 self, epoch: EpochNumber, ) -> Pin<Box<dyn Future<Output = HashMap<PubKey, f64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§