pub trait Storage<TYPES: NodeType>: Send + Sync + Clone {
    // Required methods
    fn append_vid<'life0, 'life1, 'async_trait>(
        &'life0 self,
        proposal: &'life1 Proposal<TYPES, VidDisperseShare<TYPES>>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn append_da<'life0, 'life1, 'async_trait>(
        &'life0 self,
        proposal: &'life1 Proposal<TYPES, DaProposal<TYPES>>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn append_proposal<'life0, 'life1, 'async_trait>(
        &'life0 self,
        proposal: &'life1 Proposal<TYPES, QuorumProposal<TYPES>>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn record_action<'life0, 'async_trait>(
        &'life0 self,
        view: TYPES::Time,
        action: HotShotAction
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_high_qc<'life0, 'async_trait>(
        &'life0 self,
        high_qc: QuorumCertificate<TYPES>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_undecided_state<'life0, 'async_trait>(
        &'life0 self,
        leafs: CommitmentMap<Leaf<TYPES>>,
        state: BTreeMap<TYPES::Time, View<TYPES>>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Abstraction for storing a variety of consensus payload datum.

Required Methods§

source

fn append_vid<'life0, 'life1, 'async_trait>( &'life0 self, proposal: &'life1 Proposal<TYPES, VidDisperseShare<TYPES>> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Add a proposal to the stored VID proposals.

source

fn append_da<'life0, 'life1, 'async_trait>( &'life0 self, proposal: &'life1 Proposal<TYPES, DaProposal<TYPES>> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Add a proposal to the stored DA proposals.

source

fn append_proposal<'life0, 'life1, 'async_trait>( &'life0 self, proposal: &'life1 Proposal<TYPES, QuorumProposal<TYPES>> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Add a proposal we sent to the store

source

fn record_action<'life0, 'async_trait>( &'life0 self, view: TYPES::Time, action: HotShotAction ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Record a HotShotAction taken.

source

fn update_high_qc<'life0, 'async_trait>( &'life0 self, high_qc: QuorumCertificate<TYPES> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update the current high QC in storage.

source

fn update_undecided_state<'life0, 'async_trait>( &'life0 self, leafs: CommitmentMap<Leaf<TYPES>>, state: BTreeMap<TYPES::Time, View<TYPES>> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update the currently undecided state of consensus. This includes the undecided leaf chain, and the undecided state.

Object Safety§

This trait is not object safe.

Implementors§