Breakup RPCBlock into LookupBlock & RangeSyncBlock (#8860)

Co-Authored-By: Mark Mackey <mark@sigmaprime.io>
This commit is contained in:
ethDreamer
2026-03-13 14:22:29 -05:00
committed by GitHub
parent 02137492f3
commit 6ca610d918
25 changed files with 505 additions and 669 deletions

View File

@@ -19,7 +19,7 @@ use crate::sync::manager::BatchProcessResult;
use crate::sync::network_context::{
RangeRequestId, RpcRequestSendError, RpcResponseError, SyncNetworkContext,
};
use beacon_chain::block_verification_types::RpcBlock;
use beacon_chain::block_verification_types::RangeSyncBlock;
use beacon_chain::{BeaconChain, BeaconChainTypes};
use lighthouse_network::service::api_types::Id;
use lighthouse_network::types::{BackFillState, NetworkGlobals};
@@ -55,7 +55,7 @@ const MAX_BATCH_DOWNLOAD_ATTEMPTS: u8 = 10;
/// after `MAX_BATCH_PROCESSING_ATTEMPTS` times, it is considered faulty.
const MAX_BATCH_PROCESSING_ATTEMPTS: u8 = 10;
type RpcBlocks<E> = Vec<RpcBlock<E>>;
type RpcBlocks<E> = Vec<RangeSyncBlock<E>>;
type BackFillBatchInfo<E> = BatchInfo<E, BackFillBatchConfig<E>, RpcBlocks<E>>;
@@ -390,7 +390,7 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
batch_id: BatchId,
peer_id: &PeerId,
request_id: Id,
blocks: Vec<RpcBlock<T::EthSpec>>,
blocks: Vec<RangeSyncBlock<T::EthSpec>>,
) -> Result<ProcessResult, BackFillError> {
// check if we have this batch
let Some(batch) = self.batches.get_mut(&batch_id) else {

View File

@@ -1,4 +1,4 @@
use beacon_chain::block_verification_types::RpcBlock;
use beacon_chain::block_verification_types::RangeSyncBlock;
use educe::Educe;
use lighthouse_network::PeerId;
use lighthouse_network::rpc::methods::BlocksByRangeRequest;
@@ -449,7 +449,7 @@ impl<E: EthSpec, B: BatchConfig, D: Hash> BatchInfo<E, B, D> {
}
// BatchInfo implementations for RangeSync
impl<E: EthSpec, B: BatchConfig> BatchInfo<E, B, Vec<RpcBlock<E>>> {
impl<E: EthSpec, B: BatchConfig> BatchInfo<E, B, Vec<RangeSyncBlock<E>>> {
/// Returns a BlocksByRange request associated with the batch.
pub fn to_blocks_by_range_request(&self) -> (BlocksByRangeRequest, ByRangeRequestType) {
(

View File

@@ -1,6 +1,6 @@
use beacon_chain::{
BeaconChainTypes,
block_verification_types::{AvailableBlockData, RpcBlock},
block_verification_types::{AvailableBlockData, RangeSyncBlock},
data_availability_checker::DataAvailabilityChecker,
data_column_verification::CustodyDataColumn,
get_block_root,
@@ -200,7 +200,7 @@ impl<E: EthSpec> RangeBlockComponentsRequest<E> {
&mut self,
da_checker: Arc<DataAvailabilityChecker<T>>,
spec: Arc<ChainSpec>,
) -> Option<Result<Vec<RpcBlock<E>>, CouplingError>>
) -> Option<Result<Vec<RangeSyncBlock<E>>, CouplingError>>
where
T: BeaconChainTypes<EthSpec = E>,
{
@@ -288,7 +288,7 @@ impl<E: EthSpec> RangeBlockComponentsRequest<E> {
blobs: Vec<Arc<BlobSidecar<E>>>,
da_checker: Arc<DataAvailabilityChecker<T>>,
spec: Arc<ChainSpec>,
) -> Result<Vec<RpcBlock<E>>, CouplingError>
) -> Result<Vec<RangeSyncBlock<E>>, CouplingError>
where
T: BeaconChainTypes<EthSpec = E>,
{
@@ -335,7 +335,7 @@ impl<E: EthSpec> RangeBlockComponentsRequest<E> {
})?;
let block_data = AvailableBlockData::new_with_blobs(blobs);
responses.push(
RpcBlock::new(block, Some(block_data), &da_checker, spec.clone())
RangeSyncBlock::new(block, block_data, &da_checker, spec.clone())
.map_err(|e| CouplingError::BlobPeerFailure(format!("{e:?}")))?,
)
}
@@ -360,7 +360,7 @@ impl<E: EthSpec> RangeBlockComponentsRequest<E> {
attempt: usize,
da_checker: Arc<DataAvailabilityChecker<T>>,
spec: Arc<ChainSpec>,
) -> Result<Vec<RpcBlock<E>>, CouplingError>
) -> Result<Vec<RangeSyncBlock<E>>, CouplingError>
where
T: BeaconChainTypes<EthSpec = E>,
{
@@ -388,12 +388,12 @@ impl<E: EthSpec> RangeBlockComponentsRequest<E> {
// Now iterate all blocks ensuring that the block roots of each block and data column match,
// plus we have columns for our custody requirements
let mut rpc_blocks = Vec::with_capacity(blocks.len());
let mut range_sync_blocks = Vec::with_capacity(blocks.len());
let exceeded_retries = attempt >= MAX_COLUMN_RETRIES;
for block in blocks {
let block_root = get_block_root(&block);
rpc_blocks.push(if block.num_expected_blobs() > 0 {
range_sync_blocks.push(if block.num_expected_blobs() > 0 {
let Some(mut data_columns_by_index) = data_columns_by_block.remove(&block_root)
else {
let responsible_peers = column_to_peer.iter().map(|c| (*c.0, *c.1)).collect();
@@ -441,11 +441,11 @@ impl<E: EthSpec> RangeBlockComponentsRequest<E> {
let block_data = AvailableBlockData::new_with_data_columns(custody_columns.iter().map(|c| c.as_data_column().clone()).collect::<Vec<_>>());
RpcBlock::new(block, Some(block_data), &da_checker, spec.clone())
RangeSyncBlock::new(block, block_data, &da_checker, spec.clone())
.map_err(|e| CouplingError::InternalError(format!("{:?}", e)))?
} else {
// Block has no data, expects zero columns
RpcBlock::new(block, Some(AvailableBlockData::NoData), &da_checker, spec.clone())
RangeSyncBlock::new(block, AvailableBlockData::NoData, &da_checker, spec.clone())
.map_err(|e| CouplingError::InternalError(format!("{:?}", e)))?
});
}
@@ -458,7 +458,7 @@ impl<E: EthSpec> RangeBlockComponentsRequest<E> {
debug!(?remaining_roots, "Not all columns consumed for block");
}
Ok(rpc_blocks)
Ok(range_sync_blocks)
}
}
@@ -947,7 +947,7 @@ mod tests {
}
let result: Result<
Vec<beacon_chain::block_verification_types::RpcBlock<E>>,
Vec<beacon_chain::block_verification_types::RangeSyncBlock<E>>,
crate::sync::block_sidecar_coupling::CouplingError,
> = info.responses(da_checker.clone(), spec.clone()).unwrap();
assert!(result.is_err());
@@ -981,10 +981,10 @@ mod tests {
// WHEN: Attempting to get responses again
let result = info.responses(da_checker, spec).unwrap();
// THEN: Should succeed with complete RPC blocks
// THEN: Should succeed with complete RangeSync blocks
assert!(result.is_ok());
let rpc_blocks = result.unwrap();
assert_eq!(rpc_blocks.len(), 2);
let range_sync_blocks = result.unwrap();
assert_eq!(range_sync_blocks.len(), 2);
}
#[test]

View File

@@ -17,7 +17,8 @@ use crate::sync::block_lookups::SingleLookupId;
use crate::sync::block_sidecar_coupling::CouplingError;
use crate::sync::network_context::requests::BlobsByRootSingleBlockRequest;
use crate::sync::range_data_column_batch_request::RangeDataColumnBatchRequest;
use beacon_chain::block_verification_types::{AsBlock, RpcBlock};
use beacon_chain::block_verification_types::LookupBlock;
use beacon_chain::block_verification_types::{AsBlock, RangeSyncBlock};
use beacon_chain::{BeaconChain, BeaconChainTypes, BlockProcessStatus, EngineState};
use custody::CustodyRequestResult;
use fnv::FnvHashMap;
@@ -735,7 +736,7 @@ impl<T: BeaconChainTypes> SyncNetworkContext<T> {
&mut self,
id: ComponentsByRangeRequestId,
range_block_component: RangeBlockComponent<T::EthSpec>,
) -> Option<Result<Vec<RpcBlock<T::EthSpec>>, RpcResponseError>> {
) -> Option<Result<Vec<RangeSyncBlock<T::EthSpec>>, RpcResponseError>> {
let Entry::Occupied(mut entry) = self.components_by_range_requests.entry(id) else {
metrics::inc_counter_vec(&metrics::SYNC_UNKNOWN_NETWORK_REQUESTS, &["range_blocks"]);
return None;
@@ -1588,21 +1589,15 @@ impl<T: BeaconChainTypes> SyncNetworkContext<T> {
.beacon_processor_if_enabled()
.ok_or(SendErrorProcessor::ProcessorNotAvailable)?;
let block = RpcBlock::new(
block,
None,
&self.chain.data_availability_checker,
self.chain.spec.clone(),
)
.map_err(|_| SendErrorProcessor::SendError)?;
let lookup_block = LookupBlock::new(block);
debug!(block = ?block_root, block_slot = %block.slot(), id, "Sending block for processing");
debug!(block = ?block_root, block_slot = %lookup_block.slot(), id, "Sending block for processing");
// Lookup sync event safety: If `beacon_processor.send_rpc_beacon_block` returns Ok() sync
// must receive a single `SyncMessage::BlockComponentProcessed` with this process type
beacon_processor
.send_rpc_beacon_block(
.send_lookup_beacon_block(
block_root,
block,
lookup_block,
seen_timestamp,
BlockProcessType::SingleBlock { id },
)

View File

@@ -10,7 +10,7 @@ use crate::sync::block_sidecar_coupling::CouplingError;
use crate::sync::network_context::{RangeRequestId, RpcRequestSendError, RpcResponseError};
use crate::sync::{BatchProcessResult, network_context::SyncNetworkContext};
use beacon_chain::BeaconChainTypes;
use beacon_chain::block_verification_types::RpcBlock;
use beacon_chain::block_verification_types::RangeSyncBlock;
use lighthouse_network::service::api_types::Id;
use lighthouse_network::{PeerAction, PeerId};
use logging::crit;
@@ -40,7 +40,7 @@ const BATCH_BUFFER_SIZE: u8 = 5;
/// and continued is now in an inconsistent state.
pub type ProcessingResult = Result<KeepChain, RemoveChain>;
type RpcBlocks<E> = Vec<RpcBlock<E>>;
type RpcBlocks<E> = Vec<RangeSyncBlock<E>>;
type RangeSyncBatchInfo<E> = BatchInfo<E, RangeSyncBatchConfig<E>, RpcBlocks<E>>;
type RangeSyncBatches<E> = BTreeMap<BatchId, RangeSyncBatchInfo<E>>;
@@ -273,7 +273,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
batch_id: BatchId,
peer_id: &PeerId,
request_id: Id,
blocks: Vec<RpcBlock<T::EthSpec>>,
blocks: Vec<RangeSyncBlock<T::EthSpec>>,
) -> ProcessingResult {
let _guard = self.span.clone().entered();
// check if we have this batch

View File

@@ -47,7 +47,7 @@ use crate::status::ToStatusMessage;
use crate::sync::BatchProcessResult;
use crate::sync::batch::BatchId;
use crate::sync::network_context::{RpcResponseError, SyncNetworkContext};
use beacon_chain::block_verification_types::RpcBlock;
use beacon_chain::block_verification_types::RangeSyncBlock;
use beacon_chain::{BeaconChain, BeaconChainTypes};
use lighthouse_network::rpc::GoodbyeReason;
use lighthouse_network::service::api_types::Id;
@@ -213,7 +213,7 @@ where
chain_id: ChainId,
batch_id: BatchId,
request_id: Id,
blocks: Vec<RpcBlock<T::EthSpec>>,
blocks: Vec<RangeSyncBlock<T::EthSpec>>,
) {
// check if this chunk removes the chain
match self.chains.call_by_id(chain_id, |chain| {

View File

@@ -7,6 +7,7 @@ use crate::sync::{
manager::{BlockProcessType, BlockProcessingResult, SyncManager},
};
use beacon_chain::blob_verification::KzgVerifiedBlob;
use beacon_chain::block_verification_types::LookupBlock;
use beacon_chain::custody_context::NodeCustodyType;
use beacon_chain::{
AvailabilityProcessingStatus, BlockError, NotifyExecutionLayer,
@@ -464,7 +465,7 @@ impl TestRig {
panic!("Test consumer requested unknown block: {id:?}")
})
.block_data()
.and_then(|d| d.blobs())
.blobs()
.unwrap_or_else(|| panic!("Block {id:?} has no blobs"))
.iter()
.find(|blob| blob.index == id.index)
@@ -528,7 +529,7 @@ impl TestRig {
panic!("Test consumer requested unknown block: {id:?}")
})
.block_data()
.and_then(|d| d.data_columns())
.data_columns()
.unwrap_or_else(|| panic!("Block id {id:?} has no columns"));
id.columns
.iter()
@@ -594,7 +595,7 @@ impl TestRig {
// - Some blocks may not have blobs as the blob count is random
let blobs = (req.start_slot..req.start_slot + req.count)
.filter_map(|slot| self.network_blocks_by_slot.get(&Slot::new(slot)))
.filter_map(|block| block.block_data().and_then(|d| d.blobs()))
.filter_map(|block| block.block_data().blobs())
.flat_map(|blobs| blobs.into_iter())
.collect::<Vec<_>>();
self.send_rpc_blobs_response(req_id, peer_id, &blobs);
@@ -610,7 +611,7 @@ impl TestRig {
// - Some blocks may not have columns as the blob count is random
let columns = (req.start_slot..req.start_slot + req.count)
.filter_map(|slot| self.network_blocks_by_slot.get(&Slot::new(slot)))
.filter_map(|block| block.block_data().and_then(|d| d.data_columns()))
.filter_map(|block| block.block_data().data_columns())
.flat_map(|columns| {
columns
.into_iter()
@@ -786,10 +787,10 @@ impl TestRig {
}
fn corrupt_last_block_signature(&mut self) {
let rpc_block = self.get_last_block().clone();
let mut block = (*rpc_block.block_cloned()).clone();
let blobs = rpc_block.block_data().and_then(|d| d.blobs());
let columns = rpc_block.block_data().and_then(|d| d.data_columns());
let range_sync_block = self.get_last_block().clone();
let mut block = (*range_sync_block.block_cloned()).clone();
let blobs = range_sync_block.block_data().blobs();
let columns = range_sync_block.block_data().data_columns();
*block.signature_mut() = self.valid_signature();
self.re_insert_block(Arc::new(block), blobs, columns);
}
@@ -801,15 +802,15 @@ impl TestRig {
}
fn corrupt_last_blob_proposer_signature(&mut self) {
let rpc_block = self.get_last_block().clone();
let block = rpc_block.block_cloned();
let mut blobs = rpc_block
let range_sync_block = self.get_last_block().clone();
let block = range_sync_block.block_cloned();
let mut blobs = range_sync_block
.block_data()
.and_then(|d| d.blobs())
.blobs()
.expect("no blobs")
.into_iter()
.collect::<Vec<_>>();
let columns = rpc_block.block_data().and_then(|d| d.data_columns());
let columns = range_sync_block.block_data().data_columns();
let first = blobs.first_mut().expect("empty blobs");
Arc::make_mut(first).signed_block_header.signature = self.valid_signature();
let max_blobs =
@@ -822,15 +823,15 @@ impl TestRig {
}
fn corrupt_last_blob_kzg_proof(&mut self) {
let rpc_block = self.get_last_block().clone();
let block = rpc_block.block_cloned();
let mut blobs = rpc_block
let range_sync_block = self.get_last_block().clone();
let block = range_sync_block.block_cloned();
let mut blobs = range_sync_block
.block_data()
.and_then(|d| d.blobs())
.blobs()
.expect("no blobs")
.into_iter()
.collect::<Vec<_>>();
let columns = rpc_block.block_data().and_then(|d| d.data_columns());
let columns = range_sync_block.block_data().data_columns();
let first = blobs.first_mut().expect("empty blobs");
Arc::make_mut(first).kzg_proof = kzg::KzgProof::empty();
let max_blobs =
@@ -843,12 +844,12 @@ impl TestRig {
}
fn corrupt_last_column_proposer_signature(&mut self) {
let rpc_block = self.get_last_block().clone();
let block = rpc_block.block_cloned();
let blobs = rpc_block.block_data().and_then(|d| d.blobs());
let mut columns = rpc_block
let range_sync_block = self.get_last_block().clone();
let block = range_sync_block.block_cloned();
let blobs = range_sync_block.block_data().blobs();
let mut columns = range_sync_block
.block_data()
.and_then(|d| d.data_columns())
.data_columns()
.expect("no columns");
let first = columns.first_mut().expect("empty columns");
Arc::make_mut(first)
@@ -859,12 +860,12 @@ impl TestRig {
}
fn corrupt_last_column_kzg_proof(&mut self) {
let rpc_block = self.get_last_block().clone();
let block = rpc_block.block_cloned();
let blobs = rpc_block.block_data().and_then(|d| d.blobs());
let mut columns = rpc_block
let range_sync_block = self.get_last_block().clone();
let block = range_sync_block.block_cloned();
let blobs = range_sync_block.block_data().blobs();
let mut columns = range_sync_block
.block_data()
.and_then(|d| d.data_columns())
.data_columns()
.expect("no columns");
let first = columns.first_mut().expect("empty columns");
let column = Arc::make_mut(first);
@@ -873,7 +874,7 @@ impl TestRig {
self.re_insert_block(block, blobs, Some(columns));
}
fn get_last_block(&self) -> &RpcBlock<E> {
fn get_last_block(&self) -> &RangeSyncBlock<E> {
let (_, last_block) = self
.network_blocks_by_root
.iter()
@@ -893,13 +894,13 @@ impl TestRig {
let block_root = block.canonical_root();
let block_slot = block.slot();
let block_data = if let Some(columns) = columns {
Some(AvailableBlockData::new_with_data_columns(columns))
AvailableBlockData::new_with_data_columns(columns)
} else if let Some(blobs) = blobs {
Some(AvailableBlockData::new_with_blobs(blobs))
AvailableBlockData::new_with_blobs(blobs)
} else {
Some(AvailableBlockData::NoData)
AvailableBlockData::NoData
};
let rpc_block = RpcBlock::new(
let range_sync_block = RangeSyncBlock::new(
block,
block_data,
&self.harness.chain.data_availability_checker,
@@ -907,8 +908,9 @@ impl TestRig {
)
.unwrap();
self.network_blocks_by_slot
.insert(block_slot, rpc_block.clone());
self.network_blocks_by_root.insert(block_root, rpc_block);
.insert(block_slot, range_sync_block.clone());
self.network_blocks_by_root
.insert(block_root, range_sync_block);
}
/// Trigger a lookup with the last created block
@@ -947,7 +949,7 @@ impl TestRig {
/// Import a block directly into the chain without going through lookup sync
async fn import_block_by_root(&mut self, block_root: Hash256) {
let rpc_block = self
let range_sync_block = self
.network_blocks_by_root
.get(&block_root)
.unwrap_or_else(|| panic!("No block for root {block_root}"))
@@ -957,9 +959,9 @@ impl TestRig {
.chain
.process_block(
block_root,
rpc_block,
range_sync_block,
NotifyExecutionLayer::Yes,
BlockImportSource::Gossip,
BlockImportSource::RangeSync,
|| Ok(()),
)
.await
@@ -979,7 +981,7 @@ impl TestRig {
let blobs = self
.get_last_block()
.block_data()
.and_then(|d| d.blobs())
.blobs()
.expect("no blobs");
let blob = blobs.first().expect("empty blobs");
self.trigger_unknown_parent_blob(peer_id, blob.clone());
@@ -990,7 +992,7 @@ impl TestRig {
let columns = self
.get_last_block()
.block_data()
.and_then(|d| d.data_columns())
.data_columns()
.expect("No data columns");
let column = columns.first().expect("empty columns");
self.trigger_unknown_parent_column(peer_id, column.clone());
@@ -1475,15 +1477,14 @@ impl TestRig {
) -> AvailabilityProcessingStatus {
// Simulate importing block from another source. Don't use GossipVerified as it checks with
// the clock, which does not match the timestamp in the payload.
let block_root = block.canonical_root();
let rpc_block = RpcBlock::BlockOnly { block_root, block };
let lookup_block = LookupBlock::new(block);
self.harness
.chain
.process_block(
block_root,
rpc_block,
lookup_block.block_root(),
lookup_block,
NotifyExecutionLayer::Yes,
BlockImportSource::Gossip,
BlockImportSource::Lookup,
|| Ok(()),
)
.await
@@ -2196,10 +2197,7 @@ async fn blobs_in_da_checker_skip_download() {
};
r.build_chain(1).await;
let block = r.get_last_block().clone();
let blobs = block
.block_data()
.and_then(|d| d.blobs())
.expect("block with no blobs");
let blobs = block.block_data().blobs().expect("block with no blobs");
for blob in &blobs {
r.insert_blob_to_da_checker(blob.clone());
}

View File

@@ -3,7 +3,7 @@ use crate::sync::SyncMessage;
use crate::sync::block_lookups::BlockLookupsMetrics;
use crate::sync::manager::SyncManager;
use crate::sync::tests::lookups::SimulateConfig;
use beacon_chain::block_verification_types::RpcBlock;
use beacon_chain::block_verification_types::RangeSyncBlock;
use beacon_chain::builder::Witness;
use beacon_chain::custody_context::NodeCustodyType;
use beacon_chain::test_utils::{BeaconChainHarness, EphemeralHarnessType};
@@ -77,8 +77,8 @@ struct TestRig {
rng: ChaCha20Rng,
fork_name: ForkName,
/// Blocks that will be used in the test but may not be known to `harness` yet.
network_blocks_by_root: HashMap<Hash256, RpcBlock<E>>,
network_blocks_by_slot: HashMap<Slot, RpcBlock<E>>,
network_blocks_by_root: HashMap<Hash256, RangeSyncBlock<E>>,
network_blocks_by_slot: HashMap<Slot, RangeSyncBlock<E>>,
penalties: Vec<ReportedPenalty>,
/// All seen lookups through the test run
seen_lookups: HashMap<Id, SeenLookup>,

View File

@@ -10,7 +10,7 @@ use beacon_chain::block_verification_types::AvailableBlockData;
use beacon_chain::custody_context::NodeCustodyType;
use beacon_chain::data_column_verification::CustodyDataColumn;
use beacon_chain::test_utils::{AttestationStrategy, BlockStrategy};
use beacon_chain::{EngineState, NotifyExecutionLayer, block_verification_types::RpcBlock};
use beacon_chain::{EngineState, NotifyExecutionLayer, block_verification_types::RangeSyncBlock};
use beacon_processor::WorkType;
use lighthouse_network::rpc::RequestType;
use lighthouse_network::rpc::methods::{
@@ -430,7 +430,7 @@ impl TestRig {
.chain
.process_block(
block_root,
build_rpc_block(block.into(), &data_sidecars, self.harness.chain.clone()),
build_range_sync_block(block.into(), &data_sidecars, self.harness.chain.clone()),
NotifyExecutionLayer::Yes,
BlockImportSource::RangeSync,
|| Ok(()),
@@ -443,17 +443,17 @@ impl TestRig {
}
}
fn build_rpc_block(
fn build_range_sync_block(
block: Arc<SignedBeaconBlock<E>>,
data_sidecars: &Option<DataSidecars<E>>,
chain: Arc<BeaconChain<T>>,
) -> RpcBlock<E> {
) -> RangeSyncBlock<E> {
match data_sidecars {
Some(DataSidecars::Blobs(blobs)) => {
let block_data = AvailableBlockData::new_with_blobs(blobs.clone());
RpcBlock::new(
RangeSyncBlock::new(
block,
Some(block_data),
block_data,
&chain.data_availability_checker,
chain.spec.clone(),
)
@@ -466,18 +466,18 @@ fn build_rpc_block(
.map(|c| c.as_data_column().clone())
.collect::<Vec<_>>(),
);
RpcBlock::new(
RangeSyncBlock::new(
block,
Some(block_data),
block_data,
&chain.data_availability_checker,
chain.spec.clone(),
)
.unwrap()
}
// Block has no data, expects zero columns
None => RpcBlock::new(
None => RangeSyncBlock::new(
block,
Some(AvailableBlockData::NoData),
AvailableBlockData::NoData,
&chain.data_availability_checker,
chain.spec.clone(),
)