initial sidecars

This commit is contained in:
Agnish Ghosh 2024-10-08 10:29:05 +05:30
parent 99dd45a070
commit 38260f8de7
1 changed files with 8 additions and 6 deletions

View File

@ -427,16 +427,18 @@ proc initFullNode(
# maybeFinalized = maybeFinalized)
when consensusFork >= ConsensusFork.Deneb:
if dataColumnQuarantine[].hasDataColumns(forkyBlck) and
len(forkyBlck.message.body.blob_kzg_commitments) != 0:
if not dataColumnQuarantine[].checkForInitialDcSidecars(forkyBlck):
# We don't have all the data columns for this block, so we have
# to put it in columnless quarantine.
if not quarantine[].addColumnless(dag.finalizedHead.slot, forkyBlck):
err(VerifierError.UnviableFork)
else:
err(VerifierError.MissingParent)
else:
let data_columns = dataColumnQuarantine[].popDataColumns(forkyBlck.root, forkyBlck)
await blockProcessor[].addBlock(MsgSource.gossip, signedBlock,
Opt.none(BlobSidecars), Opt.some(data_columns),
maybeFinalized = maybeFinalized)
else:
await blockProcessor[].addBlock(MsgSource.gossip, signedBlock,
Opt.none(BlobSidecars), Opt.none(DataColumnSidecars),
maybeFinalized = maybeFinalized)
else:
await blockProcessor[].addBlock(MsgSource.gossip, signedBlock,
Opt.none(BlobSidecars), Opt.none(DataColumnSidecars),