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 = blck: deneb.SignedBeaconBlock | electra.SignedBeaconBlock): bool =
var counter = 0 var counter = 0
for i in 0..<NUMBER_OF_COLUMNS: for i in 0..<NUMBER_OF_COLUMNS:
let idx = ColumnIndex(i) if len(blck.message.body.blob_kzg_commitments) != 0:
if len(blck.message.body.blob_kzg_commitments) != 0 and if (blck.root, ColumnIndex i) notin quarantine.data_columns:
quarantine.data_columns.hasKey(
(blck.root, idx)):
inc counter
if counter != max(SAMPLES_PER_SLOT, CUSTODY_REQUIREMENT) or
counter != NUMBER_OF_COLUMNS:
return false return false
true true

View File

@ -427,10 +427,6 @@ proc initFullNode(
return err(VerifierError.UnviableFork) return err(VerifierError.UnviableFork)
else: else:
return err(VerifierError.MissingParent) 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: elif supernode == true and accumulatedColumns.len >= localCustodyColumns.len div 2:
let data_columns = dataColumnQuarantine[].popDataColumns(forkyBlck.root, forkyBlck) let data_columns = dataColumnQuarantine[].popDataColumns(forkyBlck.root, forkyBlck)
return await blockProcessor[].addBlock(MsgSource.gossip, signedBlock, 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" debug "Not handling missing data columns early in slot"
continue 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) let missing = rman.dataColumnQuarantine[].dataColumnFetchRecord(forkyBlck)
if len(missing.indices) == 0: if len(missing.indices) == 0:
warn "quarantine is missing data columns, but missing indices are empty", warn "quarantine is missing data columns, but missing indices are empty",