From 8fa11aa79288663348623d9b0f23b198d5a6019a Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Tue, 6 Feb 2024 05:37:28 +1100 Subject: [PATCH] Fix incorrect value set for `blobs_by_root_request` rpc limit. (#5181) * Fix incorrect value set for `blobs_by_root_request` rpc limit. --- consensus/types/src/chain_spec.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/consensus/types/src/chain_spec.rs b/consensus/types/src/chain_spec.rs index ebaec6370..a182c0f98 100644 --- a/consensus/types/src/chain_spec.rs +++ b/consensus/types/src/chain_spec.rs @@ -1,4 +1,5 @@ use crate::application_domain::{ApplicationDomain, APPLICATION_DOMAIN_BUILDER}; +use crate::blob_sidecar::BlobIdentifier; use crate::*; use int_to_bytes::int_to_bytes4; use serde::Deserialize; @@ -1292,8 +1293,13 @@ fn max_blocks_by_root_request_common(max_request_blocks: u64) -> usize { fn max_blobs_by_root_request_common(max_request_blob_sidecars: u64) -> usize { let max_request_blob_sidecars = max_request_blob_sidecars as usize; - RuntimeVariableList::::from_vec( - vec![Hash256::zero(); max_request_blob_sidecars], + let empty_blob_identifier = BlobIdentifier { + block_root: Hash256::zero(), + index: 0, + }; + + RuntimeVariableList::::from_vec( + vec![empty_blob_identifier; max_request_blob_sidecars], max_request_blob_sidecars, ) .as_ssz_bytes()