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

Update outdated NPM dependencies #4597

Merged
merged 10 commits into from Sep 28, 2022
Merged

Conversation

nazarhussain
Copy link
Contributor

Motivation

Update the outdated dependencies.

Description

Update the dependencies which don't introduce nay breaking changes.

Resolves #4431

Steps to test or reproduce

Run tests

@nazarhussain nazarhussain self-assigned this Sep 26, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Sep 26, 2022

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: c789a1c Previous: 0e600d8 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.4670 ms/op 1.5254 ms/op 1.62
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 91.057 us/op 67.948 us/op 1.34
BLS verify - blst-native 2.4450 ms/op 2.1653 ms/op 1.13
BLS verifyMultipleSignatures 3 - blst-native 4.8440 ms/op 4.4687 ms/op 1.08
BLS verifyMultipleSignatures 8 - blst-native 10.563 ms/op 9.6628 ms/op 1.09
BLS verifyMultipleSignatures 32 - blst-native 37.126 ms/op 35.119 ms/op 1.06
BLS aggregatePubkeys 32 - blst-native 49.076 us/op 46.458 us/op 1.06
BLS aggregatePubkeys 128 - blst-native 191.17 us/op 182.08 us/op 1.05
getAttestationsForBlock 104.55 ms/op 72.570 ms/op 1.44
isKnown best case - 1 super set check 566.00 ns/op 479.00 ns/op 1.18
isKnown normal case - 2 super set checks 555.00 ns/op 462.00 ns/op 1.20
isKnown worse case - 16 super set checks 556.00 ns/op 465.00 ns/op 1.20
CheckpointStateCache - add get delete 10.872 us/op 8.6310 us/op 1.26
validate gossip signedAggregateAndProof - struct 5.3315 ms/op 5.0208 ms/op 1.06
validate gossip attestation - struct 2.5240 ms/op 2.3627 ms/op 1.07
pickEth1Vote - no votes 2.7439 ms/op 2.0768 ms/op 1.32
pickEth1Vote - max votes 24.577 ms/op 17.001 ms/op 1.45
pickEth1Vote - Eth1Data hashTreeRoot value x2048 14.313 ms/op 11.814 ms/op 1.21
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 25.213 ms/op 19.139 ms/op 1.32
pickEth1Vote - Eth1Data fastSerialize value x2048 1.8575 ms/op 1.3757 ms/op 1.35
pickEth1Vote - Eth1Data fastSerialize tree x2048 15.193 ms/op 11.227 ms/op 1.35
bytes32 toHexString 1.3140 us/op 958.00 ns/op 1.37
bytes32 Buffer.toString(hex) 963.00 ns/op 764.00 ns/op 1.26
bytes32 Buffer.toString(hex) from Uint8Array 1.2690 us/op 995.00 ns/op 1.28
bytes32 Buffer.toString(hex) + 0x 950.00 ns/op 763.00 ns/op 1.25
Object access 1 prop 0.46200 ns/op 0.34400 ns/op 1.34
Map access 1 prop 0.40200 ns/op 0.31500 ns/op 1.28
Object get x1000 23.664 ns/op 10.788 ns/op 2.19
Map get x1000 1.2850 ns/op 1.0180 ns/op 1.26
Object set x1000 136.90 ns/op 68.918 ns/op 1.99
Map set x1000 83.101 ns/op 45.154 ns/op 1.84
Return object 10000 times 0.46040 ns/op 0.43170 ns/op 1.07
Throw Error 10000 times 7.3027 us/op 5.9474 us/op 1.23
enrSubnets - fastDeserialize 64 bits 3.1170 us/op 2.3960 us/op 1.30
enrSubnets - ssz BitVector 64 bits 934.00 ns/op 740.00 ns/op 1.26
enrSubnets - fastDeserialize 4 bits 496.00 ns/op 353.00 ns/op 1.41
enrSubnets - ssz BitVector 4 bits 929.00 ns/op 761.00 ns/op 1.22
prioritizePeers score -10:0 att 32-0.1 sync 2-0 117.26 us/op 80.035 us/op 1.47
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 152.40 us/op 121.71 us/op 1.25
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 265.90 us/op 193.96 us/op 1.37
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 559.29 us/op 334.68 us/op 1.67
prioritizePeers score 0:0 att 64-1 sync 4-1 573.41 us/op 405.41 us/op 1.41
RateTracker 1000000 limit, 1 obj count per request 231.21 ns/op 174.12 ns/op 1.33
RateTracker 1000000 limit, 2 obj count per request 172.15 ns/op 127.45 ns/op 1.35
RateTracker 1000000 limit, 4 obj count per request 142.22 ns/op 103.93 ns/op 1.37
RateTracker 1000000 limit, 8 obj count per request 136.00 ns/op 91.777 ns/op 1.48
RateTracker with prune 5.0870 us/op 3.7070 us/op 1.37
array of 16000 items push then shift 4.0029 us/op 51.570 us/op 0.08
LinkedList of 16000 items push then shift 21.905 ns/op 12.150 ns/op 1.80
array of 16000 items push then pop 279.43 ns/op 171.12 ns/op 1.63
LinkedList of 16000 items push then pop 20.610 ns/op 11.944 ns/op 1.73
array of 24000 items push then shift 5.6778 us/op 77.335 us/op 0.07
LinkedList of 24000 items push then shift 24.243 ns/op 12.437 ns/op 1.95
array of 24000 items push then pop 237.62 ns/op 189.03 ns/op 1.26
LinkedList of 24000 items push then pop 21.362 ns/op 12.035 ns/op 1.77
intersect bitArray bitLen 8 14.728 ns/op 10.876 ns/op 1.35
intersect array and set length 8 197.68 ns/op 128.54 ns/op 1.54
intersect bitArray bitLen 128 77.522 ns/op 56.458 ns/op 1.37
intersect array and set length 128 2.7931 us/op 1.7190 us/op 1.62
Buffer.concat 32 items 2.3770 ns/op 1.8180 ns/op 1.31
pass gossip attestations to forkchoice per slot 7.8538 ms/op 3.5660 ms/op 2.20
computeDeltas 7.4413 ms/op 4.4289 ms/op 1.68
computeProposerBoostScoreFromBalances 1.1519 ms/op 808.87 us/op 1.42
altair processAttestation - 250000 vs - 7PWei normalcase 4.2385 ms/op 3.3225 ms/op 1.28
altair processAttestation - 250000 vs - 7PWei worstcase 7.4166 ms/op 5.2988 ms/op 1.40
altair processAttestation - setStatus - 1/6 committees join 271.01 us/op 186.07 us/op 1.46
altair processAttestation - setStatus - 1/3 committees join 510.27 us/op 361.49 us/op 1.41
altair processAttestation - setStatus - 1/2 committees join 723.72 us/op 522.91 us/op 1.38
altair processAttestation - setStatus - 2/3 committees join 923.36 us/op 682.41 us/op 1.35
altair processAttestation - setStatus - 4/5 committees join 1.3283 ms/op 948.52 us/op 1.40
altair processAttestation - setStatus - 100% committees join 1.5466 ms/op 1.1435 ms/op 1.35
altair processBlock - 250000 vs - 7PWei normalcase 29.004 ms/op 24.617 ms/op 1.18
altair processBlock - 250000 vs - 7PWei normalcase hashState 43.107 ms/op 33.250 ms/op 1.30
altair processBlock - 250000 vs - 7PWei worstcase 101.28 ms/op 86.575 ms/op 1.17
altair processBlock - 250000 vs - 7PWei worstcase hashState 118.25 ms/op 101.14 ms/op 1.17
phase0 processBlock - 250000 vs - 7PWei normalcase 4.4057 ms/op 3.1373 ms/op 1.40
phase0 processBlock - 250000 vs - 7PWei worstcase 58.305 ms/op 50.767 ms/op 1.15
altair processEth1Data - 250000 vs - 7PWei normalcase 934.10 us/op 726.99 us/op 1.28
Tree 40 250000 create 927.37 ms/op 679.32 ms/op 1.37
Tree 40 250000 get(125000) 357.95 ns/op 238.75 ns/op 1.50
Tree 40 250000 set(125000) 2.7884 us/op 2.0539 us/op 1.36
Tree 40 250000 toArray() 37.965 ms/op 27.337 ms/op 1.39
Tree 40 250000 iterate all - toArray() + loop 38.025 ms/op 27.012 ms/op 1.41
Tree 40 250000 iterate all - get(i) 136.83 ms/op 110.15 ms/op 1.24
MutableVector 250000 create 18.211 ms/op 12.686 ms/op 1.44
MutableVector 250000 get(125000) 16.921 ns/op 10.637 ns/op 1.59
MutableVector 250000 set(125000) 689.89 ns/op 513.74 ns/op 1.34
MutableVector 250000 toArray() 8.6892 ms/op 5.9195 ms/op 1.47
MutableVector 250000 iterate all - toArray() + loop 8.6893 ms/op 6.1088 ms/op 1.42
MutableVector 250000 iterate all - get(i) 4.4755 ms/op 2.7532 ms/op 1.63
Array 250000 create 7.7946 ms/op 5.2264 ms/op 1.49
Array 250000 clone - spread 4.1650 ms/op 2.3275 ms/op 1.79
Array 250000 get(125000) 1.8380 ns/op 1.1470 ns/op 1.60
Array 250000 set(125000) 1.8080 ns/op 1.1450 ns/op 1.58
Array 250000 iterate all - loop 209.83 us/op 151.86 us/op 1.38
effectiveBalanceIncrements clone Uint8Array 300000 212.80 us/op 51.747 us/op 4.11
effectiveBalanceIncrements clone MutableVector 300000 855.00 ns/op 637.00 ns/op 1.34
effectiveBalanceIncrements rw all Uint8Array 300000 315.60 us/op 246.97 us/op 1.28
effectiveBalanceIncrements rw all MutableVector 300000 191.24 ms/op 125.26 ms/op 1.53
phase0 afterProcessEpoch - 250000 vs - 7PWei 249.63 ms/op 196.66 ms/op 1.27
phase0 beforeProcessEpoch - 250000 vs - 7PWei 84.309 ms/op 58.045 ms/op 1.45
altair processEpoch - mainnet_e81889 720.75 ms/op 542.45 ms/op 1.33
mainnet_e81889 - altair beforeProcessEpoch 169.14 ms/op 125.21 ms/op 1.35
mainnet_e81889 - altair processJustificationAndFinalization 40.538 us/op 17.229 us/op 2.35
mainnet_e81889 - altair processInactivityUpdates 13.646 ms/op 8.5981 ms/op 1.59
mainnet_e81889 - altair processRewardsAndPenalties 110.15 ms/op 120.32 ms/op 0.92
mainnet_e81889 - altair processRegistryUpdates 7.6510 us/op 2.6670 us/op 2.87
mainnet_e81889 - altair processSlashings 1.8810 us/op 672.00 ns/op 2.80
mainnet_e81889 - altair processEth1DataReset 2.0710 us/op 653.00 ns/op 3.17
mainnet_e81889 - altair processEffectiveBalanceUpdates 3.1245 ms/op 2.4301 ms/op 1.29
mainnet_e81889 - altair processSlashingsReset 12.322 us/op 3.9860 us/op 3.09
mainnet_e81889 - altair processRandaoMixesReset 14.411 us/op 3.9780 us/op 3.62
mainnet_e81889 - altair processHistoricalRootsUpdate 2.2590 us/op 668.00 ns/op 3.38
mainnet_e81889 - altair processParticipationFlagUpdates 8.6500 us/op 2.3670 us/op 3.65
mainnet_e81889 - altair processSyncCommitteeUpdates 1.8800 us/op 533.00 ns/op 3.53
mainnet_e81889 - altair afterProcessEpoch 257.39 ms/op 199.77 ms/op 1.29
phase0 processEpoch - mainnet_e58758 648.01 ms/op 483.59 ms/op 1.34
mainnet_e58758 - phase0 beforeProcessEpoch 273.49 ms/op 176.40 ms/op 1.55
mainnet_e58758 - phase0 processJustificationAndFinalization 34.632 us/op 16.439 us/op 2.11
mainnet_e58758 - phase0 processRewardsAndPenalties 92.412 ms/op 106.51 ms/op 0.87
mainnet_e58758 - phase0 processRegistryUpdates 18.434 us/op 7.7600 us/op 2.38
mainnet_e58758 - phase0 processSlashings 1.9800 us/op 568.00 ns/op 3.49
mainnet_e58758 - phase0 processEth1DataReset 2.1830 us/op 588.00 ns/op 3.71
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.4289 ms/op 1.9121 ms/op 1.27
mainnet_e58758 - phase0 processSlashingsReset 10.599 us/op 3.1440 us/op 3.37
mainnet_e58758 - phase0 processRandaoMixesReset 14.624 us/op 4.3420 us/op 3.37
mainnet_e58758 - phase0 processHistoricalRootsUpdate 2.3420 us/op 607.00 ns/op 3.86
mainnet_e58758 - phase0 processParticipationRecordUpdates 13.992 us/op 3.3850 us/op 4.13
mainnet_e58758 - phase0 afterProcessEpoch 209.17 ms/op 165.04 ms/op 1.27
phase0 processEffectiveBalanceUpdates - 250000 normalcase 3.2677 ms/op 1.9990 ms/op 1.63
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 4.3218 ms/op 2.2739 ms/op 1.90
altair processInactivityUpdates - 250000 normalcase 44.612 ms/op 39.428 ms/op 1.13
altair processInactivityUpdates - 250000 worstcase 47.334 ms/op 32.688 ms/op 1.45
phase0 processRegistryUpdates - 250000 normalcase 14.955 us/op 6.1970 us/op 2.41
phase0 processRegistryUpdates - 250000 badcase_full_deposits 623.41 us/op 382.71 us/op 1.63
phase0 processRegistryUpdates - 250000 worstcase 0.5 287.86 ms/op 172.94 ms/op 1.66
altair processRewardsAndPenalties - 250000 normalcase 143.70 ms/op 74.300 ms/op 1.93
altair processRewardsAndPenalties - 250000 worstcase 161.60 ms/op 104.34 ms/op 1.55
phase0 getAttestationDeltas - 250000 normalcase 15.832 ms/op 11.349 ms/op 1.39
phase0 getAttestationDeltas - 250000 worstcase 16.049 ms/op 11.494 ms/op 1.40
phase0 processSlashings - 250000 worstcase 6.9788 ms/op 5.1323 ms/op 1.36
altair processSyncCommitteeUpdates - 250000 360.00 ms/op 287.03 ms/op 1.25
BeaconState.hashTreeRoot - No change 620.00 ns/op 544.00 ns/op 1.14
BeaconState.hashTreeRoot - 1 full validator 80.867 us/op 69.537 us/op 1.16
BeaconState.hashTreeRoot - 32 full validator 736.14 us/op 650.13 us/op 1.13
BeaconState.hashTreeRoot - 512 full validator 8.3796 ms/op 7.3009 ms/op 1.15
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 102.00 us/op 84.687 us/op 1.20
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.5068 ms/op 1.2631 ms/op 1.19
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 20.654 ms/op 16.180 ms/op 1.28
BeaconState.hashTreeRoot - 1 balances 65.579 us/op 62.991 us/op 1.04
BeaconState.hashTreeRoot - 32 balances 695.21 us/op 640.02 us/op 1.09
BeaconState.hashTreeRoot - 512 balances 8.3754 ms/op 6.0964 ms/op 1.37
BeaconState.hashTreeRoot - 250000 balances 112.52 ms/op 111.03 ms/op 1.01
aggregationBits - 2048 els - zipIndexesInBitList 43.319 us/op 24.851 us/op 1.74
regular array get 100000 times 84.283 us/op 61.605 us/op 1.37
wrappedArray get 100000 times 84.338 us/op 61.608 us/op 1.37
arrayWithProxy get 100000 times 40.022 ms/op 28.333 ms/op 1.41
ssz.Root.equals 648.00 ns/op 485.00 ns/op 1.34
byteArrayEquals 627.00 ns/op 446.00 ns/op 1.41
shuffle list - 16384 els 14.174 ms/op 11.564 ms/op 1.23
shuffle list - 250000 els 207.59 ms/op 169.54 ms/op 1.22
processSlot - 1 slots 15.690 us/op 12.803 us/op 1.23
processSlot - 32 slots 2.3210 ms/op 1.8915 ms/op 1.23
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 493.98 us/op 400.94 us/op 1.23
getCommitteeAssignments - req 1 vs - 250000 vc 6.6543 ms/op 5.4863 ms/op 1.21
getCommitteeAssignments - req 100 vs - 250000 vc 9.1266 ms/op 7.9940 ms/op 1.14
getCommitteeAssignments - req 1000 vs - 250000 vc 9.7931 ms/op 8.6009 ms/op 1.14
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 12.960 ns/op 8.0500 ns/op 1.61
state getBlockRootAtSlot - 250000 vs - 7PWei 1.2601 us/op 951.72 ns/op 1.32
computeProposers - vc 250000 20.639 ms/op 16.780 ms/op 1.23
computeEpochShuffling - vc 250000 216.67 ms/op 173.18 ms/op 1.25
getNextSyncCommittee - vc 250000 347.24 ms/op 283.72 ms/op 1.22

by benchmarkbot/action

@nazarhussain nazarhussain marked this pull request as ready for review September 26, 2022 15:23
@nazarhussain nazarhussain requested a review from a team as a code owner September 26, 2022 15:23
@nazarhussain
Copy link
Contributor Author

nazarhussain commented Sep 26, 2022

Fixed all critical dependencies.

> yarn audit --summary
yarn audit v1.22.19
warning Resolution field "libnpmpublish@4.0.0" is incompatible with requested version "libnpmpublish@^6.0.4"
91 vulnerabilities found - Packages audited: 2006
Severity: 12 Low | 41 Moderate | 33 High | 5 Critical

and now

> yarn audit --summary 
yarn audit v1.22.19
61 vulnerabilities found - Packages audited: 1995
Severity: 6 Low | 31 Moderate | 24 High

@@ -85,7 +85,5 @@
"webpack": "^5.74.0"
},
"dependencies": {},
"resolutions": {
"libnpmpublish": "4.0.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to understand the reason of this resolution, but could not found any reference. I think it's unnecessary now.

@wemeetagain
Copy link
Member

Can you merge in latest unstable after #4114 ?

@nazarhussain nazarhussain marked this pull request as draft September 27, 2022 20:30
@nazarhussain nazarhussain marked this pull request as ready for review September 27, 2022 21:17
@wemeetagain wemeetagain merged commit 631b6e7 into unstable Sep 28, 2022
@wemeetagain wemeetagain deleted the nh/4431-dependencies-update branch September 28, 2022 17:24
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.

Update outdated NPM dependencies
2 participants