pub trait EngineApi<N, T>: Send + Sync {
Show 15 methods
// Required methods
fn new_payload_v1<'life0, 'async_trait>(
&'life0 self,
payload: ExecutionPayloadV1,
) -> Pin<Box<dyn Future<Output = TransportResult<PayloadStatus>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn new_payload_v2<'life0, 'async_trait>(
&'life0 self,
payload: ExecutionPayloadInputV2,
) -> Pin<Box<dyn Future<Output = TransportResult<PayloadStatus>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn new_payload_v3<'life0, 'async_trait>(
&'life0 self,
payload: ExecutionPayloadV3,
versioned_hashes: Vec<B256>,
parent_beacon_block_root: B256,
) -> Pin<Box<dyn Future<Output = TransportResult<PayloadStatus>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn new_payload_v4<'life0, 'async_trait>(
&'life0 self,
payload: ExecutionPayloadV3,
versioned_hashes: Vec<B256>,
parent_beacon_block_root: B256,
execution_requests: Vec<Bytes>,
) -> Pin<Box<dyn Future<Output = TransportResult<PayloadStatus>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn fork_choice_updated_v1<'life0, 'async_trait>(
&'life0 self,
fork_choice_state: ForkchoiceState,
payload_attributes: Option<PayloadAttributes>,
) -> Pin<Box<dyn Future<Output = TransportResult<ForkchoiceUpdated>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn fork_choice_updated_v2<'life0, 'async_trait>(
&'life0 self,
fork_choice_state: ForkchoiceState,
payload_attributes: Option<PayloadAttributes>,
) -> Pin<Box<dyn Future<Output = TransportResult<ForkchoiceUpdated>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn fork_choice_updated_v3<'life0, 'async_trait>(
&'life0 self,
fork_choice_state: ForkchoiceState,
payload_attributes: Option<PayloadAttributes>,
) -> Pin<Box<dyn Future<Output = TransportResult<ForkchoiceUpdated>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_payload_v1<'life0, 'async_trait>(
&'life0 self,
payload_id: PayloadId,
) -> Pin<Box<dyn Future<Output = TransportResult<ExecutionPayloadV1>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_payload_v2<'life0, 'async_trait>(
&'life0 self,
payload_id: PayloadId,
) -> Pin<Box<dyn Future<Output = TransportResult<ExecutionPayloadEnvelopeV2>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_payload_v3<'life0, 'async_trait>(
&'life0 self,
payload_id: PayloadId,
) -> Pin<Box<dyn Future<Output = TransportResult<ExecutionPayloadEnvelopeV3>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_payload_v4<'life0, 'async_trait>(
&'life0 self,
payload_id: PayloadId,
) -> Pin<Box<dyn Future<Output = TransportResult<ExecutionPayloadEnvelopeV4>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_payload_bodies_by_hash_v1<'life0, 'async_trait>(
&'life0 self,
block_hashes: Vec<BlockHash>,
) -> Pin<Box<dyn Future<Output = TransportResult<ExecutionPayloadBodiesV1>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_payload_bodies_by_range_v1<'life0, 'async_trait>(
&'life0 self,
start: u64,
count: u64,
) -> Pin<Box<dyn Future<Output = TransportResult<ExecutionPayloadBodiesV1>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_client_version_v1<'life0, 'async_trait>(
&'life0 self,
client_version: ClientVersionV1,
) -> Pin<Box<dyn Future<Output = TransportResult<Vec<ClientVersionV1>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn exchange_capabilities<'life0, 'async_trait>(
&'life0 self,
capabilities: Vec<String>,
) -> Pin<Box<dyn Future<Output = TransportResult<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
engine-api
only.Expand description
Extension trait that gives access to engine API RPC methods.
Note:
The provider should use a JWT authentication layer.
Required Methods§
Sourcefn new_payload_v1<'life0, 'async_trait>(
&'life0 self,
payload: ExecutionPayloadV1,
) -> Pin<Box<dyn Future<Output = TransportResult<PayloadStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn new_payload_v1<'life0, 'async_trait>(
&'life0 self,
payload: ExecutionPayloadV1,
) -> Pin<Box<dyn Future<Output = TransportResult<PayloadStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends the given payload to the execution layer client, as specified for the Paris fork.
Caution: This should not accept the withdrawals
field
Sourcefn new_payload_v2<'life0, 'async_trait>(
&'life0 self,
payload: ExecutionPayloadInputV2,
) -> Pin<Box<dyn Future<Output = TransportResult<PayloadStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn new_payload_v2<'life0, 'async_trait>(
&'life0 self,
payload: ExecutionPayloadInputV2,
) -> Pin<Box<dyn Future<Output = TransportResult<PayloadStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends the given payload to the execution layer client, as specified for the Shanghai fork.
Sourcefn new_payload_v3<'life0, 'async_trait>(
&'life0 self,
payload: ExecutionPayloadV3,
versioned_hashes: Vec<B256>,
parent_beacon_block_root: B256,
) -> Pin<Box<dyn Future<Output = TransportResult<PayloadStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn new_payload_v3<'life0, 'async_trait>(
&'life0 self,
payload: ExecutionPayloadV3,
versioned_hashes: Vec<B256>,
parent_beacon_block_root: B256,
) -> Pin<Box<dyn Future<Output = TransportResult<PayloadStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends the given payload to the execution layer client, as specified for the Cancun fork.
See also https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#engine_newpayloadv3
Sourcefn new_payload_v4<'life0, 'async_trait>(
&'life0 self,
payload: ExecutionPayloadV3,
versioned_hashes: Vec<B256>,
parent_beacon_block_root: B256,
execution_requests: Vec<Bytes>,
) -> Pin<Box<dyn Future<Output = TransportResult<PayloadStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn new_payload_v4<'life0, 'async_trait>(
&'life0 self,
payload: ExecutionPayloadV3,
versioned_hashes: Vec<B256>,
parent_beacon_block_root: B256,
execution_requests: Vec<Bytes>,
) -> Pin<Box<dyn Future<Output = TransportResult<PayloadStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends the given payload to the execution layer client, as specified for the Prague fork.
Sourcefn fork_choice_updated_v1<'life0, 'async_trait>(
&'life0 self,
fork_choice_state: ForkchoiceState,
payload_attributes: Option<PayloadAttributes>,
) -> Pin<Box<dyn Future<Output = TransportResult<ForkchoiceUpdated>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fork_choice_updated_v1<'life0, 'async_trait>(
&'life0 self,
fork_choice_state: ForkchoiceState,
payload_attributes: Option<PayloadAttributes>,
) -> Pin<Box<dyn Future<Output = TransportResult<ForkchoiceUpdated>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Updates the execution layer client with the given fork choice, as specified for the Paris fork.
Caution: This should not accept the withdrawals
field in the payload attributes.
Sourcefn fork_choice_updated_v2<'life0, 'async_trait>(
&'life0 self,
fork_choice_state: ForkchoiceState,
payload_attributes: Option<PayloadAttributes>,
) -> Pin<Box<dyn Future<Output = TransportResult<ForkchoiceUpdated>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fork_choice_updated_v2<'life0, 'async_trait>(
&'life0 self,
fork_choice_state: ForkchoiceState,
payload_attributes: Option<PayloadAttributes>,
) -> Pin<Box<dyn Future<Output = TransportResult<ForkchoiceUpdated>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Updates the execution layer client with the given fork choice, as specified for the Shanghai fork.
Caution: This should not accept the parentBeaconBlockRoot
field in the payload attributes.
Sourcefn fork_choice_updated_v3<'life0, 'async_trait>(
&'life0 self,
fork_choice_state: ForkchoiceState,
payload_attributes: Option<PayloadAttributes>,
) -> Pin<Box<dyn Future<Output = TransportResult<ForkchoiceUpdated>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fork_choice_updated_v3<'life0, 'async_trait>(
&'life0 self,
fork_choice_state: ForkchoiceState,
payload_attributes: Option<PayloadAttributes>,
) -> Pin<Box<dyn Future<Output = TransportResult<ForkchoiceUpdated>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Updates the execution layer client with the given fork choice, as specified for the Cancun fork.
See also https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#engine_forkchoiceupdatedv3
Sourcefn get_payload_v1<'life0, 'async_trait>(
&'life0 self,
payload_id: PayloadId,
) -> Pin<Box<dyn Future<Output = TransportResult<ExecutionPayloadV1>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_payload_v1<'life0, 'async_trait>(
&'life0 self,
payload_id: PayloadId,
) -> Pin<Box<dyn Future<Output = TransportResult<ExecutionPayloadV1>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves an execution payload from a previously started build process, as specified for the Paris fork.
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<'life0, 'async_trait>(
&'life0 self,
payload_id: PayloadId,
) -> Pin<Box<dyn Future<Output = TransportResult<ExecutionPayloadEnvelopeV2>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_payload_v2<'life0, 'async_trait>(
&'life0 self,
payload_id: PayloadId,
) -> Pin<Box<dyn Future<Output = TransportResult<ExecutionPayloadEnvelopeV2>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves an execution payload from a previously started build process, as specified for the Shanghai fork.
Note:
Provider software MAY stop the corresponding build process after serving this call.
Sourcefn get_payload_v3<'life0, 'async_trait>(
&'life0 self,
payload_id: PayloadId,
) -> Pin<Box<dyn Future<Output = TransportResult<ExecutionPayloadEnvelopeV3>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_payload_v3<'life0, 'async_trait>(
&'life0 self,
payload_id: PayloadId,
) -> Pin<Box<dyn Future<Output = TransportResult<ExecutionPayloadEnvelopeV3>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves an execution payload from a previously started build process, as specified for the Cancun fork.
See also https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#engine_getpayloadv3
Note:
Provider software MAY stop the corresponding build process after serving this call.
Sourcefn get_payload_v4<'life0, 'async_trait>(
&'life0 self,
payload_id: PayloadId,
) -> Pin<Box<dyn Future<Output = TransportResult<ExecutionPayloadEnvelopeV4>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_payload_v4<'life0, 'async_trait>(
&'life0 self,
payload_id: PayloadId,
) -> Pin<Box<dyn Future<Output = TransportResult<ExecutionPayloadEnvelopeV4>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the most recent version of the payload that is available in the corresponding payload build process at the time of receiving this call.
See also https://github.com/ethereum/execution-apis/blob/main/src/engine/prague.md#engine_getpayloadv4
Note:
Provider software MAY stop the corresponding build process after serving this call.
Sourcefn get_payload_bodies_by_hash_v1<'life0, 'async_trait>(
&'life0 self,
block_hashes: Vec<BlockHash>,
) -> Pin<Box<dyn Future<Output = TransportResult<ExecutionPayloadBodiesV1>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_payload_bodies_by_hash_v1<'life0, 'async_trait>(
&'life0 self,
block_hashes: Vec<BlockHash>,
) -> Pin<Box<dyn Future<Output = TransportResult<ExecutionPayloadBodiesV1>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the execution payload bodies by the given hash.
Sourcefn get_payload_bodies_by_range_v1<'life0, 'async_trait>(
&'life0 self,
start: u64,
count: u64,
) -> Pin<Box<dyn Future<Output = TransportResult<ExecutionPayloadBodiesV1>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_payload_bodies_by_range_v1<'life0, 'async_trait>(
&'life0 self,
start: u64,
count: u64,
) -> Pin<Box<dyn Future<Output = TransportResult<ExecutionPayloadBodiesV1>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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<'life0, 'async_trait>(
&'life0 self,
client_version: ClientVersionV1,
) -> Pin<Box<dyn Future<Output = TransportResult<Vec<ClientVersionV1>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_client_version_v1<'life0, 'async_trait>(
&'life0 self,
client_version: ClientVersionV1,
) -> Pin<Box<dyn Future<Output = TransportResult<Vec<ClientVersionV1>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the execution client version information.
Note:
The
client_version
parameter identifies the consensus client.
Sourcefn exchange_capabilities<'life0, 'async_trait>(
&'life0 self,
capabilities: Vec<String>,
) -> Pin<Box<dyn Future<Output = TransportResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exchange_capabilities<'life0, 'async_trait>(
&'life0 self,
capabilities: Vec<String>,
) -> Pin<Box<dyn Future<Output = TransportResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the list of Engine API methods supported by the execution layer client software.