reconstruction only happens in background

This commit is contained in:
Agnish Ghosh 2024-11-13 18:33:06 +07:00
parent 916f9c0638
commit e05cb51ffe
No known key found for this signature in database
GPG Key ID: 7BDDA05D1B25E9F8
2 changed files with 11 additions and 11 deletions

View File

@ -893,7 +893,7 @@ proc storeBlock(
# discard self.consensusManager.quarantine[].addBlobless( # discard self.consensusManager.quarantine[].addBlobless(
# dag.finalizedHead.slot, forkyBlck) # dag.finalizedHead.slot, forkyBlck)
if self.dataColumnQuarantine[].hasMissingDataColumns(forkyBlck): if self.dataColumnQuarantine[].hasEnoughDataColumns(forkyBlck):
let data_columns = self.dataColumnQuarantine[].popDataColumns( let data_columns = self.dataColumnQuarantine[].popDataColumns(
forkyBlck.root, forkyBlck) forkyBlck.root, forkyBlck)
self[].enqueueBlock(MsgSource.gossip, quarantined, Opt.none(BlobSidecars), Opt.some(data_columns)) self[].enqueueBlock(MsgSource.gossip, quarantined, Opt.none(BlobSidecars), Opt.some(data_columns))

View File

@ -414,16 +414,16 @@ proc processDataColumnSidecar*(
Opt.none(BlobSidecars), Opt.none(BlobSidecars),
Opt.some(self.dataColumnQuarantine[].popDataColumns(block_root, forkyBlck))) Opt.some(self.dataColumnQuarantine[].popDataColumns(block_root, forkyBlck)))
elif self.dataColumnQuarantine[].hasEnoughDataColumns(forkyBlck): elif self.dataColumnQuarantine[].hasEnoughDataColumns(forkyBlck):
let # let
columns = self.dataColumnQuarantine[].gatherDataColumns(block_root) # columns = self.dataColumnQuarantine[].gatherDataColumns(block_root)
if columns.len >= (NUMBER_OF_COLUMNS div 2) and # if columns.len >= (NUMBER_OF_COLUMNS div 2) and
self.dataColumnQuarantine[].supernode: # self.dataColumnQuarantine[].supernode:
let # let
reconstructed_columns = # reconstructed_columns =
self.processReconstructionFromGossip(forkyBlck, columns.mapIt(it[])) # self.processReconstructionFromGossip(forkyBlck, columns.mapIt(it[]))
for rc in reconstructed_columns.get: # for rc in reconstructed_columns.get:
if rc notin self.dataColumnQuarantine[].gatherDataColumns(block_root).mapIt(it[]): # if rc notin self.dataColumnQuarantine[].gatherDataColumns(block_root).mapIt(it[]):
self.dataColumnQuarantine[].put(newClone(rc)) # self.dataColumnQuarantine[].put(newClone(rc))
self.blockProcessor[].enqueueBlock( self.blockProcessor[].enqueueBlock(
MsgSource.gossip, columnless, MsgSource.gossip, columnless,
Opt.none(BlobSidecars), Opt.none(BlobSidecars),