add more logging of KZG commitments, proofs, and blobs (#5735)
This commit is contained in:
parent
017f9f1103
commit
1559a09184
|
@ -192,11 +192,12 @@ proc storeBackfillBlock(
|
|||
blobs.mapIt(it.kzg_proof))
|
||||
if r.isErr():
|
||||
debug "backfill blob validation failed",
|
||||
blockRoot = shortLog(signedBlock.root),
|
||||
blobs = shortLog(blobs),
|
||||
blck = shortLog(signedBlock.message),
|
||||
signature = shortLog(signedBlock.signature),
|
||||
msg = r.error()
|
||||
blockRoot = shortLog(signedBlock.root),
|
||||
blobs = shortLog(blobs),
|
||||
blck = shortLog(signedBlock.message),
|
||||
kzgCommits = mapIt(kzgCommits, shortLog(it)),
|
||||
signature = shortLog(signedBlock.signature),
|
||||
msg = r.error()
|
||||
blobsOk = r.isOk()
|
||||
|
||||
if not blobsOk:
|
||||
|
@ -539,6 +540,7 @@ proc storeBlock(
|
|||
blockRoot = shortLog(signedBlock.root),
|
||||
blobs = shortLog(blobs),
|
||||
blck = shortLog(signedBlock.message),
|
||||
kzgCommits = mapIt(kzgCommits, shortLog(it)),
|
||||
signature = shortLog(signedBlock.signature),
|
||||
msg = r.error()
|
||||
return err((VerifierError.Invalid, ProcessingStatus.completed))
|
||||
|
|
|
@ -508,6 +508,12 @@ type
|
|||
func initHashedBeaconState*(s: BeaconState): HashedBeaconState =
|
||||
HashedBeaconState(data: s)
|
||||
|
||||
func shortLog*(v: KzgCommitment | KzgProof): auto =
|
||||
to0xHex(v)
|
||||
|
||||
func shortLog*(v: Blob): auto =
|
||||
to0xHex(v.toOpenArray(0, 31))
|
||||
|
||||
func shortLog*(v: SomeBeaconBlock): auto =
|
||||
(
|
||||
slot: shortLog(v.slot),
|
||||
|
@ -534,8 +540,11 @@ func shortLog*(v: SomeBeaconBlock): auto =
|
|||
func shortLog*(v: BlobSidecar): auto =
|
||||
(
|
||||
index: v.index,
|
||||
blob: shortLog(v.blob),
|
||||
bloblen: v.blob.len(),
|
||||
block_header: shortLog(v.signed_block_header.message),
|
||||
kzg_commitment: shortLog(v.kzg_commitment),
|
||||
kzg_proof: shortLog(v.kzg_proof),
|
||||
)
|
||||
|
||||
func shortLog*(v: seq[BlobSidecar]): auto =
|
||||
|
|
Loading…
Reference in New Issue