Skip to content

Commit 1443d4e

Browse files
Add peerDAS computation metric
1 parent 0f68604 commit 1443d4e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

beacon_chain/gossip_processing/eth2_processor.nim

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ declareHistogram data_column_sidecar_delay,
100100
"Time(s) betweeen slot start and data column sidecar reception",
101101
buckets = delayBuckets
102102

103+
declareHistogram beacon_data_column_sidecar_computation_seconds,
104+
"Time taken to compute data column sidecar, including cells and inclusion proof",
105+
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]
106+
103107
type
104108
DoppelgangerProtection = object
105109
broadcastStartEpoch*: Epoch ##\
@@ -381,11 +385,15 @@ proc validateDataColumnSidecarFromEL*(
381385
flat_proof.add(kzg.KzgProof(bytes: proof.data))
382386

383387
let
388+
recover_start_time = Moment.now()
384389
recovered_columns =
385390
assemble_data_column_sidecars(
386391
forkyBlck,
387392
blobsEl.mapIt(kzg.KzgBlob(bytes: it.blob.data)),
388393
flat_proof)
394+
recover_end_time = Moment.now()
395+
recover_dur = recover_end_time - recover_start_time
396+
beacon_data_column_sidecar_computation_seconds.observe(recover_dur.toFloatSeconds())
389397

390398
# Pop out the column sidecars as we have all columns from the EL
391399
discard self.dataColumnQuarantine[].popSidecars(block_root,

0 commit comments

Comments
 (0)