Verify KZG in Bulk During Block Sync (#4903)

This commit is contained in:
ethDreamer
2023-11-08 22:05:44 -06:00
committed by GitHub
parent a380f6ef1f
commit 7818100777
6 changed files with 110 additions and 41 deletions

View File

@@ -560,14 +560,10 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
downloaded_blocks: Vec<RpcBlock<T::EthSpec>>,
) -> (usize, Result<(), ChainSegmentFailed>) {
let total_blocks = downloaded_blocks.len();
let available_blocks = match downloaded_blocks
.into_iter()
.map(|block| {
self.chain
.data_availability_checker
.check_rpc_block_availability(block)
})
.collect::<Result<Vec<_>, _>>()
let available_blocks = match self
.chain
.data_availability_checker
.verify_kzg_for_rpc_blocks(downloaded_blocks)
{
Ok(blocks) => blocks
.into_iter()