mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-07 20:28:03 +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,
|
get_custody_columns(quarantine.nodeid,
|
||||||
max(SAMPLES_PER_SLOT.uint64,
|
max(SAMPLES_PER_SLOT.uint64,
|
||||||
localSubnetCount))
|
localSubnetCount))
|
||||||
|
|
||||||
for i in localCustodyColumns:
|
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
|
return false
|
||||||
true
|
true
|
||||||
|
|
||||||
|
@ -398,15 +398,16 @@ proc processDataColumnSidecar*(
|
|||||||
let columnless = o.unsafeGet()
|
let columnless = o.unsafeGet()
|
||||||
withBlck(columnless):
|
withBlck(columnless):
|
||||||
when consensusFork >= ConsensusFork.Deneb:
|
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):
|
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(
|
self.blockProcessor[].enqueueBlock(
|
||||||
MsgSource.gossip, columnless,
|
MsgSource.gossip, columnless,
|
||||||
Opt.none(BlobSidecars),
|
Opt.none(BlobSidecars),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user