From 15a302cea269dacef8d8d87866a31382620904e9 Mon Sep 17 00:00:00 2001 From: Agnish Ghosh Date: Mon, 19 Aug 2024 01:23:37 +0530 Subject: [PATCH] fixes related to reconstruction --- .../gossip_processing/block_processor.nim | 16 ++++++++++++---- beacon_chain/nimbus_beacon_node.nim | 12 +++++++++--- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/beacon_chain/gossip_processing/block_processor.nim b/beacon_chain/gossip_processing/block_processor.nim index b92048729..c0b444c67 100644 --- a/beacon_chain/gossip_processing/block_processor.nim +++ b/beacon_chain/gossip_processing/block_processor.nim @@ -487,13 +487,21 @@ proc storeBlock( signature = shortLog(signedBlock.signature), err = r.error() else: - if blobsOpt.isSome: - for blobSidecar in blobsOpt.get: - self.blobQuarantine[].put(blobSidecar) + # if blobsOpt.isSome: + # for blobSidecar in blobsOpt.get: + # self.blobQuarantine[].put(blobSidecar) + # debug "Block quarantined", + # blockRoot = shortLog(signedBlock.root), + # blck = shortLog(signedBlock.message), + # signature = shortLog(signedBlock.signature) + + if dataColumnsOpt.isSome: + for dataColumnSidecar in dataColumnsOpt.get: + self.dataColumnQuarantine[].put(dataColumnSidecar) debug "Block quarantined", blockRoot = shortLog(signedBlock.root), blck = shortLog(signedBlock.message), - signature = shortLog(signedBlock.signature) + signature = shortLog(signedBlock.signature) of VerifierError.UnviableFork: # Track unviables so that descendants can be discarded promptly diff --git a/beacon_chain/nimbus_beacon_node.nim b/beacon_chain/nimbus_beacon_node.nim index 391248cfa..e3870b0cc 100644 --- a/beacon_chain/nimbus_beacon_node.nim +++ b/beacon_chain/nimbus_beacon_node.nim @@ -1537,7 +1537,13 @@ proc reconstructAndSendDataColumns*(node: BeaconNode) {.async.} = let db = node.db root = node.dag.head.root - + + let localCustodySubnetCount = + if self.config.subscribeAllSubnets: + DATA_COLUMN_SIDECAR_SUBNET_COUNT.uint64 + else: + CUSTODY_REQUIREMENT + let blck = getForkedBlock(db, root).valueOr: return withBlck(blck): when typeof(forkyBlck).kind < ConsensusFork.Deneb: return @@ -1548,7 +1554,7 @@ proc reconstructAndSendDataColumns*(node: BeaconNode) {.async.} = let custody_columns = get_custody_columns( node.network.nodeId, - CUSTODY_REQUIREMENT) + localCustodySubnetCount) var data_column_sidecars: DataColumnSidecars columnsOk = true @@ -1613,7 +1619,7 @@ proc onSlotEnd(node: BeaconNode, slot: Slot) {.async.} = # the pruning for later node.dag.pruneHistory() node.pruneBlobs(slot) - # node.pruneDataColumns(slot) + node.pruneDataColumns(slot) when declared(GC_fullCollect): # The slots in the beacon node work as frames in a game: we want to make