penumbra_stake::component::stake

Trait SlashingData

Source
pub trait SlashingData: StateRead {
    // Provided methods
    fn get_penalty_in_epoch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 IdentityKey,
        epoch_index: u64,
    ) -> Pin<Box<dyn Future<Output = Option<Penalty>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn get_penalty_for_range<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 IdentityKey,
        start: u64,
        end: u64,
    ) -> Pin<Box<dyn Future<Output = Vec<Penalty>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn compute_compounded_penalty(penalties: Vec<Penalty>) -> Penalty { ... }
    fn compounded_penalty_over_range<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 IdentityKey,
        epoch_index_start: u64,
        epoch_index_end: u64,
    ) -> Pin<Box<dyn Future<Output = Result<Penalty>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Available on crate feature component only.

Provided Methods§

Source

fn get_penalty_in_epoch<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 IdentityKey, epoch_index: u64, ) -> Pin<Box<dyn Future<Output = Option<Penalty>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_penalty_for_range<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 IdentityKey, start: u64, end: u64, ) -> Pin<Box<dyn Future<Output = Vec<Penalty>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn compute_compounded_penalty(penalties: Vec<Penalty>) -> Penalty

Source

fn compounded_penalty_over_range<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 IdentityKey, epoch_index_start: u64, epoch_index_end: u64, ) -> Pin<Box<dyn Future<Output = Result<Penalty>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns the compounded penalty for the given validator over the half-open range of epochs [start, end).

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.

Implementors§