other fixes
This commit is contained in:
parent
e7f66a6ace
commit
878cfc5d5c
|
@ -260,7 +260,7 @@ proc storeBackfillBlock(
|
||||||
let data_columns = dataColumnsOpt.valueOr: DataColumnSidecars @[]
|
let data_columns = dataColumnsOpt.valueOr: DataColumnSidecars @[]
|
||||||
for c in data_columns:
|
for c in data_columns:
|
||||||
self.consensusManager.dag.db.putDataColumnSidecar(c[])
|
self.consensusManager.dag.db.putDataColumnSidecar(c[])
|
||||||
debug "Data column written to database!",
|
debug "StoreBackFillBlock: Data column written to database!",
|
||||||
data_column = shortLog(c[])
|
data_column = shortLog(c[])
|
||||||
|
|
||||||
res
|
res
|
||||||
|
@ -646,6 +646,7 @@ proc storeBlock(
|
||||||
let kzgCommits = signedBlock.message.body.blob_kzg_commitments.asSeq
|
let kzgCommits = signedBlock.message.body.blob_kzg_commitments.asSeq
|
||||||
debugEcho "Hitting verification"
|
debugEcho "Hitting verification"
|
||||||
if data_columns.len > 0 and kzgCommits.len > 0:
|
if data_columns.len > 0 and kzgCommits.len > 0:
|
||||||
|
debugEcho "Hitting verification 2"
|
||||||
for i in 0..<data_columns.len:
|
for i in 0..<data_columns.len:
|
||||||
let r = verify_data_column_sidecar_kzg_proofs(data_columns[i][])
|
let r = verify_data_column_sidecar_kzg_proofs(data_columns[i][])
|
||||||
if r.isErr():
|
if r.isErr():
|
||||||
|
@ -655,7 +656,7 @@ proc storeBlock(
|
||||||
blck = shortLog(signedBlock.message),
|
blck = shortLog(signedBlock.message),
|
||||||
signature = shortLog(signedBlock.signature),
|
signature = shortLog(signedBlock.signature),
|
||||||
msg = r.error()
|
msg = r.error()
|
||||||
return err((VerifierError.Invalid, ProcessingStatus.completed))
|
return err((VerifierError.Invalid, ProcessingStatus.completed))
|
||||||
|
|
||||||
type Trusted = typeof signedBlock.asTrusted()
|
type Trusted = typeof signedBlock.asTrusted()
|
||||||
|
|
||||||
|
@ -707,7 +708,7 @@ proc storeBlock(
|
||||||
let data_columns = dataColumnsOpt.valueOr: DataColumnSidecars @[]
|
let data_columns = dataColumnsOpt.valueOr: DataColumnSidecars @[]
|
||||||
for c in data_columns:
|
for c in data_columns:
|
||||||
self.consensusManager.dag.db.putDataColumnSidecar(c[])
|
self.consensusManager.dag.db.putDataColumnSidecar(c[])
|
||||||
debug "Data column written to database!",
|
debug "StoreBlock: Data column written to database!",
|
||||||
data_column = shortLog(c[])
|
data_column = shortLog(c[])
|
||||||
|
|
||||||
let addHeadBlockTick = Moment.now()
|
let addHeadBlockTick = Moment.now()
|
||||||
|
|
|
@ -1545,15 +1545,17 @@ proc tryReconstructingDataColumns* (self: BeaconNode,
|
||||||
|
|
||||||
# Reconstruct data column sidecars from recovered blobs
|
# Reconstruct data column sidecars from recovered blobs
|
||||||
let reconstructedDataColumns = get_data_column_sidecars(signed_block, recovered_cps.get)
|
let reconstructedDataColumns = get_data_column_sidecars(signed_block, recovered_cps.get)
|
||||||
|
debugEcho "Reconstructed Data Columns len"
|
||||||
|
debugEcho reconstructedDataColumns.get.len
|
||||||
for data_column in reconstructedDataColumns.get:
|
for data_column in reconstructedDataColumns.get:
|
||||||
if data_column.index notin custodiedColumnIndices:
|
if data_column.index notin custodiedColumnIndices:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
finalisedDataColumns.add(data_column)
|
finalisedDataColumns.add(data_column)
|
||||||
db.putDataColumnSidecar(data_column)
|
for fc in finalisedDataColumns:
|
||||||
|
db.putDataColumnSidecar(fc)
|
||||||
debug "Reconstructed data column written to database",
|
debug "Reconstructed data column written to database",
|
||||||
data_column = shortLog(data_column)
|
data_column = shortLog(fc)
|
||||||
ok(finalisedDataColumns)
|
ok(finalisedDataColumns)
|
||||||
|
|
||||||
proc reconstructAndSendDataColumns*(node: BeaconNode) {.async.} =
|
proc reconstructAndSendDataColumns*(node: BeaconNode) {.async.} =
|
||||||
|
|
Loading…
Reference in New Issue