Skip to content

Add peerDAS kzg verification metrics #7154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions beacon_chain/gossip_processing/gossip_validation.nim
Original file line number Diff line number Diff line change
@@ -53,6 +53,10 @@ declareHistogram beacon_data_column_sidecar_gossip_verification_seconds,
"Full runtime of data column sidecars gossip verification",
buckets = [0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1.0, 2.5, 5.0, 7.5, 10.0, Inf]

declareHistogram beacon_data_column_sidecar_inclusion_proof_verification_seconds,
"Runtime of batched data column kzg verification",
buckets = [0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1.0, 2.5, 5.0, 7.5, 10.0, Inf]

# This result is a little messy in that it returns Result.ok for
# ValidationResult.Accept and an err for the others - this helps transport
# an error message to callers but could arguably be done in an cleaner way.
@@ -716,10 +720,15 @@ proc validateDataColumnSidecar*(
# [REJECT] The sidecar's column data is valid as
# verified by `verify_data_column_kzg_proofs(sidecar)`
block:
let r = check_data_column_sidecar_kzg_proofs(data_column_sidecar)
let
kzgStartTick = Moment.now()
r = check_data_column_sidecar_kzg_proofs(data_column_sidecar)
kzgValidationTick = Moment.now()
kzgValidationDur = kzgValidationTick - kzgStartTick
beacon_data_column_sidecar_inclusion_proof_verification_seconds.observe(kzgValidationDur.toFloatSeconds())
if r.isErr:
return dag.checkedReject(r.error)

let
validationTick = Moment.now()
validationDur = validationTick - startTick