mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-31 21:27:12 +00:00
Cell Dissemination (Partial messages) (#8314)
- https://github.com/ethereum/consensus-specs/pull/4558 - https://eips.ethereum.org/EIPS/eip-8136 Co-Authored-By: Daniel Knopik <daniel@dknopik.de> Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com> Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
This commit is contained in:
@@ -64,6 +64,7 @@ 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_V3: &str = "engine_getBlobsV3";
|
||||
pub const ENGINE_GET_BLOBS_TIMEOUT: Duration = Duration::from_secs(1);
|
||||
|
||||
/// This error is returned during a `chainId` call by Geth.
|
||||
@@ -743,6 +744,20 @@ impl HttpJsonRpc {
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn get_blobs_v3<E: EthSpec>(
|
||||
&self,
|
||||
versioned_hashes: Vec<Hash256>,
|
||||
) -> Result<Option<Vec<BlobAndProofV3<E>>>, Error> {
|
||||
let params = json!([versioned_hashes]);
|
||||
|
||||
self.rpc_request(
|
||||
ENGINE_GET_BLOBS_V3,
|
||||
params,
|
||||
ENGINE_GET_BLOBS_TIMEOUT * self.execution_timeout_multiplier,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn get_block_by_number(
|
||||
&self,
|
||||
query: BlockByNumberQuery<'_>,
|
||||
@@ -1258,6 +1273,7 @@ impl HttpJsonRpc {
|
||||
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_blobs_v3: capabilities.contains(ENGINE_GET_BLOBS_V3),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -864,6 +864,9 @@ pub struct BlobAndProof<E: EthSpec> {
|
||||
pub proofs: KzgProofs<E>,
|
||||
}
|
||||
|
||||
/// A BlobAndProofV3 is just a BlobAndProofV2 that may also be `null` if unknown by the EL.
|
||||
pub type BlobAndProofV3<E> = Option<BlobAndProofV2<E>>;
|
||||
|
||||
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct JsonForkchoiceStateV1 {
|
||||
|
||||
Reference in New Issue
Block a user