mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-02 04:03:35 +00:00
Gloas engine api updates (#9150)
Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
This commit is contained in:
@@ -277,7 +277,8 @@ pub async fn handle_rpc<E: EthSpec>(
|
||||
| ENGINE_GET_PAYLOAD_V2
|
||||
| ENGINE_GET_PAYLOAD_V3
|
||||
| ENGINE_GET_PAYLOAD_V4
|
||||
| ENGINE_GET_PAYLOAD_V5 => {
|
||||
| ENGINE_GET_PAYLOAD_V5
|
||||
| ENGINE_GET_PAYLOAD_V6 => {
|
||||
let request: JsonPayloadIdRequest =
|
||||
get_param(params, 0).map_err(|s| (s, BAD_PARAMS_ERROR_CODE))?;
|
||||
let id = request.into();
|
||||
@@ -363,7 +364,8 @@ pub async fn handle_rpc<E: EthSpec>(
|
||||
&& (method == ENGINE_GET_PAYLOAD_V1
|
||||
|| method == ENGINE_GET_PAYLOAD_V2
|
||||
|| method == ENGINE_GET_PAYLOAD_V3
|
||||
|| method == ENGINE_GET_PAYLOAD_V4)
|
||||
|| method == ENGINE_GET_PAYLOAD_V4
|
||||
|| method == ENGINE_GET_PAYLOAD_V5)
|
||||
{
|
||||
return Err((
|
||||
format!("{} called after Gloas fork!", method),
|
||||
@@ -455,13 +457,18 @@ pub async fn handle_rpc<E: EthSpec>(
|
||||
})
|
||||
.unwrap()
|
||||
}
|
||||
_ => unreachable!(),
|
||||
})
|
||||
}
|
||||
ENGINE_GET_PAYLOAD_V6 => {
|
||||
Ok(match JsonExecutionPayload::try_from(response).unwrap() {
|
||||
JsonExecutionPayload::Gloas(execution_payload) => {
|
||||
serde_json::to_value(JsonGetPayloadResponseGloas {
|
||||
execution_payload,
|
||||
block_value: Uint256::from(DEFAULT_MOCK_EL_PAYLOAD_VALUE_WEI),
|
||||
blobs_bundle: maybe_blobs
|
||||
.ok_or((
|
||||
"No blobs returned despite V5 Payload".to_string(),
|
||||
"No blobs returned despite V6 Payload".to_string(),
|
||||
GENERIC_ERROR_CODE,
|
||||
))?
|
||||
.into(),
|
||||
|
||||
@@ -55,6 +55,7 @@ pub const DEFAULT_ENGINE_CAPABILITIES: EngineCapabilities = EngineCapabilities {
|
||||
get_payload_v3: true,
|
||||
get_payload_v4: true,
|
||||
get_payload_v5: true,
|
||||
get_payload_v6: true,
|
||||
get_client_version_v1: true,
|
||||
get_blobs_v1: true,
|
||||
get_blobs_v2: true,
|
||||
|
||||
Reference in New Issue
Block a user