1use alloc::boxed::Box;
4use alloy_consensus::{Header, Sealed};
5use alloy_primitives::B256;
6use async_trait::async_trait;
7use core::error::Error;
8use kona_executor::BlockBuildingOutcome;
9use op_alloy_rpc_types_engine::OpPayloadAttributes;
10
11#[async_trait]
15pub trait Executor {
16 type Error: Error;
18
19 async fn wait_until_ready(&mut self);
21
22 fn update_safe_head(&mut self, header: Sealed<Header>);
24
25 async fn execute_payload(
27 &mut self,
28 attributes: OpPayloadAttributes,
29 ) -> Result<BlockBuildingOutcome, Self::Error>;
30
31 fn compute_output_root(&mut self) -> Result<B256, Self::Error>;
34}