Trait Executor

Source
pub trait Executor {
    type Error: Error;

    // Required methods
    fn wait_until_ready<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_safe_head(&mut self, header: Sealed<Header>);
    fn execute_payload<'life0, 'async_trait>(
        &'life0 mut self,
        attributes: OpPayloadAttributes,
    ) -> Pin<Box<dyn Future<Output = Result<BlockBuildingOutcome, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn compute_output_root(&mut self) -> Result<B256, Self::Error>;
}
Expand description

Executor

Abstracts block execution by the driver.

Required Associated Types§

Source

type Error: Error

The error type for the Executor.

Required Methods§

Source

fn wait_until_ready<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Waits for the executor to be ready.

Source

fn update_safe_head(&mut self, header: Sealed<Header>)

Updates the safe header.

Source

fn execute_payload<'life0, 'async_trait>( &'life0 mut self, attributes: OpPayloadAttributes, ) -> Pin<Box<dyn Future<Output = Result<BlockBuildingOutcome, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute the given OpPayloadAttributes.

Source

fn compute_output_root(&mut self) -> Result<B256, Self::Error>

Computes the output root. Expected to be called after the payload has been executed.

Implementors§