Skip to main content

EngineSszApi

Trait EngineSszApi 

Source
pub trait EngineSszApi:
    Clone
    + Send
    + Sync
    + 'static {
    // Provided methods
    fn capabilities(&self, _witness_enabled: bool) -> HttpResponse { ... }
    fn supports_witness(&self) -> bool { ... }
    fn new_payload_with_witness(
        &self,
        _body: Bytes,
        _witness_handler: Arc<dyn EngineSszWitness>,
    ) -> impl Future<Output = HttpResponse> + Send { ... }
    fn identity(&self) -> HttpResponse { ... }
    fn new_payload(
        &self,
        _fork: EngineSszFork,
        _body: Bytes,
    ) -> impl Future<Output = HttpResponse> + Send { ... }
    fn get_payload(
        &self,
        _fork: EngineSszFork,
        _payload_id: PayloadId,
    ) -> impl Future<Output = HttpResponse> + Send { ... }
    fn forkchoice_updated(
        &self,
        _fork: EngineSszFork,
        _body: Bytes,
    ) -> impl Future<Output = HttpResponse> + Send { ... }
    fn get_payload_bodies_by_hash(
        &self,
        _fork: EngineSszFork,
        _hashes: Vec<B256>,
    ) -> impl Future<Output = HttpResponse> + Send { ... }
    fn get_payload_bodies_by_range(
        &self,
        _fork: EngineSszFork,
        _start: u64,
        _count: u64,
    ) -> impl Future<Output = HttpResponse> + Send { ... }
    fn get_blobs(
        &self,
        _version: u8,
        _body: Bytes,
    ) -> impl Future<Output = HttpResponse> + Send { ... }
}
Expand description

API surface required by the SSZ Engine API proxy.

Custom APIs can opt in with a marker implementation; every route, including /capabilities, then answers 404 so clients fall back to the JSON-RPC Engine API.

Provided Methods§

Source

fn capabilities(&self, _witness_enabled: bool) -> HttpResponse

Returns the capabilities advertisement.

witness_enabled is true when a witness generator is configured and Self::supports_witness holds, so the advertisement can include the extension.

Source

fn supports_witness(&self) -> bool

Whether the implementation supports the witness extension.

Source

fn new_payload_with_witness( &self, _body: Bytes, _witness_handler: Arc<dyn EngineSszWitness>, ) -> impl Future<Output = HttpResponse> + Send

Handles the experimental Amsterdam payload submission with a witness.

Source

fn identity(&self) -> HttpResponse

Returns the Engine API identity response.

Source

fn new_payload( &self, _fork: EngineSszFork, _body: Bytes, ) -> impl Future<Output = HttpResponse> + Send

Handles a new payload request.

Source

fn get_payload( &self, _fork: EngineSszFork, _payload_id: PayloadId, ) -> impl Future<Output = HttpResponse> + Send

Handles a getPayload request.

Source

fn forkchoice_updated( &self, _fork: EngineSszFork, _body: Bytes, ) -> impl Future<Output = HttpResponse> + Send

Handles a forkchoice update request.

Source

fn get_payload_bodies_by_hash( &self, _fork: EngineSszFork, _hashes: Vec<B256>, ) -> impl Future<Output = HttpResponse> + Send

Handles a getPayloadBodiesByHash request.

Source

fn get_payload_bodies_by_range( &self, _fork: EngineSszFork, _start: u64, _count: u64, ) -> impl Future<Output = HttpResponse> + Send

Handles a getPayloadBodiesByRange request.

Source

fn get_blobs( &self, _version: u8, _body: Bytes, ) -> impl Future<Output = HttpResponse> + Send

Handles a getBlobs request.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl EngineSszApi for NoopEngineApi

Source§

impl<Provider, Pool, Validator, ChainSpec> EngineSszApi for EngineApi<Provider, EthEngineTypes, Pool, Validator, ChainSpec>
where Provider: HeaderProvider + BlockReader + StateProviderFactory + BalProvider + 'static, Pool: TransactionPool + 'static, Validator: EngineApiValidator<EthEngineTypes>, ChainSpec: EthereumHardforks + Send + Sync + 'static,

Source§

fn capabilities(&self, witness_enabled: bool) -> HttpResponse

Source§

fn identity(&self) -> HttpResponse

Source§

async fn new_payload(&self, fork: EngineSszFork, body: Bytes) -> HttpResponse

Source§

fn supports_witness(&self) -> bool

Source§

async fn new_payload_with_witness( &self, body: Bytes, witness_handler: Arc<dyn EngineSszWitness>, ) -> HttpResponse

Source§

async fn get_payload( &self, fork: EngineSszFork, payload_id: PayloadId, ) -> HttpResponse

Source§

async fn forkchoice_updated( &self, fork: EngineSszFork, body: Bytes, ) -> HttpResponse

Source§

async fn get_payload_bodies_by_hash( &self, fork: EngineSszFork, hashes: Vec<B256>, ) -> HttpResponse

Source§

async fn get_payload_bodies_by_range( &self, fork: EngineSszFork, start: u64, count: u64, ) -> HttpResponse

Source§

async fn get_blobs(&self, version: u8, body: Bytes) -> HttpResponse

Implementors§