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

Upgrade lerna to lerna 6 #5368

Merged
merged 6 commits into from
Apr 17, 2023
Merged

Upgrade lerna to lerna 6 #5368

merged 6 commits into from
Apr 17, 2023

Conversation

nazarhussain
Copy link
Contributor

Motivation

Make the dependencies up-to-date.

Description

Upgrade the lerna.

Steps to test or reproduce

  • Run all tests

@nazarhussain nazarhussain requested a review from a team as a code owner April 17, 2023 12:08
@nazarhussain nazarhussain self-assigned this Apr 17, 2023
@nazarhussain nazarhussain marked this pull request as draft April 17, 2023 12:08
@github-actions
Copy link
Contributor

github-actions bot commented Apr 17, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 2fb4458 Previous: 395a246 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.0027 ms/op 772.69 us/op 1.30
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 65.281 us/op 61.686 us/op 1.06
BLS verify - blst-native 1.5159 ms/op 1.3301 ms/op 1.14
BLS verifyMultipleSignatures 3 - blst-native 2.9743 ms/op 2.7928 ms/op 1.06
BLS verifyMultipleSignatures 8 - blst-native 6.3518 ms/op 5.6608 ms/op 1.12
BLS verifyMultipleSignatures 32 - blst-native 25.296 ms/op 21.082 ms/op 1.20
BLS aggregatePubkeys 32 - blst-native 32.740 us/op 27.510 us/op 1.19
BLS aggregatePubkeys 128 - blst-native 126.37 us/op 107.44 us/op 1.18
getAttestationsForBlock 86.265 ms/op 78.463 ms/op 1.10
isKnown best case - 1 super set check 329.00 ns/op 327.00 ns/op 1.01
isKnown normal case - 2 super set checks 319.00 ns/op 279.00 ns/op 1.14
isKnown worse case - 16 super set checks 323.00 ns/op 271.00 ns/op 1.19
CheckpointStateCache - add get delete 7.0140 us/op 6.1850 us/op 1.13
validate gossip signedAggregateAndProof - struct 3.5127 ms/op 2.9334 ms/op 1.20
validate gossip attestation - struct 1.6933 ms/op 1.4048 ms/op 1.21
pickEth1Vote - no votes 1.8103 ms/op 1.4122 ms/op 1.28
pickEth1Vote - max votes 14.475 ms/op 10.608 ms/op 1.36
pickEth1Vote - Eth1Data hashTreeRoot value x2048 11.953 ms/op 9.4309 ms/op 1.27
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 19.354 ms/op 17.630 ms/op 1.10
pickEth1Vote - Eth1Data fastSerialize value x2048 863.25 us/op 748.70 us/op 1.15
pickEth1Vote - Eth1Data fastSerialize tree x2048 9.5384 ms/op 8.2074 ms/op 1.16
bytes32 toHexString 918.00 ns/op 765.00 ns/op 1.20
bytes32 Buffer.toString(hex) 610.00 ns/op 478.00 ns/op 1.28
bytes32 Buffer.toString(hex) from Uint8Array 774.00 ns/op 675.00 ns/op 1.15
bytes32 Buffer.toString(hex) + 0x 516.00 ns/op 464.00 ns/op 1.11
Object access 1 prop 0.24600 ns/op 0.21600 ns/op 1.14
Map access 1 prop 0.20300 ns/op 0.17400 ns/op 1.17
Object get x1000 8.4990 ns/op 7.7540 ns/op 1.10
Map get x1000 0.91600 ns/op 0.71900 ns/op 1.27
Object set x1000 87.495 ns/op 69.561 ns/op 1.26
Map set x1000 68.079 ns/op 53.464 ns/op 1.27
Return object 10000 times 0.31800 ns/op 0.25560 ns/op 1.24
Throw Error 10000 times 5.3232 us/op 4.3905 us/op 1.21
fastMsgIdFn sha256 / 200 bytes 4.5690 us/op 3.7190 us/op 1.23
fastMsgIdFn h32 xxhash / 200 bytes 390.00 ns/op 325.00 ns/op 1.20
fastMsgIdFn h64 xxhash / 200 bytes 601.00 ns/op 457.00 ns/op 1.32
fastMsgIdFn sha256 / 1000 bytes 16.288 us/op 12.161 us/op 1.34
fastMsgIdFn h32 xxhash / 1000 bytes 573.00 ns/op 457.00 ns/op 1.25
fastMsgIdFn h64 xxhash / 1000 bytes 746.00 ns/op 517.00 ns/op 1.44
fastMsgIdFn sha256 / 10000 bytes 134.49 us/op 107.91 us/op 1.25
fastMsgIdFn h32 xxhash / 10000 bytes 2.7910 us/op 2.0200 us/op 1.38
fastMsgIdFn h64 xxhash / 10000 bytes 1.8070 us/op 1.4860 us/op 1.22
enrSubnets - fastDeserialize 64 bits 2.3280 us/op 1.5120 us/op 1.54
enrSubnets - ssz BitVector 64 bits 760.00 ns/op 610.00 ns/op 1.25
enrSubnets - fastDeserialize 4 bits 284.00 ns/op 210.00 ns/op 1.35
enrSubnets - ssz BitVector 4 bits 748.00 ns/op 622.00 ns/op 1.20
prioritizePeers score -10:0 att 32-0.1 sync 2-0 169.30 us/op 111.27 us/op 1.52
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 225.18 us/op 170.22 us/op 1.32
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 276.36 us/op 200.56 us/op 1.38
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 545.65 us/op 362.34 us/op 1.51
prioritizePeers score 0:0 att 64-1 sync 4-1 594.82 us/op 392.72 us/op 1.51
array of 16000 items push then shift 2.4247 us/op 1.7189 us/op 1.41
LinkedList of 16000 items push then shift 16.023 ns/op 9.1400 ns/op 1.75
array of 16000 items push then pop 189.07 ns/op 93.477 ns/op 2.02
LinkedList of 16000 items push then pop 14.890 ns/op 9.0320 ns/op 1.65
array of 24000 items push then shift 3.2745 us/op 2.4823 us/op 1.32
LinkedList of 24000 items push then shift 16.194 ns/op 9.3880 ns/op 1.72
array of 24000 items push then pop 152.66 ns/op 86.631 ns/op 1.76
LinkedList of 24000 items push then pop 13.528 ns/op 9.1490 ns/op 1.48
intersect bitArray bitLen 8 19.332 ns/op 14.565 ns/op 1.33
intersect array and set length 8 168.97 ns/op 86.197 ns/op 1.96
intersect bitArray bitLen 128 61.959 ns/op 45.333 ns/op 1.37
intersect array and set length 128 1.9364 us/op 1.2879 us/op 1.50
Buffer.concat 32 items 4.2310 us/op 2.7860 us/op 1.52
Uint8Array.set 32 items 4.2330 us/op 2.6800 us/op 1.58
pass gossip attestations to forkchoice per slot 5.2744 ms/op 3.0430 ms/op 1.73
computeDeltas 4.9196 ms/op 3.0615 ms/op 1.61
computeProposerBoostScoreFromBalances 2.2645 ms/op 1.8956 ms/op 1.19
altair processAttestation - 250000 vs - 7PWei normalcase 5.6182 ms/op 3.2183 ms/op 1.75
altair processAttestation - 250000 vs - 7PWei worstcase 9.2708 ms/op 4.6741 ms/op 1.98
altair processAttestation - setStatus - 1/6 committees join 255.60 us/op 143.60 us/op 1.78
altair processAttestation - setStatus - 1/3 committees join 445.68 us/op 285.84 us/op 1.56
altair processAttestation - setStatus - 1/2 committees join 608.75 us/op 380.60 us/op 1.60
altair processAttestation - setStatus - 2/3 committees join 815.98 us/op 483.63 us/op 1.69
altair processAttestation - setStatus - 4/5 committees join 1.0657 ms/op 699.21 us/op 1.52
altair processAttestation - setStatus - 100% committees join 1.1427 ms/op 806.14 us/op 1.42
altair processBlock - 250000 vs - 7PWei normalcase 27.109 ms/op 18.945 ms/op 1.43
altair processBlock - 250000 vs - 7PWei normalcase hashState 45.072 ms/op 26.973 ms/op 1.67
altair processBlock - 250000 vs - 7PWei worstcase 76.827 ms/op 57.710 ms/op 1.33
altair processBlock - 250000 vs - 7PWei worstcase hashState 106.38 ms/op 72.939 ms/op 1.46
phase0 processBlock - 250000 vs - 7PWei normalcase 3.6665 ms/op 2.6886 ms/op 1.36
phase0 processBlock - 250000 vs - 7PWei worstcase 44.719 ms/op 33.545 ms/op 1.33
altair processEth1Data - 250000 vs - 7PWei normalcase 1.0665 ms/op 592.67 us/op 1.80
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 13.191 us/op 10.595 us/op 1.25
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 36.343 us/op 31.314 us/op 1.16
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 18.402 us/op 12.397 us/op 1.48
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 14.645 us/op 9.1930 us/op 1.59
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 111.47 us/op 112.40 us/op 0.99
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 1.2013 ms/op 679.61 us/op 1.77
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 16384 1.3626 ms/op 973.59 us/op 1.40
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 16384 1.2673 ms/op 953.61 us/op 1.33
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 16384 5.4428 ms/op 2.6658 ms/op 2.04
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 16384 2.2265 ms/op 1.7496 ms/op 1.27
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 16384 7.7328 ms/op 4.7435 ms/op 1.63
Tree 40 250000 create 1.0268 s/op 354.15 ms/op 2.90
Tree 40 250000 get(125000) 274.12 ns/op 194.85 ns/op 1.41
Tree 40 250000 set(125000) 2.8102 us/op 1.0400 us/op 2.70
Tree 40 250000 toArray() 37.827 ms/op 22.227 ms/op 1.70
Tree 40 250000 iterate all - toArray() + loop 37.878 ms/op 25.751 ms/op 1.47
Tree 40 250000 iterate all - get(i) 110.41 ms/op 75.031 ms/op 1.47
MutableVector 250000 create 16.716 ms/op 10.209 ms/op 1.64
MutableVector 250000 get(125000) 8.7800 ns/op 6.6550 ns/op 1.32
MutableVector 250000 set(125000) 1.0264 us/op 265.89 ns/op 3.86
MutableVector 250000 toArray() 7.0512 ms/op 3.3882 ms/op 2.08
MutableVector 250000 iterate all - toArray() + loop 6.7160 ms/op 3.1530 ms/op 2.13
MutableVector 250000 iterate all - get(i) 2.3607 ms/op 1.6246 ms/op 1.45
Array 250000 create 7.2437 ms/op 2.9251 ms/op 2.48
Array 250000 clone - spread 7.0326 ms/op 1.2332 ms/op 5.70
Array 250000 get(125000) 3.3900 ns/op 0.59000 ns/op 5.75
Array 250000 set(125000) 2.9510 ns/op 0.66000 ns/op 4.47
Array 250000 iterate all - loop 199.03 us/op 97.692 us/op 2.04
effectiveBalanceIncrements clone Uint8Array 300000 116.94 us/op 36.684 us/op 3.19
effectiveBalanceIncrements clone MutableVector 300000 2.7810 us/op 379.00 ns/op 7.34
effectiveBalanceIncrements rw all Uint8Array 300000 259.84 us/op 176.99 us/op 1.47
effectiveBalanceIncrements rw all MutableVector 300000 333.95 ms/op 90.388 ms/op 3.69
phase0 afterProcessEpoch - 250000 vs - 7PWei 172.89 ms/op 122.39 ms/op 1.41
phase0 beforeProcessEpoch - 250000 vs - 7PWei 78.055 ms/op 40.892 ms/op 1.91
altair processEpoch - mainnet_e81889 559.58 ms/op 351.42 ms/op 1.59
mainnet_e81889 - altair beforeProcessEpoch 87.349 ms/op 72.234 ms/op 1.21
mainnet_e81889 - altair processJustificationAndFinalization 38.017 us/op 22.119 us/op 1.72
mainnet_e81889 - altair processInactivityUpdates 14.726 ms/op 6.3410 ms/op 2.32
mainnet_e81889 - altair processRewardsAndPenalties 105.92 ms/op 50.945 ms/op 2.08
mainnet_e81889 - altair processRegistryUpdates 9.2220 us/op 5.4510 us/op 1.69
mainnet_e81889 - altair processSlashings 1.6220 us/op 1.4530 us/op 1.12
mainnet_e81889 - altair processEth1DataReset 1.2000 us/op 1.3710 us/op 0.88
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.7983 ms/op 1.5793 ms/op 1.14
mainnet_e81889 - altair processSlashingsReset 12.616 us/op 5.0150 us/op 2.52
mainnet_e81889 - altair processRandaoMixesReset 13.081 us/op 10.069 us/op 1.30
mainnet_e81889 - altair processHistoricalRootsUpdate 2.2150 us/op 1.2670 us/op 1.75
mainnet_e81889 - altair processParticipationFlagUpdates 6.3930 us/op 3.9350 us/op 1.62
mainnet_e81889 - altair processSyncCommitteeUpdates 1.4820 us/op 1.1560 us/op 1.28
mainnet_e81889 - altair afterProcessEpoch 169.49 ms/op 152.95 ms/op 1.11
phase0 processEpoch - mainnet_e58758 498.63 ms/op 418.31 ms/op 1.19
mainnet_e58758 - phase0 beforeProcessEpoch 168.39 ms/op 161.66 ms/op 1.04
mainnet_e58758 - phase0 processJustificationAndFinalization 31.745 us/op 19.574 us/op 1.62
mainnet_e58758 - phase0 processRewardsAndPenalties 75.155 ms/op 67.033 ms/op 1.12
mainnet_e58758 - phase0 processRegistryUpdates 15.407 us/op 10.228 us/op 1.51
mainnet_e58758 - phase0 processSlashings 1.3980 us/op 601.00 ns/op 2.33
mainnet_e58758 - phase0 processEth1DataReset 1.3620 us/op 701.00 ns/op 1.94
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.2487 ms/op 1.0309 ms/op 1.21
mainnet_e58758 - phase0 processSlashingsReset 9.9970 us/op 4.8940 us/op 2.04
mainnet_e58758 - phase0 processRandaoMixesReset 10.338 us/op 7.4360 us/op 1.39
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.4690 us/op 840.00 ns/op 1.75
mainnet_e58758 - phase0 processParticipationRecordUpdates 8.8120 us/op 5.1770 us/op 1.70
mainnet_e58758 - phase0 afterProcessEpoch 118.91 ms/op 103.02 ms/op 1.15
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.5195 ms/op 1.2706 ms/op 1.20
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.3313 ms/op 1.7524 ms/op 1.33
altair processInactivityUpdates - 250000 normalcase 35.495 ms/op 24.397 ms/op 1.45
altair processInactivityUpdates - 250000 worstcase 38.893 ms/op 26.567 ms/op 1.46
phase0 processRegistryUpdates - 250000 normalcase 17.129 us/op 8.4010 us/op 2.04
phase0 processRegistryUpdates - 250000 badcase_full_deposits 404.24 us/op 302.42 us/op 1.34
phase0 processRegistryUpdates - 250000 worstcase 0.5 199.49 ms/op 125.93 ms/op 1.58
altair processRewardsAndPenalties - 250000 normalcase 94.424 ms/op 78.021 ms/op 1.21
altair processRewardsAndPenalties - 250000 worstcase 101.75 ms/op 72.192 ms/op 1.41
phase0 getAttestationDeltas - 250000 normalcase 12.654 ms/op 8.5491 ms/op 1.48
phase0 getAttestationDeltas - 250000 worstcase 10.776 ms/op 8.0903 ms/op 1.33
phase0 processSlashings - 250000 worstcase 4.4942 ms/op 4.5246 ms/op 0.99
altair processSyncCommitteeUpdates - 250000 224.80 ms/op 188.07 ms/op 1.20
BeaconState.hashTreeRoot - No change 330.00 ns/op 398.00 ns/op 0.83
BeaconState.hashTreeRoot - 1 full validator 64.894 us/op 54.982 us/op 1.18
BeaconState.hashTreeRoot - 32 full validator 888.79 us/op 518.96 us/op 1.71
BeaconState.hashTreeRoot - 512 full validator 7.5458 ms/op 6.3928 ms/op 1.18
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 78.913 us/op 65.222 us/op 1.21
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.1708 ms/op 1.0596 ms/op 1.10
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 16.951 ms/op 12.931 ms/op 1.31
BeaconState.hashTreeRoot - 1 balances 62.295 us/op 53.698 us/op 1.16
BeaconState.hashTreeRoot - 32 balances 561.89 us/op 470.09 us/op 1.20
BeaconState.hashTreeRoot - 512 balances 5.9479 ms/op 4.7968 ms/op 1.24
BeaconState.hashTreeRoot - 250000 balances 92.673 ms/op 80.012 ms/op 1.16
aggregationBits - 2048 els - zipIndexesInBitList 30.212 us/op 21.451 us/op 1.41
regular array get 100000 times 40.517 us/op 43.013 us/op 0.94
wrappedArray get 100000 times 37.732 us/op 45.812 us/op 0.82
arrayWithProxy get 100000 times 18.720 ms/op 17.419 ms/op 1.07
ssz.Root.equals 749.00 ns/op 630.00 ns/op 1.19
byteArrayEquals 905.00 ns/op 620.00 ns/op 1.46
shuffle list - 16384 els 8.5190 ms/op 7.4167 ms/op 1.15
shuffle list - 250000 els 128.93 ms/op 104.79 ms/op 1.23
processSlot - 1 slots 11.189 us/op 10.299 us/op 1.09
processSlot - 32 slots 1.6394 ms/op 1.5076 ms/op 1.09
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 44.097 ms/op 36.396 ms/op 1.21
getCommitteeAssignments - req 1 vs - 250000 vc 3.5749 ms/op 3.0371 ms/op 1.18
getCommitteeAssignments - req 100 vs - 250000 vc 4.8591 ms/op 4.4748 ms/op 1.09
getCommitteeAssignments - req 1000 vs - 250000 vc 5.4962 ms/op 4.8394 ms/op 1.14
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.8800 ns/op 5.4100 ns/op 1.27
state getBlockRootAtSlot - 250000 vs - 7PWei 1.0989 us/op 662.59 ns/op 1.66
computeProposers - vc 250000 14.989 ms/op 12.016 ms/op 1.25
computeEpochShuffling - vc 250000 128.99 ms/op 111.73 ms/op 1.15
getNextSyncCommittee - vc 250000 255.05 ms/op 186.06 ms/op 1.37
computeSigningRoot for AttestationData 19.455 us/op 13.994 us/op 1.39
hash AttestationData serialized data then Buffer.toString(base64) 3.6115 us/op 2.5711 us/op 1.40
toHexString serialized data 2.3131 us/op 1.1069 us/op 2.09
Buffer.toString(base64) 572.97 ns/op 340.61 ns/op 1.68

by benchmarkbot/action

@@ -43,7 +43,7 @@ jobs:
key: ${{ runner.os }}-${{ steps.node.outputs.v8CppApiVersion }}-${{ hashFiles('**/yarn.lock', '**/package.json') }}
- name: Install & build
if: steps.cache-deps.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --ignore-optional && yarn build
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to remove --ignore-optional from all CI scripts because of the following issue. The alternative solution didn't worked in our case. The issue is somehow related to NPM and yarn behavior about optional dependencies npm/cli#4828

@nazarhussain nazarhussain marked this pull request as ready for review April 17, 2023 13:12
@@ -4,6 +4,7 @@
],
"npmClient": "yarn",
"useWorkspaces": true,
"useNx": true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Major change in Lerna 6 is the new task runner nx. We can revert to a legacy behavior by setting this to false.

Copy link
Member

@wemeetagain wemeetagain left a comment

Choose a reason for hiding this comment

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

lgtm

@wemeetagain wemeetagain merged commit 6cfc518 into unstable Apr 17, 2023
10 checks passed
@wemeetagain wemeetagain deleted the nh/lerna-upgrade branch April 17, 2023 17:35
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.8.0 🎉

@@ -11,8 +11,8 @@
"clean": "rm -rf ./packages/*/lib ./packages/*/*.tsbuildinfo",
"build": "lerna run build",
"build:docs": "lerna run build:refdocs && ./scripts/prepare-docs.sh",
"build:lib:watch": "lerna run build:lib:watch --parallel",
"build:types:watch": "lerna run build:types:watch --parallel",
Copy link
Member

Choose a reason for hiding this comment

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

@nazarhussain what was the reason for removing --parallel? Looks like it is required to run multiple concurrent jobs

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