Skip to content

Update yargs to v17 - #5159

Merged
wemeetagain merged 8 commits into
unstablefrom
cayman/update-yargs
Apr 17, 2023
Merged

Update yargs to v17#5159
wemeetagain merged 8 commits into
unstablefrom
cayman/update-yargs

Conversation

@wemeetagain

Copy link
Copy Markdown
Member

Small thing noticed when trying to add a --show-hidden cli option.

Update yargs v16 to v17. Resolves a small typing issue.

@wemeetagain
wemeetagain requested a review from a team as a code owner February 16, 2023 16:24
@github-actions

github-actions Bot commented Feb 16, 2023

Copy link
Copy Markdown
Contributor

Performance Report

鉁旓笍 no performance regression detected

Full benchmark results
Benchmark suite Current: 5b11b62 Previous: 850f9f6 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 619.58 us/op 525.37 us/op 1.18
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 71.810 us/op 46.094 us/op 1.56
BLS verify - blst-native 1.3878 ms/op 1.2214 ms/op 1.14
BLS verifyMultipleSignatures 3 - blst-native 2.7613 ms/op 2.4700 ms/op 1.12
BLS verifyMultipleSignatures 8 - blst-native 5.7903 ms/op 5.3129 ms/op 1.09
BLS verifyMultipleSignatures 32 - blst-native 19.921 ms/op 19.815 ms/op 1.01
BLS aggregatePubkeys 32 - blst-native 27.388 us/op 26.376 us/op 1.04
BLS aggregatePubkeys 128 - blst-native 105.13 us/op 101.34 us/op 1.04
getAttestationsForBlock 65.823 ms/op 58.221 ms/op 1.13
isKnown best case - 1 super set check 274.00 ns/op 261.00 ns/op 1.05
isKnown normal case - 2 super set checks 271.00 ns/op 251.00 ns/op 1.08
isKnown worse case - 16 super set checks 265.00 ns/op 253.00 ns/op 1.05
CheckpointStateCache - add get delete 5.7950 us/op 5.1850 us/op 1.12
validate gossip signedAggregateAndProof - struct 2.9139 ms/op 2.8168 ms/op 1.03
validate gossip attestation - struct 1.3669 ms/op 1.3451 ms/op 1.02
pickEth1Vote - no votes 1.4082 ms/op 1.3656 ms/op 1.03
pickEth1Vote - max votes 14.123 ms/op 12.808 ms/op 1.10
pickEth1Vote - Eth1Data hashTreeRoot value x2048 9.8929 ms/op 9.8836 ms/op 1.00
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 18.400 ms/op 16.778 ms/op 1.10
pickEth1Vote - Eth1Data fastSerialize value x2048 777.71 us/op 774.73 us/op 1.00
pickEth1Vote - Eth1Data fastSerialize tree x2048 8.9033 ms/op 8.0901 ms/op 1.10
bytes32 toHexString 640.00 ns/op 608.00 ns/op 1.05
bytes32 Buffer.toString(hex) 421.00 ns/op 409.00 ns/op 1.03
bytes32 Buffer.toString(hex) from Uint8Array 606.00 ns/op 610.00 ns/op 0.99
bytes32 Buffer.toString(hex) + 0x 409.00 ns/op 425.00 ns/op 0.96
Object access 1 prop 0.19200 ns/op 0.19200 ns/op 1.00
Map access 1 prop 0.16700 ns/op 0.16700 ns/op 1.00
Object get x1000 6.9090 ns/op 6.4230 ns/op 1.08
Map get x1000 0.59600 ns/op 0.60200 ns/op 0.99
Object set x1000 65.703 ns/op 68.174 ns/op 0.96
Map set x1000 55.263 ns/op 50.665 ns/op 1.09
Return object 10000 times 0.25730 ns/op 0.24430 ns/op 1.05
Throw Error 10000 times 4.3459 us/op 4.2940 us/op 1.01
fastMsgIdFn sha256 / 200 bytes 3.6080 us/op 3.6150 us/op 1.00
fastMsgIdFn h32 xxhash / 200 bytes 306.00 ns/op 306.00 ns/op 1.00
fastMsgIdFn h64 xxhash / 200 bytes 465.00 ns/op 444.00 ns/op 1.05
fastMsgIdFn sha256 / 1000 bytes 12.082 us/op 12.121 us/op 1.00
fastMsgIdFn h32 xxhash / 1000 bytes 451.00 ns/op 443.00 ns/op 1.02
fastMsgIdFn h64 xxhash / 1000 bytes 501.00 ns/op 521.00 ns/op 0.96
fastMsgIdFn sha256 / 10000 bytes 105.36 us/op 106.80 us/op 0.99
fastMsgIdFn h32 xxhash / 10000 bytes 2.0020 us/op 1.9770 us/op 1.01
fastMsgIdFn h64 xxhash / 10000 bytes 1.4420 us/op 1.4410 us/op 1.00
enrSubnets - fastDeserialize 64 bits 1.6550 us/op 1.4560 us/op 1.14
enrSubnets - ssz BitVector 64 bits 598.00 ns/op 538.00 ns/op 1.11
enrSubnets - fastDeserialize 4 bits 209.00 ns/op 192.00 ns/op 1.09
enrSubnets - ssz BitVector 4 bits 604.00 ns/op 603.00 ns/op 1.00
prioritizePeers score -10:0 att 32-0.1 sync 2-0 117.47 us/op 114.53 us/op 1.03
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 158.83 us/op 160.84 us/op 0.99
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 193.56 us/op 195.35 us/op 0.99
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 360.43 us/op 356.46 us/op 1.01
prioritizePeers score 0:0 att 64-1 sync 4-1 441.00 us/op 403.43 us/op 1.09
array of 16000 items push then shift 1.7122 us/op 1.6311 us/op 1.05
LinkedList of 16000 items push then shift 9.3480 ns/op 8.9160 ns/op 1.05
array of 16000 items push then pop 113.44 ns/op 91.057 ns/op 1.25
LinkedList of 16000 items push then pop 9.1910 ns/op 8.9480 ns/op 1.03
array of 24000 items push then shift 2.4807 us/op 2.4236 us/op 1.02
LinkedList of 24000 items push then shift 10.365 ns/op 9.4730 ns/op 1.09
array of 24000 items push then pop 92.060 ns/op 85.833 ns/op 1.07
LinkedList of 24000 items push then pop 9.7230 ns/op 9.7830 ns/op 0.99
intersect bitArray bitLen 8 14.237 ns/op 13.744 ns/op 1.04
intersect array and set length 8 101.05 ns/op 78.402 ns/op 1.29
intersect bitArray bitLen 128 44.964 ns/op 45.032 ns/op 1.00
intersect array and set length 128 1.2627 us/op 1.1025 us/op 1.15
Buffer.concat 32 items 3.1810 us/op 2.7120 us/op 1.17
Uint8Array.set 32 items 2.7920 us/op 2.2510 us/op 1.24
pass gossip attestations to forkchoice per slot 3.4093 ms/op 3.4683 ms/op 0.98
computeDeltas 3.0944 ms/op 3.0295 ms/op 1.02
computeProposerBoostScoreFromBalances 1.8026 ms/op 1.8387 ms/op 0.98
altair processAttestation - 250000 vs - 7PWei normalcase 2.8356 ms/op 2.6419 ms/op 1.07
altair processAttestation - 250000 vs - 7PWei worstcase 4.0713 ms/op 3.3396 ms/op 1.22
altair processAttestation - setStatus - 1/6 committees join 147.63 us/op 146.43 us/op 1.01
altair processAttestation - setStatus - 1/3 committees join 272.45 us/op 281.78 us/op 0.97
altair processAttestation - setStatus - 1/2 committees join 370.54 us/op 374.92 us/op 0.99
altair processAttestation - setStatus - 2/3 committees join 457.89 us/op 471.78 us/op 0.97
altair processAttestation - setStatus - 4/5 committees join 645.48 us/op 669.05 us/op 0.96
altair processAttestation - setStatus - 100% committees join 746.74 us/op 785.96 us/op 0.95
altair processBlock - 250000 vs - 7PWei normalcase 17.206 ms/op 18.422 ms/op 0.93
altair processBlock - 250000 vs - 7PWei normalcase hashState 27.565 ms/op 26.484 ms/op 1.04
altair processBlock - 250000 vs - 7PWei worstcase 53.691 ms/op 65.041 ms/op 0.83
altair processBlock - 250000 vs - 7PWei worstcase hashState 82.031 ms/op 79.062 ms/op 1.04
phase0 processBlock - 250000 vs - 7PWei normalcase 2.0993 ms/op 2.3172 ms/op 0.91
phase0 processBlock - 250000 vs - 7PWei worstcase 29.239 ms/op 29.926 ms/op 0.98
altair processEth1Data - 250000 vs - 7PWei normalcase 497.94 us/op 480.27 us/op 1.04
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 7.8850 us/op 7.6270 us/op 1.03
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 25.382 us/op 29.525 us/op 0.86
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 14.030 us/op 12.148 us/op 1.15
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 8.0980 us/op 8.0050 us/op 1.01
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 81.104 us/op 107.42 us/op 0.76
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 1.1331 ms/op 771.57 us/op 1.47
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 16384 1.6503 ms/op 1.0252 ms/op 1.61
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 16384 1.6698 ms/op 1.1211 ms/op 1.49
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 16384 2.3830 ms/op 2.3653 ms/op 1.01
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 16384 2.1205 ms/op 1.7027 ms/op 1.25
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 16384 3.7492 ms/op 3.7809 ms/op 0.99
Tree 40 250000 create 329.10 ms/op 320.36 ms/op 1.03
Tree 40 250000 get(125000) 186.17 ns/op 186.93 ns/op 1.00
Tree 40 250000 set(125000) 997.64 ns/op 944.63 ns/op 1.06
Tree 40 250000 toArray() 19.071 ms/op 17.519 ms/op 1.09
Tree 40 250000 iterate all - toArray() + loop 21.068 ms/op 17.912 ms/op 1.18
Tree 40 250000 iterate all - get(i) 69.508 ms/op 66.514 ms/op 1.05
MutableVector 250000 create 12.273 ms/op 12.482 ms/op 0.98
MutableVector 250000 get(125000) 6.6820 ns/op 6.5050 ns/op 1.03
MutableVector 250000 set(125000) 260.54 ns/op 258.67 ns/op 1.01
MutableVector 250000 toArray() 3.0617 ms/op 2.7450 ms/op 1.12
MutableVector 250000 iterate all - toArray() + loop 3.0959 ms/op 2.8530 ms/op 1.09
MutableVector 250000 iterate all - get(i) 1.5612 ms/op 1.5390 ms/op 1.01
Array 250000 create 2.4863 ms/op 2.5683 ms/op 0.97
Array 250000 clone - spread 1.1407 ms/op 1.2112 ms/op 0.94
Array 250000 get(125000) 0.57200 ns/op 0.58200 ns/op 0.98
Array 250000 set(125000) 0.66400 ns/op 0.67200 ns/op 0.99
Array 250000 iterate all - loop 101.11 us/op 82.655 us/op 1.22
effectiveBalanceIncrements clone Uint8Array 300000 33.396 us/op 27.425 us/op 1.22
effectiveBalanceIncrements clone MutableVector 300000 383.00 ns/op 392.00 ns/op 0.98
effectiveBalanceIncrements rw all Uint8Array 300000 171.96 us/op 169.00 us/op 1.02
effectiveBalanceIncrements rw all MutableVector 300000 85.738 ms/op 86.150 ms/op 1.00
phase0 afterProcessEpoch - 250000 vs - 7PWei 115.04 ms/op 116.19 ms/op 0.99
phase0 beforeProcessEpoch - 250000 vs - 7PWei 41.421 ms/op 67.446 ms/op 0.61
altair processEpoch - mainnet_e81889 360.23 ms/op 361.80 ms/op 1.00
mainnet_e81889 - altair beforeProcessEpoch 68.487 ms/op 73.262 ms/op 0.93
mainnet_e81889 - altair processJustificationAndFinalization 27.378 us/op 21.665 us/op 1.26
mainnet_e81889 - altair processInactivityUpdates 6.9433 ms/op 6.0340 ms/op 1.15
mainnet_e81889 - altair processRewardsAndPenalties 64.051 ms/op 72.710 ms/op 0.88
mainnet_e81889 - altair processRegistryUpdates 3.1840 us/op 3.5350 us/op 0.90
mainnet_e81889 - altair processSlashings 1.0710 us/op 657.00 ns/op 1.63
mainnet_e81889 - altair processEth1DataReset 2.0190 us/op 704.00 ns/op 2.87
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.2839 ms/op 1.5321 ms/op 1.49
mainnet_e81889 - altair processSlashingsReset 5.5120 us/op 4.5660 us/op 1.21
mainnet_e81889 - altair processRandaoMixesReset 8.3660 us/op 7.7330 us/op 1.08
mainnet_e81889 - altair processHistoricalRootsUpdate 847.00 ns/op 898.00 ns/op 0.94
mainnet_e81889 - altair processParticipationFlagUpdates 2.8980 us/op 5.6720 us/op 0.51
mainnet_e81889 - altair processSyncCommitteeUpdates 1.3590 us/op 827.00 ns/op 1.64
mainnet_e81889 - altair afterProcessEpoch 131.34 ms/op 136.47 ms/op 0.96
phase0 processEpoch - mainnet_e58758 425.63 ms/op 383.82 ms/op 1.11
mainnet_e58758 - phase0 beforeProcessEpoch 149.39 ms/op 151.97 ms/op 0.98
mainnet_e58758 - phase0 processJustificationAndFinalization 20.391 us/op 17.961 us/op 1.14
mainnet_e58758 - phase0 processRewardsAndPenalties 69.986 ms/op 72.415 ms/op 0.97
mainnet_e58758 - phase0 processRegistryUpdates 8.7560 us/op 9.9320 us/op 0.88
mainnet_e58758 - phase0 processSlashings 745.00 ns/op 1.4880 us/op 0.50
mainnet_e58758 - phase0 processEth1DataReset 920.00 ns/op 1.9250 us/op 0.48
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.9076 ms/op 2.1842 ms/op 0.87
mainnet_e58758 - phase0 processSlashingsReset 6.8730 us/op 6.9150 us/op 0.99
mainnet_e58758 - phase0 processRandaoMixesReset 7.9920 us/op 4.6960 us/op 1.70
mainnet_e58758 - phase0 processHistoricalRootsUpdate 993.00 ns/op 694.00 ns/op 1.43
mainnet_e58758 - phase0 processParticipationRecordUpdates 7.3880 us/op 4.7390 us/op 1.56
mainnet_e58758 - phase0 afterProcessEpoch 102.48 ms/op 102.36 ms/op 1.00
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.8286 ms/op 1.5004 ms/op 1.22
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.8364 ms/op 1.9994 ms/op 0.92
altair processInactivityUpdates - 250000 normalcase 26.846 ms/op 25.660 ms/op 1.05
altair processInactivityUpdates - 250000 worstcase 30.412 ms/op 24.550 ms/op 1.24
phase0 processRegistryUpdates - 250000 normalcase 6.6880 us/op 10.915 us/op 0.61
phase0 processRegistryUpdates - 250000 badcase_full_deposits 367.55 us/op 262.90 us/op 1.40
phase0 processRegistryUpdates - 250000 worstcase 0.5 118.35 ms/op 139.28 ms/op 0.85
altair processRewardsAndPenalties - 250000 normalcase 72.986 ms/op 60.932 ms/op 1.20
altair processRewardsAndPenalties - 250000 worstcase 75.893 ms/op 73.550 ms/op 1.03
phase0 getAttestationDeltas - 250000 normalcase 7.2560 ms/op 8.9925 ms/op 0.81
phase0 getAttestationDeltas - 250000 worstcase 6.8979 ms/op 8.4909 ms/op 0.81
phase0 processSlashings - 250000 worstcase 3.4879 ms/op 3.4732 ms/op 1.00
altair processSyncCommitteeUpdates - 250000 194.33 ms/op 200.92 ms/op 0.97
BeaconState.hashTreeRoot - No change 278.00 ns/op 403.00 ns/op 0.69
BeaconState.hashTreeRoot - 1 full validator 56.985 us/op 67.922 us/op 0.84
BeaconState.hashTreeRoot - 32 full validator 568.58 us/op 789.37 us/op 0.72
BeaconState.hashTreeRoot - 512 full validator 5.5369 ms/op 9.6565 ms/op 0.57
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 71.947 us/op 80.375 us/op 0.90
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 943.51 us/op 965.21 us/op 0.98
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 13.242 ms/op 15.644 ms/op 0.85
BeaconState.hashTreeRoot - 1 balances 53.024 us/op 57.708 us/op 0.92
BeaconState.hashTreeRoot - 32 balances 571.03 us/op 501.13 us/op 1.14
BeaconState.hashTreeRoot - 512 balances 4.8201 ms/op 4.6883 ms/op 1.03
BeaconState.hashTreeRoot - 250000 balances 75.712 ms/op 87.559 ms/op 0.86
aggregationBits - 2048 els - zipIndexesInBitList 15.642 us/op 18.325 us/op 0.85
regular array get 100000 times 33.352 us/op 46.608 us/op 0.72
wrappedArray get 100000 times 33.282 us/op 34.345 us/op 0.97
arrayWithProxy get 100000 times 17.602 ms/op 15.975 ms/op 1.10
ssz.Root.equals 549.00 ns/op 588.00 ns/op 0.93
byteArrayEquals 546.00 ns/op 582.00 ns/op 0.94
shuffle list - 16384 els 6.9222 ms/op 6.9744 ms/op 0.99
shuffle list - 250000 els 101.34 ms/op 104.71 ms/op 0.97
processSlot - 1 slots 8.5960 us/op 10.071 us/op 0.85
processSlot - 32 slots 1.3554 ms/op 1.4903 ms/op 0.91
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 40.788 ms/op 38.590 ms/op 1.06
getCommitteeAssignments - req 1 vs - 250000 vc 2.8949 ms/op 3.0057 ms/op 0.96
getCommitteeAssignments - req 100 vs - 250000 vc 4.1186 ms/op 4.2001 ms/op 0.98
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4736 ms/op 4.5729 ms/op 0.98
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.7300 ns/op 5.0700 ns/op 0.93
state getBlockRootAtSlot - 250000 vs - 7PWei 868.89 ns/op 760.00 ns/op 1.14
computeProposers - vc 250000 10.283 ms/op 10.995 ms/op 0.94
computeEpochShuffling - vc 250000 101.04 ms/op 110.67 ms/op 0.91
getNextSyncCommittee - vc 250000 186.47 ms/op 181.88 ms/op 1.03
computeSigningRoot for AttestationData 14.643 us/op 13.928 us/op 1.05
hash AttestationData serialized data then Buffer.toString(base64) 2.5251 us/op 2.4744 us/op 1.02
toHexString serialized data 1.0964 us/op 1.1937 us/op 0.92
Buffer.toString(base64) 353.38 ns/op 351.93 ns/op 1.00

by benchmarkbot/action

dapplion
dapplion previously approved these changes Feb 19, 2023
dapplion
dapplion previously approved these changes Feb 23, 2023

@dapplion dapplion left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

twoeths
twoeths previously approved these changes Feb 23, 2023
@dapplion
dapplion enabled auto-merge (squash) February 27, 2023 03:27
@dapplion

Copy link
Copy Markdown
Contributor

@wemeetagain Bad types in e2e test

chainsafe/lodestar:   19 passing (1m)
@chainsafe/lodestar:   1 failing
@chainsafe/lodestar:   1) cmds / validator
@chainsafe/lodestar:        should list validators:
@chainsafe/lodestar:      TypeError: validatorPubKeys.sort is not a function
@chainsafe/lodestar:       at Context.<anonymous> (file:///home/runner/actions-runner/_work/lodestar/lodestar/packages/cli/test/e2e/example.test.ts:87:29)

@dapplion
dapplion disabled auto-merge February 27, 2023 03:28
@nazarhussain
nazarhussain dismissed stale reviews from twoeths and dapplion via 7c52601 April 17, 2023 13:23
@wemeetagain

Copy link
Copy Markdown
Member Author

LGTM, can't approve since I opened the PR

@wemeetagain
wemeetagain merged commit 307912d into unstable Apr 17, 2023
@wemeetagain
wemeetagain deleted the cayman/update-yargs branch April 17, 2023 16:59
@wemeetagain

Copy link
Copy Markdown
Member Author

馃帀 This PR is included in v1.8.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.

5 participants