Skip to content
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

feat: add metric to track default validator configuration #7194

Merged
merged 3 commits into from
Oct 28, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Oct 23, 2024

Motivation

Related to #5932, it seems useful to see in grafana how the validator client is configured and detect misconfigurations.

Description

Add metric to track default validator configuration

image

We can extend the tracked default configuration values as needed by simply adding a new label to the metric.

@wemeetagain does this resolve #5932?

We should track when we select builder vs local block building and why.

This will require more work and will have to be tracked on the beacon node side, we have #7190 now which shows engine and builder errors which gives some insights but in case that both blocks succeed, we have to add more metrics to properly track the reason why we selected builder over engine block or vice-versa.

@nflaig nflaig requested a review from a team as a code owner October 23, 2024 14:18
Copy link

codecov bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 49.20%. Comparing base (748966b) to head (96afa15).
Report is 5 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7194      +/-   ##
============================================
- Coverage     49.21%   49.20%   -0.01%     
============================================
  Files           598      598              
  Lines         39794    39795       +1     
  Branches       2091     2097       +6     
============================================
  Hits          19583    19583              
  Misses        20171    20171              
- Partials         40       41       +1     

Copy link
Contributor

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 227327c Previous: 748966b Ratio
Buffer.compare 123687377 6.5615 ms/op 20.442 ms/op 0.32
Full benchmark results
Benchmark suite Current: 227327c Previous: 748966b Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.3374 ms/op 2.1807 ms/op 1.07
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 45.689 us/op 66.746 us/op 0.68
BLS verify - blst 846.51 us/op 1.0183 ms/op 0.83
BLS verifyMultipleSignatures 3 - blst 1.3081 ms/op 1.3517 ms/op 0.97
BLS verifyMultipleSignatures 8 - blst 2.0266 ms/op 1.9743 ms/op 1.03
BLS verifyMultipleSignatures 32 - blst 6.3680 ms/op 5.8657 ms/op 1.09
BLS verifyMultipleSignatures 64 - blst 10.708 ms/op 11.179 ms/op 0.96
BLS verifyMultipleSignatures 128 - blst 17.426 ms/op 18.512 ms/op 0.94
BLS deserializing 10000 signatures 665.79 ms/op 714.67 ms/op 0.93
BLS deserializing 100000 signatures 6.5640 s/op 7.0807 s/op 0.93
BLS verifyMultipleSignatures - same message - 3 - blst 934.37 us/op 1.1133 ms/op 0.84
BLS verifyMultipleSignatures - same message - 8 - blst 1.0958 ms/op 1.1348 ms/op 0.97
BLS verifyMultipleSignatures - same message - 32 - blst 1.6317 ms/op 2.0165 ms/op 0.81
BLS verifyMultipleSignatures - same message - 64 - blst 2.6438 ms/op 2.9738 ms/op 0.89
BLS verifyMultipleSignatures - same message - 128 - blst 4.3141 ms/op 4.9267 ms/op 0.88
BLS aggregatePubkeys 32 - blst 18.904 us/op 21.309 us/op 0.89
BLS aggregatePubkeys 128 - blst 67.519 us/op 71.333 us/op 0.95
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 87.999 ms/op 80.652 ms/op 1.09
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 60.009 ms/op 89.872 ms/op 0.67
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 56.766 ms/op 51.751 ms/op 1.10
getSlashingsAndExits - default max 77.050 us/op 137.18 us/op 0.56
getSlashingsAndExits - 2k 446.74 us/op 438.56 us/op 1.02
proposeBlockBody type=full, size=empty 6.0241 ms/op 9.7087 ms/op 0.62
isKnown best case - 1 super set check 573.00 ns/op 756.00 ns/op 0.76
isKnown normal case - 2 super set checks 499.00 ns/op 693.00 ns/op 0.72
isKnown worse case - 16 super set checks 492.00 ns/op 670.00 ns/op 0.73
InMemoryCheckpointStateCache - add get delete 4.5620 us/op 3.8390 us/op 1.19
updateUnfinalizedPubkeys - updating 10 pubkeys 617.70 us/op 2.0777 ms/op 0.30
updateUnfinalizedPubkeys - updating 100 pubkeys 3.1014 ms/op 5.8934 ms/op 0.53
updateUnfinalizedPubkeys - updating 1000 pubkeys 44.048 ms/op 66.025 ms/op 0.67
validate api signedAggregateAndProof - struct 2.0544 ms/op 1.8313 ms/op 1.12
validate gossip signedAggregateAndProof - struct 1.6254 ms/op 2.0381 ms/op 0.80
batch validate gossip attestation - vc 640000 - chunk 32 147.71 us/op 159.86 us/op 0.92
batch validate gossip attestation - vc 640000 - chunk 64 136.84 us/op 148.72 us/op 0.92
batch validate gossip attestation - vc 640000 - chunk 128 127.18 us/op 144.79 us/op 0.88
batch validate gossip attestation - vc 640000 - chunk 256 129.81 us/op 119.41 us/op 1.09
pickEth1Vote - no votes 1.1518 ms/op 1.1738 ms/op 0.98
pickEth1Vote - max votes 10.406 ms/op 7.2901 ms/op 1.43
pickEth1Vote - Eth1Data hashTreeRoot value x2048 27.553 ms/op 13.906 ms/op 1.98
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 31.728 ms/op 21.547 ms/op 1.47
pickEth1Vote - Eth1Data fastSerialize value x2048 405.40 us/op 551.19 us/op 0.74
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.9933 ms/op 4.5870 ms/op 1.31
bytes32 toHexString 641.00 ns/op 626.00 ns/op 1.02
bytes32 Buffer.toString(hex) 506.00 ns/op 271.00 ns/op 1.87
bytes32 Buffer.toString(hex) from Uint8Array 700.00 ns/op 492.00 ns/op 1.42
bytes32 Buffer.toString(hex) + 0x 502.00 ns/op 273.00 ns/op 1.84
Object access 1 prop 0.34200 ns/op 0.20200 ns/op 1.69
Map access 1 prop 0.32500 ns/op 0.14800 ns/op 2.20
Object get x1000 5.3240 ns/op 6.2110 ns/op 0.86
Map get x1000 5.9920 ns/op 6.7660 ns/op 0.89
Object set x1000 23.453 ns/op 50.880 ns/op 0.46
Map set x1000 19.636 ns/op 39.200 ns/op 0.50
Return object 10000 times 0.30330 ns/op 0.32190 ns/op 0.94
Throw Error 10000 times 3.0708 us/op 3.5923 us/op 0.85
toHex 128.86 ns/op 193.15 ns/op 0.67
Buffer.from 131.02 ns/op 178.98 ns/op 0.73
shared Buffer 77.380 ns/op 105.48 ns/op 0.73
fastMsgIdFn sha256 / 200 bytes 2.1930 us/op 2.3280 us/op 0.94
fastMsgIdFn h32 xxhash / 200 bytes 509.00 ns/op 309.00 ns/op 1.65
fastMsgIdFn h64 xxhash / 200 bytes 456.00 ns/op 301.00 ns/op 1.51
fastMsgIdFn sha256 / 1000 bytes 6.6810 us/op 8.1220 us/op 0.82
fastMsgIdFn h32 xxhash / 1000 bytes 656.00 ns/op 449.00 ns/op 1.46
fastMsgIdFn h64 xxhash / 1000 bytes 563.00 ns/op 375.00 ns/op 1.50
fastMsgIdFn sha256 / 10000 bytes 50.672 us/op 67.234 us/op 0.75
fastMsgIdFn h32 xxhash / 10000 bytes 2.0880 us/op 2.0170 us/op 1.04
fastMsgIdFn h64 xxhash / 10000 bytes 1.4200 us/op 1.2880 us/op 1.10
send data - 1000 256B messages 12.923 ms/op 15.344 ms/op 0.84
send data - 1000 512B messages 22.730 ms/op 20.582 ms/op 1.10
send data - 1000 1024B messages 30.826 ms/op 32.342 ms/op 0.95
send data - 1000 1200B messages 33.733 ms/op 33.462 ms/op 1.01
send data - 1000 2048B messages 42.511 ms/op 36.554 ms/op 1.16
send data - 1000 4096B messages 40.949 ms/op 38.245 ms/op 1.07
send data - 1000 16384B messages 106.65 ms/op 86.273 ms/op 1.24
send data - 1000 65536B messages 425.24 ms/op 264.66 ms/op 1.61
enrSubnets - fastDeserialize 64 bits 1.5020 us/op 1.3530 us/op 1.11
enrSubnets - ssz BitVector 64 bits 660.00 ns/op 450.00 ns/op 1.47
enrSubnets - fastDeserialize 4 bits 402.00 ns/op 204.00 ns/op 1.97
enrSubnets - ssz BitVector 4 bits 673.00 ns/op 459.00 ns/op 1.47
prioritizePeers score -10:0 att 32-0.1 sync 2-0 191.88 us/op 206.53 us/op 0.93
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 183.17 us/op 200.93 us/op 0.91
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 341.63 us/op 387.57 us/op 0.88
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 500.11 us/op 541.87 us/op 0.92
prioritizePeers score 0:0 att 64-1 sync 4-1 600.25 us/op 1.0134 ms/op 0.59
array of 16000 items push then shift 1.2985 us/op 1.9130 us/op 0.68
LinkedList of 16000 items push then shift 6.7180 ns/op 8.1230 ns/op 0.83
array of 16000 items push then pop 82.160 ns/op 143.62 ns/op 0.57
LinkedList of 16000 items push then pop 7.2450 ns/op 7.6180 ns/op 0.95
array of 24000 items push then shift 1.9374 us/op 2.5118 us/op 0.77
LinkedList of 24000 items push then shift 7.1750 ns/op 8.6250 ns/op 0.83
array of 24000 items push then pop 182.69 ns/op 177.63 ns/op 1.03
LinkedList of 24000 items push then pop 6.3610 ns/op 8.2970 ns/op 0.77
intersect bitArray bitLen 8 5.6810 ns/op 6.9650 ns/op 0.82
intersect array and set length 8 44.064 ns/op 61.859 ns/op 0.71
intersect bitArray bitLen 128 26.315 ns/op 31.004 ns/op 0.85
intersect array and set length 128 747.45 ns/op 837.44 ns/op 0.89
bitArray.getTrueBitIndexes() bitLen 128 2.6540 us/op 2.3160 us/op 1.15
bitArray.getTrueBitIndexes() bitLen 248 4.7140 us/op 4.4540 us/op 1.06
bitArray.getTrueBitIndexes() bitLen 512 11.718 us/op 8.4700 us/op 1.38
Buffer.concat 32 items 1.1460 us/op 986.00 ns/op 1.16
Uint8Array.set 32 items 2.0630 us/op 1.6600 us/op 1.24
Buffer.copy 2.2490 us/op 1.9870 us/op 1.13
Uint8Array.set - with subarray 2.8950 us/op 3.2040 us/op 0.90
Uint8Array.set - without subarray 2.2260 us/op 1.7080 us/op 1.30
getUint32 - dataview 416.00 ns/op 304.00 ns/op 1.37
getUint32 - manual 327.00 ns/op 219.00 ns/op 1.49
Set add up to 64 items then delete first 1.7797 us/op 2.5193 us/op 0.71
OrderedSet add up to 64 items then delete first 2.8421 us/op 4.1617 us/op 0.68
Set add up to 64 items then delete last 2.0866 us/op 3.1986 us/op 0.65
OrderedSet add up to 64 items then delete last 3.0707 us/op 4.3760 us/op 0.70
Set add up to 64 items then delete middle 2.0168 us/op 2.6464 us/op 0.76
OrderedSet add up to 64 items then delete middle 4.3972 us/op 6.0279 us/op 0.73
Set add up to 128 items then delete first 4.0985 us/op 5.3519 us/op 0.77
OrderedSet add up to 128 items then delete first 6.1804 us/op 10.577 us/op 0.58
Set add up to 128 items then delete last 3.8745 us/op 5.5222 us/op 0.70
OrderedSet add up to 128 items then delete last 5.7838 us/op 8.3033 us/op 0.70
Set add up to 128 items then delete middle 3.8393 us/op 6.4714 us/op 0.59
OrderedSet add up to 128 items then delete middle 11.621 us/op 18.652 us/op 0.62
Set add up to 256 items then delete first 7.7931 us/op 13.138 us/op 0.59
OrderedSet add up to 256 items then delete first 12.458 us/op 21.447 us/op 0.58
Set add up to 256 items then delete last 7.5567 us/op 11.174 us/op 0.68
OrderedSet add up to 256 items then delete last 11.544 us/op 16.175 us/op 0.71
Set add up to 256 items then delete middle 7.8629 us/op 10.177 us/op 0.77
OrderedSet add up to 256 items then delete middle 40.974 us/op 47.018 us/op 0.87
transfer serialized Status (84 B) 2.1200 us/op 1.5220 us/op 1.39
copy serialized Status (84 B) 2.1070 us/op 1.3250 us/op 1.59
transfer serialized SignedVoluntaryExit (112 B) 2.0740 us/op 1.5040 us/op 1.38
copy serialized SignedVoluntaryExit (112 B) 1.9590 us/op 1.2540 us/op 1.56
transfer serialized ProposerSlashing (416 B) 2.3090 us/op 2.3620 us/op 0.98
copy serialized ProposerSlashing (416 B) 2.1890 us/op 2.0220 us/op 1.08
transfer serialized Attestation (485 B) 2.1050 us/op 1.7890 us/op 1.18
copy serialized Attestation (485 B) 2.4790 us/op 1.7560 us/op 1.41
transfer serialized AttesterSlashing (33232 B) 1.8120 us/op 1.8630 us/op 0.97
copy serialized AttesterSlashing (33232 B) 7.2860 us/op 5.9160 us/op 1.23
transfer serialized Small SignedBeaconBlock (128000 B) 2.6600 us/op 2.7500 us/op 0.97
copy serialized Small SignedBeaconBlock (128000 B) 21.254 us/op 21.094 us/op 1.01
transfer serialized Avg SignedBeaconBlock (200000 B) 3.9210 us/op 3.3590 us/op 1.17
copy serialized Avg SignedBeaconBlock (200000 B) 23.160 us/op 33.204 us/op 0.70
transfer serialized BlobsSidecar (524380 B) 3.4650 us/op 3.7570 us/op 0.92
copy serialized BlobsSidecar (524380 B) 70.784 us/op 129.31 us/op 0.55
transfer serialized Big SignedBeaconBlock (1000000 B) 3.5010 us/op 3.9660 us/op 0.88
copy serialized Big SignedBeaconBlock (1000000 B) 317.05 us/op 297.07 us/op 1.07
pass gossip attestations to forkchoice per slot 2.6464 ms/op 3.1079 ms/op 0.85
forkChoice updateHead vc 100000 bc 64 eq 0 550.25 us/op 465.96 us/op 1.18
forkChoice updateHead vc 600000 bc 64 eq 0 2.4003 ms/op 3.0337 ms/op 0.79
forkChoice updateHead vc 1000000 bc 64 eq 0 4.3356 ms/op 5.0290 ms/op 0.86
forkChoice updateHead vc 600000 bc 320 eq 0 2.5494 ms/op 2.9222 ms/op 0.87
forkChoice updateHead vc 600000 bc 1200 eq 0 2.4308 ms/op 2.9764 ms/op 0.82
forkChoice updateHead vc 600000 bc 7200 eq 0 3.3186 ms/op 4.5130 ms/op 0.74
forkChoice updateHead vc 600000 bc 64 eq 1000 9.6920 ms/op 10.741 ms/op 0.90
forkChoice updateHead vc 600000 bc 64 eq 10000 10.019 ms/op 10.910 ms/op 0.92
forkChoice updateHead vc 600000 bc 64 eq 300000 23.659 ms/op 14.765 ms/op 1.60
computeDeltas 500000 validators 300 proto nodes 3.4618 ms/op 4.4766 ms/op 0.77
computeDeltas 500000 validators 1200 proto nodes 3.5365 ms/op 4.3498 ms/op 0.81
computeDeltas 500000 validators 7200 proto nodes 3.3684 ms/op 4.2661 ms/op 0.79
computeDeltas 750000 validators 300 proto nodes 5.0887 ms/op 6.4602 ms/op 0.79
computeDeltas 750000 validators 1200 proto nodes 4.9554 ms/op 6.6890 ms/op 0.74
computeDeltas 750000 validators 7200 proto nodes 5.0672 ms/op 6.5004 ms/op 0.78
computeDeltas 1400000 validators 300 proto nodes 9.0658 ms/op 11.826 ms/op 0.77
computeDeltas 1400000 validators 1200 proto nodes 9.3170 ms/op 13.720 ms/op 0.68
computeDeltas 1400000 validators 7200 proto nodes 9.4904 ms/op 12.279 ms/op 0.77
computeDeltas 2100000 validators 300 proto nodes 14.067 ms/op 20.941 ms/op 0.67
computeDeltas 2100000 validators 1200 proto nodes 14.090 ms/op 24.485 ms/op 0.58
computeDeltas 2100000 validators 7200 proto nodes 14.327 ms/op 26.195 ms/op 0.55
altair processAttestation - 250000 vs - 7PWei normalcase 1.4975 ms/op 4.0004 ms/op 0.37
altair processAttestation - 250000 vs - 7PWei worstcase 2.2595 ms/op 5.3793 ms/op 0.42
altair processAttestation - setStatus - 1/6 committees join 74.065 us/op 175.69 us/op 0.42
altair processAttestation - setStatus - 1/3 committees join 152.28 us/op 405.87 us/op 0.38
altair processAttestation - setStatus - 1/2 committees join 213.13 us/op 362.80 us/op 0.59
altair processAttestation - setStatus - 2/3 committees join 303.50 us/op 385.46 us/op 0.79
altair processAttestation - setStatus - 4/5 committees join 425.37 us/op 551.97 us/op 0.77
altair processAttestation - setStatus - 100% committees join 530.96 us/op 642.47 us/op 0.83
altair processBlock - 250000 vs - 7PWei normalcase 5.0442 ms/op 6.1016 ms/op 0.83
altair processBlock - 250000 vs - 7PWei normalcase hashState 26.896 ms/op 31.131 ms/op 0.86
altair processBlock - 250000 vs - 7PWei worstcase 33.280 ms/op 42.616 ms/op 0.78
altair processBlock - 250000 vs - 7PWei worstcase hashState 68.515 ms/op 83.015 ms/op 0.83
phase0 processBlock - 250000 vs - 7PWei normalcase 1.9976 ms/op 3.1487 ms/op 0.63
phase0 processBlock - 250000 vs - 7PWei worstcase 26.016 ms/op 29.216 ms/op 0.89
altair processEth1Data - 250000 vs - 7PWei normalcase 285.44 us/op 449.73 us/op 0.63
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.5840 us/op 9.5290 us/op 0.69
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 36.423 us/op 49.119 us/op 0.74
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 11.641 us/op 16.073 us/op 0.72
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.6940 us/op 10.691 us/op 0.63
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 135.73 us/op 192.39 us/op 0.71
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 864.49 us/op 1.3502 ms/op 0.64
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.2042 ms/op 1.6194 ms/op 0.74
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.3434 ms/op 2.0316 ms/op 0.66
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.2687 ms/op 6.4913 ms/op 0.66
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.5311 ms/op 2.4245 ms/op 0.63
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.0557 ms/op 4.0445 ms/op 1.00
Tree 40 250000 create 249.94 ms/op 279.96 ms/op 0.89
Tree 40 250000 get(125000) 143.43 ns/op 166.81 ns/op 0.86
Tree 40 250000 set(125000) 576.45 ns/op 769.36 ns/op 0.75
Tree 40 250000 toArray() 23.083 ms/op 21.708 ms/op 1.06
Tree 40 250000 iterate all - toArray() + loop 24.130 ms/op 20.965 ms/op 1.15
Tree 40 250000 iterate all - get(i) 71.232 ms/op 58.447 ms/op 1.22
Array 250000 create 4.0263 ms/op 3.5322 ms/op 1.14
Array 250000 clone - spread 1.6428 ms/op 1.4852 ms/op 1.11
Array 250000 get(125000) 0.78300 ns/op 0.42500 ns/op 1.84
Array 250000 set(125000) 0.63300 ns/op 0.46700 ns/op 1.36
Array 250000 iterate all - loop 81.546 us/op 111.28 us/op 0.73
phase0 afterProcessEpoch - 250000 vs - 7PWei 49.857 ms/op 51.601 ms/op 0.97
Array.fill - length 1000000 2.9183 ms/op 3.8294 ms/op 0.76
Array push - length 1000000 19.092 ms/op 18.530 ms/op 1.03
Array.get 0.30653 ns/op 0.29476 ns/op 1.04
Uint8Array.get 0.36685 ns/op 0.45900 ns/op 0.80
phase0 beforeProcessEpoch - 250000 vs - 7PWei 19.039 ms/op 17.901 ms/op 1.06
altair processEpoch - mainnet_e81889 265.36 ms/op 296.53 ms/op 0.89
mainnet_e81889 - altair beforeProcessEpoch 21.527 ms/op 19.771 ms/op 1.09
mainnet_e81889 - altair processJustificationAndFinalization 16.168 us/op 12.941 us/op 1.25
mainnet_e81889 - altair processInactivityUpdates 5.3303 ms/op 7.8546 ms/op 0.68
mainnet_e81889 - altair processRewardsAndPenalties 48.075 ms/op 55.586 ms/op 0.86
mainnet_e81889 - altair processRegistryUpdates 3.6210 us/op 2.2010 us/op 1.65
mainnet_e81889 - altair processSlashings 981.00 ns/op 624.00 ns/op 1.57
mainnet_e81889 - altair processEth1DataReset 799.00 ns/op 483.00 ns/op 1.65
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2375 ms/op 3.7741 ms/op 0.33
mainnet_e81889 - altair processSlashingsReset 3.8890 us/op 9.3870 us/op 0.41
mainnet_e81889 - altair processRandaoMixesReset 5.9300 us/op 8.2490 us/op 0.72
mainnet_e81889 - altair processHistoricalRootsUpdate 1.1000 us/op 795.00 ns/op 1.38
mainnet_e81889 - altair processParticipationFlagUpdates 3.1920 us/op 5.7640 us/op 0.55
mainnet_e81889 - altair processSyncCommitteeUpdates 980.00 ns/op 675.00 ns/op 1.45
mainnet_e81889 - altair afterProcessEpoch 44.095 ms/op 53.198 ms/op 0.83
capella processEpoch - mainnet_e217614 1.1198 s/op 1.2557 s/op 0.89
mainnet_e217614 - capella beforeProcessEpoch 90.234 ms/op 98.810 ms/op 0.91
mainnet_e217614 - capella processJustificationAndFinalization 22.472 us/op 28.779 us/op 0.78
mainnet_e217614 - capella processInactivityUpdates 17.693 ms/op 21.804 ms/op 0.81
mainnet_e217614 - capella processRewardsAndPenalties 238.97 ms/op 283.50 ms/op 0.84
mainnet_e217614 - capella processRegistryUpdates 17.166 us/op 25.027 us/op 0.69
mainnet_e217614 - capella processSlashings 1.0680 us/op 912.00 ns/op 1.17
mainnet_e217614 - capella processEth1DataReset 908.00 ns/op 708.00 ns/op 1.28
mainnet_e217614 - capella processEffectiveBalanceUpdates 17.697 ms/op 18.641 ms/op 0.95
mainnet_e217614 - capella processSlashingsReset 5.7420 us/op 5.5000 us/op 1.04
mainnet_e217614 - capella processRandaoMixesReset 10.874 us/op 13.717 us/op 0.79
mainnet_e217614 - capella processHistoricalRootsUpdate 1.1820 us/op 856.00 ns/op 1.38
mainnet_e217614 - capella processParticipationFlagUpdates 3.4600 us/op 3.1450 us/op 1.10
mainnet_e217614 - capella afterProcessEpoch 101.85 ms/op 131.77 ms/op 0.77
phase0 processEpoch - mainnet_e58758 275.72 ms/op 416.76 ms/op 0.66
mainnet_e58758 - phase0 beforeProcessEpoch 67.181 ms/op 92.313 ms/op 0.73
mainnet_e58758 - phase0 processJustificationAndFinalization 20.838 us/op 20.058 us/op 1.04
mainnet_e58758 - phase0 processRewardsAndPenalties 24.985 ms/op 42.567 ms/op 0.59
mainnet_e58758 - phase0 processRegistryUpdates 9.6860 us/op 14.222 us/op 0.68
mainnet_e58758 - phase0 processSlashings 771.00 ns/op 519.00 ns/op 1.49
mainnet_e58758 - phase0 processEth1DataReset 744.00 ns/op 566.00 ns/op 1.31
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 927.95 us/op 1.3714 ms/op 0.68
mainnet_e58758 - phase0 processSlashingsReset 5.0280 us/op 8.1350 us/op 0.62
mainnet_e58758 - phase0 processRandaoMixesReset 4.6260 us/op 9.3030 us/op 0.50
mainnet_e58758 - phase0 processHistoricalRootsUpdate 761.00 ns/op 729.00 ns/op 1.04
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.0540 us/op 6.7750 us/op 0.60
mainnet_e58758 - phase0 afterProcessEpoch 35.574 ms/op 48.092 ms/op 0.74
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0149 ms/op 1.8926 ms/op 0.54
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.3173 ms/op 3.5816 ms/op 0.37
altair processInactivityUpdates - 250000 normalcase 16.957 ms/op 23.902 ms/op 0.71
altair processInactivityUpdates - 250000 worstcase 16.085 ms/op 23.605 ms/op 0.68
phase0 processRegistryUpdates - 250000 normalcase 6.1040 us/op 15.018 us/op 0.41
phase0 processRegistryUpdates - 250000 badcase_full_deposits 304.14 us/op 481.15 us/op 0.63
phase0 processRegistryUpdates - 250000 worstcase 0.5 114.75 ms/op 164.33 ms/op 0.70
altair processRewardsAndPenalties - 250000 normalcase 37.606 ms/op 52.718 ms/op 0.71
altair processRewardsAndPenalties - 250000 worstcase 40.074 ms/op 51.569 ms/op 0.78
phase0 getAttestationDeltas - 250000 normalcase 6.5103 ms/op 10.768 ms/op 0.60
phase0 getAttestationDeltas - 250000 worstcase 6.4693 ms/op 8.9439 ms/op 0.72
phase0 processSlashings - 250000 worstcase 92.949 us/op 109.62 us/op 0.85
altair processSyncCommitteeUpdates - 250000 98.364 ms/op 142.98 ms/op 0.69
BeaconState.hashTreeRoot - No change 447.00 ns/op 408.00 ns/op 1.10
BeaconState.hashTreeRoot - 1 full validator 110.02 us/op 130.59 us/op 0.84
BeaconState.hashTreeRoot - 32 full validator 866.20 us/op 1.7923 ms/op 0.48
BeaconState.hashTreeRoot - 512 full validator 7.8054 ms/op 12.350 ms/op 0.63
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 95.435 us/op 148.40 us/op 0.64
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.3361 ms/op 1.9437 ms/op 0.69
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 20.846 ms/op 27.015 ms/op 0.77
BeaconState.hashTreeRoot - 1 balances 100.57 us/op 112.52 us/op 0.89
BeaconState.hashTreeRoot - 32 balances 931.71 us/op 1.0684 ms/op 0.87
BeaconState.hashTreeRoot - 512 balances 6.2825 ms/op 9.5965 ms/op 0.65
BeaconState.hashTreeRoot - 250000 balances 198.09 ms/op 243.04 ms/op 0.82
aggregationBits - 2048 els - zipIndexesInBitList 23.943 us/op 42.647 us/op 0.56
byteArrayEquals 32 48.029 ns/op 64.846 ns/op 0.74
Buffer.compare 32 15.751 ns/op 17.632 ns/op 0.89
byteArrayEquals 1024 1.2788 us/op 1.6136 us/op 0.79
Buffer.compare 1024 25.074 ns/op 25.558 ns/op 0.98
byteArrayEquals 16384 20.707 us/op 25.749 us/op 0.80
Buffer.compare 16384 179.33 ns/op 203.80 ns/op 0.88
byteArrayEquals 123687377 152.54 ms/op 227.23 ms/op 0.67
Buffer.compare 123687377 6.5615 ms/op 20.442 ms/op 0.32
byteArrayEquals 32 - diff last byte 51.291 ns/op 68.532 ns/op 0.75
Buffer.compare 32 - diff last byte 16.333 ns/op 23.577 ns/op 0.69
byteArrayEquals 1024 - diff last byte 1.4219 us/op 1.9801 us/op 0.72
Buffer.compare 1024 - diff last byte 25.689 ns/op 42.123 ns/op 0.61
byteArrayEquals 16384 - diff last byte 20.393 us/op 31.222 us/op 0.65
Buffer.compare 16384 - diff last byte 193.22 ns/op 303.27 ns/op 0.64
byteArrayEquals 123687377 - diff last byte 167.22 ms/op 215.47 ms/op 0.78
Buffer.compare 123687377 - diff last byte 7.2590 ms/op 11.842 ms/op 0.61
byteArrayEquals 32 - random bytes 5.0790 ns/op 5.4510 ns/op 0.93
Buffer.compare 32 - random bytes 16.084 ns/op 20.710 ns/op 0.78
byteArrayEquals 1024 - random bytes 5.0460 ns/op 6.3760 ns/op 0.79
Buffer.compare 1024 - random bytes 15.877 ns/op 22.346 ns/op 0.71
byteArrayEquals 16384 - random bytes 5.1440 ns/op 6.9260 ns/op 0.74
Buffer.compare 16384 - random bytes 16.522 ns/op 20.004 ns/op 0.83
byteArrayEquals 123687377 - random bytes 8.5100 ns/op 7.4600 ns/op 1.14
Buffer.compare 123687377 - random bytes 19.430 ns/op 20.800 ns/op 0.93
regular array get 100000 times 32.533 us/op 33.558 us/op 0.97
wrappedArray get 100000 times 32.781 us/op 33.980 us/op 0.96
arrayWithProxy get 100000 times 11.232 ms/op 16.248 ms/op 0.69
ssz.Root.equals 44.332 ns/op 50.215 ns/op 0.88
byteArrayEquals 44.653 ns/op 58.733 ns/op 0.76
Buffer.compare 9.2770 ns/op 13.558 ns/op 0.68
processSlot - 1 slots 10.522 us/op 28.369 us/op 0.37
processSlot - 32 slots 2.0482 ms/op 3.6083 ms/op 0.57
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.273 ms/op 52.087 ms/op 0.72
getCommitteeAssignments - req 1 vs - 250000 vc 1.8404 ms/op 2.6802 ms/op 0.69
getCommitteeAssignments - req 100 vs - 250000 vc 3.6249 ms/op 4.7180 ms/op 0.77
getCommitteeAssignments - req 1000 vs - 250000 vc 3.8270 ms/op 5.0592 ms/op 0.76
findModifiedValidators - 10000 modified validators 253.50 ms/op 505.09 ms/op 0.50
findModifiedValidators - 1000 modified validators 173.33 ms/op 265.30 ms/op 0.65
findModifiedValidators - 100 modified validators 160.11 ms/op 317.05 ms/op 0.50
findModifiedValidators - 10 modified validators 160.33 ms/op 258.31 ms/op 0.62
findModifiedValidators - 1 modified validators 154.56 ms/op 248.96 ms/op 0.62
findModifiedValidators - no difference 180.87 ms/op 283.87 ms/op 0.64
compare ViewDUs 3.4729 s/op 4.4528 s/op 0.78
compare each validator Uint8Array 1.4612 s/op 1.7023 s/op 0.86
compare ViewDU to Uint8Array 952.77 ms/op 1.2657 s/op 0.75
migrate state 1000000 validators, 24 modified, 0 new 715.08 ms/op 902.03 ms/op 0.79
migrate state 1000000 validators, 1700 modified, 1000 new 904.75 ms/op 1.1175 s/op 0.81
migrate state 1000000 validators, 3400 modified, 2000 new 1.1440 s/op 1.2592 s/op 0.91
migrate state 1500000 validators, 24 modified, 0 new 728.59 ms/op 784.94 ms/op 0.93
migrate state 1500000 validators, 1700 modified, 1000 new 1.0216 s/op 1.0624 s/op 0.96
migrate state 1500000 validators, 3400 modified, 2000 new 1.1547 s/op 1.3327 s/op 0.87
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.2300 ns/op 4.9200 ns/op 1.27
state getBlockRootAtSlot - 250000 vs - 7PWei 364.65 ns/op 605.41 ns/op 0.60
computeProposers - vc 250000 5.1487 ms/op 7.3412 ms/op 0.70
computeEpochShuffling - vc 250000 36.181 ms/op 43.533 ms/op 0.83
getNextSyncCommittee - vc 250000 94.120 ms/op 153.66 ms/op 0.61
computeSigningRoot for AttestationData 19.471 us/op 30.158 us/op 0.65
hash AttestationData serialized data then Buffer.toString(base64) 1.1819 us/op 1.6982 us/op 0.70
toHexString serialized data 753.55 ns/op 1.0046 us/op 0.75
Buffer.toString(base64) 131.94 ns/op 208.91 ns/op 0.63
nodejs block root to RootHex using toHex 117.39 ns/op 179.82 ns/op 0.65
nodejs block root to RootHex using toRootHex 76.468 ns/op 106.47 ns/op 0.72
browser block root to RootHex using the deprecated toHexString 210.88 ns/op 244.80 ns/op 0.86
browser block root to RootHex using toHex 163.55 ns/op 220.12 ns/op 0.74
browser block root to RootHex using toRootHex 145.07 ns/op 175.54 ns/op 0.83

by benchmarkbot/action

@wemeetagain
Copy link
Member

does this resolve #5932?

No, 5932 is about having a counter with with a single label that tracks local vs builder block building
eg:

// produceEngineOrBuilderBlock
const executionPayloadSource: "builder" | "engine" = ...;
metrics?.blockProductionStrategy.inc({source: executionPayloadSource});

@nflaig
Copy link
Member Author

nflaig commented Oct 23, 2024

with a single label that tracks local vs builder block building

I don't think we would have caught the issue noted in #5932 even if we had this metric, I think the why is the important part.

eg.

metrics?.blockProductionSelection.inc({source: "engine", reason: "builder_no_bid"});
metrics?.blockProductionSelection.inc({source: "engine", reason: "builder_disabled"});
metrics?.blockProductionSelection.inc({source: "engine", reason: "builder_error"});
metrics?.blockProductionSelection.inc({source: "builder", reason: "block_value"});

That way we could have told that builder had errors and it was not just due to min-bid that we only proposed local blocks.

Maybe in addition add a histogram that tracks builder and engine block values to get a better overview on block values.

@nflaig
Copy link
Member Author

nflaig commented Oct 28, 2024

Curious about the usefulness of the metrics added in this PR, the default configs are also printed out on startup so we might not need it.

Maybe something could help infra team @Faithtosin @philknows ?

If not we should probably close this and revert the dashboard

@wemeetagain
Copy link
Member

Imo its nice to have

@Faithtosin
Copy link
Contributor

Curious about the usefulness of the metrics added in this PR, the default configs are also printed out on startup so we might not need it.

Maybe something could help infra team @Faithtosin @philknows ?

If not we should probably close this and revert the dashboard

I also think it's nice to have, honestly!

@wemeetagain wemeetagain merged commit 4c757cb into unstable Oct 28, 2024
21 checks passed
@wemeetagain wemeetagain deleted the nflaig/builder-strategy-metric branch October 28, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Track block building strategy as a metric
3 participants