fix reconstruction from gossip logic

This commit is contained in:
Agnish Ghosh 2024-10-12 01:48:18 +05:30
parent 826a4f60f8
commit 6ae1418e91
No known key found for this signature in database
GPG Key ID: 7BDDA05D1B25E9F8
2 changed files with 11 additions and 10 deletions

View File

@ -129,9 +129,9 @@ func hasMissingDataColumns*(quarantine: DataColumnQuarantine,
get_custody_columns(quarantine.nodeid,
max(SAMPLES_PER_SLOT.uint64,
localSubnetCount))
for i in localCustodyColumns:
if (blck.root, ColumnIndex i) notin quarantine.data_columns:
if (blck.root, ColumnIndex i) notin quarantine.data_columns and
len(blck.message.body.blob_kzg_commitments) != 0:
return false
true

View File

@ -398,15 +398,16 @@ proc processDataColumnSidecar*(
let columnless = o.unsafeGet()
withBlck(columnless):
when consensusFork >= ConsensusFork.Deneb:
let
columns = self.dataColumnQuarantine[].gatherDataColumns(forkyBlck)
if columns.len >= (NUMBER_OF_COLUMNS div 2):
let
reconstructed_columns =
self.processReconstructionFromGossip(forkyBlck, columns)
for rc in reconstructed_columns.get:
self.dataColumnQuarantine[].put(newClone(rc))
if self.dataColumnQuarantine[].hasEnoughDataColumns(forkyBlck):
let
columns = self.dataColumnQuarantine[].gatherDataColumns(forkyBlck)
if columns.len >= (NUMBER_OF_COLUMNS div 2) or
self.dataColumnQuarantine[].supernode:
let
reconstructed_columns =
self.processReconstructionFromGossip(forkyBlck, columns)
for rc in reconstructed_columns.get:
self.dataColumnQuarantine[].put(newClone(rc))
self.blockProcessor[].enqueueBlock(
MsgSource.gossip, columnless,
Opt.none(BlobSidecars),