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(
# dag.finalizedHead.slot, forkyBlck)
if self.dataColumnQuarantine[].hasMissingDataColumns(forkyBlck):
if self.dataColumnQuarantine[].hasEnoughDataColumns(forkyBlck):
let data_columns = self.dataColumnQuarantine[].popDataColumns(
forkyBlck.root, forkyBlck)
self[].enqueueBlock(MsgSource.gossip, quarantined, Opt.none(BlobSidecars), Opt.some(data_columns))

View File

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