merge conflicts

This commit is contained in:
Eitan Seri-Levi
2025-05-27 14:56:02 -07:00
358 changed files with 11552 additions and 6768 deletions

View File

@@ -61,6 +61,7 @@ pub const ENGINE_GET_CLIENT_VERSION_V1: &str = "engine_getClientVersionV1";
pub const ENGINE_GET_CLIENT_VERSION_TIMEOUT: Duration = Duration::from_secs(1);
pub const ENGINE_GET_BLOBS_V1: &str = "engine_getBlobsV1";
pub const ENGINE_GET_BLOBS_V2: &str = "engine_getBlobsV2";
pub const ENGINE_GET_BLOBS_TIMEOUT: Duration = Duration::from_secs(1);
pub const ENGINE_GET_INCLUSION_LIST_V1: &str = "engine_getInclusionListV1";
@@ -90,6 +91,7 @@ pub static LIGHTHOUSE_CAPABILITIES: &[&str] = &[
ENGINE_GET_PAYLOAD_BODIES_BY_RANGE_V1,
ENGINE_GET_CLIENT_VERSION_V1,
ENGINE_GET_BLOBS_V1,
ENGINE_GET_BLOBS_V2,
ENGINE_GET_INCLUSION_LIST_V1,
];
@@ -712,7 +714,7 @@ impl HttpJsonRpc {
}
}
pub async fn get_blobs<E: EthSpec>(
pub async fn get_blobs_v1<E: EthSpec>(
&self,
versioned_hashes: Vec<Hash256>,
) -> Result<Vec<Option<BlobAndProofV1<E>>>, Error> {
@@ -726,6 +728,20 @@ impl HttpJsonRpc {
.await
}
pub async fn get_blobs_v2<E: EthSpec>(
&self,
versioned_hashes: Vec<Hash256>,
) -> Result<Vec<Option<BlobAndProofV2<E>>>, Error> {
let params = json!([versioned_hashes]);
self.rpc_request(
ENGINE_GET_BLOBS_V2,
params,
ENGINE_GET_BLOBS_TIMEOUT * self.execution_timeout_multiplier,
)
.await
}
pub async fn update_payload_with_inclusion_list<E: EthSpec>(&self) {}
pub async fn get_inclusion_list<E: EthSpec>(
@@ -884,7 +900,7 @@ impl HttpJsonRpc {
pub async fn new_payload_v5_fulu<E: EthSpec>(
&self,
new_payload_request_fulu: NewPayloadRequestFulu<'_, E>,
_new_payload_request_fulu: NewPayloadRequestFulu<'_, E>,
) -> Result<PayloadStatusV1, Error> {
unreachable!("new payload fulu");
// // TODO(focil) clean this up?
@@ -1025,19 +1041,6 @@ impl HttpJsonRpc {
.try_into()
.map_err(Error::BadResponse)
}
// TODO(fulu): remove when v5 method is ready.
ForkName::Fulu => {
let response: JsonGetPayloadResponseV5<E> = self
.rpc_request(
ENGINE_GET_PAYLOAD_V4,
params,
ENGINE_GET_PAYLOAD_TIMEOUT * self.execution_timeout_multiplier,
)
.await?;
JsonGetPayloadResponse::V5(response)
.try_into()
.map_err(Error::BadResponse)
}
_ => Err(Error::UnsupportedForkVariant(format!(
"called get_payload_v4 with {}",
fork_name
@@ -1210,6 +1213,7 @@ impl HttpJsonRpc {
get_payload_v5: capabilities.contains(ENGINE_GET_PAYLOAD_V5),
get_client_version_v1: capabilities.contains(ENGINE_GET_CLIENT_VERSION_V1),
get_blobs_v1: capabilities.contains(ENGINE_GET_BLOBS_V1),
get_blobs_v2: capabilities.contains(ENGINE_GET_BLOBS_V2),
get_inclusion_list_v1: capabilities.contains(ENGINE_GET_INCLUSION_LIST_V1),
})
}
@@ -1397,9 +1401,8 @@ impl HttpJsonRpc {
}
}
ForkName::Fulu => {
// TODO(fulu): switch to v5 when the EL is ready
if engine_capabilities.get_payload_v4 {
self.get_payload_v4(fork_name, payload_id).await
if engine_capabilities.get_payload_v5 {
self.get_payload_v5(fork_name, payload_id).await
} else {
Err(Error::RequiredMethodUnsupported("engine_getPayloadv5"))
}