missing data columns improvement

This commit is contained in:
Agnish Ghosh 2024-10-10 01:41:18 +05:30
parent 44c95a0667
commit a89847b1f1
3 changed files with 5 additions and 13 deletions

View File

@ -104,13 +104,8 @@ func hasDataColumns*(quarantine: DataColumnQuarantine,
blck: deneb.SignedBeaconBlock | electra.SignedBeaconBlock): bool =
var counter = 0
for i in 0..<NUMBER_OF_COLUMNS:
let idx = ColumnIndex(i)
if len(blck.message.body.blob_kzg_commitments) != 0 and
quarantine.data_columns.hasKey(
(blck.root, idx)):
inc counter
if counter != max(SAMPLES_PER_SLOT, CUSTODY_REQUIREMENT) or
counter != NUMBER_OF_COLUMNS:
if len(blck.message.body.blob_kzg_commitments) != 0:
if (blck.root, ColumnIndex i) notin quarantine.data_columns:
return false
true

View File

@ -427,10 +427,6 @@ proc initFullNode(
return err(VerifierError.UnviableFork)
else:
return err(VerifierError.MissingParent)
elif accumulatedColumns.len == 0:
return await blockProcessor[].addBlock(MsgSource.gossip, signedBlock,
Opt.none(BlobSidecars), Opt.none(DataColumnSidecars),
maybeFinalized = maybeFinalized)
elif supernode == true and accumulatedColumns.len >= localCustodyColumns.len div 2:
let data_columns = dataColumnQuarantine[].popDataColumns(forkyBlck.root, forkyBlck)
return await blockProcessor[].addBlock(MsgSource.gossip, signedBlock,

View File

@ -541,7 +541,8 @@ proc getMissingDataColumns(rman: RequestManager): seq[DataColumnIdentifier] =
debug "Not handling missing data columns early in slot"
continue
if not rman.dataColumnQuarantine[].hasDataColumns(forkyBlck):
if not rman.dataColumnQuarantine[].hasDataColumns(forkyBlck) and
len(forkyBlck.message.body.blob_kzg_commitments) != 0:
let missing = rman.dataColumnQuarantine[].dataColumnFetchRecord(forkyBlck)
if len(missing.indices) == 0:
warn "quarantine is missing data columns, but missing indices are empty",