Skip to content

Commit ad766c0

Browse files
feat(engine): add engine_getPayloadV5 skeleton (#16270)
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
1 parent 4cbe87f commit ad766c0

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

crates/rpc/rpc-api/src/engine.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,19 @@ pub trait EngineApi<Engine: EngineTypes> {
166166
payload_id: PayloadId,
167167
) -> RpcResult<Engine::ExecutionPayloadEnvelopeV4>;
168168

169+
/// Post Osaka payload handler.
170+
///
171+
/// See also <https://github.com/ethereum/execution-apis/blob/15399c2e2f16a5f800bf3f285640357e2c245ad9/src/engine/osaka.md#engine_getpayloadv5>.
172+
///
173+
/// Returns the most recent version of the payload that is available in the corresponding
174+
/// payload build process at the time of receiving this call. Note:
175+
/// > Provider software MAY stop the corresponding build process after serving this call.
176+
#[method(name = "getPayloadV5")]
177+
async fn get_payload_v5(
178+
&self,
179+
payload_id: PayloadId,
180+
) -> RpcResult<Engine::ExecutionPayloadEnvelopeV5>;
181+
169182
/// See also <https://github.com/ethereum/execution-apis/blob/6452a6b194d7db269bf1dbd087a267251d3cc7f8/src/engine/shanghai.md#engine_getpayloadbodiesbyhashv1>
170183
#[method(name = "getPayloadBodiesByHashV1")]
171184
async fn get_payload_bodies_by_hash_v1(

crates/rpc/rpc-engine-api/src/engine_api.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,23 @@ where
10151015
Ok(self.get_payload_v4_metered(payload_id).await?)
10161016
}
10171017

1018+
/// Handler for `engine_getPayloadV5`
1019+
///
1020+
/// Returns the most recent version of the payload that is available in the corresponding
1021+
/// payload build process at the time of receiving this call.
1022+
///
1023+
/// See also <https://github.com/ethereum/execution-apis/blob/15399c2e2f16a5f800bf3f285640357e2c245ad9/src/engine/osaka.md#engine_getpayloadv5>
1024+
///
1025+
/// Note:
1026+
/// > Provider software MAY stop the corresponding build process after serving this call.
1027+
async fn get_payload_v5(
1028+
&self,
1029+
_payload_id: PayloadId,
1030+
) -> RpcResult<EngineT::ExecutionPayloadEnvelopeV5> {
1031+
trace!(target: "rpc::engine", "Serving engine_getPayloadV5");
1032+
Err(internal_rpc_err("unimplemented"))
1033+
}
1034+
10181035
/// Handler for `engine_getPayloadBodiesByHashV1`
10191036
/// See also <https://github.com/ethereum/execution-apis/blob/6452a6b194d7db269bf1dbd087a267251d3cc7f8/src/engine/shanghai.md#engine_getpayloadbodiesbyhashv1>
10201037
async fn get_payload_bodies_by_hash_v1(

0 commit comments

Comments
 (0)