feat: _V3 engine api skeletons (#3931)

This commit is contained in:
Matthias Seitz
2023-07-26 18:39:38 +02:00
committed by GitHub
parent 0cfc424291
commit 96b108f25a
3 changed files with 45 additions and 1 deletions

View File

@@ -21,6 +21,17 @@ pub trait EngineApi {
#[method(name = "newPayloadV2")]
async fn new_payload_v2(&self, payload: ExecutionPayload) -> RpcResult<PayloadStatus>;
/// Post Cancun payload handler
///
/// See also <https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#engine_newpayloadv3>
#[method(name = "newPayloadV3")]
async fn new_payload_v3(
&self,
payload: ExecutionPayload,
versioned_hashes: Vec<H256>,
parent_beacon_block_root: H256,
) -> RpcResult<PayloadStatus>;
/// See also <https://github.com/ethereum/execution-apis/blob/6709c2a795b707202e93c4f2867fa0bf2640a84f/src/engine/paris.md#engine_forkchoiceupdatedv1>
///
/// Caution: This should not accept the `withdrawals` field
@@ -59,6 +70,14 @@ pub trait EngineApi {
#[method(name = "getPayloadV2")]
async fn get_payload_v2(&self, payload_id: PayloadId) -> RpcResult<ExecutionPayloadEnvelope>;
/// Post Cancun payload handler which also returns a blobs bundle.
///
/// 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.
#[method(name = "getPayloadV3")]
async fn get_payload_v3(&self, payload_id: PayloadId) -> RpcResult<ExecutionPayloadEnvelope>;
/// See also <https://github.com/ethereum/execution-apis/blob/6452a6b194d7db269bf1dbd087a267251d3cc7f8/src/engine/shanghai.md#engine_getpayloadbodiesbyhashv1>
#[method(name = "getPayloadBodiesByHashV1")]
async fn get_payload_bodies_by_hash_v1(