missing data columns improvement
This commit is contained in:
parent
44c95a0667
commit
a89847b1f1
|
@ -104,14 +104,9 @@ 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:
|
||||
return false
|
||||
if len(blck.message.body.blob_kzg_commitments) != 0:
|
||||
if (blck.root, ColumnIndex i) notin quarantine.data_columns:
|
||||
return false
|
||||
true
|
||||
|
||||
func dataColumnFetchRecord*(quarantine: DataColumnQuarantine,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue