have gather data columns in enqueue block

This commit is contained in:
Agnish Ghosh 2024-10-13 13:48:51 +05:30
parent 11508c41c2
commit 6fc5fc79ed
No known key found for this signature in database
GPG Key ID: 7BDDA05D1B25E9F8
2 changed files with 7 additions and 7 deletions

View File

@ -88,14 +88,14 @@ func accumulateDataColumns*(quarantine: DataColumnQuarantine,
func gatherDataColumns*(quarantine: DataColumnQuarantine,
blck: deneb.SignedBeaconBlock |
electra.SignedBeaconBlock):
seq[DataColumnSidecar] =
var columns: seq[DataColumnSidecar]
seq[ref DataColumnSidecar] =
var columns: seq[ref DataColumnSidecar]
for i in 0..<NUMBER_OF_COLUMNS:
let idx = ColumnIndex(i)
if quarantine.data_columns.hasKey(
(blck.root, idx)):
let value = quarantine.data_columns.getOrDefault((blck.root, idx), default(ref DataColumnSidecar))
columns.add(value[])
columns.add(value)
columns
func popDataColumns*(

View File

@ -8,7 +8,7 @@
{.push raises: [].}
import
std/tables,
std/[tables, sequtils],
stew/results,
chronicles, chronos, metrics, taskpools,
../networking/eth2_network,
@ -404,7 +404,7 @@ proc processDataColumnSidecar*(
self.blockProcessor[].enqueueBlock(
MsgSource.gossip, columnless,
Opt.none(BlobSidecars),
Opt.some(self.dataColumnQuarantine[].popDataColumns(block_root, forkyBlck)))
Opt.some(self.dataColumnQuarantine[].gatherDataColumns(forkyBlck)))
elif self.dataColumnQuarantine[].hasEnoughDataColumns(forkyBlck):
let
columns = self.dataColumnQuarantine[].gatherDataColumns(forkyBlck)
@ -412,9 +412,9 @@ proc processDataColumnSidecar*(
self.dataColumnQuarantine[].supernode:
let
reconstructed_columns =
self.processReconstructionFromGossip(forkyBlck, columns)
self.processReconstructionFromGossip(forkyBlck, columns.mapIt(it[]))
for rc in reconstructed_columns.get:
if rc notin self.dataColumnQuarantine[].gatherDataColumns(forkyBlck):
if rc notin self.dataColumnQuarantine[].gatherDataColumns(forkyBlck).mapIt(it[]):
self.dataColumnQuarantine[].put(newClone(rc))
self.blockProcessor[].enqueueBlock(
MsgSource.gossip, columnless,