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: review fixes for PR-5527 #5678

Merged
merged 2 commits into from
Jun 22, 2023
Merged

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jun 21, 2023

Motivation

Follow up fixes for

Running yarn install on unstable produces a diff as it looks like yarn.lock was accidentally updated by PR.

Description

  • fix yarn.lock file
  • fix readme formatting

@nflaig nflaig requested a review from a team as a code owner June 21, 2023 19:38
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: f07308b Previous: 9e57b7d Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 613.18 us/op 618.54 us/op 0.99
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 51.504 us/op 47.050 us/op 1.09
BLS verify - blst-native 1.2367 ms/op 1.2543 ms/op 0.99
BLS verifyMultipleSignatures 3 - blst-native 2.4975 ms/op 2.6148 ms/op 0.96
BLS verifyMultipleSignatures 8 - blst-native 5.4442 ms/op 5.2828 ms/op 1.03
BLS verifyMultipleSignatures 32 - blst-native 19.825 ms/op 19.258 ms/op 1.03
BLS aggregatePubkeys 32 - blst-native 26.332 us/op 26.006 us/op 1.01
BLS aggregatePubkeys 128 - blst-native 103.61 us/op 102.70 us/op 1.01
getAttestationsForBlock 60.864 ms/op 64.607 ms/op 0.94
isKnown best case - 1 super set check 280.00 ns/op 268.00 ns/op 1.04
isKnown normal case - 2 super set checks 277.00 ns/op 268.00 ns/op 1.03
isKnown worse case - 16 super set checks 271.00 ns/op 267.00 ns/op 1.01
CheckpointStateCache - add get delete 5.3940 us/op 5.2850 us/op 1.02
validate gossip signedAggregateAndProof - struct 2.8491 ms/op 2.8605 ms/op 1.00
validate gossip attestation - struct 1.3530 ms/op 1.3760 ms/op 0.98
pickEth1Vote - no votes 1.2953 ms/op 1.2900 ms/op 1.00
pickEth1Vote - max votes 9.6287 ms/op 10.928 ms/op 0.88
pickEth1Vote - Eth1Data hashTreeRoot value x2048 9.6983 ms/op 8.8318 ms/op 1.10
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 16.766 ms/op 18.468 ms/op 0.91
pickEth1Vote - Eth1Data fastSerialize value x2048 718.44 us/op 724.31 us/op 0.99
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.3151 ms/op 8.8347 ms/op 0.71
bytes32 toHexString 519.00 ns/op 544.00 ns/op 0.95
bytes32 Buffer.toString(hex) 342.00 ns/op 391.00 ns/op 0.87
bytes32 Buffer.toString(hex) from Uint8Array 587.00 ns/op 607.00 ns/op 0.97
bytes32 Buffer.toString(hex) + 0x 373.00 ns/op 408.00 ns/op 0.91
Object access 1 prop 0.16600 ns/op 0.19800 ns/op 0.84
Map access 1 prop 0.16100 ns/op 0.17600 ns/op 0.91
Object get x1000 6.6690 ns/op 6.6780 ns/op 1.00
Map get x1000 0.60900 ns/op 0.61800 ns/op 0.99
Object set x1000 51.707 ns/op 61.303 ns/op 0.84
Map set x1000 44.788 ns/op 47.256 ns/op 0.95
Return object 10000 times 0.23900 ns/op 0.24830 ns/op 0.96
Throw Error 10000 times 4.2684 us/op 4.6202 us/op 0.92
fastMsgIdFn sha256 / 200 bytes 3.4890 us/op 3.6990 us/op 0.94
fastMsgIdFn h32 xxhash / 200 bytes 274.00 ns/op 323.00 ns/op 0.85
fastMsgIdFn h64 xxhash / 200 bytes 396.00 ns/op 445.00 ns/op 0.89
fastMsgIdFn sha256 / 1000 bytes 11.715 us/op 12.849 us/op 0.91
fastMsgIdFn h32 xxhash / 1000 bytes 407.00 ns/op 444.00 ns/op 0.92
fastMsgIdFn h64 xxhash / 1000 bytes 469.00 ns/op 532.00 ns/op 0.88
fastMsgIdFn sha256 / 10000 bytes 104.49 us/op 105.40 us/op 0.99
fastMsgIdFn h32 xxhash / 10000 bytes 1.9510 us/op 1.9750 us/op 0.99
fastMsgIdFn h64 xxhash / 10000 bytes 1.3470 us/op 1.4780 us/op 0.91
enrSubnets - fastDeserialize 64 bits 1.3360 us/op 1.4720 us/op 0.91
enrSubnets - ssz BitVector 64 bits 555.00 ns/op 547.00 ns/op 1.01
enrSubnets - fastDeserialize 4 bits 181.00 ns/op 171.00 ns/op 1.06
enrSubnets - ssz BitVector 4 bits 517.00 ns/op 503.00 ns/op 1.03
prioritizePeers score -10:0 att 32-0.1 sync 2-0 118.78 us/op 109.29 us/op 1.09
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 157.42 us/op 151.18 us/op 1.04
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 177.22 us/op 190.67 us/op 0.93
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 362.06 us/op 325.06 us/op 1.11
prioritizePeers score 0:0 att 64-1 sync 4-1 429.20 us/op 399.40 us/op 1.07
array of 16000 items push then shift 1.6668 us/op 1.7418 us/op 0.96
LinkedList of 16000 items push then shift 8.7400 ns/op 9.5000 ns/op 0.92
array of 16000 items push then pop 110.54 ns/op 104.73 ns/op 1.06
LinkedList of 16000 items push then pop 8.8470 ns/op 9.2090 ns/op 0.96
array of 24000 items push then shift 2.4056 us/op 2.5099 us/op 0.96
LinkedList of 24000 items push then shift 8.9640 ns/op 10.557 ns/op 0.85
array of 24000 items push then pop 81.971 ns/op 85.872 ns/op 0.95
LinkedList of 24000 items push then pop 8.6670 ns/op 9.1750 ns/op 0.94
intersect bitArray bitLen 8 13.218 ns/op 14.032 ns/op 0.94
intersect array and set length 8 84.550 ns/op 81.286 ns/op 1.04
intersect bitArray bitLen 128 44.259 ns/op 46.810 ns/op 0.95
intersect array and set length 128 1.2240 us/op 1.0870 us/op 1.13
Buffer.concat 32 items 3.0330 us/op 2.7320 us/op 1.11
Uint8Array.set 32 items 3.0150 us/op 2.5650 us/op 1.18
transfer serialized Status (84 B) 2.2670 us/op 2.2630 us/op 1.00
copy serialized Status (84 B) 1.9260 us/op 1.8580 us/op 1.04
transfer serialized SignedVoluntaryExit (112 B) 2.4800 us/op 2.2130 us/op 1.12
copy serialized SignedVoluntaryExit (112 B) 1.8550 us/op 1.9800 us/op 0.94
transfer serialized ProposerSlashing (416 B) 2.5600 us/op 2.6280 us/op 0.97
copy serialized ProposerSlashing (416 B) 2.8370 us/op 2.3940 us/op 1.19
transfer serialized Attestation (485 B) 3.2080 us/op 2.4560 us/op 1.31
copy serialized Attestation (485 B) 3.0480 us/op 2.1980 us/op 1.39
transfer serialized AttesterSlashing (33232 B) 2.9030 us/op 2.4090 us/op 1.21
copy serialized AttesterSlashing (33232 B) 6.5000 us/op 5.6940 us/op 1.14
transfer serialized Small SignedBeaconBlock (128000 B) 3.3830 us/op 2.7130 us/op 1.25
copy serialized Small SignedBeaconBlock (128000 B) 16.934 us/op 14.554 us/op 1.16
transfer serialized Avg SignedBeaconBlock (200000 B) 3.2090 us/op 3.0510 us/op 1.05
copy serialized Avg SignedBeaconBlock (200000 B) 38.893 us/op 21.663 us/op 1.80
transfer serialized BlobsSidecar (524380 B) 3.6720 us/op 3.1720 us/op 1.16
copy serialized BlobsSidecar (524380 B) 199.85 us/op 196.70 us/op 1.02
transfer serialized Big SignedBeaconBlock (1000000 B) 3.7680 us/op 3.2510 us/op 1.16
copy serialized Big SignedBeaconBlock (1000000 B) 320.50 us/op 295.17 us/op 1.09
pass gossip attestations to forkchoice per slot 2.9191 ms/op 2.7532 ms/op 1.06
forkChoice updateHead vc 100000 bc 64 eq 0 2.2592 ms/op 2.5097 ms/op 0.90
forkChoice updateHead vc 600000 bc 64 eq 0 12.707 ms/op 12.048 ms/op 1.05
forkChoice updateHead vc 1000000 bc 64 eq 0 23.840 ms/op 19.319 ms/op 1.23
forkChoice updateHead vc 600000 bc 320 eq 0 18.201 ms/op 17.339 ms/op 1.05
forkChoice updateHead vc 600000 bc 1200 eq 0 83.498 ms/op 91.262 ms/op 0.91
forkChoice updateHead vc 600000 bc 64 eq 1000 21.212 ms/op 21.551 ms/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 10000 23.241 ms/op 24.553 ms/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 300000 34.912 ms/op 34.560 ms/op 1.01
computeDeltas 3.3161 ms/op 4.0315 ms/op 0.82
computeProposerBoostScoreFromBalances 1.8327 ms/op 1.8415 ms/op 1.00
altair processAttestation - 250000 vs - 7PWei normalcase 2.9486 ms/op 2.6204 ms/op 1.13
altair processAttestation - 250000 vs - 7PWei worstcase 4.8630 ms/op 3.6288 ms/op 1.34
altair processAttestation - setStatus - 1/6 committees join 147.18 us/op 148.36 us/op 0.99
altair processAttestation - setStatus - 1/3 committees join 292.54 us/op 287.81 us/op 1.02
altair processAttestation - setStatus - 1/2 committees join 384.59 us/op 379.28 us/op 1.01
altair processAttestation - setStatus - 2/3 committees join 468.55 us/op 481.65 us/op 0.97
altair processAttestation - setStatus - 4/5 committees join 672.83 us/op 687.03 us/op 0.98
altair processAttestation - setStatus - 100% committees join 805.60 us/op 773.69 us/op 1.04
altair processBlock - 250000 vs - 7PWei normalcase 19.257 ms/op 19.235 ms/op 1.00
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.250 ms/op 27.414 ms/op 1.07
altair processBlock - 250000 vs - 7PWei worstcase 49.830 ms/op 58.144 ms/op 0.86
altair processBlock - 250000 vs - 7PWei worstcase hashState 76.246 ms/op 81.321 ms/op 0.94
phase0 processBlock - 250000 vs - 7PWei normalcase 2.2766 ms/op 2.1093 ms/op 1.08
phase0 processBlock - 250000 vs - 7PWei worstcase 32.523 ms/op 29.657 ms/op 1.10
altair processEth1Data - 250000 vs - 7PWei normalcase 598.87 us/op 469.38 us/op 1.28
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 8.6490 us/op 8.5360 us/op 1.01
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 25.849 us/op 19.887 us/op 1.30
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 10.405 us/op 13.088 us/op 0.80
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 8.6590 us/op 6.1860 us/op 1.40
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 104.88 us/op 87.705 us/op 1.20
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 667.31 us/op 1.2506 ms/op 0.53
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 932.98 us/op 1.3935 ms/op 0.67
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 913.47 us/op 1.0407 ms/op 0.88
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.6890 ms/op 2.3894 ms/op 1.13
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.5342 ms/op 2.2306 ms/op 0.69
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.7548 ms/op 3.9050 ms/op 1.22
Tree 40 250000 create 391.21 ms/op 324.95 ms/op 1.20
Tree 40 250000 get(125000) 200.03 ns/op 192.42 ns/op 1.04
Tree 40 250000 set(125000) 1.0310 us/op 999.17 ns/op 1.03
Tree 40 250000 toArray() 20.976 ms/op 19.792 ms/op 1.06
Tree 40 250000 iterate all - toArray() + loop 20.864 ms/op 20.427 ms/op 1.02
Tree 40 250000 iterate all - get(i) 74.696 ms/op 75.642 ms/op 0.99
MutableVector 250000 create 10.637 ms/op 13.226 ms/op 0.80
MutableVector 250000 get(125000) 6.4280 ns/op 6.6350 ns/op 0.97
MutableVector 250000 set(125000) 287.01 ns/op 276.40 ns/op 1.04
MutableVector 250000 toArray() 3.3922 ms/op 3.0660 ms/op 1.11
MutableVector 250000 iterate all - toArray() + loop 2.9578 ms/op 3.4344 ms/op 0.86
MutableVector 250000 iterate all - get(i) 1.5441 ms/op 1.5520 ms/op 0.99
Array 250000 create 2.5577 ms/op 2.6868 ms/op 0.95
Array 250000 clone - spread 1.1243 ms/op 1.2420 ms/op 0.91
Array 250000 get(125000) 0.55900 ns/op 0.65200 ns/op 0.86
Array 250000 set(125000) 0.63600 ns/op 0.73500 ns/op 0.87
Array 250000 iterate all - loop 90.853 us/op 91.078 us/op 1.00
effectiveBalanceIncrements clone Uint8Array 300000 31.288 us/op 46.339 us/op 0.68
effectiveBalanceIncrements clone MutableVector 300000 343.00 ns/op 390.00 ns/op 0.88
effectiveBalanceIncrements rw all Uint8Array 300000 172.66 us/op 173.12 us/op 1.00
effectiveBalanceIncrements rw all MutableVector 300000 80.510 ms/op 91.917 ms/op 0.88
phase0 afterProcessEpoch - 250000 vs - 7PWei 115.05 ms/op 122.04 ms/op 0.94
phase0 beforeProcessEpoch - 250000 vs - 7PWei 42.339 ms/op 44.444 ms/op 0.95
altair processEpoch - mainnet_e81889 328.89 ms/op 331.80 ms/op 0.99
mainnet_e81889 - altair beforeProcessEpoch 70.576 ms/op 64.539 ms/op 1.09
mainnet_e81889 - altair processJustificationAndFinalization 16.964 us/op 23.697 us/op 0.72
mainnet_e81889 - altair processInactivityUpdates 5.6783 ms/op 6.3097 ms/op 0.90
mainnet_e81889 - altair processRewardsAndPenalties 51.389 ms/op 78.959 ms/op 0.65
mainnet_e81889 - altair processRegistryUpdates 2.7570 us/op 2.8750 us/op 0.96
mainnet_e81889 - altair processSlashings 620.00 ns/op 620.00 ns/op 1.00
mainnet_e81889 - altair processEth1DataReset 543.00 ns/op 772.00 ns/op 0.70
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2650 ms/op 1.4216 ms/op 0.89
mainnet_e81889 - altair processSlashingsReset 4.8840 us/op 7.1410 us/op 0.68
mainnet_e81889 - altair processRandaoMixesReset 9.3330 us/op 5.7760 us/op 1.62
mainnet_e81889 - altair processHistoricalRootsUpdate 911.00 ns/op 1.2030 us/op 0.76
mainnet_e81889 - altair processParticipationFlagUpdates 2.6790 us/op 3.1890 us/op 0.84
mainnet_e81889 - altair processSyncCommitteeUpdates 653.00 ns/op 865.00 ns/op 0.75
mainnet_e81889 - altair afterProcessEpoch 130.11 ms/op 142.57 ms/op 0.91
phase0 processEpoch - mainnet_e58758 368.84 ms/op 402.92 ms/op 0.92
mainnet_e58758 - phase0 beforeProcessEpoch 146.43 ms/op 155.30 ms/op 0.94
mainnet_e58758 - phase0 processJustificationAndFinalization 18.947 us/op 22.658 us/op 0.84
mainnet_e58758 - phase0 processRewardsAndPenalties 67.704 ms/op 69.314 ms/op 0.98
mainnet_e58758 - phase0 processRegistryUpdates 10.950 us/op 12.562 us/op 0.87
mainnet_e58758 - phase0 processSlashings 566.00 ns/op 985.00 ns/op 0.57
mainnet_e58758 - phase0 processEth1DataReset 870.00 ns/op 729.00 ns/op 1.19
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1026 ms/op 1.2411 ms/op 0.89
mainnet_e58758 - phase0 processSlashingsReset 4.6890 us/op 7.0660 us/op 0.66
mainnet_e58758 - phase0 processRandaoMixesReset 5.8830 us/op 6.9280 us/op 0.85
mainnet_e58758 - phase0 processHistoricalRootsUpdate 802.00 ns/op 1.0550 us/op 0.76
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.4130 us/op 6.0340 us/op 0.73
mainnet_e58758 - phase0 afterProcessEpoch 101.55 ms/op 102.17 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2889 ms/op 1.3062 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.7392 ms/op 1.5105 ms/op 1.15
altair processInactivityUpdates - 250000 normalcase 27.432 ms/op 29.002 ms/op 0.95
altair processInactivityUpdates - 250000 worstcase 29.530 ms/op 27.893 ms/op 1.06
phase0 processRegistryUpdates - 250000 normalcase 9.5040 us/op 9.0540 us/op 1.05
phase0 processRegistryUpdates - 250000 badcase_full_deposits 279.57 us/op 366.42 us/op 0.76
phase0 processRegistryUpdates - 250000 worstcase 0.5 122.81 ms/op 150.53 ms/op 0.82
altair processRewardsAndPenalties - 250000 normalcase 64.815 ms/op 75.835 ms/op 0.85
altair processRewardsAndPenalties - 250000 worstcase 72.989 ms/op 98.681 ms/op 0.74
phase0 getAttestationDeltas - 250000 normalcase 8.3674 ms/op 13.123 ms/op 0.64
phase0 getAttestationDeltas - 250000 worstcase 7.2728 ms/op 10.315 ms/op 0.71
phase0 processSlashings - 250000 worstcase 3.6503 ms/op 4.1540 ms/op 0.88
altair processSyncCommitteeUpdates - 250000 193.06 ms/op 262.54 ms/op 0.74
BeaconState.hashTreeRoot - No change 292.00 ns/op 389.00 ns/op 0.75
BeaconState.hashTreeRoot - 1 full validator 53.050 us/op 69.655 us/op 0.76
BeaconState.hashTreeRoot - 32 full validator 575.11 us/op 674.58 us/op 0.85
BeaconState.hashTreeRoot - 512 full validator 5.4192 ms/op 7.8286 ms/op 0.69
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 64.981 us/op 82.904 us/op 0.78
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 962.26 us/op 1.2685 ms/op 0.76
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 13.621 ms/op 17.744 ms/op 0.77
BeaconState.hashTreeRoot - 1 balances 50.921 us/op 64.322 us/op 0.79
BeaconState.hashTreeRoot - 32 balances 507.22 us/op 632.10 us/op 0.80
BeaconState.hashTreeRoot - 512 balances 4.8960 ms/op 6.9863 ms/op 0.70
BeaconState.hashTreeRoot - 250000 balances 78.304 ms/op 101.38 ms/op 0.77
aggregationBits - 2048 els - zipIndexesInBitList 18.034 us/op 34.100 us/op 0.53
regular array get 100000 times 34.605 us/op 55.916 us/op 0.62
wrappedArray get 100000 times 44.192 us/op 65.836 us/op 0.67
arrayWithProxy get 100000 times 16.489 ms/op 24.859 ms/op 0.66
ssz.Root.equals 619.00 ns/op 847.00 ns/op 0.73
byteArrayEquals 576.00 ns/op 835.00 ns/op 0.69
shuffle list - 16384 els 7.1940 ms/op 8.3242 ms/op 0.86
shuffle list - 250000 els 105.33 ms/op 136.43 ms/op 0.77
processSlot - 1 slots 9.6500 us/op 16.107 us/op 0.60
processSlot - 32 slots 1.4486 ms/op 1.7136 ms/op 0.85
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 34.765 ms/op 49.121 ms/op 0.71
getCommitteeAssignments - req 1 vs - 250000 vc 2.9959 ms/op 3.9612 ms/op 0.76
getCommitteeAssignments - req 100 vs - 250000 vc 4.2009 ms/op 5.5619 ms/op 0.76
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5871 ms/op 5.5835 ms/op 0.82
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.0700 ns/op 8.5500 ns/op 0.59
state getBlockRootAtSlot - 250000 vs - 7PWei 666.07 ns/op 860.83 ns/op 0.77
computeProposers - vc 250000 11.202 ms/op 12.939 ms/op 0.87
computeEpochShuffling - vc 250000 111.96 ms/op 151.77 ms/op 0.74
getNextSyncCommittee - vc 250000 180.70 ms/op 291.45 ms/op 0.62
computeSigningRoot for AttestationData 13.940 us/op 19.902 us/op 0.70
hash AttestationData serialized data then Buffer.toString(base64) 2.5366 us/op 3.0234 us/op 0.84
toHexString serialized data 1.1215 us/op 2.0122 us/op 0.56
Buffer.toString(base64) 336.88 ns/op 557.65 ns/op 0.60

by benchmarkbot/action

@wemeetagain wemeetagain merged commit c042a0b into unstable Jun 22, 2023
12 checks passed
@wemeetagain wemeetagain deleted the nflaig/review-docs-spelling-pr branch June 22, 2023 03:11
@wemeetagain
Copy link
Member

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

None yet

3 participants