Skip to main content

EngineSszApi

Trait EngineSszApi 

Source
pub trait EngineSszApi:
    Clone
    + Send
    + Sync
    + 'static {
    // Provided methods
    fn capabilities(&self, _witness_enabled: bool) -> Response<Body> { ... }
    fn supports_witness(&self) -> bool { ... }
    fn new_payload_with_witness(
        &self,
        _body: Bytes,
        _witness_handler: Arc<dyn EngineSszWitness>,
    ) -> impl Future<Output = Response<Body>> + Send { ... }
    fn identity(&self) -> Response<Body> { ... }
    fn new_payload(
        &self,
        _fork: EngineSszFork,
        _body: Bytes,
    ) -> impl Future<Output = Response<Body>> + Send { ... }
    fn get_payload(
        &self,
        _fork: EngineSszFork,
        _payload_id: PayloadId,
    ) -> impl Future<Output = Response<Body>> + Send { ... }
    fn forkchoice_updated(
        &self,
        _fork: EngineSszFork,
        _body: Bytes,
    ) -> impl Future<Output = Response<Body>> + Send { ... }
    fn get_payload_bodies_by_hash(
        &self,
        _fork: EngineSszFork,
        _hashes: Vec<FixedBytes<32>>,
    ) -> impl Future<Output = Response<Body>> + Send { ... }
    fn get_payload_bodies_by_range(
        &self,
        _fork: EngineSszFork,
        _start: u64,
        _count: u64,
    ) -> impl Future<Output = Response<Body>> + Send { ... }
    fn get_blobs(
        &self,
        _version: u8,
        _body: Bytes,
    ) -> impl Future<Output = Response<Body>> + Send { ... }
}
Available on crate features node-api and node only.
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) -> Response<Body>

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 = Response<Body>> + Send

Handles the experimental Amsterdam payload submission with a witness.

Source

fn identity(&self) -> Response<Body>

Returns the Engine API identity response.

Source

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

Handles a new payload request.

Source

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

Handles a getPayload request.

Source

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

Handles a forkchoice update request.

Source

fn get_payload_bodies_by_hash( &self, _fork: EngineSszFork, _hashes: Vec<FixedBytes<32>>, ) -> impl Future<Output = Response<Body>> + Send

Handles a getPayloadBodiesByHash request.

Source

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

Handles a getPayloadBodiesByRange request.

Source

fn get_blobs( &self, _version: u8, _body: Bytes, ) -> impl Future<Output = Response<Body>> + 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

Implementors§

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,