pub trait ProtocolParametersStorer: Sync + Send {
// Required methods
fn save_protocol_parameters<'life0, 'async_trait>(
&'life0 self,
epoch: Epoch,
protocol_parameters: ProtocolParameters
) -> Pin<Box<dyn Future<Output = StdResult<Option<ProtocolParameters>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_protocol_parameters<'life0, 'async_trait>(
&'life0 self,
epoch: Epoch
) -> Pin<Box<dyn Future<Output = StdResult<Option<ProtocolParameters>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn handle_discrepancies_at_startup<'life0, 'life1, 'async_trait>(
&'life0 self,
current_epoch: Epoch,
configuration_protocol_parameters: &'life1 ProtocolParameters
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}
Expand description
Store and get protocol parameters for given epoch.
Required Methods§
sourcefn save_protocol_parameters<'life0, 'async_trait>(
&'life0 self,
epoch: Epoch,
protocol_parameters: ProtocolParameters
) -> Pin<Box<dyn Future<Output = StdResult<Option<ProtocolParameters>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save_protocol_parameters<'life0, 'async_trait>(
&'life0 self,
epoch: Epoch,
protocol_parameters: ProtocolParameters
) -> Pin<Box<dyn Future<Output = StdResult<Option<ProtocolParameters>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Save the given ProtocolParameter
for the given Epoch.
Provided Methods§
sourcefn handle_discrepancies_at_startup<'life0, 'life1, 'async_trait>(
&'life0 self,
current_epoch: Epoch,
configuration_protocol_parameters: &'life1 ProtocolParameters
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_discrepancies_at_startup<'life0, 'life1, 'async_trait>(
&'life0 self,
current_epoch: Epoch,
configuration_protocol_parameters: &'life1 ProtocolParameters
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle discrepancies at startup in the protocol parameters store. In case an aggregator has been launched after some epochs of not being up or at initial startup, the discrepancies in the protocol parameters store needs to be fixed. The protocol parameters needs to be recorded for the working epoch and the next 2 epochs.