pub trait VerificationKeyStorer: Sync + Send {
    // Required methods
    fn save_verification_key<'life0, 'async_trait>(
        &'life0 self,
        epoch: Epoch,
        signer: SignerWithStake
    ) -> Pin<Box<dyn Future<Output = StdResult<Option<SignerWithStake>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_verification_keys<'life0, 'async_trait>(
        &'life0 self,
        epoch: Epoch
    ) -> Pin<Box<dyn Future<Output = StdResult<Option<HashMap<PartyId, Signer>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_signers<'life0, 'async_trait>(
        &'life0 self,
        epoch: Epoch
    ) -> Pin<Box<dyn Future<Output = StdResult<Option<Vec<SignerWithStake>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn prune_verification_keys<'life0, 'async_trait>(
        &'life0 self,
        max_epoch_to_prune: Epoch
    ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Store and get signers verification keys for given epoch.

Important note: This store works on the recording epoch, the epoch at which the signers are signed into a certificate so they can sign single signatures at the next epoch.

Required Methods§

source

fn save_verification_key<'life0, 'async_trait>( &'life0 self, epoch: Epoch, signer: SignerWithStake ) -> Pin<Box<dyn Future<Output = StdResult<Option<SignerWithStake>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Save the verification key, for the given Signer for the given Epoch, returns the previous values if one already existed.

source

fn get_verification_keys<'life0, 'async_trait>( &'life0 self, epoch: Epoch ) -> Pin<Box<dyn Future<Output = StdResult<Option<HashMap<PartyId, Signer>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns a HashMap of Signer indexed by PartyId for the given epoch.

source

fn get_signers<'life0, 'async_trait>( &'life0 self, epoch: Epoch ) -> Pin<Box<dyn Future<Output = StdResult<Option<Vec<SignerWithStake>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the list of signers for the given epoch.

source

fn prune_verification_keys<'life0, 'async_trait>( &'life0 self, max_epoch_to_prune: Epoch ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Prune all verification keys that are at or below the given epoch.

Implementors§