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

refactor: add type guard to builder pubkey filter #5985

Merged
merged 1 commit into from
Sep 23, 2023

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Sep 23, 2023

Motivation

Clean up unnecessary type check

Description

Add type guard to builder pubkey filter to correctly infer the type as string[] and remove workaround type check.

@nflaig nflaig requested a review from a team as a code owner September 23, 2023 12:25
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 76a99fe Previous: 9618dd1 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 691.18 us/op 814.25 us/op 0.85
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 76.561 us/op 109.28 us/op 0.70
BLS verify - blst-native 1.2678 ms/op 1.3630 ms/op 0.93
BLS verifyMultipleSignatures 3 - blst-native 2.6610 ms/op 2.8415 ms/op 0.94
BLS verifyMultipleSignatures 8 - blst-native 5.8365 ms/op 6.2390 ms/op 0.94
BLS verifyMultipleSignatures 32 - blst-native 21.360 ms/op 22.847 ms/op 0.93
BLS verifyMultipleSignatures 64 - blst-native 42.087 ms/op 44.905 ms/op 0.94
BLS verifyMultipleSignatures 128 - blst-native 83.385 ms/op 88.396 ms/op 0.94
BLS deserializing 10000 signatures 867.11 ms/op 918.63 ms/op 0.94
BLS deserializing 100000 signatures 8.7833 s/op 9.1709 s/op 0.96
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3698 ms/op 1.3601 ms/op 1.01
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.4691 ms/op 1.6123 ms/op 0.91
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.2648 ms/op 2.3412 ms/op 0.97
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.7276 ms/op 3.5001 ms/op 1.06
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.2150 ms/op 5.6960 ms/op 1.09
BLS aggregatePubkeys 32 - blst-native 25.565 us/op 26.000 us/op 0.98
BLS aggregatePubkeys 128 - blst-native 95.881 us/op 102.50 us/op 0.94
getAttestationsForBlock 36.350 ms/op 44.286 ms/op 0.82
isKnown best case - 1 super set check 260.00 ns/op 360.00 ns/op 0.72
isKnown normal case - 2 super set checks 251.00 ns/op 453.00 ns/op 0.55
isKnown worse case - 16 super set checks 263.00 ns/op 441.00 ns/op 0.60
CheckpointStateCache - add get delete 4.9350 us/op 5.6820 us/op 0.87
validate api signedAggregateAndProof - struct 2.7338 ms/op 2.8749 ms/op 0.95
validate gossip signedAggregateAndProof - struct 2.7175 ms/op 2.8623 ms/op 0.95
validate gossip attestation - vc 640000 1.3148 ms/op 1.3890 ms/op 0.95
batch validate gossip attestation - vc 640000 - chunk 32 155.07 us/op 173.12 us/op 0.90
batch validate gossip attestation - vc 640000 - chunk 64 137.92 us/op 150.93 us/op 0.91
batch validate gossip attestation - vc 640000 - chunk 128 127.12 us/op 140.69 us/op 0.90
batch validate gossip attestation - vc 640000 - chunk 256 121.93 us/op 142.18 us/op 0.86
pickEth1Vote - no votes 1.1092 ms/op 1.5193 ms/op 0.73
pickEth1Vote - max votes 9.8902 ms/op 11.269 ms/op 0.88
pickEth1Vote - Eth1Data hashTreeRoot value x2048 19.284 ms/op 19.651 ms/op 0.98
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 25.018 ms/op 30.533 ms/op 0.82
pickEth1Vote - Eth1Data fastSerialize value x2048 561.31 us/op 680.83 us/op 0.82
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.4017 ms/op 7.3031 ms/op 0.88
bytes32 toHexString 457.00 ns/op 603.00 ns/op 0.76
bytes32 Buffer.toString(hex) 284.00 ns/op 319.00 ns/op 0.89
bytes32 Buffer.toString(hex) from Uint8Array 412.00 ns/op 531.00 ns/op 0.78
bytes32 Buffer.toString(hex) + 0x 290.00 ns/op 341.00 ns/op 0.85
Object access 1 prop 0.14300 ns/op 0.20800 ns/op 0.69
Map access 1 prop 0.14300 ns/op 0.17300 ns/op 0.83
Object get x1000 7.0260 ns/op 9.4670 ns/op 0.74
Map get x1000 0.58400 ns/op 0.79500 ns/op 0.73
Object set x1000 47.178 ns/op 65.441 ns/op 0.72
Map set x1000 37.412 ns/op 48.273 ns/op 0.78
Return object 10000 times 0.23430 ns/op 0.26940 ns/op 0.87
Throw Error 10000 times 3.7623 us/op 3.9723 us/op 0.95
fastMsgIdFn sha256 / 200 bytes 3.2030 us/op 3.4790 us/op 0.92
fastMsgIdFn h32 xxhash / 200 bytes 266.00 ns/op 320.00 ns/op 0.83
fastMsgIdFn h64 xxhash / 200 bytes 333.00 ns/op 379.00 ns/op 0.88
fastMsgIdFn sha256 / 1000 bytes 11.294 us/op 12.141 us/op 0.93
fastMsgIdFn h32 xxhash / 1000 bytes 391.00 ns/op 492.00 ns/op 0.79
fastMsgIdFn h64 xxhash / 1000 bytes 408.00 ns/op 465.00 ns/op 0.88
fastMsgIdFn sha256 / 10000 bytes 102.91 us/op 107.88 us/op 0.95
fastMsgIdFn h32 xxhash / 10000 bytes 1.9030 us/op 2.0480 us/op 0.93
fastMsgIdFn h64 xxhash / 10000 bytes 1.3110 us/op 1.4360 us/op 0.91
send data - 1000 256B messages 17.747 ms/op 19.762 ms/op 0.90
send data - 1000 512B messages 25.108 ms/op 28.649 ms/op 0.88
send data - 1000 1024B messages 39.435 ms/op 43.309 ms/op 0.91
send data - 1000 1200B messages 23.155 ms/op 33.923 ms/op 0.68
send data - 1000 2048B messages 30.839 ms/op 37.596 ms/op 0.82
send data - 1000 4096B messages 32.046 ms/op 33.552 ms/op 0.96
send data - 1000 16384B messages 71.759 ms/op 82.468 ms/op 0.87
send data - 1000 65536B messages 263.62 ms/op 297.83 ms/op 0.89
enrSubnets - fastDeserialize 64 bits 1.2550 us/op 1.3360 us/op 0.94
enrSubnets - ssz BitVector 64 bits 407.00 ns/op 457.00 ns/op 0.89
enrSubnets - fastDeserialize 4 bits 156.00 ns/op 177.00 ns/op 0.88
enrSubnets - ssz BitVector 4 bits 404.00 ns/op 502.00 ns/op 0.80
prioritizePeers score -10:0 att 32-0.1 sync 2-0 96.660 us/op 110.17 us/op 0.88
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 118.31 us/op 137.54 us/op 0.86
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 155.85 us/op 182.31 us/op 0.85
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 280.57 us/op 323.17 us/op 0.87
prioritizePeers score 0:0 att 64-1 sync 4-1 327.39 us/op 384.16 us/op 0.85
array of 16000 items push then shift 1.5697 us/op 1.8330 us/op 0.86
LinkedList of 16000 items push then shift 8.7400 ns/op 11.870 ns/op 0.74
array of 16000 items push then pop 72.895 ns/op 105.38 ns/op 0.69
LinkedList of 16000 items push then pop 8.5130 ns/op 10.157 ns/op 0.84
array of 24000 items push then shift 2.3261 us/op 2.8087 us/op 0.83
LinkedList of 24000 items push then shift 8.5780 ns/op 11.516 ns/op 0.74
array of 24000 items push then pop 97.975 ns/op 148.30 ns/op 0.66
LinkedList of 24000 items push then pop 8.3440 ns/op 9.9900 ns/op 0.84
intersect bitArray bitLen 8 6.5320 ns/op 7.2940 ns/op 0.90
intersect array and set length 8 51.518 ns/op 77.285 ns/op 0.67
intersect bitArray bitLen 128 30.781 ns/op 33.956 ns/op 0.91
intersect array and set length 128 734.18 ns/op 990.58 ns/op 0.74
bitArray.getTrueBitIndexes() bitLen 128 1.3980 us/op 1.8710 us/op 0.75
bitArray.getTrueBitIndexes() bitLen 248 2.3380 us/op 3.0380 us/op 0.77
bitArray.getTrueBitIndexes() bitLen 512 4.4810 us/op 6.3670 us/op 0.70
Buffer.concat 32 items 937.00 ns/op 1.1200 us/op 0.84
Uint8Array.set 32 items 1.9590 us/op 2.1630 us/op 0.91
Set add up to 64 items then delete first 4.1968 us/op 4.9342 us/op 0.85
OrderedSet add up to 64 items then delete first 5.2624 us/op 6.4115 us/op 0.82
Set add up to 64 items then delete last 4.4955 us/op 5.2377 us/op 0.86
OrderedSet add up to 64 items then delete last 5.6365 us/op 6.8059 us/op 0.83
Set add up to 64 items then delete middle 4.4791 us/op 5.2434 us/op 0.85
OrderedSet add up to 64 items then delete middle 6.9474 us/op 8.2281 us/op 0.84
Set add up to 128 items then delete first 8.9815 us/op 10.718 us/op 0.84
OrderedSet add up to 128 items then delete first 11.826 us/op 14.845 us/op 0.80
Set add up to 128 items then delete last 8.7879 us/op 10.670 us/op 0.82
OrderedSet add up to 128 items then delete last 11.160 us/op 13.819 us/op 0.81
Set add up to 128 items then delete middle 8.7400 us/op 10.516 us/op 0.83
OrderedSet add up to 128 items then delete middle 16.321 us/op 19.381 us/op 0.84
Set add up to 256 items then delete first 18.271 us/op 21.584 us/op 0.85
OrderedSet add up to 256 items then delete first 24.111 us/op 29.386 us/op 0.82
Set add up to 256 items then delete last 17.432 us/op 20.613 us/op 0.85
OrderedSet add up to 256 items then delete last 22.315 us/op 25.892 us/op 0.86
Set add up to 256 items then delete middle 17.446 us/op 20.589 us/op 0.85
OrderedSet add up to 256 items then delete middle 43.731 us/op 51.636 us/op 0.85
transfer serialized Status (84 B) 1.7090 us/op 1.8740 us/op 0.91
copy serialized Status (84 B) 1.5120 us/op 1.5680 us/op 0.96
transfer serialized SignedVoluntaryExit (112 B) 2.0570 us/op 2.1800 us/op 0.94
copy serialized SignedVoluntaryExit (112 B) 1.5900 us/op 1.7150 us/op 0.93
transfer serialized ProposerSlashing (416 B) 2.9160 us/op 3.1160 us/op 0.94
copy serialized ProposerSlashing (416 B) 2.0110 us/op 2.4560 us/op 0.82
transfer serialized Attestation (485 B) 2.9530 us/op 2.3640 us/op 1.25
copy serialized Attestation (485 B) 2.0180 us/op 2.0840 us/op 0.97
transfer serialized AttesterSlashing (33232 B) 2.6480 us/op 2.2330 us/op 1.19
copy serialized AttesterSlashing (33232 B) 4.8040 us/op 5.8190 us/op 0.83
transfer serialized Small SignedBeaconBlock (128000 B) 2.6750 us/op 2.5800 us/op 1.04
copy serialized Small SignedBeaconBlock (128000 B) 11.860 us/op 14.904 us/op 0.80
transfer serialized Avg SignedBeaconBlock (200000 B) 3.1560 us/op 2.9530 us/op 1.07
copy serialized Avg SignedBeaconBlock (200000 B) 16.353 us/op 20.919 us/op 0.78
transfer serialized BlobsSidecar (524380 B) 2.9790 us/op 2.7180 us/op 1.10
copy serialized BlobsSidecar (524380 B) 123.77 us/op 86.580 us/op 1.43
transfer serialized Big SignedBeaconBlock (1000000 B) 3.0550 us/op 2.9480 us/op 1.04
copy serialized Big SignedBeaconBlock (1000000 B) 175.20 us/op 155.85 us/op 1.12
pass gossip attestations to forkchoice per slot 3.8194 ms/op 3.9264 ms/op 0.97
forkChoice updateHead vc 100000 bc 64 eq 0 681.04 us/op 704.12 us/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 0 4.7509 ms/op 5.4246 ms/op 0.88
forkChoice updateHead vc 1000000 bc 64 eq 0 6.7681 ms/op 7.4188 ms/op 0.91
forkChoice updateHead vc 600000 bc 320 eq 0 4.2259 ms/op 4.3828 ms/op 0.96
forkChoice updateHead vc 600000 bc 1200 eq 0 4.2793 ms/op 4.4126 ms/op 0.97
forkChoice updateHead vc 600000 bc 7200 eq 0 5.6205 ms/op 5.2476 ms/op 1.07
forkChoice updateHead vc 600000 bc 64 eq 1000 11.138 ms/op 11.350 ms/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 10000 12.000 ms/op 12.399 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 300000 16.122 ms/op 16.835 ms/op 0.96
computeDeltas 500000 validators 300 proto nodes 6.2606 ms/op 6.3579 ms/op 0.98
computeDeltas 500000 validators 1200 proto nodes 6.1395 ms/op 6.3056 ms/op 0.97
computeDeltas 500000 validators 7200 proto nodes 6.2456 ms/op 6.2615 ms/op 1.00
computeDeltas 750000 validators 300 proto nodes 9.2727 ms/op 9.4485 ms/op 0.98
computeDeltas 750000 validators 1200 proto nodes 9.2222 ms/op 9.4529 ms/op 0.98
computeDeltas 750000 validators 7200 proto nodes 9.2553 ms/op 9.5841 ms/op 0.97
computeDeltas 1400000 validators 300 proto nodes 17.549 ms/op 18.846 ms/op 0.93
computeDeltas 1400000 validators 1200 proto nodes 17.358 ms/op 24.066 ms/op 0.72
computeDeltas 1400000 validators 7200 proto nodes 17.673 ms/op 18.752 ms/op 0.94
computeDeltas 2100000 validators 300 proto nodes 26.331 ms/op 30.066 ms/op 0.88
computeDeltas 2100000 validators 1200 proto nodes 26.106 ms/op 32.135 ms/op 0.81
computeDeltas 2100000 validators 7200 proto nodes 26.250 ms/op 32.038 ms/op 0.82
computeProposerBoostScoreFromBalances 500000 validators 3.2028 ms/op 4.2541 ms/op 0.75
computeProposerBoostScoreFromBalances 750000 validators 3.2012 ms/op 4.1316 ms/op 0.77
computeProposerBoostScoreFromBalances 1400000 validators 3.1877 ms/op 4.1514 ms/op 0.77
computeProposerBoostScoreFromBalances 2100000 validators 3.1940 ms/op 4.1921 ms/op 0.76
altair processAttestation - 250000 vs - 7PWei normalcase 2.5124 ms/op 4.5945 ms/op 0.55
altair processAttestation - 250000 vs - 7PWei worstcase 3.0005 ms/op 5.9816 ms/op 0.50
altair processAttestation - setStatus - 1/6 committees join 167.89 us/op 290.31 us/op 0.58
altair processAttestation - setStatus - 1/3 committees join 323.01 us/op 538.54 us/op 0.60
altair processAttestation - setStatus - 1/2 committees join 433.26 us/op 742.67 us/op 0.58
altair processAttestation - setStatus - 2/3 committees join 553.28 us/op 1.0453 ms/op 0.53
altair processAttestation - setStatus - 4/5 committees join 745.35 us/op 1.5646 ms/op 0.48
altair processAttestation - setStatus - 100% committees join 880.42 us/op 1.7582 ms/op 0.50
altair processBlock - 250000 vs - 7PWei normalcase 6.4119 ms/op 11.524 ms/op 0.56
altair processBlock - 250000 vs - 7PWei normalcase hashState 27.993 ms/op 50.702 ms/op 0.55
altair processBlock - 250000 vs - 7PWei worstcase 35.707 ms/op 51.292 ms/op 0.70
altair processBlock - 250000 vs - 7PWei worstcase hashState 83.729 ms/op 126.50 ms/op 0.66
phase0 processBlock - 250000 vs - 7PWei normalcase 2.3088 ms/op 3.9418 ms/op 0.59
phase0 processBlock - 250000 vs - 7PWei worstcase 29.209 ms/op 41.416 ms/op 0.71
altair processEth1Data - 250000 vs - 7PWei normalcase 479.63 us/op 806.05 us/op 0.60
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 10.914 us/op 25.822 us/op 0.42
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 47.878 us/op 88.959 us/op 0.54
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 19.634 us/op 28.374 us/op 0.69
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 11.531 us/op 24.124 us/op 0.48
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 156.50 us/op 226.39 us/op 0.69
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.0238 ms/op 2.2306 ms/op 0.46
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.5546 ms/op 2.4064 ms/op 0.65
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.6717 ms/op 2.4304 ms/op 0.69
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.7177 ms/op 5.9644 ms/op 0.62
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.6146 ms/op 4.2178 ms/op 0.62
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.1331 ms/op 10.601 ms/op 0.48
Tree 40 250000 create 322.54 ms/op 790.76 ms/op 0.41
Tree 40 250000 get(125000) 195.44 ns/op 250.28 ns/op 0.78
Tree 40 250000 set(125000) 892.36 ns/op 2.5086 us/op 0.36
Tree 40 250000 toArray() 17.184 ms/op 39.627 ms/op 0.43
Tree 40 250000 iterate all - toArray() + loop 16.928 ms/op 32.710 ms/op 0.52
Tree 40 250000 iterate all - get(i) 65.599 ms/op 87.468 ms/op 0.75
MutableVector 250000 create 12.672 ms/op 21.337 ms/op 0.59
MutableVector 250000 get(125000) 6.5410 ns/op 7.6050 ns/op 0.86
MutableVector 250000 set(125000) 244.52 ns/op 496.28 ns/op 0.49
MutableVector 250000 toArray() 2.9248 ms/op 5.3180 ms/op 0.55
MutableVector 250000 iterate all - toArray() + loop 3.0620 ms/op 4.9952 ms/op 0.61
MutableVector 250000 iterate all - get(i) 1.5381 ms/op 1.8371 ms/op 0.84
Array 250000 create 2.7378 ms/op 4.5527 ms/op 0.60
Array 250000 clone - spread 1.1446 ms/op 1.7392 ms/op 0.66
Array 250000 get(125000) 0.54600 ns/op 1.0610 ns/op 0.51
Array 250000 set(125000) 0.62400 ns/op 1.1780 ns/op 0.53
Array 250000 iterate all - loop 81.975 us/op 95.757 us/op 0.86
effectiveBalanceIncrements clone Uint8Array 300000 23.872 us/op 57.477 us/op 0.42
effectiveBalanceIncrements clone MutableVector 300000 324.00 ns/op 455.00 ns/op 0.71
effectiveBalanceIncrements rw all Uint8Array 300000 173.27 us/op 198.32 us/op 0.87
effectiveBalanceIncrements rw all MutableVector 300000 77.730 ms/op 163.85 ms/op 0.47
phase0 afterProcessEpoch - 250000 vs - 7PWei 110.95 ms/op 143.48 ms/op 0.77
phase0 beforeProcessEpoch - 250000 vs - 7PWei 35.902 ms/op 59.538 ms/op 0.60
altair processEpoch - mainnet_e81889 461.64 ms/op 665.07 ms/op 0.69
mainnet_e81889 - altair beforeProcessEpoch 58.880 ms/op 108.50 ms/op 0.54
mainnet_e81889 - altair processJustificationAndFinalization 15.129 us/op 34.756 us/op 0.44
mainnet_e81889 - altair processInactivityUpdates 7.5568 ms/op 14.014 ms/op 0.54
mainnet_e81889 - altair processRewardsAndPenalties 61.313 ms/op 87.327 ms/op 0.70
mainnet_e81889 - altair processRegistryUpdates 2.2940 us/op 8.5140 us/op 0.27
mainnet_e81889 - altair processSlashings 471.00 ns/op 1.4210 us/op 0.33
mainnet_e81889 - altair processEth1DataReset 548.00 ns/op 1.3370 us/op 0.41
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2431 ms/op 1.8430 ms/op 0.67
mainnet_e81889 - altair processSlashingsReset 2.8150 us/op 9.3710 us/op 0.30
mainnet_e81889 - altair processRandaoMixesReset 4.4850 us/op 11.288 us/op 0.40
mainnet_e81889 - altair processHistoricalRootsUpdate 679.00 ns/op 1.8550 us/op 0.37
mainnet_e81889 - altair processParticipationFlagUpdates 1.6740 us/op 6.2810 us/op 0.27
mainnet_e81889 - altair processSyncCommitteeUpdates 621.00 ns/op 2.0950 us/op 0.30
mainnet_e81889 - altair afterProcessEpoch 125.92 ms/op 165.05 ms/op 0.76
capella processEpoch - mainnet_e217614 1.3933 s/op 2.0508 s/op 0.68
mainnet_e217614 - capella beforeProcessEpoch 232.63 ms/op 351.50 ms/op 0.66
mainnet_e217614 - capella processJustificationAndFinalization 12.895 us/op 33.460 us/op 0.39
mainnet_e217614 - capella processInactivityUpdates 19.767 ms/op 34.725 ms/op 0.57
mainnet_e217614 - capella processRewardsAndPenalties 259.55 ms/op 357.13 ms/op 0.73
mainnet_e217614 - capella processRegistryUpdates 21.063 us/op 39.240 us/op 0.54
mainnet_e217614 - capella processSlashings 504.00 ns/op 1.6660 us/op 0.30
mainnet_e217614 - capella processEth1DataReset 522.00 ns/op 1.3560 us/op 0.38
mainnet_e217614 - capella processEffectiveBalanceUpdates 3.9585 ms/op 6.1357 ms/op 0.65
mainnet_e217614 - capella processSlashingsReset 2.4000 us/op 8.8380 us/op 0.27
mainnet_e217614 - capella processRandaoMixesReset 3.9770 us/op 11.478 us/op 0.35
mainnet_e217614 - capella processHistoricalRootsUpdate 777.00 ns/op 1.6760 us/op 0.46
mainnet_e217614 - capella processParticipationFlagUpdates 2.0990 us/op 7.2050 us/op 0.29
mainnet_e217614 - capella afterProcessEpoch 294.03 ms/op 421.97 ms/op 0.70
phase0 processEpoch - mainnet_e58758 419.63 ms/op 691.03 ms/op 0.61
mainnet_e58758 - phase0 beforeProcessEpoch 102.77 ms/op 199.65 ms/op 0.51
mainnet_e58758 - phase0 processJustificationAndFinalization 15.004 us/op 34.067 us/op 0.44
mainnet_e58758 - phase0 processRewardsAndPenalties 35.085 ms/op 58.271 ms/op 0.60
mainnet_e58758 - phase0 processRegistryUpdates 9.2930 us/op 23.074 us/op 0.40
mainnet_e58758 - phase0 processSlashings 424.00 ns/op 1.5250 us/op 0.28
mainnet_e58758 - phase0 processEth1DataReset 463.00 ns/op 1.3960 us/op 0.33
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 953.32 us/op 1.8898 ms/op 0.50
mainnet_e58758 - phase0 processSlashingsReset 2.2300 us/op 6.6700 us/op 0.33
mainnet_e58758 - phase0 processRandaoMixesReset 3.9690 us/op 11.969 us/op 0.33
mainnet_e58758 - phase0 processHistoricalRootsUpdate 353.00 ns/op 1.3700 us/op 0.26
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.7180 us/op 13.241 us/op 0.28
mainnet_e58758 - phase0 afterProcessEpoch 98.859 ms/op 146.46 ms/op 0.68
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2669 ms/op 2.2265 ms/op 0.57
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4248 ms/op 2.1124 ms/op 0.67
altair processInactivityUpdates - 250000 normalcase 19.323 ms/op 31.877 ms/op 0.61
altair processInactivityUpdates - 250000 worstcase 17.610 ms/op 35.846 ms/op 0.49
phase0 processRegistryUpdates - 250000 normalcase 8.0300 us/op 25.659 us/op 0.31
phase0 processRegistryUpdates - 250000 badcase_full_deposits 320.23 us/op 540.09 us/op 0.59
phase0 processRegistryUpdates - 250000 worstcase 0.5 136.30 ms/op 260.53 ms/op 0.52
altair processRewardsAndPenalties - 250000 normalcase 63.952 ms/op 63.438 ms/op 1.01
altair processRewardsAndPenalties - 250000 worstcase 64.026 ms/op 78.232 ms/op 0.82
phase0 getAttestationDeltas - 250000 normalcase 7.5596 ms/op 12.105 ms/op 0.62
phase0 getAttestationDeltas - 250000 worstcase 7.7107 ms/op 13.690 ms/op 0.56
phase0 processSlashings - 250000 worstcase 2.3230 ms/op 3.9747 ms/op 0.58
altair processSyncCommitteeUpdates - 250000 153.47 ms/op 232.80 ms/op 0.66
BeaconState.hashTreeRoot - No change 317.00 ns/op 483.00 ns/op 0.66
BeaconState.hashTreeRoot - 1 full validator 137.62 us/op 236.32 us/op 0.58
BeaconState.hashTreeRoot - 32 full validator 1.6357 ms/op 2.7098 ms/op 0.60
BeaconState.hashTreeRoot - 512 full validator 14.171 ms/op 24.159 ms/op 0.59
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 165.12 us/op 242.92 us/op 0.68
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.2064 ms/op 3.2249 ms/op 0.68
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 28.273 ms/op 43.732 ms/op 0.65
BeaconState.hashTreeRoot - 1 balances 139.26 us/op 189.85 us/op 0.73
BeaconState.hashTreeRoot - 32 balances 1.3432 ms/op 1.7412 ms/op 0.77
BeaconState.hashTreeRoot - 512 balances 13.275 ms/op 19.888 ms/op 0.67
BeaconState.hashTreeRoot - 250000 balances 200.60 ms/op 315.34 ms/op 0.64
aggregationBits - 2048 els - zipIndexesInBitList 15.077 us/op 43.688 us/op 0.35
regular array get 100000 times 33.067 us/op 70.874 us/op 0.47
wrappedArray get 100000 times 32.846 us/op 71.376 us/op 0.46
arrayWithProxy get 100000 times 14.209 ms/op 18.318 ms/op 0.78
ssz.Root.equals 214.00 ns/op 355.00 ns/op 0.60
byteArrayEquals 215.00 ns/op 339.00 ns/op 0.63
shuffle list - 16384 els 7.0324 ms/op 8.5713 ms/op 0.82
shuffle list - 250000 els 102.82 ms/op 127.44 ms/op 0.81
processSlot - 1 slots 16.449 us/op 23.731 us/op 0.69
processSlot - 32 slots 3.2834 ms/op 4.9891 ms/op 0.66
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 53.580 ms/op 64.586 ms/op 0.83
getCommitteeAssignments - req 1 vs - 250000 vc 2.5354 ms/op 2.9018 ms/op 0.87
getCommitteeAssignments - req 100 vs - 250000 vc 3.7888 ms/op 4.2675 ms/op 0.89
getCommitteeAssignments - req 1000 vs - 250000 vc 4.0499 ms/op 5.1379 ms/op 0.79
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.5000 ns/op 6.8300 ns/op 0.66
state getBlockRootAtSlot - 250000 vs - 7PWei 680.80 ns/op 720.37 ns/op 0.95
computeProposers - vc 250000 8.7967 ms/op 10.264 ms/op 0.86
computeEpochShuffling - vc 250000 107.05 ms/op 120.93 ms/op 0.89
getNextSyncCommittee - vc 250000 144.23 ms/op 177.55 ms/op 0.81
computeSigningRoot for AttestationData 25.643 us/op 31.778 us/op 0.81
hash AttestationData serialized data then Buffer.toString(base64) 2.2854 us/op 2.7157 us/op 0.84
toHexString serialized data 1.0487 us/op 2.0674 us/op 0.51
Buffer.toString(base64) 200.08 ns/op 305.32 ns/op 0.66

by benchmarkbot/action

@@ -86,7 +86,9 @@ export function pollBuilderValidatorRegistration(
const pubkeyHexes = validatorStore
.getAllLocalIndices()
.map((index) => validatorStore.getPubkeyOfIndex(index))
.filter((pubkeyHex) => pubkeyHex !== undefined && validatorStore.isBuilderEnabled(pubkeyHex));
.filter(
(pubkeyHex): pubkeyHex is string => pubkeyHex !== undefined && validatorStore.isBuilderEnabled(pubkeyHex)
Copy link
Member

Choose a reason for hiding this comment

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

nifty :)

@wemeetagain wemeetagain merged commit f5e2c3a into unstable Sep 23, 2023
14 of 15 checks passed
@wemeetagain wemeetagain deleted the nflaig/remove-type-workaround branch September 23, 2023 19:37
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.12.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