mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-01 01:08:27 +00:00
fix reconstruction from gossip logic
This commit is contained in:
parent
826a4f60f8
commit
6ae1418e91
@ -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
|
||||
|
||||
|
@ -398,15 +398,16 @@ proc processDataColumnSidecar*(
|
||||
let columnless = o.unsafeGet()
|
||||
withBlck(columnless):
|
||||
when consensusFork >= ConsensusFork.Deneb:
|
||||
if self.dataColumnQuarantine[].hasEnoughDataColumns(forkyBlck):
|
||||
let
|
||||
columns = self.dataColumnQuarantine[].gatherDataColumns(forkyBlck)
|
||||
if columns.len >= (NUMBER_OF_COLUMNS div 2):
|
||||
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))
|
||||
if self.dataColumnQuarantine[].hasEnoughDataColumns(forkyBlck):
|
||||
self.blockProcessor[].enqueueBlock(
|
||||
MsgSource.gossip, columnless,
|
||||
Opt.none(BlobSidecars),
|
||||
|
Loading…
x
Reference in New Issue
Block a user