Skip to content

Conversation

@KatyaRyazantseva
Copy link
Contributor

Motivation

This PR aims to solve inconsistencies and tech debt associated with the metrics for blobs and columns, as outlined in #8174.

Description

The metrics have been refactored for better consistency between blobs and data columns.

Steps to test or reproduce

Blobs metrics are not widely used on dashboards. For some data column metrics, use the PeerDAS dashboard.

@KatyaRyazantseva KatyaRyazantseva requested a review from a team as a code owner August 13, 2025 19:56
@KatyaRyazantseva KatyaRyazantseva added the scope-metrics All issues with regards to the exposed metrics. label Aug 13, 2025
(blockInput.blockData.fork === ForkName.deneb || blockInput.blockData.fork === ForkName.electra)
) {
const {blobsSource} = blockInput.blockData;
this.metrics?.importBlock.blobsBySource.inc({blobsSource});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to seenGossipBlockInput.ts.

Comment on lines 737 to 740
validationTime: register.histogram({
name: "lodestar_gossip_data_column_gossip_validate_time",
help: "Time elapsed for data column validation",
buckets: [0.05, 0.1, 0.2, 0.5, 1, 1.5, 2, 4],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point overlaps with the specs' beacon_data_column_sidecar_gossip_verification_seconds metric. Probably, should be deleted.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it's already defined in the spec should prefer using those metrics if they track the same

help: "Time elapsed between block slot time and the time data column sidecar reconstructed",
buckets: [2, 4, 6, 8, 10, 12],
gossipDataColumn: {
recvToValidation: register.histogram({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be added to the PeerDAS dashboard?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason not to visualize it?

Comment on lines 743 to 747
blobs: {
bySource: register.gauge<{source: BlobsSource}>({
name: "lodestar_blobs_by_source",
help: "Number of received blobs by source",
labelNames: ["source"],
Copy link
Contributor Author

@KatyaRyazantseva KatyaRyazantseva Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved out from importBlock section - blobsBySource.

@KatyaRyazantseva
Copy link
Contributor Author

Are blob metrics from blockInput group like duplicateBlobCount and createdByBlob related to the upcoming BlockInput refactor? Currently BlockInputColumns code is commented out in seenBlockInput.

Copy link
Member

@nflaig nflaig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blobs metrics seem incomplete and data column likely as well (need to double check), at least for blobs we might also get them from engine or req/resp, not only gossip and api.

you can search for EventType.blobSidecar, also see changes in #7967

} as BlockInputBlobs;

blockInputs.push(getBlockInput.availableData(config, block.data, blockSource, blockData));
metrics?.blobs.bySource.inc({source: blobsSource}, allBlobSidecars.length);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function also called from ByRoot.


let allDataColumnsSidecars: fulu.DataColumnSidecar[];
logger?.debug("allDataColumnsSidecars partialDownload", {
let allDataColumnSidecars: fulu.DataColumnSidecar[];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed for consistency, has been used twice in this module, as allDataColumnSidecars and allDataColumnsSidecars. Probably, this change should be moved into other PR.

// for e.g. a blockInput that might be awaiting blobs promise fullfillment in
// verifyBlocksDataAvailability
cachedData.blobsCache.set(blobSidecar.index, blobSidecar);
metrics?.blobs.bySource.inc({source: BlobsSource.engine});
Copy link
Contributor Author

@KatyaRyazantseva KatyaRyazantseva Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how to count here: all the blobs we've got from EL or those from EL which are not cached yet. Same for data columns.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EL which are not cached yet.

otherwise we would get incorrect numbers, we care about from where we've received the data first

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on check cachedData.blobsCache.has(engineReqIdentifiers[j].index) === false it seems we already count this correctly, ie. we only increment if we've received a blob from EL which we haven't received yet from gossip or other sources

},
gossipDataColumn: {
recvToValidation: register.histogram({
name: "lodestar_gossip_data_column_received_to_gossip_validate",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unit is missing

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the metric name might also suggest that it tracks time between receiving until before validation, not including validation time

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The [start]To[end] metric naming convention is a standard practice for measuring the total latency of a process. It is used to define the full time elapsed from the moment a process starts until the moment it completes. Adding unit makes sense.

help: "Time elapsed between data column received and data column validation",
buckets: [0.05, 0.1, 0.2, 0.5, 1, 1.5, 2, 4],
}),
validationTime: register.histogram({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any difference between recvToValidation and validationTime? we shouldn't be doing a lot of work besides deserialzation which is pretty fast

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a difference. Deleted validationTime in favor of verificationTime from the metrics specs.

Comment on lines 737 to 740
validationTime: register.histogram({
name: "lodestar_gossip_data_column_gossip_validate_time",
help: "Time elapsed for data column validation",
buckets: [0.05, 0.1, 0.2, 0.5, 1, 1.5, 2, 4],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it's already defined in the spec should prefer using those metrics if they track the same

help: "Time elapsed between block slot time and the time data column sidecar reconstructed",
buckets: [2, 4, 6, 8, 10, 12],
gossipDataColumn: {
recvToValidation: register.histogram({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason not to visualize it?

// for e.g. a blockInput that might be awaiting blobs promise fullfillment in
// verifyBlocksDataAvailability
cachedData.blobsCache.set(blobSidecar.index, blobSidecar);
metrics?.blobs.bySource.inc({source: BlobsSource.engine});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on check cachedData.blobsCache.has(engineReqIdentifiers[j].index) === false it seems we already count this correctly, ie. we only increment if we've received a blob from EL which we haven't received yet from gossip or other sources

@codecov
Copy link

codecov bot commented Aug 25, 2025

Codecov Report

❌ Patch coverage is 40.78947% with 45 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.25%. Comparing base (cc8c1ac) to head (9f28365).
⚠️ Report is 108 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #8198   +/-   ##
=========================================
  Coverage     54.24%   54.25%           
=========================================
  Files           847      847           
  Lines         63829    63839   +10     
  Branches       4833     4837    +4     
=========================================
+ Hits          34626    34636   +10     
  Misses        29126    29126           
  Partials         77       77           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

Performance Report

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 4bd6aea Previous: cc8c1ac Ratio
getSlashingsAndExits - default max 75.987 us/op 295.84 us/op 0.26
forkChoice updateHead vc 600000 bc 64 eq 300000 13.564 ms/op 59.313 ms/op 0.23
Full benchmark results
Benchmark suite Current: 4bd6aea Previous: cc8c1ac Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 977.16 us/op 1.0779 ms/op 0.91
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 35.716 us/op 37.734 us/op 0.95
BLS verify - blst 904.86 us/op 977.20 us/op 0.93
BLS verifyMultipleSignatures 3 - blst 1.3155 ms/op 1.3540 ms/op 0.97
BLS verifyMultipleSignatures 8 - blst 1.8926 ms/op 2.5500 ms/op 0.74
BLS verifyMultipleSignatures 32 - blst 5.9834 ms/op 6.2192 ms/op 0.96
BLS verifyMultipleSignatures 64 - blst 9.3828 ms/op 10.977 ms/op 0.85
BLS verifyMultipleSignatures 128 - blst 17.656 ms/op 18.700 ms/op 0.94
BLS deserializing 10000 signatures 693.39 ms/op 716.94 ms/op 0.97
BLS deserializing 100000 signatures 6.9867 s/op 7.3551 s/op 0.95
BLS verifyMultipleSignatures - same message - 3 - blst 1.0164 ms/op 1.2319 ms/op 0.83
BLS verifyMultipleSignatures - same message - 8 - blst 1.0460 ms/op 1.3754 ms/op 0.76
BLS verifyMultipleSignatures - same message - 32 - blst 1.7204 ms/op 2.5714 ms/op 0.67
BLS verifyMultipleSignatures - same message - 64 - blst 2.6541 ms/op 3.8021 ms/op 0.70
BLS verifyMultipleSignatures - same message - 128 - blst 4.4152 ms/op 6.2061 ms/op 0.71
BLS aggregatePubkeys 32 - blst 24.344 us/op 29.408 us/op 0.83
BLS aggregatePubkeys 128 - blst 71.228 us/op 99.182 us/op 0.72
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 56.217 ms/op 99.518 ms/op 0.56
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 55.507 ms/op 97.767 ms/op 0.57
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 39.638 ms/op 62.530 ms/op 0.63
getSlashingsAndExits - default max 75.987 us/op 295.84 us/op 0.26
getSlashingsAndExits - 2k 311.03 us/op 657.40 us/op 0.47
proposeBlockBody type=full, size=empty 5.5261 ms/op 11.034 ms/op 0.50
isKnown best case - 1 super set check 216.00 ns/op 292.00 ns/op 0.74
isKnown normal case - 2 super set checks 214.00 ns/op 336.00 ns/op 0.64
isKnown worse case - 16 super set checks 212.00 ns/op 285.00 ns/op 0.74
InMemoryCheckpointStateCache - add get delete 2.5850 us/op 3.7120 us/op 0.70
validate api signedAggregateAndProof - struct 1.4741 ms/op 1.7334 ms/op 0.85
validate gossip signedAggregateAndProof - struct 1.6002 ms/op 2.1090 ms/op 0.76
batch validate gossip attestation - vc 640000 - chunk 32 115.07 us/op 177.75 us/op 0.65
batch validate gossip attestation - vc 640000 - chunk 64 101.19 us/op 153.99 us/op 0.66
batch validate gossip attestation - vc 640000 - chunk 128 99.099 us/op 138.71 us/op 0.71
batch validate gossip attestation - vc 640000 - chunk 256 103.03 us/op 128.50 us/op 0.80
pickEth1Vote - no votes 1.0247 ms/op 1.1049 ms/op 0.93
pickEth1Vote - max votes 6.6322 ms/op 12.499 ms/op 0.53
pickEth1Vote - Eth1Data hashTreeRoot value x2048 11.764 ms/op 18.357 ms/op 0.64
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 20.835 ms/op 35.465 ms/op 0.59
pickEth1Vote - Eth1Data fastSerialize value x2048 465.88 us/op 648.19 us/op 0.72
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.7884 ms/op 4.8261 ms/op 0.99
bytes32 toHexString 380.00 ns/op 509.00 ns/op 0.75
bytes32 Buffer.toString(hex) 292.00 ns/op 279.00 ns/op 1.05
bytes32 Buffer.toString(hex) from Uint8Array 380.00 ns/op 460.00 ns/op 0.83
bytes32 Buffer.toString(hex) + 0x 256.00 ns/op 356.00 ns/op 0.72
Object access 1 prop 0.13000 ns/op 0.13700 ns/op 0.95
Map access 1 prop 0.13000 ns/op 0.16700 ns/op 0.78
Object get x1000 6.1370 ns/op 6.5890 ns/op 0.93
Map get x1000 6.5690 ns/op 7.2410 ns/op 0.91
Object set x1000 34.177 ns/op 39.856 ns/op 0.86
Map set x1000 22.173 ns/op 25.814 ns/op 0.86
Return object 10000 times 0.29750 ns/op 0.31570 ns/op 0.94
Throw Error 10000 times 4.2233 us/op 5.0419 us/op 0.84
toHex 125.44 ns/op 148.94 ns/op 0.84
Buffer.from 124.92 ns/op 192.62 ns/op 0.65
shared Buffer 87.309 ns/op 121.25 ns/op 0.72
fastMsgIdFn sha256 / 200 bytes 2.1900 us/op 3.2550 us/op 0.67
fastMsgIdFn h32 xxhash / 200 bytes 206.00 ns/op 251.00 ns/op 0.82
fastMsgIdFn h64 xxhash / 200 bytes 259.00 ns/op 327.00 ns/op 0.79
fastMsgIdFn sha256 / 1000 bytes 7.1750 us/op 7.9870 us/op 0.90
fastMsgIdFn h32 xxhash / 1000 bytes 330.00 ns/op 405.00 ns/op 0.81
fastMsgIdFn h64 xxhash / 1000 bytes 339.00 ns/op 401.00 ns/op 0.85
fastMsgIdFn sha256 / 10000 bytes 64.983 us/op 70.771 us/op 0.92
fastMsgIdFn h32 xxhash / 10000 bytes 1.8840 us/op 2.1860 us/op 0.86
fastMsgIdFn h64 xxhash / 10000 bytes 1.2280 us/op 1.3240 us/op 0.93
send data - 1000 256B messages 18.836 ms/op 28.833 ms/op 0.65
send data - 1000 512B messages 21.204 ms/op 27.720 ms/op 0.76
send data - 1000 1024B messages 28.246 ms/op 35.783 ms/op 0.79
send data - 1000 1200B messages 31.452 ms/op 41.204 ms/op 0.76
send data - 1000 2048B messages 30.094 ms/op 35.813 ms/op 0.84
send data - 1000 4096B messages 32.431 ms/op 40.746 ms/op 0.80
send data - 1000 16384B messages 47.285 ms/op 58.684 ms/op 0.81
send data - 1000 65536B messages 124.12 ms/op 158.61 ms/op 0.78
enrSubnets - fastDeserialize 64 bits 924.00 ns/op 1.0070 us/op 0.92
enrSubnets - ssz BitVector 64 bits 344.00 ns/op 445.00 ns/op 0.77
enrSubnets - fastDeserialize 4 bits 141.00 ns/op 196.00 ns/op 0.72
enrSubnets - ssz BitVector 4 bits 345.00 ns/op 350.00 ns/op 0.99
prioritizePeers score -10:0 att 32-0.1 sync 2-0 128.39 us/op 140.44 us/op 0.91
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 147.94 us/op 174.90 us/op 0.85
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 214.78 us/op 248.47 us/op 0.86
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 400.57 us/op 474.06 us/op 0.84
prioritizePeers score 0:0 att 64-1 sync 4-1 476.58 us/op 578.43 us/op 0.82
array of 16000 items push then shift 1.6535 us/op 1.7458 us/op 0.95
LinkedList of 16000 items push then shift 7.1710 ns/op 9.6240 ns/op 0.75
array of 16000 items push then pop 80.647 ns/op 93.597 ns/op 0.86
LinkedList of 16000 items push then pop 7.0980 ns/op 9.3790 ns/op 0.76
array of 24000 items push then shift 2.5154 us/op 2.6165 us/op 0.96
LinkedList of 24000 items push then shift 7.5450 ns/op 10.534 ns/op 0.72
array of 24000 items push then pop 115.31 ns/op 132.73 ns/op 0.87
LinkedList of 24000 items push then pop 8.1730 ns/op 9.5950 ns/op 0.85
intersect bitArray bitLen 8 6.4640 ns/op 6.8200 ns/op 0.95
intersect array and set length 8 38.505 ns/op 42.982 ns/op 0.90
intersect bitArray bitLen 128 30.196 ns/op 32.108 ns/op 0.94
intersect array and set length 128 634.69 ns/op 663.78 ns/op 0.96
bitArray.getTrueBitIndexes() bitLen 128 1.1170 us/op 1.3870 us/op 0.81
bitArray.getTrueBitIndexes() bitLen 248 1.8390 us/op 2.0700 us/op 0.89
bitArray.getTrueBitIndexes() bitLen 512 4.0030 us/op 4.1820 us/op 0.96
Buffer.concat 32 items 768.00 ns/op 697.00 ns/op 1.10
Uint8Array.set 32 items 1.7710 us/op 1.1360 us/op 1.56
Buffer.copy 2.8260 us/op 3.2340 us/op 0.87
Uint8Array.set - with subarray 1.7460 us/op 3.5340 us/op 0.49
Uint8Array.set - without subarray 1.0740 us/op 1.8800 us/op 0.57
getUint32 - dataview 213.00 ns/op 217.00 ns/op 0.98
getUint32 - manual 130.00 ns/op 130.00 ns/op 1.00
Set add up to 64 items then delete first 2.7911 us/op 2.9215 us/op 0.96
OrderedSet add up to 64 items then delete first 4.2135 us/op 4.6727 us/op 0.90
Set add up to 64 items then delete last 2.9164 us/op 3.4665 us/op 0.84
OrderedSet add up to 64 items then delete last 4.0925 us/op 4.8783 us/op 0.84
Set add up to 64 items then delete middle 2.7933 us/op 3.2406 us/op 0.86
OrderedSet add up to 64 items then delete middle 5.8428 us/op 6.5592 us/op 0.89
Set add up to 128 items then delete first 5.4823 us/op 6.7183 us/op 0.82
OrderedSet add up to 128 items then delete first 8.2758 us/op 11.308 us/op 0.73
Set add up to 128 items then delete last 5.3157 us/op 6.8811 us/op 0.77
OrderedSet add up to 128 items then delete last 7.9586 us/op 9.1936 us/op 0.87
Set add up to 128 items then delete middle 5.4901 us/op 5.7805 us/op 0.95
OrderedSet add up to 128 items then delete middle 14.229 us/op 17.308 us/op 0.82
Set add up to 256 items then delete first 10.505 us/op 13.537 us/op 0.78
OrderedSet add up to 256 items then delete first 16.077 us/op 21.696 us/op 0.74
Set add up to 256 items then delete last 11.085 us/op 13.089 us/op 0.85
OrderedSet add up to 256 items then delete last 16.522 us/op 21.638 us/op 0.76
Set add up to 256 items then delete middle 10.801 us/op 13.678 us/op 0.79
OrderedSet add up to 256 items then delete middle 41.910 us/op 49.604 us/op 0.84
transfer serialized Status (84 B) 2.3020 us/op 3.4050 us/op 0.68
copy serialized Status (84 B) 1.2100 us/op 2.1000 us/op 0.58
transfer serialized SignedVoluntaryExit (112 B) 2.3700 us/op 2.9920 us/op 0.79
copy serialized SignedVoluntaryExit (112 B) 1.2400 us/op 1.8850 us/op 0.66
transfer serialized ProposerSlashing (416 B) 2.3620 us/op 3.0200 us/op 0.78
copy serialized ProposerSlashing (416 B) 1.2100 us/op 2.3490 us/op 0.52
transfer serialized Attestation (485 B) 2.4990 us/op 3.3100 us/op 0.75
copy serialized Attestation (485 B) 1.3760 us/op 2.5350 us/op 0.54
transfer serialized AttesterSlashing (33232 B) 2.4770 us/op 4.0220 us/op 0.62
copy serialized AttesterSlashing (33232 B) 3.2870 us/op 6.1640 us/op 0.53
transfer serialized Small SignedBeaconBlock (128000 B) 3.1910 us/op 3.9860 us/op 0.80
copy serialized Small SignedBeaconBlock (128000 B) 9.1110 us/op 19.459 us/op 0.47
transfer serialized Avg SignedBeaconBlock (200000 B) 3.7230 us/op 4.1990 us/op 0.89
copy serialized Avg SignedBeaconBlock (200000 B) 15.113 us/op 23.965 us/op 0.63
transfer serialized BlobsSidecar (524380 B) 3.7580 us/op 4.4610 us/op 0.84
copy serialized BlobsSidecar (524380 B) 59.081 us/op 166.47 us/op 0.35
transfer serialized Big SignedBeaconBlock (1000000 B) 3.5890 us/op 4.8730 us/op 0.74
copy serialized Big SignedBeaconBlock (1000000 B) 118.60 us/op 135.21 us/op 0.88
pass gossip attestations to forkchoice per slot 2.9460 ms/op 3.2233 ms/op 0.91
forkChoice updateHead vc 100000 bc 64 eq 0 467.94 us/op 489.67 us/op 0.96
forkChoice updateHead vc 600000 bc 64 eq 0 3.0774 ms/op 3.8890 ms/op 0.79
forkChoice updateHead vc 1000000 bc 64 eq 0 5.0236 ms/op 6.1344 ms/op 0.82
forkChoice updateHead vc 600000 bc 320 eq 0 3.0452 ms/op 3.5088 ms/op 0.87
forkChoice updateHead vc 600000 bc 1200 eq 0 2.9691 ms/op 3.6120 ms/op 0.82
forkChoice updateHead vc 600000 bc 7200 eq 0 3.2762 ms/op 4.4943 ms/op 0.73
forkChoice updateHead vc 600000 bc 64 eq 1000 10.593 ms/op 11.598 ms/op 0.91
forkChoice updateHead vc 600000 bc 64 eq 10000 10.515 ms/op 11.862 ms/op 0.89
forkChoice updateHead vc 600000 bc 64 eq 300000 13.564 ms/op 59.313 ms/op 0.23
computeDeltas 500000 validators 300 proto nodes 4.2889 ms/op 4.6253 ms/op 0.93
computeDeltas 500000 validators 1200 proto nodes 4.1670 ms/op 4.8811 ms/op 0.85
computeDeltas 500000 validators 7200 proto nodes 4.5157 ms/op 4.7231 ms/op 0.96
computeDeltas 750000 validators 300 proto nodes 6.3987 ms/op 6.7429 ms/op 0.95
computeDeltas 750000 validators 1200 proto nodes 6.3459 ms/op 7.0295 ms/op 0.90
computeDeltas 750000 validators 7200 proto nodes 6.4620 ms/op 7.1147 ms/op 0.91
computeDeltas 1400000 validators 300 proto nodes 11.738 ms/op 12.819 ms/op 0.92
computeDeltas 1400000 validators 1200 proto nodes 12.088 ms/op 14.445 ms/op 0.84
computeDeltas 1400000 validators 7200 proto nodes 11.978 ms/op 16.412 ms/op 0.73
computeDeltas 2100000 validators 300 proto nodes 19.191 ms/op 22.246 ms/op 0.86
computeDeltas 2100000 validators 1200 proto nodes 19.150 ms/op 23.374 ms/op 0.82
computeDeltas 2100000 validators 7200 proto nodes 18.873 ms/op 19.776 ms/op 0.95
altair processAttestation - 250000 vs - 7PWei normalcase 2.5758 ms/op 3.4977 ms/op 0.74
altair processAttestation - 250000 vs - 7PWei worstcase 3.3739 ms/op 5.1147 ms/op 0.66
altair processAttestation - setStatus - 1/6 committees join 155.70 us/op 205.10 us/op 0.76
altair processAttestation - setStatus - 1/3 committees join 273.31 us/op 356.70 us/op 0.77
altair processAttestation - setStatus - 1/2 committees join 414.54 us/op 394.72 us/op 1.05
altair processAttestation - setStatus - 2/3 committees join 497.79 us/op 533.34 us/op 0.93
altair processAttestation - setStatus - 4/5 committees join 643.26 us/op 705.29 us/op 0.91
altair processAttestation - setStatus - 100% committees join 735.18 us/op 904.70 us/op 0.81
altair processBlock - 250000 vs - 7PWei normalcase 9.1960 ms/op 8.1479 ms/op 1.13
altair processBlock - 250000 vs - 7PWei normalcase hashState 36.611 ms/op 46.070 ms/op 0.79
altair processBlock - 250000 vs - 7PWei worstcase 43.219 ms/op 50.681 ms/op 0.85
altair processBlock - 250000 vs - 7PWei worstcase hashState 98.177 ms/op 100.59 ms/op 0.98
phase0 processBlock - 250000 vs - 7PWei normalcase 1.6481 ms/op 2.1297 ms/op 0.77
phase0 processBlock - 250000 vs - 7PWei worstcase 28.599 ms/op 26.142 ms/op 1.09
altair processEth1Data - 250000 vs - 7PWei normalcase 342.93 us/op 371.48 us/op 0.92
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.0460 us/op 10.952 us/op 0.83
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 49.397 us/op 54.800 us/op 0.90
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 9.6180 us/op 16.483 us/op 0.58
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.8690 us/op 7.1030 us/op 0.97
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 258.52 us/op 163.44 us/op 1.58
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.8943 ms/op 1.9453 ms/op 0.97
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.3636 ms/op 2.4785 ms/op 0.95
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.4633 ms/op 2.5682 ms/op 0.96
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.7229 ms/op 4.8263 ms/op 0.98
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.4444 ms/op 2.5775 ms/op 0.95
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.8438 ms/op 5.9645 ms/op 0.81
Tree 40 250000 create 426.09 ms/op 707.11 ms/op 0.60
Tree 40 250000 get(125000) 139.44 ns/op 155.25 ns/op 0.90
Tree 40 250000 set(125000) 1.4323 us/op 2.7674 us/op 0.52
Tree 40 250000 toArray() 17.137 ms/op 23.574 ms/op 0.73
Tree 40 250000 iterate all - toArray() + loop 15.894 ms/op 24.388 ms/op 0.65
Tree 40 250000 iterate all - get(i) 53.813 ms/op 63.434 ms/op 0.85
Array 250000 create 2.5549 ms/op 3.0270 ms/op 0.84
Array 250000 clone - spread 829.85 us/op 1.5581 ms/op 0.53
Array 250000 get(125000) 0.41800 ns/op 0.44300 ns/op 0.94
Array 250000 set(125000) 0.43800 ns/op 0.45700 ns/op 0.96
Array 250000 iterate all - loop 83.210 us/op 113.96 us/op 0.73
phase0 afterProcessEpoch - 250000 vs - 7PWei 42.251 ms/op 44.402 ms/op 0.95
Array.fill - length 1000000 3.4976 ms/op 4.2883 ms/op 0.82
Array push - length 1000000 13.276 ms/op 16.503 ms/op 0.80
Array.get 0.28429 ns/op 0.29718 ns/op 0.96
Uint8Array.get 0.44177 ns/op 0.46955 ns/op 0.94
phase0 beforeProcessEpoch - 250000 vs - 7PWei 17.301 ms/op 21.881 ms/op 0.79
altair processEpoch - mainnet_e81889 269.73 ms/op 331.52 ms/op 0.81
mainnet_e81889 - altair beforeProcessEpoch 17.812 ms/op 24.280 ms/op 0.73
mainnet_e81889 - altair processJustificationAndFinalization 5.8320 us/op 7.8620 us/op 0.74
mainnet_e81889 - altair processInactivityUpdates 4.1340 ms/op 7.1858 ms/op 0.58
mainnet_e81889 - altair processRewardsAndPenalties 39.172 ms/op 48.466 ms/op 0.81
mainnet_e81889 - altair processRegistryUpdates 700.00 ns/op 819.00 ns/op 0.85
mainnet_e81889 - altair processSlashings 179.00 ns/op 219.00 ns/op 0.82
mainnet_e81889 - altair processEth1DataReset 181.00 ns/op 205.00 ns/op 0.88
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2149 ms/op 1.2950 ms/op 0.94
mainnet_e81889 - altair processSlashingsReset 1.0930 us/op 1.2300 us/op 0.89
mainnet_e81889 - altair processRandaoMixesReset 1.1900 us/op 1.5390 us/op 0.77
mainnet_e81889 - altair processHistoricalRootsUpdate 179.00 ns/op 219.00 ns/op 0.82
mainnet_e81889 - altair processParticipationFlagUpdates 562.00 ns/op 649.00 ns/op 0.87
mainnet_e81889 - altair processSyncCommitteeUpdates 133.00 ns/op 210.00 ns/op 0.63
mainnet_e81889 - altair afterProcessEpoch 45.004 ms/op 47.477 ms/op 0.95
capella processEpoch - mainnet_e217614 982.19 ms/op 1.1039 s/op 0.89
mainnet_e217614 - capella beforeProcessEpoch 65.426 ms/op 70.338 ms/op 0.93
mainnet_e217614 - capella processJustificationAndFinalization 6.5640 us/op 5.8190 us/op 1.13
mainnet_e217614 - capella processInactivityUpdates 15.175 ms/op 15.605 ms/op 0.97
mainnet_e217614 - capella processRewardsAndPenalties 184.01 ms/op 192.80 ms/op 0.95
mainnet_e217614 - capella processRegistryUpdates 8.3360 us/op 7.6450 us/op 1.09
mainnet_e217614 - capella processSlashings 185.00 ns/op 201.00 ns/op 0.92
mainnet_e217614 - capella processEth1DataReset 181.00 ns/op 211.00 ns/op 0.86
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.2331 ms/op 4.4908 ms/op 0.94
mainnet_e217614 - capella processSlashingsReset 1.0930 us/op 950.00 ns/op 1.15
mainnet_e217614 - capella processRandaoMixesReset 1.4190 us/op 1.2600 us/op 1.13
mainnet_e217614 - capella processHistoricalRootsUpdate 194.00 ns/op 198.00 ns/op 0.98
mainnet_e217614 - capella processParticipationFlagUpdates 563.00 ns/op 577.00 ns/op 0.98
mainnet_e217614 - capella afterProcessEpoch 117.11 ms/op 122.09 ms/op 0.96
phase0 processEpoch - mainnet_e58758 299.65 ms/op 366.17 ms/op 0.82
mainnet_e58758 - phase0 beforeProcessEpoch 78.871 ms/op 105.07 ms/op 0.75
mainnet_e58758 - phase0 processJustificationAndFinalization 6.2310 us/op 7.4970 us/op 0.83
mainnet_e58758 - phase0 processRewardsAndPenalties 38.299 ms/op 40.551 ms/op 0.94
mainnet_e58758 - phase0 processRegistryUpdates 3.2110 us/op 3.7410 us/op 0.86
mainnet_e58758 - phase0 processSlashings 177.00 ns/op 203.00 ns/op 0.87
mainnet_e58758 - phase0 processEth1DataReset 174.00 ns/op 201.00 ns/op 0.87
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.2143 ms/op 2.5650 ms/op 0.47
mainnet_e58758 - phase0 processSlashingsReset 939.00 ns/op 1.2690 us/op 0.74
mainnet_e58758 - phase0 processRandaoMixesReset 1.2250 us/op 1.3910 us/op 0.88
mainnet_e58758 - phase0 processHistoricalRootsUpdate 176.00 ns/op 190.00 ns/op 0.93
mainnet_e58758 - phase0 processParticipationRecordUpdates 866.00 ns/op 1.0210 us/op 0.85
mainnet_e58758 - phase0 afterProcessEpoch 35.591 ms/op 37.553 ms/op 0.95
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.4315 ms/op 1.6665 ms/op 1.46
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.7503 ms/op 2.8964 ms/op 0.60
altair processInactivityUpdates - 250000 normalcase 25.582 ms/op 21.534 ms/op 1.19
altair processInactivityUpdates - 250000 worstcase 19.008 ms/op 20.379 ms/op 0.93
phase0 processRegistryUpdates - 250000 normalcase 10.437 us/op 7.1820 us/op 1.45
phase0 processRegistryUpdates - 250000 badcase_full_deposits 456.04 us/op 343.13 us/op 1.33
phase0 processRegistryUpdates - 250000 worstcase 0.5 122.36 ms/op 118.46 ms/op 1.03
altair processRewardsAndPenalties - 250000 normalcase 28.607 ms/op 32.264 ms/op 0.89
altair processRewardsAndPenalties - 250000 worstcase 30.751 ms/op 31.369 ms/op 0.98
phase0 getAttestationDeltas - 250000 normalcase 5.9493 ms/op 8.2185 ms/op 0.72
phase0 getAttestationDeltas - 250000 worstcase 6.0415 ms/op 8.1720 ms/op 0.74
phase0 processSlashings - 250000 worstcase 125.46 us/op 108.59 us/op 1.16
altair processSyncCommitteeUpdates - 250000 10.535 ms/op 12.183 ms/op 0.86
BeaconState.hashTreeRoot - No change 257.00 ns/op 278.00 ns/op 0.92
BeaconState.hashTreeRoot - 1 full validator 97.501 us/op 85.119 us/op 1.15
BeaconState.hashTreeRoot - 32 full validator 1.1301 ms/op 1.0939 ms/op 1.03
BeaconState.hashTreeRoot - 512 full validator 9.2599 ms/op 12.133 ms/op 0.76
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 140.73 us/op 109.63 us/op 1.28
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.9891 ms/op 1.7769 ms/op 1.12
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 25.728 ms/op 24.849 ms/op 1.04
BeaconState.hashTreeRoot - 1 balances 83.183 us/op 85.493 us/op 0.97
BeaconState.hashTreeRoot - 32 balances 1.0387 ms/op 921.29 us/op 1.13
BeaconState.hashTreeRoot - 512 balances 8.9131 ms/op 9.2895 ms/op 0.96
BeaconState.hashTreeRoot - 250000 balances 192.75 ms/op 146.53 ms/op 1.32
aggregationBits - 2048 els - zipIndexesInBitList 21.322 us/op 21.614 us/op 0.99
byteArrayEquals 32 53.618 ns/op 54.944 ns/op 0.98
Buffer.compare 32 17.144 ns/op 19.849 ns/op 0.86
byteArrayEquals 1024 1.5899 us/op 1.6007 us/op 0.99
Buffer.compare 1024 25.448 ns/op 25.793 ns/op 0.99
byteArrayEquals 16384 25.237 us/op 28.144 us/op 0.90
Buffer.compare 16384 190.63 ns/op 202.77 ns/op 0.94
byteArrayEquals 123687377 196.38 ms/op 194.08 ms/op 1.01
Buffer.compare 123687377 6.8097 ms/op 6.5261 ms/op 1.04
byteArrayEquals 32 - diff last byte 53.416 ns/op 52.529 ns/op 1.02
Buffer.compare 32 - diff last byte 17.372 ns/op 17.087 ns/op 1.02
byteArrayEquals 1024 - diff last byte 1.6167 us/op 1.5854 us/op 1.02
Buffer.compare 1024 - diff last byte 26.380 ns/op 25.071 ns/op 1.05
byteArrayEquals 16384 - diff last byte 25.730 us/op 25.134 us/op 1.02
Buffer.compare 16384 - diff last byte 198.45 ns/op 194.72 ns/op 1.02
byteArrayEquals 123687377 - diff last byte 195.25 ms/op 194.62 ms/op 1.00
Buffer.compare 123687377 - diff last byte 8.5986 ms/op 7.1095 ms/op 1.21
byteArrayEquals 32 - random bytes 5.2600 ns/op 5.1730 ns/op 1.02
Buffer.compare 32 - random bytes 17.992 ns/op 18.233 ns/op 0.99
byteArrayEquals 1024 - random bytes 5.2320 ns/op 5.5150 ns/op 0.95
Buffer.compare 1024 - random bytes 17.747 ns/op 16.905 ns/op 1.05
byteArrayEquals 16384 - random bytes 5.2530 ns/op 5.0780 ns/op 1.03
Buffer.compare 16384 - random bytes 17.929 ns/op 17.095 ns/op 1.05
byteArrayEquals 123687377 - random bytes 7.3700 ns/op 6.3700 ns/op 1.16
Buffer.compare 123687377 - random bytes 20.260 ns/op 18.360 ns/op 1.10
regular array get 100000 times 34.105 us/op 33.441 us/op 1.02
wrappedArray get 100000 times 34.027 us/op 44.285 us/op 0.77
arrayWithProxy get 100000 times 12.864 ms/op 12.736 ms/op 1.01
ssz.Root.equals 47.069 ns/op 46.788 ns/op 1.01
byteArrayEquals 46.118 ns/op 46.071 ns/op 1.00
Buffer.compare 10.627 ns/op 10.457 ns/op 1.02
processSlot - 1 slots 10.883 us/op 11.670 us/op 0.93
processSlot - 32 slots 2.4384 ms/op 2.4380 ms/op 1.00
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 3.3610 ms/op 3.0026 ms/op 1.12
getCommitteeAssignments - req 1 vs - 250000 vc 2.1352 ms/op 2.1072 ms/op 1.01
getCommitteeAssignments - req 100 vs - 250000 vc 4.2793 ms/op 4.1217 ms/op 1.04
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5207 ms/op 4.3912 ms/op 1.03
findModifiedValidators - 10000 modified validators 777.30 ms/op 753.85 ms/op 1.03
findModifiedValidators - 1000 modified validators 802.99 ms/op 759.98 ms/op 1.06
findModifiedValidators - 100 modified validators 282.47 ms/op 259.95 ms/op 1.09
findModifiedValidators - 10 modified validators 200.68 ms/op 182.76 ms/op 1.10
findModifiedValidators - 1 modified validators 287.68 ms/op 177.85 ms/op 1.62
findModifiedValidators - no difference 164.33 ms/op 152.02 ms/op 1.08
compare ViewDUs 6.3056 s/op 6.1385 s/op 1.03
compare each validator Uint8Array 1.7543 s/op 1.3186 s/op 1.33
compare ViewDU to Uint8Array 1.0178 s/op 1.0338 s/op 0.98
migrate state 1000000 validators, 24 modified, 0 new 821.78 ms/op 891.85 ms/op 0.92
migrate state 1000000 validators, 1700 modified, 1000 new 1.1805 s/op 1.1762 s/op 1.00
migrate state 1000000 validators, 3400 modified, 2000 new 1.3131 s/op 1.3259 s/op 0.99
migrate state 1500000 validators, 24 modified, 0 new 927.45 ms/op 921.55 ms/op 1.01
migrate state 1500000 validators, 1700 modified, 1000 new 1.1726 s/op 1.1924 s/op 0.98
migrate state 1500000 validators, 3400 modified, 2000 new 1.4019 s/op 1.3851 s/op 1.01
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.3400 ns/op 6.8700 ns/op 0.63
state getBlockRootAtSlot - 250000 vs - 7PWei 677.63 ns/op 567.41 ns/op 1.19
naive computeProposerIndex 100000 validators 54.381 ms/op 50.250 ms/op 1.08
computeProposerIndex 100000 validators 1.5513 ms/op 1.4530 ms/op 1.07
naiveGetNextSyncCommitteeIndices 1000 validators 8.5971 s/op 7.2765 s/op 1.18
getNextSyncCommitteeIndices 1000 validators 117.07 ms/op 105.74 ms/op 1.11
naiveGetNextSyncCommitteeIndices 10000 validators 8.6156 s/op 8.1231 s/op 1.06
getNextSyncCommitteeIndices 10000 validators 122.91 ms/op 108.61 ms/op 1.13
naiveGetNextSyncCommitteeIndices 100000 validators 7.7661 s/op 7.3353 s/op 1.06
getNextSyncCommitteeIndices 100000 validators 111.47 ms/op 108.50 ms/op 1.03
naive computeShuffledIndex 100000 validators 26.698 s/op 24.957 s/op 1.07
cached computeShuffledIndex 100000 validators 600.88 ms/op 562.19 ms/op 1.07
naive computeShuffledIndex 2000000 validators 497.81 s/op 491.69 s/op 1.01
cached computeShuffledIndex 2000000 validators 32.608 s/op 75.593 s/op 0.43
computeProposers - vc 250000 635.71 us/op 701.35 us/op 0.91
computeEpochShuffling - vc 250000 42.429 ms/op 46.968 ms/op 0.90
getNextSyncCommittee - vc 250000 10.629 ms/op 14.044 ms/op 0.76
computeSigningRoot for AttestationData 20.869 us/op 57.551 us/op 0.36
hash AttestationData serialized data then Buffer.toString(base64) 1.5983 us/op 1.8071 us/op 0.88
toHexString serialized data 1.1550 us/op 1.6950 us/op 0.68
Buffer.toString(base64) 153.12 ns/op 172.49 ns/op 0.89
nodejs block root to RootHex using toHex 142.22 ns/op 169.60 ns/op 0.84
nodejs block root to RootHex using toRootHex 84.015 ns/op 92.634 ns/op 0.91
browser block root to RootHex using the deprecated toHexString 207.61 ns/op 249.04 ns/op 0.83
browser block root to RootHex using toHex 170.04 ns/op 209.02 ns/op 0.81
browser block root to RootHex using toRootHex 164.44 ns/op 179.49 ns/op 0.92

by benchmarkbot/action

@KatyaRyazantseva
Copy link
Contributor Author

KatyaRyazantseva commented Sep 3, 2025

Blocked by #8282 and #8200

@nflaig
Copy link
Member

nflaig commented Sep 23, 2025

@KatyaRyazantseva are you planning to continue working on this? needs to be updated against latest unstable since we did quite a lot of changes in block input refactor

@KatyaRyazantseva
Copy link
Contributor Author

@KatyaRyazantseva are you planning to continue working on this? needs to be updated against latest unstable since we did quite a lot of changes in block input refactor

If the block input refactor has finished, then yes, I am going to finish this PR. Will merge the updates.

@nflaig
Copy link
Member

nflaig commented Sep 23, 2025

@KatyaRyazantseva are you planning to continue working on this? needs to be updated against latest unstable since we did quite a lot of changes in block input refactor

If the block input refactor has finished, then yes, I am going to finish this PR. Will merge the updates.

all changes have been merged, seems like we submitted the grafana dashboard changes already to unstable in #8443

@nflaig nflaig marked this pull request as draft September 23, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope-metrics All issues with regards to the exposed metrics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants