Trait narwhal_executor::ExecutionState
source · [−]pub trait ExecutionState {
fn handle_consensus_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
consensus_output: &'life1 ConsensusOutput,
execution_indices: ExecutionIndices,
transaction: Vec<u8>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn load_execution_indices<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = ExecutionIndices> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}
Required Methods
sourcefn handle_consensus_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
consensus_output: &'life1 ConsensusOutput,
execution_indices: ExecutionIndices,
transaction: Vec<u8>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn handle_consensus_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
consensus_output: &'life1 ConsensusOutput,
execution_indices: ExecutionIndices,
transaction: Vec<u8>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Execute the transaction and atomically persist the consensus index. This function returns an execution outcome that will be output by the executor channel. It may also return a new committee to reconfigure the system.
sourcefn load_execution_indices<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = ExecutionIndices> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn load_execution_indices<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = ExecutionIndices> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Load the last consensus index from storage.