pub trait EngineApiClient<Engine>: ClientT{
Show 18 methods
// Provided methods
fn new_payload_v1(
&self,
payload: ExecutionPayloadV1,
) -> impl Future<Output = Result<PayloadStatus, Error>> + Send { ... }
fn new_payload_v2(
&self,
payload: ExecutionPayloadInputV2,
) -> impl Future<Output = Result<PayloadStatus, Error>> + Send { ... }
fn new_payload_v3(
&self,
payload: ExecutionPayloadV3,
versioned_hashes: Vec<FixedBytes<32>>,
parent_beacon_block_root: FixedBytes<32>,
) -> impl Future<Output = Result<PayloadStatus, Error>> + Send { ... }
fn new_payload_v4(
&self,
payload: ExecutionPayloadV3,
versioned_hashes: Vec<FixedBytes<32>>,
parent_beacon_block_root: FixedBytes<32>,
execution_requests: RequestsOrHash,
) -> impl Future<Output = Result<PayloadStatus, Error>> + Send { ... }
fn fork_choice_updated_v1(
&self,
fork_choice_state: ForkchoiceState,
payload_attributes: Option<<Engine as PayloadTypes>::PayloadAttributes>,
) -> impl Future<Output = Result<ForkchoiceUpdated, Error>> + Send { ... }
fn fork_choice_updated_v2(
&self,
fork_choice_state: ForkchoiceState,
payload_attributes: Option<<Engine as PayloadTypes>::PayloadAttributes>,
) -> impl Future<Output = Result<ForkchoiceUpdated, Error>> + Send { ... }
fn fork_choice_updated_v3(
&self,
fork_choice_state: ForkchoiceState,
payload_attributes: Option<<Engine as PayloadTypes>::PayloadAttributes>,
) -> impl Future<Output = Result<ForkchoiceUpdated, Error>> + Send { ... }
fn get_payload_v1(
&self,
payload_id: PayloadId,
) -> impl Future<Output = Result<<Engine as EngineTypes>::ExecutionPayloadEnvelopeV1, Error>> + Send { ... }
fn get_payload_v2(
&self,
payload_id: PayloadId,
) -> impl Future<Output = Result<<Engine as EngineTypes>::ExecutionPayloadEnvelopeV2, Error>> + Send { ... }
fn get_payload_v3(
&self,
payload_id: PayloadId,
) -> impl Future<Output = Result<<Engine as EngineTypes>::ExecutionPayloadEnvelopeV3, Error>> + Send { ... }
fn get_payload_v4(
&self,
payload_id: PayloadId,
) -> impl Future<Output = Result<<Engine as EngineTypes>::ExecutionPayloadEnvelopeV4, Error>> + Send { ... }
fn get_payload_v5(
&self,
payload_id: PayloadId,
) -> impl Future<Output = Result<<Engine as EngineTypes>::ExecutionPayloadEnvelopeV5, Error>> + Send { ... }
fn get_payload_bodies_by_hash_v1(
&self,
block_hashes: Vec<FixedBytes<32>>,
) -> impl Future<Output = Result<Vec<Option<ExecutionPayloadBodyV1>>, Error>> + Send { ... }
fn get_payload_bodies_by_range_v1(
&self,
start: Uint<64, 1>,
count: Uint<64, 1>,
) -> impl Future<Output = Result<Vec<Option<ExecutionPayloadBodyV1>>, Error>> + Send { ... }
fn get_client_version_v1(
&self,
client_version: ClientVersionV1,
) -> impl Future<Output = Result<Vec<ClientVersionV1>, Error>> + Send { ... }
fn exchange_capabilities(
&self,
capabilities: Vec<String>,
) -> impl Future<Output = Result<Vec<String>, Error>> + Send { ... }
fn get_blobs_v1(
&self,
versioned_hashes: Vec<FixedBytes<32>>,
) -> impl Future<Output = Result<Vec<Option<BlobAndProofV1>>, Error>> + Send { ... }
fn get_blobs_v2(
&self,
versioned_hashes: Vec<FixedBytes<32>>,
) -> impl Future<Output = Result<Option<Vec<BlobAndProofV2>>, Error>> + Send { ... }
}
Expand description
Client implementation for the EngineApi
RPC API.
Provided Methods§
Sourcefn new_payload_v1(
&self,
payload: ExecutionPayloadV1,
) -> impl Future<Output = Result<PayloadStatus, Error>> + Send
fn new_payload_v1( &self, payload: ExecutionPayloadV1, ) -> impl Future<Output = Result<PayloadStatus, Error>> + Send
See also https://github.com/ethereum/execution-apis/blob/6709c2a795b707202e93c4f2867fa0bf2640a84f/src/engine/paris.md#engine_newpayloadv1
Caution: This should not accept the withdrawals
field
Sourcefn new_payload_v2(
&self,
payload: ExecutionPayloadInputV2,
) -> impl Future<Output = Result<PayloadStatus, Error>> + Send
fn new_payload_v2( &self, payload: ExecutionPayloadInputV2, ) -> impl Future<Output = Result<PayloadStatus, Error>> + Send
Sourcefn new_payload_v3(
&self,
payload: ExecutionPayloadV3,
versioned_hashes: Vec<FixedBytes<32>>,
parent_beacon_block_root: FixedBytes<32>,
) -> impl Future<Output = Result<PayloadStatus, Error>> + Send
fn new_payload_v3( &self, payload: ExecutionPayloadV3, versioned_hashes: Vec<FixedBytes<32>>, parent_beacon_block_root: FixedBytes<32>, ) -> impl Future<Output = Result<PayloadStatus, Error>> + Send
Post Cancun payload handler
See also https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#engine_newpayloadv3
Sourcefn new_payload_v4(
&self,
payload: ExecutionPayloadV3,
versioned_hashes: Vec<FixedBytes<32>>,
parent_beacon_block_root: FixedBytes<32>,
execution_requests: RequestsOrHash,
) -> impl Future<Output = Result<PayloadStatus, Error>> + Send
fn new_payload_v4( &self, payload: ExecutionPayloadV3, versioned_hashes: Vec<FixedBytes<32>>, parent_beacon_block_root: FixedBytes<32>, execution_requests: RequestsOrHash, ) -> impl Future<Output = Result<PayloadStatus, Error>> + Send
Post Prague payload handler
See also https://github.com/ethereum/execution-apis/blob/main/src/engine/prague.md#engine_newpayloadv4
Sourcefn fork_choice_updated_v1(
&self,
fork_choice_state: ForkchoiceState,
payload_attributes: Option<<Engine as PayloadTypes>::PayloadAttributes>,
) -> impl Future<Output = Result<ForkchoiceUpdated, Error>> + Send
fn fork_choice_updated_v1( &self, fork_choice_state: ForkchoiceState, payload_attributes: Option<<Engine as PayloadTypes>::PayloadAttributes>, ) -> impl Future<Output = Result<ForkchoiceUpdated, Error>> + Send
Caution: This should not accept the withdrawals
field in the payload attributes.
Sourcefn fork_choice_updated_v2(
&self,
fork_choice_state: ForkchoiceState,
payload_attributes: Option<<Engine as PayloadTypes>::PayloadAttributes>,
) -> impl Future<Output = Result<ForkchoiceUpdated, Error>> + Send
fn fork_choice_updated_v2( &self, fork_choice_state: ForkchoiceState, payload_attributes: Option<<Engine as PayloadTypes>::PayloadAttributes>, ) -> impl Future<Output = Result<ForkchoiceUpdated, Error>> + Send
Post Shanghai forkchoice update handler
This is the same as forkchoiceUpdatedV1
, but expects an additional withdrawals
field in
the payloadAttributes
, if payload attributes are provided.
Caution: This should not accept the parentBeaconBlockRoot
field in the payload
attributes.
Sourcefn fork_choice_updated_v3(
&self,
fork_choice_state: ForkchoiceState,
payload_attributes: Option<<Engine as PayloadTypes>::PayloadAttributes>,
) -> impl Future<Output = Result<ForkchoiceUpdated, Error>> + Send
fn fork_choice_updated_v3( &self, fork_choice_state: ForkchoiceState, payload_attributes: Option<<Engine as PayloadTypes>::PayloadAttributes>, ) -> impl Future<Output = Result<ForkchoiceUpdated, Error>> + Send
Post Cancun forkchoice update handler
This is the same as forkchoiceUpdatedV2
, but expects an additional
parentBeaconBlockRoot
field in the payloadAttributes
, if payload attributes
are provided.
See also https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#engine_forkchoiceupdatedv3
Sourcefn get_payload_v1(
&self,
payload_id: PayloadId,
) -> impl Future<Output = Result<<Engine as EngineTypes>::ExecutionPayloadEnvelopeV1, Error>> + Send
fn get_payload_v1( &self, payload_id: PayloadId, ) -> impl Future<Output = Result<<Engine as EngineTypes>::ExecutionPayloadEnvelopeV1, Error>> + Send
Returns the most recent version of the payload that is available in the corresponding payload build process at the time of receiving this call.
Caution: This should not return the withdrawals
field
Note:
Provider software MAY stop the corresponding build process after serving this call.
Sourcefn get_payload_v2(
&self,
payload_id: PayloadId,
) -> impl Future<Output = Result<<Engine as EngineTypes>::ExecutionPayloadEnvelopeV2, Error>> + Send
fn get_payload_v2( &self, payload_id: PayloadId, ) -> impl Future<Output = Result<<Engine as EngineTypes>::ExecutionPayloadEnvelopeV2, Error>> + Send
Returns the most recent version of the payload that is available in the corresponding payload build process at the time of receiving this call. Note:
Provider software MAY stop the corresponding build process after serving this call.
Sourcefn get_payload_v3(
&self,
payload_id: PayloadId,
) -> impl Future<Output = Result<<Engine as EngineTypes>::ExecutionPayloadEnvelopeV3, Error>> + Send
fn get_payload_v3( &self, payload_id: PayloadId, ) -> impl Future<Output = Result<<Engine as EngineTypes>::ExecutionPayloadEnvelopeV3, Error>> + Send
Post Cancun payload handler which also returns a blobs bundle.
See also https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#engine_getpayloadv3
Returns the most recent version of the payload that is available in the corresponding payload build process at the time of receiving this call. Note:
Provider software MAY stop the corresponding build process after serving this call.
Sourcefn get_payload_v4(
&self,
payload_id: PayloadId,
) -> impl Future<Output = Result<<Engine as EngineTypes>::ExecutionPayloadEnvelopeV4, Error>> + Send
fn get_payload_v4( &self, payload_id: PayloadId, ) -> impl Future<Output = Result<<Engine as EngineTypes>::ExecutionPayloadEnvelopeV4, Error>> + Send
Post Prague payload handler.
See also https://github.com/ethereum/execution-apis/blob/main/src/engine/prague.md#engine_getpayloadv4
Returns the most recent version of the payload that is available in the corresponding payload build process at the time of receiving this call. Note:
Provider software MAY stop the corresponding build process after serving this call.
Sourcefn get_payload_v5(
&self,
payload_id: PayloadId,
) -> impl Future<Output = Result<<Engine as EngineTypes>::ExecutionPayloadEnvelopeV5, Error>> + Send
fn get_payload_v5( &self, payload_id: PayloadId, ) -> impl Future<Output = Result<<Engine as EngineTypes>::ExecutionPayloadEnvelopeV5, Error>> + Send
Post Osaka payload handler.
Returns the most recent version of the payload that is available in the corresponding payload build process at the time of receiving this call. Note:
Provider software MAY stop the corresponding build process after serving this call.
Sourcefn get_payload_bodies_by_hash_v1(
&self,
block_hashes: Vec<FixedBytes<32>>,
) -> impl Future<Output = Result<Vec<Option<ExecutionPayloadBodyV1>>, Error>> + Send
fn get_payload_bodies_by_hash_v1( &self, block_hashes: Vec<FixedBytes<32>>, ) -> impl Future<Output = Result<Vec<Option<ExecutionPayloadBodyV1>>, Error>> + Send
Sourcefn get_payload_bodies_by_range_v1(
&self,
start: Uint<64, 1>,
count: Uint<64, 1>,
) -> impl Future<Output = Result<Vec<Option<ExecutionPayloadBodyV1>>, Error>> + Send
fn get_payload_bodies_by_range_v1( &self, start: Uint<64, 1>, count: Uint<64, 1>, ) -> impl Future<Output = Result<Vec<Option<ExecutionPayloadBodyV1>>, Error>> + Send
Returns the execution payload bodies by the range starting at start
, containing count
blocks.
WARNING: This method is associated with the BeaconBlocksByRange message in the consensus layer p2p specification, meaning the input should be treated as untrusted or potentially adversarial.
Implementers should take care when acting on the input to this method, specifically ensuring that the range is limited properly, and that the range boundaries are computed correctly and without panics.
Sourcefn get_client_version_v1(
&self,
client_version: ClientVersionV1,
) -> impl Future<Output = Result<Vec<ClientVersionV1>, Error>> + Send
fn get_client_version_v1( &self, client_version: ClientVersionV1, ) -> impl Future<Output = Result<Vec<ClientVersionV1>, Error>> + Send
This function will return the ClientVersionV1 object. See also: https://github.com/ethereum/execution-apis/blob/03911ffc053b8b806123f1fc237184b0092a485a/src/engine/identification.md#engine_getclientversionv1make fmt
- When connected to a single execution client, the consensus client MUST receive an
array with a single
ClientVersionV1
object. - When connected to multiple execution clients via a multiplexer, the multiplexer MUST concatenate the responses from each execution client into a single, flat array before returning the response to the consensus client.
Sourcefn exchange_capabilities(
&self,
capabilities: Vec<String>,
) -> impl Future<Output = Result<Vec<String>, Error>> + Send
fn exchange_capabilities( &self, capabilities: Vec<String>, ) -> impl Future<Output = Result<Vec<String>, Error>> + Send
Sourcefn get_blobs_v1(
&self,
versioned_hashes: Vec<FixedBytes<32>>,
) -> impl Future<Output = Result<Vec<Option<BlobAndProofV1>>, Error>> + Send
fn get_blobs_v1( &self, versioned_hashes: Vec<FixedBytes<32>>, ) -> impl Future<Output = Result<Vec<Option<BlobAndProofV1>>, Error>> + Send
Fetch blobs for the consensus layer from the blob store.
Sourcefn get_blobs_v2(
&self,
versioned_hashes: Vec<FixedBytes<32>>,
) -> impl Future<Output = Result<Option<Vec<BlobAndProofV2>>, Error>> + Send
fn get_blobs_v2( &self, versioned_hashes: Vec<FixedBytes<32>>, ) -> impl Future<Output = Result<Option<Vec<BlobAndProofV2>>, Error>> + Send
Fetch blobs for the consensus layer from the blob store.
Returns a response only if blobs and proofs are present for all of the versioned hashes: 2. Client software MUST return null in case of any missing or older version blobs.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.