diff --git a/beacon_chain/nimbus_beacon_node.nim b/beacon_chain/nimbus_beacon_node.nim index 1a80551bb..597002820 100644 --- a/beacon_chain/nimbus_beacon_node.nim +++ b/beacon_chain/nimbus_beacon_node.nim @@ -408,42 +408,42 @@ proc initFullNode( maybeFinalized: bool): Future[Result[void, VerifierError]] {.async: (raises: [CancelledError]).} = withBlck(signedBlock): - when consensusFork >= ConsensusFork.Deneb: - if not blobQuarantine[].hasBlobs(forkyBlck): - # We don't have all the blobs for this block, so we have - # to put it in blobless quarantine. - if not quarantine[].addBlobless(dag.finalizedHead.slot, forkyBlck): - err(VerifierError.UnviableFork) - else: - err(VerifierError.MissingParent) - else: - let blobs = blobQuarantine[].popBlobs(forkyBlck.root, forkyBlck) - await blockProcessor[].addBlock(MsgSource.gossip, signedBlock, - Opt.some(blobs), Opt.none(DataColumnSidecars), - maybeFinalized = maybeFinalized) - else: - await blockProcessor[].addBlock(MsgSource.gossip, signedBlock, - Opt.none(BlobSidecars), Opt.none(DataColumnSidecars), - maybeFinalized = maybeFinalized) - # when consensusFork >= ConsensusFork.Deneb: - # if not dataColumnQuarantine[].hasDataColumns(forkyBlck): - # # We don't have all the data columns for this block, so we have - # # to put it in columnless quarantine. - # if not quarantine[].addColumnless(dag.finalizedHead.slot, forkyBlck): + # if not blobQuarantine[].hasBlobs(forkyBlck): + # # We don't have all the blobs for this block, so we have + # # to put it in blobless quarantine. + # if not quarantine[].addBlobless(dag.finalizedHead.slot, forkyBlck): # err(VerifierError.UnviableFork) # else: # err(VerifierError.MissingParent) # else: - # let data_columns = dataColumnQuarantine[].popDataColumns(forkyBlck.root, forkyBlck) + # let blobs = blobQuarantine[].popBlobs(forkyBlck.root, forkyBlck) # await blockProcessor[].addBlock(MsgSource.gossip, signedBlock, - # Opt.none(BlobSidecars), Opt.some(data_columns), + # Opt.some(blobs), Opt.none(DataColumnSidecars), # maybeFinalized = maybeFinalized) # else: # await blockProcessor[].addBlock(MsgSource.gossip, signedBlock, # Opt.none(BlobSidecars), Opt.none(DataColumnSidecars), # maybeFinalized = maybeFinalized) + when consensusFork >= ConsensusFork.Deneb: + if not dataColumnQuarantine[].hasDataColumns(forkyBlck): + # We don't have all the data columns for this block, so we have + # to put it in columnless quarantine. + if not quarantine[].addColumnless(dag.finalizedHead.slot, forkyBlck): + err(VerifierError.UnviableFork) + else: + err(VerifierError.MissingParent) + else: + let data_columns = dataColumnQuarantine[].popDataColumns(forkyBlck.root, forkyBlck) + await blockProcessor[].addBlock(MsgSource.gossip, signedBlock, + Opt.none(BlobSidecars), Opt.some(data_columns), + maybeFinalized = maybeFinalized) + else: + await blockProcessor[].addBlock(MsgSource.gossip, signedBlock, + Opt.none(BlobSidecars), Opt.none(DataColumnSidecars), + maybeFinalized = maybeFinalized) + rmanBlockLoader = proc( blockRoot: Eth2Digest): Opt[ForkedTrustedSignedBeaconBlock] = dag.getForkedBlock(blockRoot)