fix initial columnless situation

This commit is contained in:
Agnish Ghosh 2024-10-03 15:49:01 +05:30
parent 6e057edc89
commit 44a5514861
2 changed files with 7 additions and 1 deletions

View File

@ -80,6 +80,12 @@ func popDataColumns*(
r.add(c) r.add(c)
r r
func checkForInitialDcSidecars*(quarantine: DataColumnQuarantine,
blck: deneb.SignedBeaconBlock | electra.SignedBeaconBlock): bool =
for idx in 0..<len(blck.message.body.blob_kzg_commitments):
if (blck.root, ColumnIndex idx) notin quarantine.data_columns:
return false
true
func hasDataColumns*(quarantine: DataColumnQuarantine, func hasDataColumns*(quarantine: DataColumnQuarantine,
blck: deneb.SignedBeaconBlock | electra.SignedBeaconBlock): bool = blck: deneb.SignedBeaconBlock | electra.SignedBeaconBlock): bool =

View File

@ -427,7 +427,7 @@ proc initFullNode(
# maybeFinalized = maybeFinalized) # maybeFinalized = maybeFinalized)
when consensusFork >= ConsensusFork.Deneb: when consensusFork >= ConsensusFork.Deneb:
if not dataColumnQuarantine[].hasBlobs(forkyBlck): if not dataColumnQuarantine[].checkForInitialDcSidecars(forkyBlck):
# We don't have all the data columns for this block, so we have # We don't have all the data columns for this block, so we have
# to put it in columnless quarantine. # to put it in columnless quarantine.
if not quarantine[].addColumnless(dag.finalizedHead.slot, forkyBlck): if not quarantine[].addColumnless(dag.finalizedHead.slot, forkyBlck):