initial start fix

This commit is contained in:
Agnish Ghosh 2024-10-03 15:43:45 +05:30
parent 7952a3577c
commit 6e057edc89
6 changed files with 7 additions and 21 deletions

View File

@ -80,6 +80,7 @@ func popDataColumns*(
r.add(c)
r
func hasDataColumns*(quarantine: DataColumnQuarantine,
blck: deneb.SignedBeaconBlock | electra.SignedBeaconBlock): bool =
for idx in 0..<NUMBER_OF_COLUMNS:

View File

@ -219,7 +219,6 @@ proc storeBackfillBlock(
let kzgCommits = signedBlock.message.body.blob_kzg_commitments.asSeq
if data_columns.len > 0 and kzgCommits.len > 0:
for i in 0..<data_columns.len:
debugEcho "Verifying dc kzg proof"
let r = verify_data_column_sidecar_kzg_proofs(data_columns[i][])
if r.isErr():
debug "backfill data column validation failed",
@ -649,7 +648,6 @@ proc storeBlock(
debugEcho "Hitting verification"
if data_columns.len > 0 and kzgCommits.len > 0:
for i in 0..<data_columns.len:
debugEcho "Verifying dc kzg proof store block"
let r = verify_data_column_sidecar_kzg_proofs(data_columns[i][])
if r.isErr():
debug "backfill data column validation failed",

View File

@ -427,7 +427,7 @@ proc initFullNode(
# maybeFinalized = maybeFinalized)
when consensusFork >= ConsensusFork.Deneb:
if not dataColumnQuarantine[].hasDataColumns(forkyBlck):
if not dataColumnQuarantine[].hasBlobs(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):
@ -1531,13 +1531,13 @@ proc tryReconstructingDataColumns* (self: BeaconNode,
data_column_sidecars.add data_column[]
storedColumns.add data_column.index
debugEcho "Pre stored columns"
debugEcho storedColumns
debugEcho "Pre stored columns"
debugEcho storedColumns
# storedColumn number is less than the NUMBER_OF_COLUMNS
# then reconstruction is not possible, and if all the data columns
# are already stored then we do not need to reconstruct at all
if storedColumns.len < NUMBER_OF_COLUMNS div 2 and storedColumns.len != NUMBER_OF_COLUMNS:
if not storedColumns.len < NUMBER_OF_COLUMNS div 2 or storedColumns.len != NUMBER_OF_COLUMNS:
# Recover blobs from saved data column sidecars
let recovered_cps = recover_cells_and_proofs(data_column_sidecars, storedColumns.len, signed_block)
if not recovered_cps.isOk:

View File

@ -42,7 +42,6 @@ const
POLL_INTERVAL = 1.seconds
POLL_INTERVAL_DATA_COLUMNS = 1.seconds
type
BlockVerifierFn* = proc(
@ -531,7 +530,7 @@ proc getMissingDataColumns(rman: RequestManager): seq[DataColumnIdentifier] =
var
fetches: seq[DataColumnIdentifier]
ready: seq[Eth2Digest]
return fetches
for columnless in rman.quarantine[].peekColumnless():
withBlck(columnless):
when consensusFork >= ConsensusFork.Deneb:
@ -575,7 +574,7 @@ proc requestManagerDataColumnLoop(
rman: RequestManager) {.async: (raises: [CancelledError]).} =
while true:
await sleepAsync(POLL_INTERVAL_DATA_COLUMNS)
await sleepAsync(POLL_INTERVAL)
if rman.inhibit():
continue

View File

@ -371,9 +371,6 @@ func groupDataColumns*[T](req: SyncRequest[T],
grouped[block_idx].add(data_column_sidecar)
inc column_cursor
debugEcho "Column Cursor"
debugEcho column_cursor
if column_cursor != len(data_columns):
# we reached end of blocks without consuming all data columns so either
# the peer we got too few blocks in the paired request, or the

View File

@ -177,8 +177,6 @@ proc routeSignedBeaconBlock*(
debug "Issue with computing data column from blob bundle"
let data_columns = dataColumnsOpt[].get()
var das_workers = newSeq[Future[SendResult]](len(dataColumnsOpt[].get()))
debugEcho "das workers len"
debugEcho das_workers.len
for i in 0..<data_columns.lenu64:
let subnet_id = compute_subnet_for_data_column_sidecar(data_columns[i].index)
das_workers[i] =
@ -196,13 +194,6 @@ proc routeSignedBeaconBlock*(
metadata = router[].network.metadata.custody_subnet_count.uint64
custody_columns = router[].network.nodeId.get_custody_columns(max(SAMPLES_PER_SLOT.uint64,
metadata))
debugEcho "dcs"
debugEcho data_columns.len
debugEcho "custodycols"
debugEcho custody_columns.len
var final_columns: seq[DataColumnSidecar]
for dc in data_columns:
if dc.index in custody_columns: