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

chore: add metrics to unknown block sync panel #5574

Merged
merged 1 commit into from
May 30, 2023

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented May 30, 2023

Motivation

#5485 was merged, at each slot there's a race between gossip block and unknown block sync so we want to track unknown block sync received time

Description

  • Correct "Action/slot" panel: add "type" label
  • Insert "Received Time" panel to "Unknown Block Sync" row as 2nd panel (that makes it more diff than usual)
Screenshot 2023-05-30 at 09 51 38

@twoeths twoeths requested a review from a team as a code owner May 30, 2023 02:55
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: df873ca Previous: 8490369 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 871.68 us/op 497.32 us/op 1.75
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 43.369 us/op 45.225 us/op 0.96
BLS verify - blst-native 1.1574 ms/op 1.1990 ms/op 0.97
BLS verifyMultipleSignatures 3 - blst-native 2.3377 ms/op 2.4431 ms/op 0.96
BLS verifyMultipleSignatures 8 - blst-native 5.0231 ms/op 5.2412 ms/op 0.96
BLS verifyMultipleSignatures 32 - blst-native 18.126 ms/op 19.026 ms/op 0.95
BLS aggregatePubkeys 32 - blst-native 24.371 us/op 25.494 us/op 0.96
BLS aggregatePubkeys 128 - blst-native 95.016 us/op 99.038 us/op 0.96
getAttestationsForBlock 61.368 ms/op 60.243 ms/op 1.02
isKnown best case - 1 super set check 262.00 ns/op 263.00 ns/op 1.00
isKnown normal case - 2 super set checks 252.00 ns/op 263.00 ns/op 0.96
isKnown worse case - 16 super set checks 251.00 ns/op 260.00 ns/op 0.97
CheckpointStateCache - add get delete 4.9710 us/op 5.7350 us/op 0.87
validate gossip signedAggregateAndProof - struct 2.7661 ms/op 2.7782 ms/op 1.00
validate gossip attestation - struct 1.3171 ms/op 1.3178 ms/op 1.00
pickEth1Vote - no votes 1.2265 ms/op 1.3828 ms/op 0.89
pickEth1Vote - max votes 11.360 ms/op 10.783 ms/op 1.05
pickEth1Vote - Eth1Data hashTreeRoot value x2048 8.6113 ms/op 9.8935 ms/op 0.87
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 17.129 ms/op 16.273 ms/op 1.05
pickEth1Vote - Eth1Data fastSerialize value x2048 615.41 us/op 741.19 us/op 0.83
pickEth1Vote - Eth1Data fastSerialize tree x2048 7.6529 ms/op 5.7572 ms/op 1.33
bytes32 toHexString 445.00 ns/op 703.00 ns/op 0.63
bytes32 Buffer.toString(hex) 318.00 ns/op 429.00 ns/op 0.74
bytes32 Buffer.toString(hex) from Uint8Array 519.00 ns/op 613.00 ns/op 0.85
bytes32 Buffer.toString(hex) + 0x 321.00 ns/op 427.00 ns/op 0.75
Object access 1 prop 0.14800 ns/op 0.20400 ns/op 0.73
Map access 1 prop 0.16100 ns/op 0.16600 ns/op 0.97
Object get x1000 6.5220 ns/op 6.7580 ns/op 0.97
Map get x1000 0.59400 ns/op 0.61500 ns/op 0.97
Object set x1000 51.570 ns/op 68.331 ns/op 0.75
Map set x1000 43.061 ns/op 54.340 ns/op 0.79
Return object 10000 times 0.23880 ns/op 0.24640 ns/op 0.97
Throw Error 10000 times 4.2274 us/op 4.3296 us/op 0.98
fastMsgIdFn sha256 / 200 bytes 3.4360 us/op 3.5840 us/op 0.96
fastMsgIdFn h32 xxhash / 200 bytes 267.00 ns/op 328.00 ns/op 0.81
fastMsgIdFn h64 xxhash / 200 bytes 372.00 ns/op 479.00 ns/op 0.78
fastMsgIdFn sha256 / 1000 bytes 11.219 us/op 11.847 us/op 0.95
fastMsgIdFn h32 xxhash / 1000 bytes 401.00 ns/op 465.00 ns/op 0.86
fastMsgIdFn h64 xxhash / 1000 bytes 440.00 ns/op 570.00 ns/op 0.77
fastMsgIdFn sha256 / 10000 bytes 99.298 us/op 104.38 us/op 0.95
fastMsgIdFn h32 xxhash / 10000 bytes 1.7850 us/op 1.9990 us/op 0.89
fastMsgIdFn h64 xxhash / 10000 bytes 1.2860 us/op 1.4680 us/op 0.88
enrSubnets - fastDeserialize 64 bits 1.1900 us/op 1.7630 us/op 0.67
enrSubnets - ssz BitVector 64 bits 470.00 ns/op 640.00 ns/op 0.73
enrSubnets - fastDeserialize 4 bits 165.00 ns/op 215.00 ns/op 0.77
enrSubnets - ssz BitVector 4 bits 514.00 ns/op 641.00 ns/op 0.80
prioritizePeers score -10:0 att 32-0.1 sync 2-0 102.64 us/op 116.91 us/op 0.88
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 146.42 us/op 164.50 us/op 0.89
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 182.22 us/op 197.32 us/op 0.92
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 322.30 us/op 375.24 us/op 0.86
prioritizePeers score 0:0 att 64-1 sync 4-1 386.25 us/op 454.58 us/op 0.85
array of 16000 items push then shift 1.6597 us/op 1.6856 us/op 0.98
LinkedList of 16000 items push then shift 9.0800 ns/op 9.5600 ns/op 0.95
array of 16000 items push then pop 100.44 ns/op 120.49 ns/op 0.83
LinkedList of 16000 items push then pop 9.1010 ns/op 9.1090 ns/op 1.00
array of 24000 items push then shift 2.4363 us/op 2.3736 us/op 1.03
LinkedList of 24000 items push then shift 10.565 ns/op 9.5760 ns/op 1.10
array of 24000 items push then pop 86.671 ns/op 94.468 ns/op 0.92
LinkedList of 24000 items push then pop 9.9300 ns/op 9.0590 ns/op 1.10
intersect bitArray bitLen 8 13.565 ns/op 13.504 ns/op 1.00
intersect array and set length 8 84.388 ns/op 105.85 ns/op 0.80
intersect bitArray bitLen 128 45.952 ns/op 45.217 ns/op 1.02
intersect array and set length 128 1.2073 us/op 1.3050 us/op 0.93
Buffer.concat 32 items 2.8710 us/op 3.0030 us/op 0.96
Uint8Array.set 32 items 2.7730 us/op 2.4150 us/op 1.15
transfer serialized Status (84 B) 2.2490 us/op 2.2580 us/op 1.00
copy serialized Status (84 B) 1.9420 us/op 1.9210 us/op 1.01
transfer serialized SignedVoluntaryExit (112 B) 2.2970 us/op 2.4960 us/op 0.92
copy serialized SignedVoluntaryExit (112 B) 2.0890 us/op 1.9640 us/op 1.06
transfer serialized ProposerSlashing (416 B) 3.1040 us/op 2.9260 us/op 1.06
copy serialized ProposerSlashing (416 B) 3.0030 us/op 3.2060 us/op 0.94
transfer serialized Attestation (485 B) 2.9940 us/op 3.3390 us/op 0.90
copy serialized Attestation (485 B) 2.6810 us/op 3.1090 us/op 0.86
transfer serialized AttesterSlashing (33232 B) 2.6390 us/op 2.8370 us/op 0.93
copy serialized AttesterSlashing (33232 B) 9.2470 us/op 8.9810 us/op 1.03
transfer serialized Small SignedBeaconBlock (128000 B) 3.1180 us/op 3.6780 us/op 0.85
copy serialized Small SignedBeaconBlock (128000 B) 50.184 us/op 32.235 us/op 1.56
transfer serialized Avg SignedBeaconBlock (200000 B) 2.9910 us/op 3.6390 us/op 0.82
copy serialized Avg SignedBeaconBlock (200000 B) 25.432 us/op 32.741 us/op 0.78
transfer serialized BlobsSidecar (524380 B) 3.1150 us/op 3.9790 us/op 0.78
copy serialized BlobsSidecar (524380 B) 113.61 us/op 213.59 us/op 0.53
transfer serialized Big SignedBeaconBlock (1000000 B) 3.6060 us/op 3.9490 us/op 0.91
copy serialized Big SignedBeaconBlock (1000000 B) 366.33 us/op 366.68 us/op 1.00
pass gossip attestations to forkchoice per slot 2.3906 ms/op 2.4138 ms/op 0.99
computeDeltas 3.4931 ms/op 3.1568 ms/op 1.11
computeProposerBoostScoreFromBalances 1.8330 ms/op 1.7702 ms/op 1.04
altair processAttestation - 250000 vs - 7PWei normalcase 2.2178 ms/op 2.3706 ms/op 0.94
altair processAttestation - 250000 vs - 7PWei worstcase 3.7839 ms/op 3.3652 ms/op 1.12
altair processAttestation - setStatus - 1/6 committees join 138.25 us/op 140.85 us/op 0.98
altair processAttestation - setStatus - 1/3 committees join 277.58 us/op 284.81 us/op 0.97
altair processAttestation - setStatus - 1/2 committees join 376.93 us/op 369.74 us/op 1.02
altair processAttestation - setStatus - 2/3 committees join 468.27 us/op 458.18 us/op 1.02
altair processAttestation - setStatus - 4/5 committees join 664.61 us/op 661.12 us/op 1.01
altair processAttestation - setStatus - 100% committees join 767.23 us/op 745.14 us/op 1.03
altair processBlock - 250000 vs - 7PWei normalcase 19.053 ms/op 14.458 ms/op 1.32
altair processBlock - 250000 vs - 7PWei normalcase hashState 28.444 ms/op 25.233 ms/op 1.13
altair processBlock - 250000 vs - 7PWei worstcase 60.154 ms/op 46.349 ms/op 1.30
altair processBlock - 250000 vs - 7PWei worstcase hashState 72.769 ms/op 68.550 ms/op 1.06
phase0 processBlock - 250000 vs - 7PWei normalcase 1.9971 ms/op 2.3659 ms/op 0.84
phase0 processBlock - 250000 vs - 7PWei worstcase 28.170 ms/op 29.189 ms/op 0.97
altair processEth1Data - 250000 vs - 7PWei normalcase 460.73 us/op 487.47 us/op 0.95
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.5380 us/op 7.7250 us/op 0.85
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 21.779 us/op 22.694 us/op 0.96
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 9.0350 us/op 9.0060 us/op 1.00
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 8.0140 us/op 6.9600 us/op 1.15
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 124.36 us/op 90.176 us/op 1.38
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 946.62 us/op 626.61 us/op 1.51
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.6592 ms/op 896.49 us/op 1.85
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.6374 ms/op 868.37 us/op 1.89
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.3156 ms/op 2.1902 ms/op 1.06
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.3850 ms/op 1.4941 ms/op 1.60
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.8373 ms/op 4.1218 ms/op 0.93
Tree 40 250000 create 312.93 ms/op 309.05 ms/op 1.01
Tree 40 250000 get(125000) 182.95 ns/op 176.44 ns/op 1.04
Tree 40 250000 set(125000) 876.85 ns/op 892.00 ns/op 0.98
Tree 40 250000 toArray() 16.939 ms/op 17.256 ms/op 0.98
Tree 40 250000 iterate all - toArray() + loop 16.825 ms/op 17.051 ms/op 0.99
Tree 40 250000 iterate all - get(i) 68.149 ms/op 65.847 ms/op 1.03
MutableVector 250000 create 13.420 ms/op 10.563 ms/op 1.27
MutableVector 250000 get(125000) 6.5320 ns/op 6.2540 ns/op 1.04
MutableVector 250000 set(125000) 261.03 ns/op 278.05 ns/op 0.94
MutableVector 250000 toArray() 2.7438 ms/op 3.0332 ms/op 0.90
MutableVector 250000 iterate all - toArray() + loop 2.7766 ms/op 2.8428 ms/op 0.98
MutableVector 250000 iterate all - get(i) 1.5205 ms/op 1.5162 ms/op 1.00
Array 250000 create 2.8878 ms/op 2.5604 ms/op 1.13
Array 250000 clone - spread 1.0807 ms/op 1.1122 ms/op 0.97
Array 250000 get(125000) 0.54100 ns/op 0.56100 ns/op 0.96
Array 250000 set(125000) 0.61400 ns/op 0.63000 ns/op 0.97
Array 250000 iterate all - loop 82.351 us/op 110.25 us/op 0.75
effectiveBalanceIncrements clone Uint8Array 300000 24.135 us/op 27.056 us/op 0.89
effectiveBalanceIncrements clone MutableVector 300000 328.00 ns/op 345.00 ns/op 0.95
effectiveBalanceIncrements rw all Uint8Array 300000 168.44 us/op 168.05 us/op 1.00
effectiveBalanceIncrements rw all MutableVector 300000 78.006 ms/op 81.407 ms/op 0.96
phase0 afterProcessEpoch - 250000 vs - 7PWei 115.79 ms/op 114.35 ms/op 1.01
phase0 beforeProcessEpoch - 250000 vs - 7PWei 44.689 ms/op 41.838 ms/op 1.07
altair processEpoch - mainnet_e81889 373.00 ms/op 305.75 ms/op 1.22
mainnet_e81889 - altair beforeProcessEpoch 68.869 ms/op 69.173 ms/op 1.00
mainnet_e81889 - altair processJustificationAndFinalization 29.423 us/op 18.213 us/op 1.62
mainnet_e81889 - altair processInactivityUpdates 5.3739 ms/op 6.3750 ms/op 0.84
mainnet_e81889 - altair processRewardsAndPenalties 81.042 ms/op 52.945 ms/op 1.53
mainnet_e81889 - altair processRegistryUpdates 3.4220 us/op 3.6140 us/op 0.95
mainnet_e81889 - altair processSlashings 872.00 ns/op 498.00 ns/op 1.75
mainnet_e81889 - altair processEth1DataReset 957.00 ns/op 548.00 ns/op 1.75
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.2888 ms/op 1.2494 ms/op 1.83
mainnet_e81889 - altair processSlashingsReset 8.2490 us/op 4.7570 us/op 1.73
mainnet_e81889 - altair processRandaoMixesReset 7.6430 us/op 4.5270 us/op 1.69
mainnet_e81889 - altair processHistoricalRootsUpdate 1.0720 us/op 613.00 ns/op 1.75
mainnet_e81889 - altair processParticipationFlagUpdates 4.2260 us/op 2.4380 us/op 1.73
mainnet_e81889 - altair processSyncCommitteeUpdates 812.00 ns/op 880.00 ns/op 0.92
mainnet_e81889 - altair afterProcessEpoch 129.88 ms/op 126.56 ms/op 1.03
phase0 processEpoch - mainnet_e58758 381.95 ms/op 357.97 ms/op 1.07
mainnet_e58758 - phase0 beforeProcessEpoch 141.35 ms/op 140.42 ms/op 1.01
mainnet_e58758 - phase0 processJustificationAndFinalization 21.388 us/op 17.104 us/op 1.25
mainnet_e58758 - phase0 processRewardsAndPenalties 57.690 ms/op 65.821 ms/op 0.88
mainnet_e58758 - phase0 processRegistryUpdates 7.6850 us/op 8.0200 us/op 0.96
mainnet_e58758 - phase0 processSlashings 563.00 ns/op 489.00 ns/op 1.15
mainnet_e58758 - phase0 processEth1DataReset 865.00 ns/op 494.00 ns/op 1.75
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.8675 ms/op 1.0617 ms/op 1.76
mainnet_e58758 - phase0 processSlashingsReset 6.3780 us/op 3.3670 us/op 1.89
mainnet_e58758 - phase0 processRandaoMixesReset 9.7120 us/op 4.4460 us/op 2.18
mainnet_e58758 - phase0 processHistoricalRootsUpdate 655.00 ns/op 588.00 ns/op 1.11
mainnet_e58758 - phase0 processParticipationRecordUpdates 6.8090 us/op 3.8130 us/op 1.79
mainnet_e58758 - phase0 afterProcessEpoch 96.850 ms/op 97.858 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.2793 ms/op 1.2303 ms/op 1.85
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4423 ms/op 1.5625 ms/op 0.92
altair processInactivityUpdates - 250000 normalcase 33.565 ms/op 28.439 ms/op 1.18
altair processInactivityUpdates - 250000 worstcase 27.538 ms/op 29.266 ms/op 0.94
phase0 processRegistryUpdates - 250000 normalcase 6.8300 us/op 6.8990 us/op 0.99
phase0 processRegistryUpdates - 250000 badcase_full_deposits 472.81 us/op 268.72 us/op 1.76
phase0 processRegistryUpdates - 250000 worstcase 0.5 154.93 ms/op 130.13 ms/op 1.19
altair processRewardsAndPenalties - 250000 normalcase 71.922 ms/op 68.495 ms/op 1.05
altair processRewardsAndPenalties - 250000 worstcase 70.763 ms/op 72.642 ms/op 0.97
phase0 getAttestationDeltas - 250000 normalcase 6.6140 ms/op 6.8962 ms/op 0.96
phase0 getAttestationDeltas - 250000 worstcase 7.0999 ms/op 6.8561 ms/op 1.04
phase0 processSlashings - 250000 worstcase 3.4349 ms/op 3.5053 ms/op 0.98
altair processSyncCommitteeUpdates - 250000 177.55 ms/op 180.48 ms/op 0.98
BeaconState.hashTreeRoot - No change 267.00 ns/op 261.00 ns/op 1.02
BeaconState.hashTreeRoot - 1 full validator 55.992 us/op 52.156 us/op 1.07
BeaconState.hashTreeRoot - 32 full validator 684.89 us/op 474.31 us/op 1.44
BeaconState.hashTreeRoot - 512 full validator 5.8174 ms/op 5.7647 ms/op 1.01
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 74.194 us/op 61.876 us/op 1.20
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.0249 ms/op 899.15 us/op 1.14
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 13.310 ms/op 11.172 ms/op 1.19
BeaconState.hashTreeRoot - 1 balances 52.245 us/op 50.700 us/op 1.03
BeaconState.hashTreeRoot - 32 balances 467.95 us/op 463.54 us/op 1.01
BeaconState.hashTreeRoot - 512 balances 4.7092 ms/op 4.1975 ms/op 1.12
BeaconState.hashTreeRoot - 250000 balances 80.519 ms/op 70.520 ms/op 1.14
aggregationBits - 2048 els - zipIndexesInBitList 15.436 us/op 16.839 us/op 0.92
regular array get 100000 times 42.418 us/op 32.601 us/op 1.30
wrappedArray get 100000 times 32.772 us/op 32.552 us/op 1.01
arrayWithProxy get 100000 times 15.414 ms/op 16.305 ms/op 0.95
ssz.Root.equals 541.00 ns/op 569.00 ns/op 0.95
byteArrayEquals 530.00 ns/op 546.00 ns/op 0.97
shuffle list - 16384 els 6.8154 ms/op 7.0448 ms/op 0.97
shuffle list - 250000 els 100.49 ms/op 99.512 ms/op 1.01
processSlot - 1 slots 9.5340 us/op 8.8070 us/op 1.08
processSlot - 32 slots 1.3138 ms/op 1.3720 ms/op 0.96
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 43.563 ms/op 36.527 ms/op 1.19
getCommitteeAssignments - req 1 vs - 250000 vc 2.8391 ms/op 2.8883 ms/op 0.98
getCommitteeAssignments - req 100 vs - 250000 vc 4.0450 ms/op 4.0972 ms/op 0.99
getCommitteeAssignments - req 1000 vs - 250000 vc 4.2562 ms/op 4.3645 ms/op 0.98
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.4100 ns/op 4.7900 ns/op 0.92
state getBlockRootAtSlot - 250000 vs - 7PWei 1.1058 us/op 797.70 ns/op 1.39
computeProposers - vc 250000 10.888 ms/op 10.567 ms/op 1.03
computeEpochShuffling - vc 250000 108.39 ms/op 103.35 ms/op 1.05
getNextSyncCommittee - vc 250000 180.00 ms/op 172.99 ms/op 1.04
computeSigningRoot for AttestationData 14.294 us/op 12.757 us/op 1.12
hash AttestationData serialized data then Buffer.toString(base64) 2.4360 us/op 2.4535 us/op 0.99
toHexString serialized data 1.0664 us/op 1.0696 us/op 1.00
Buffer.toString(base64) 321.37 ns/op 319.15 ns/op 1.01

by benchmarkbot/action

@wemeetagain wemeetagain merged commit e43c00a into unstable May 30, 2023
@wemeetagain wemeetagain deleted the tuyen/unknown_block_sync_metrics branch May 30, 2023 14:55
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.9.0 🎉

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.

2 participants