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: fix typos in canonical #5609

Merged
merged 1 commit into from
Jun 5, 2023
Merged

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jun 5, 2023

Motivation

Cleaner and more readable code

Description

cannonical -> canonical

@nflaig nflaig requested a review from a team as a code owner June 5, 2023 09:54
@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 1064700 Previous: dd11c95 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 958.27 us/op 840.99 us/op 1.14
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 46.474 us/op 43.895 us/op 1.06
BLS verify - blst-native 1.2213 ms/op 1.1747 ms/op 1.04
BLS verifyMultipleSignatures 3 - blst-native 2.4780 ms/op 2.3859 ms/op 1.04
BLS verifyMultipleSignatures 8 - blst-native 5.3310 ms/op 5.1204 ms/op 1.04
BLS verifyMultipleSignatures 32 - blst-native 19.586 ms/op 18.525 ms/op 1.06
BLS aggregatePubkeys 32 - blst-native 26.033 us/op 25.199 us/op 1.03
BLS aggregatePubkeys 128 - blst-native 100.29 us/op 98.999 us/op 1.01
getAttestationsForBlock 57.463 ms/op 52.096 ms/op 1.10
isKnown best case - 1 super set check 246.00 ns/op 251.00 ns/op 0.98
isKnown normal case - 2 super set checks 246.00 ns/op 250.00 ns/op 0.98
isKnown worse case - 16 super set checks 245.00 ns/op 249.00 ns/op 0.98
CheckpointStateCache - add get delete 4.9010 us/op 4.8020 us/op 1.02
validate gossip signedAggregateAndProof - struct 2.7778 ms/op 2.7375 ms/op 1.01
validate gossip attestation - struct 1.3317 ms/op 1.3035 ms/op 1.02
pickEth1Vote - no votes 1.2502 ms/op 1.2394 ms/op 1.01
pickEth1Vote - max votes 10.045 ms/op 10.294 ms/op 0.98
pickEth1Vote - Eth1Data hashTreeRoot value x2048 9.0863 ms/op 8.6386 ms/op 1.05
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 14.627 ms/op 13.413 ms/op 1.09
pickEth1Vote - Eth1Data fastSerialize value x2048 640.40 us/op 617.98 us/op 1.04
pickEth1Vote - Eth1Data fastSerialize tree x2048 7.5156 ms/op 7.9171 ms/op 0.95
bytes32 toHexString 497.00 ns/op 476.00 ns/op 1.04
bytes32 Buffer.toString(hex) 334.00 ns/op 345.00 ns/op 0.97
bytes32 Buffer.toString(hex) from Uint8Array 547.00 ns/op 536.00 ns/op 1.02
bytes32 Buffer.toString(hex) + 0x 333.00 ns/op 343.00 ns/op 0.97
Object access 1 prop 0.16300 ns/op 0.17000 ns/op 0.96
Map access 1 prop 0.15800 ns/op 0.16000 ns/op 0.99
Object get x1000 6.7020 ns/op 7.3520 ns/op 0.91
Map get x1000 0.62200 ns/op 0.61100 ns/op 1.02
Object set x1000 53.720 ns/op 50.800 ns/op 1.06
Map set x1000 44.337 ns/op 42.737 ns/op 1.04
Return object 10000 times 0.23950 ns/op 0.23290 ns/op 1.03
Throw Error 10000 times 4.2203 us/op 4.1343 us/op 1.02
fastMsgIdFn sha256 / 200 bytes 3.3970 us/op 3.4190 us/op 0.99
fastMsgIdFn h32 xxhash / 200 bytes 276.00 ns/op 274.00 ns/op 1.01
fastMsgIdFn h64 xxhash / 200 bytes 405.00 ns/op 384.00 ns/op 1.05
fastMsgIdFn sha256 / 1000 bytes 11.500 us/op 11.386 us/op 1.01
fastMsgIdFn h32 xxhash / 1000 bytes 410.00 ns/op 396.00 ns/op 1.04
fastMsgIdFn h64 xxhash / 1000 bytes 472.00 ns/op 468.00 ns/op 1.01
fastMsgIdFn sha256 / 10000 bytes 104.02 us/op 102.21 us/op 1.02
fastMsgIdFn h32 xxhash / 10000 bytes 1.9100 us/op 1.8910 us/op 1.01
fastMsgIdFn h64 xxhash / 10000 bytes 1.3730 us/op 1.3450 us/op 1.02
enrSubnets - fastDeserialize 64 bits 1.3120 us/op 1.2730 us/op 1.03
enrSubnets - ssz BitVector 64 bits 492.00 ns/op 475.00 ns/op 1.04
enrSubnets - fastDeserialize 4 bits 171.00 ns/op 164.00 ns/op 1.04
enrSubnets - ssz BitVector 4 bits 496.00 ns/op 479.00 ns/op 1.04
prioritizePeers score -10:0 att 32-0.1 sync 2-0 106.44 us/op 104.53 us/op 1.02
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 139.64 us/op 132.23 us/op 1.06
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 171.11 us/op 168.50 us/op 1.02
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 311.58 us/op 298.37 us/op 1.04
prioritizePeers score 0:0 att 64-1 sync 4-1 382.42 us/op 365.79 us/op 1.05
array of 16000 items push then shift 1.6695 us/op 1.6112 us/op 1.04
LinkedList of 16000 items push then shift 8.8860 ns/op 8.7430 ns/op 1.02
array of 16000 items push then pop 98.871 ns/op 82.366 ns/op 1.20
LinkedList of 16000 items push then pop 8.7730 ns/op 8.4200 ns/op 1.04
array of 24000 items push then shift 2.3685 us/op 2.3268 us/op 1.02
LinkedList of 24000 items push then shift 8.8680 ns/op 8.7440 ns/op 1.01
array of 24000 items push then pop 79.791 ns/op 76.647 ns/op 1.04
LinkedList of 24000 items push then pop 8.6310 ns/op 8.4350 ns/op 1.02
intersect bitArray bitLen 8 13.249 ns/op 13.125 ns/op 1.01
intersect array and set length 8 82.224 ns/op 77.164 ns/op 1.07
intersect bitArray bitLen 128 44.141 ns/op 43.520 ns/op 1.01
intersect array and set length 128 1.0781 us/op 1.0481 us/op 1.03
Buffer.concat 32 items 3.0120 us/op 2.8450 us/op 1.06
Uint8Array.set 32 items 2.5610 us/op 2.8320 us/op 0.90
transfer serialized Status (84 B) 2.0570 us/op 2.0910 us/op 0.98
copy serialized Status (84 B) 1.7820 us/op 1.7970 us/op 0.99
transfer serialized SignedVoluntaryExit (112 B) 2.2390 us/op 2.1880 us/op 1.02
copy serialized SignedVoluntaryExit (112 B) 1.8520 us/op 1.8780 us/op 0.99
transfer serialized ProposerSlashing (416 B) 2.7480 us/op 2.4530 us/op 1.12
copy serialized ProposerSlashing (416 B) 2.4590 us/op 2.2720 us/op 1.08
transfer serialized Attestation (485 B) 2.7830 us/op 2.6460 us/op 1.05
copy serialized Attestation (485 B) 3.0770 us/op 3.0290 us/op 1.02
transfer serialized AttesterSlashing (33232 B) 3.1800 us/op 3.1260 us/op 1.02
copy serialized AttesterSlashing (33232 B) 6.6710 us/op 7.1330 us/op 0.94
transfer serialized Small SignedBeaconBlock (128000 B) 3.3830 us/op 3.4410 us/op 0.98
copy serialized Small SignedBeaconBlock (128000 B) 14.407 us/op 13.711 us/op 1.05
transfer serialized Avg SignedBeaconBlock (200000 B) 3.6650 us/op 3.4810 us/op 1.05
copy serialized Avg SignedBeaconBlock (200000 B) 55.048 us/op 19.229 us/op 2.86
transfer serialized BlobsSidecar (524380 B) 3.7720 us/op 3.4660 us/op 1.09
copy serialized BlobsSidecar (524380 B) 169.34 us/op 169.17 us/op 1.00
transfer serialized Big SignedBeaconBlock (1000000 B) 4.1400 us/op 3.6230 us/op 1.14
copy serialized Big SignedBeaconBlock (1000000 B) 335.98 us/op 254.09 us/op 1.32
pass gossip attestations to forkchoice per slot 2.7280 ms/op 2.5905 ms/op 1.05
forkChoice updateHead vc 100000 bc 64 eq 0 2.0741 ms/op 2.0850 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 0 11.573 ms/op 11.472 ms/op 1.01
forkChoice updateHead vc 1000000 bc 64 eq 0 21.998 ms/op 21.419 ms/op 1.03
forkChoice updateHead vc 600000 bc 320 eq 0 16.926 ms/op 16.342 ms/op 1.04
forkChoice updateHead vc 600000 bc 1200 eq 0 78.417 ms/op 79.049 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 1000 20.420 ms/op 20.346 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 10000 23.057 ms/op 23.419 ms/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 300000 31.211 ms/op 30.673 ms/op 1.02
computeDeltas 3.4338 ms/op 3.8371 ms/op 0.89
computeProposerBoostScoreFromBalances 1.8365 ms/op 1.7697 ms/op 1.04
altair processAttestation - 250000 vs - 7PWei normalcase 2.4479 ms/op 2.0982 ms/op 1.17
altair processAttestation - 250000 vs - 7PWei worstcase 3.9626 ms/op 3.6094 ms/op 1.10
altair processAttestation - setStatus - 1/6 committees join 142.83 us/op 135.76 us/op 1.05
altair processAttestation - setStatus - 1/3 committees join 284.32 us/op 267.62 us/op 1.06
altair processAttestation - setStatus - 1/2 committees join 375.10 us/op 352.02 us/op 1.07
altair processAttestation - setStatus - 2/3 committees join 472.22 us/op 441.19 us/op 1.07
altair processAttestation - setStatus - 4/5 committees join 660.89 us/op 638.53 us/op 1.04
altair processAttestation - setStatus - 100% committees join 786.28 us/op 746.38 us/op 1.05
altair processBlock - 250000 vs - 7PWei normalcase 17.667 ms/op 18.753 ms/op 0.94
altair processBlock - 250000 vs - 7PWei normalcase hashState 26.810 ms/op 26.147 ms/op 1.03
altair processBlock - 250000 vs - 7PWei worstcase 47.764 ms/op 50.686 ms/op 0.94
altair processBlock - 250000 vs - 7PWei worstcase hashState 70.092 ms/op 69.138 ms/op 1.01
phase0 processBlock - 250000 vs - 7PWei normalcase 2.2493 ms/op 1.9149 ms/op 1.17
phase0 processBlock - 250000 vs - 7PWei worstcase 28.644 ms/op 27.787 ms/op 1.03
altair processEth1Data - 250000 vs - 7PWei normalcase 450.47 us/op 463.08 us/op 0.97
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 8.6640 us/op 6.6090 us/op 1.31
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 27.294 us/op 19.565 us/op 1.40
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 10.031 us/op 8.6200 us/op 1.16
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 8.1530 us/op 6.7460 us/op 1.21
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 80.900 us/op 74.958 us/op 1.08
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 689.68 us/op 618.75 us/op 1.11
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 919.21 us/op 912.54 us/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 891.34 us/op 881.16 us/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.3713 ms/op 2.2375 ms/op 1.06
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.5136 ms/op 1.4596 ms/op 1.04
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.9052 ms/op 3.7106 ms/op 1.05
Tree 40 250000 create 301.23 ms/op 291.10 ms/op 1.03
Tree 40 250000 get(125000) 196.58 ns/op 174.78 ns/op 1.12
Tree 40 250000 set(125000) 967.03 ns/op 918.68 ns/op 1.05
Tree 40 250000 toArray() 20.184 ms/op 16.579 ms/op 1.22
Tree 40 250000 iterate all - toArray() + loop 21.958 ms/op 16.812 ms/op 1.31
Tree 40 250000 iterate all - get(i) 72.181 ms/op 65.110 ms/op 1.11
MutableVector 250000 create 11.005 ms/op 9.3426 ms/op 1.18
MutableVector 250000 get(125000) 6.4220 ns/op 6.3320 ns/op 1.01
MutableVector 250000 set(125000) 271.09 ns/op 245.29 ns/op 1.11
MutableVector 250000 toArray() 3.0335 ms/op 2.6507 ms/op 1.14
MutableVector 250000 iterate all - toArray() + loop 3.5593 ms/op 2.6934 ms/op 1.32
MutableVector 250000 iterate all - get(i) 1.5458 ms/op 1.4753 ms/op 1.05
Array 250000 create 3.2292 ms/op 2.4559 ms/op 1.31
Array 250000 clone - spread 1.1173 ms/op 1.1153 ms/op 1.00
Array 250000 get(125000) 0.54600 ns/op 0.55700 ns/op 0.98
Array 250000 set(125000) 0.62800 ns/op 0.62800 ns/op 1.00
Array 250000 iterate all - loop 84.071 us/op 81.569 us/op 1.03
effectiveBalanceIncrements clone Uint8Array 300000 39.827 us/op 25.072 us/op 1.59
effectiveBalanceIncrements clone MutableVector 300000 346.00 ns/op 347.00 ns/op 1.00
effectiveBalanceIncrements rw all Uint8Array 300000 170.23 us/op 165.49 us/op 1.03
effectiveBalanceIncrements rw all MutableVector 300000 88.613 ms/op 79.048 ms/op 1.12
phase0 afterProcessEpoch - 250000 vs - 7PWei 116.92 ms/op 109.43 ms/op 1.07
phase0 beforeProcessEpoch - 250000 vs - 7PWei 41.768 ms/op 40.042 ms/op 1.04
altair processEpoch - mainnet_e81889 341.97 ms/op 296.26 ms/op 1.15
mainnet_e81889 - altair beforeProcessEpoch 54.549 ms/op 50.105 ms/op 1.09
mainnet_e81889 - altair processJustificationAndFinalization 18.354 us/op 17.655 us/op 1.04
mainnet_e81889 - altair processInactivityUpdates 6.3542 ms/op 5.1954 ms/op 1.22
mainnet_e81889 - altair processRewardsAndPenalties 74.474 ms/op 66.892 ms/op 1.11
mainnet_e81889 - altair processRegistryUpdates 3.4000 us/op 2.5910 us/op 1.31
mainnet_e81889 - altair processSlashings 531.00 ns/op 577.00 ns/op 0.92
mainnet_e81889 - altair processEth1DataReset 895.00 ns/op 621.00 ns/op 1.44
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.3021 ms/op 1.2243 ms/op 1.06
mainnet_e81889 - altair processSlashingsReset 5.3910 us/op 4.3400 us/op 1.24
mainnet_e81889 - altair processRandaoMixesReset 5.6410 us/op 4.7610 us/op 1.18
mainnet_e81889 - altair processHistoricalRootsUpdate 953.00 ns/op 1.0250 us/op 0.93
mainnet_e81889 - altair processParticipationFlagUpdates 3.3170 us/op 2.4490 us/op 1.35
mainnet_e81889 - altair processSyncCommitteeUpdates 709.00 ns/op 638.00 ns/op 1.11
mainnet_e81889 - altair afterProcessEpoch 128.80 ms/op 126.02 ms/op 1.02
phase0 processEpoch - mainnet_e58758 383.28 ms/op 354.41 ms/op 1.08
mainnet_e58758 - phase0 beforeProcessEpoch 159.79 ms/op 135.58 ms/op 1.18
mainnet_e58758 - phase0 processJustificationAndFinalization 23.424 us/op 18.743 us/op 1.25
mainnet_e58758 - phase0 processRewardsAndPenalties 66.172 ms/op 64.482 ms/op 1.03
mainnet_e58758 - phase0 processRegistryUpdates 13.919 us/op 7.8010 us/op 1.78
mainnet_e58758 - phase0 processSlashings 798.00 ns/op 538.00 ns/op 1.48
mainnet_e58758 - phase0 processEth1DataReset 844.00 ns/op 571.00 ns/op 1.48
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0672 ms/op 941.31 us/op 1.13
mainnet_e58758 - phase0 processSlashingsReset 4.2410 us/op 4.5410 us/op 0.93
mainnet_e58758 - phase0 processRandaoMixesReset 5.1530 us/op 4.9630 us/op 1.04
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.0690 us/op 764.00 ns/op 1.40
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.1540 us/op 4.0640 us/op 1.02
mainnet_e58758 - phase0 afterProcessEpoch 100.80 ms/op 95.992 ms/op 1.05
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3697 ms/op 1.2232 ms/op 1.12
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5254 ms/op 1.4758 ms/op 1.03
altair processInactivityUpdates - 250000 normalcase 27.586 ms/op 26.004 ms/op 1.06
altair processInactivityUpdates - 250000 worstcase 26.776 ms/op 26.496 ms/op 1.01
phase0 processRegistryUpdates - 250000 normalcase 6.9540 us/op 6.6830 us/op 1.04
phase0 processRegistryUpdates - 250000 badcase_full_deposits 280.98 us/op 239.91 us/op 1.17
phase0 processRegistryUpdates - 250000 worstcase 0.5 126.29 ms/op 127.37 ms/op 0.99
altair processRewardsAndPenalties - 250000 normalcase 68.738 ms/op 66.923 ms/op 1.03
altair processRewardsAndPenalties - 250000 worstcase 72.613 ms/op 67.659 ms/op 1.07
phase0 getAttestationDeltas - 250000 normalcase 7.7397 ms/op 6.9680 ms/op 1.11
phase0 getAttestationDeltas - 250000 worstcase 7.2885 ms/op 6.4480 ms/op 1.13
phase0 processSlashings - 250000 worstcase 3.5192 ms/op 3.3840 ms/op 1.04
altair processSyncCommitteeUpdates - 250000 186.09 ms/op 173.64 ms/op 1.07
BeaconState.hashTreeRoot - No change 384.00 ns/op 332.00 ns/op 1.16
BeaconState.hashTreeRoot - 1 full validator 51.018 us/op 54.182 us/op 0.94
BeaconState.hashTreeRoot - 32 full validator 521.70 us/op 522.13 us/op 1.00
BeaconState.hashTreeRoot - 512 full validator 5.7177 ms/op 5.4598 ms/op 1.05
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 62.024 us/op 63.161 us/op 0.98
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 928.34 us/op 898.54 us/op 1.03
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 11.301 ms/op 11.129 ms/op 1.02
BeaconState.hashTreeRoot - 1 balances 47.504 us/op 48.039 us/op 0.99
BeaconState.hashTreeRoot - 32 balances 420.15 us/op 430.38 us/op 0.98
BeaconState.hashTreeRoot - 512 balances 4.3023 ms/op 4.4891 ms/op 0.96
BeaconState.hashTreeRoot - 250000 balances 75.657 ms/op 77.509 ms/op 0.98
aggregationBits - 2048 els - zipIndexesInBitList 15.173 us/op 16.077 us/op 0.94
regular array get 100000 times 32.866 us/op 44.925 us/op 0.73
wrappedArray get 100000 times 32.749 us/op 33.818 us/op 0.97
arrayWithProxy get 100000 times 16.503 ms/op 16.063 ms/op 1.03
ssz.Root.equals 536.00 ns/op 567.00 ns/op 0.95
byteArrayEquals 531.00 ns/op 542.00 ns/op 0.98
shuffle list - 16384 els 6.8665 ms/op 7.0102 ms/op 0.98
shuffle list - 250000 els 100.86 ms/op 103.00 ms/op 0.98
processSlot - 1 slots 8.8920 us/op 9.3080 us/op 0.96
processSlot - 32 slots 1.3302 ms/op 1.4197 ms/op 0.94
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.575 ms/op 35.760 ms/op 1.05
getCommitteeAssignments - req 1 vs - 250000 vc 2.8874 ms/op 2.9842 ms/op 0.97
getCommitteeAssignments - req 100 vs - 250000 vc 4.1588 ms/op 4.2446 ms/op 0.98
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4774 ms/op 4.5539 ms/op 0.98
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.6000 ns/op 4.5000 ns/op 1.02
state getBlockRootAtSlot - 250000 vs - 7PWei 949.24 ns/op 723.07 ns/op 1.31
computeProposers - vc 250000 10.602 ms/op 11.183 ms/op 0.95
computeEpochShuffling - vc 250000 100.70 ms/op 105.66 ms/op 0.95
getNextSyncCommittee - vc 250000 172.91 ms/op 188.21 ms/op 0.92
computeSigningRoot for AttestationData 13.047 us/op 13.840 us/op 0.94
hash AttestationData serialized data then Buffer.toString(base64) 2.3985 us/op 2.5474 us/op 0.94
toHexString serialized data 1.0449 us/op 1.1353 us/op 0.92
Buffer.toString(base64) 313.85 ns/op 322.13 ns/op 0.97

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 761f282 into unstable Jun 5, 2023
@wemeetagain wemeetagain deleted the nflaig/canonical-typo branch June 5, 2023 18: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