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: remove unmet peer dependencies #5469

Merged
merged 4 commits into from
May 8, 2023

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented May 5, 2023

Motivation

I dislike warnings

warning " > @lodestar/[email protected]" has unmet peer dependency "fastify@^4.15.0".
warning " > @lodestar/[email protected]" has unmet peer dependency "c-kzg@^1.0.7".
warning " > @lodestar/[email protected]" has unmet peer dependency "[email protected]".

Description

Removes unmet peer dependencies

wemeetagain
wemeetagain previously approved these changes May 5, 2023
@@ -84,9 +84,6 @@
"ajv": "^8.12.0",
"fastify": "^4.15.0"
},
"peerDependencies": {
"fastify": "^4.15.0"
Copy link
Member Author

@nflaig nflaig May 5, 2023

Choose a reason for hiding this comment

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

only types are use in this package, there is a warning because validator package does not install fastify and neither should it, as it has to be browser compatible

@@ -157,9 +157,6 @@
"varint": "^6.0.0",
"xxhash-wasm": "1.0.2"
},
"peerDependencies": {
"c-kzg": "^1.0.7"
Copy link
Member Author

Choose a reason for hiding this comment

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

c-kzg is already installed as dependency, shouldn't make a difference if this line is removed

"c-kzg": "^1.0.9",

@nflaig nflaig marked this pull request as ready for review May 5, 2023 16:00
@nflaig nflaig requested a review from a team as a code owner May 5, 2023 16:00
@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 0c72ae0 Previous: a14bf0d Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 578.66 us/op 984.75 us/op 0.59
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 66.473 us/op 51.851 us/op 1.28
BLS verify - blst-native 1.3136 ms/op 1.2691 ms/op 1.04
BLS verifyMultipleSignatures 3 - blst-native 2.7611 ms/op 2.5051 ms/op 1.10
BLS verifyMultipleSignatures 8 - blst-native 5.6977 ms/op 5.4944 ms/op 1.04
BLS verifyMultipleSignatures 32 - blst-native 20.049 ms/op 19.610 ms/op 1.02
BLS aggregatePubkeys 32 - blst-native 26.917 us/op 26.183 us/op 1.03
BLS aggregatePubkeys 128 - blst-native 104.11 us/op 101.79 us/op 1.02
getAttestationsForBlock 68.152 ms/op 59.398 ms/op 1.15
isKnown best case - 1 super set check 272.00 ns/op 262.00 ns/op 1.04
isKnown normal case - 2 super set checks 279.00 ns/op 255.00 ns/op 1.09
isKnown worse case - 16 super set checks 267.00 ns/op 251.00 ns/op 1.06
CheckpointStateCache - add get delete 6.5840 us/op 5.5130 us/op 1.19
validate gossip signedAggregateAndProof - struct 3.0255 ms/op 2.8334 ms/op 1.07
validate gossip attestation - struct 1.4015 ms/op 1.3489 ms/op 1.04
pickEth1Vote - no votes 1.4416 ms/op 1.3482 ms/op 1.07
pickEth1Vote - max votes 14.514 ms/op 10.658 ms/op 1.36
pickEth1Vote - Eth1Data hashTreeRoot value x2048 10.329 ms/op 9.1161 ms/op 1.13
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 17.300 ms/op 14.097 ms/op 1.23
pickEth1Vote - Eth1Data fastSerialize value x2048 836.19 us/op 721.29 us/op 1.16
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.5592 ms/op 4.6550 ms/op 1.41
bytes32 toHexString 798.00 ns/op 498.00 ns/op 1.60
bytes32 Buffer.toString(hex) 456.00 ns/op 355.00 ns/op 1.28
bytes32 Buffer.toString(hex) from Uint8Array 690.00 ns/op 543.00 ns/op 1.27
bytes32 Buffer.toString(hex) + 0x 492.00 ns/op 346.00 ns/op 1.42
Object access 1 prop 0.21700 ns/op 0.16500 ns/op 1.32
Map access 1 prop 0.18600 ns/op 0.16200 ns/op 1.15
Object get x1000 9.2470 ns/op 6.6040 ns/op 1.40
Map get x1000 0.69300 ns/op 0.61000 ns/op 1.14
Object set x1000 80.536 ns/op 53.901 ns/op 1.49
Map set x1000 57.787 ns/op 44.866 ns/op 1.29
Return object 10000 times 0.26740 ns/op 0.24160 ns/op 1.11
Throw Error 10000 times 4.6794 us/op 4.2699 us/op 1.10
fastMsgIdFn sha256 / 200 bytes 3.6680 us/op 3.5170 us/op 1.04
fastMsgIdFn h32 xxhash / 200 bytes 337.00 ns/op 304.00 ns/op 1.11
fastMsgIdFn h64 xxhash / 200 bytes 504.00 ns/op 426.00 ns/op 1.18
fastMsgIdFn sha256 / 1000 bytes 12.457 us/op 11.690 us/op 1.07
fastMsgIdFn h32 xxhash / 1000 bytes 472.00 ns/op 462.00 ns/op 1.02
fastMsgIdFn h64 xxhash / 1000 bytes 595.00 ns/op 548.00 ns/op 1.09
fastMsgIdFn sha256 / 10000 bytes 108.60 us/op 104.52 us/op 1.04
fastMsgIdFn h32 xxhash / 10000 bytes 2.1130 us/op 1.9860 us/op 1.06
fastMsgIdFn h64 xxhash / 10000 bytes 1.5070 us/op 1.4640 us/op 1.03
enrSubnets - fastDeserialize 64 bits 1.7980 us/op 1.7130 us/op 1.05
enrSubnets - ssz BitVector 64 bits 624.00 ns/op 586.00 ns/op 1.06
enrSubnets - fastDeserialize 4 bits 210.00 ns/op 192.00 ns/op 1.09
enrSubnets - ssz BitVector 4 bits 633.00 ns/op 611.00 ns/op 1.04
prioritizePeers score -10:0 att 32-0.1 sync 2-0 134.86 us/op 126.77 us/op 1.06
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 178.47 us/op 156.86 us/op 1.14
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 211.50 us/op 192.40 us/op 1.10
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 379.75 us/op 362.98 us/op 1.05
prioritizePeers score 0:0 att 64-1 sync 4-1 460.75 us/op 427.65 us/op 1.08
array of 16000 items push then shift 1.7992 us/op 1.6526 us/op 1.09
LinkedList of 16000 items push then shift 13.017 ns/op 9.0980 ns/op 1.43
array of 16000 items push then pop 147.85 ns/op 115.81 ns/op 1.28
LinkedList of 16000 items push then pop 14.094 ns/op 8.8830 ns/op 1.59
array of 24000 items push then shift 2.9531 us/op 2.4483 us/op 1.21
LinkedList of 24000 items push then shift 13.767 ns/op 9.4050 ns/op 1.46
array of 24000 items push then pop 102.39 ns/op 78.453 ns/op 1.31
LinkedList of 24000 items push then pop 9.3550 ns/op 8.6550 ns/op 1.08
intersect bitArray bitLen 8 14.625 ns/op 14.352 ns/op 1.02
intersect array and set length 8 110.35 ns/op 80.821 ns/op 1.37
intersect bitArray bitLen 128 47.783 ns/op 44.499 ns/op 1.07
intersect array and set length 128 1.3661 us/op 1.1501 us/op 1.19
Buffer.concat 32 items 3.2010 us/op 3.3960 us/op 0.94
Uint8Array.set 32 items 2.8520 us/op 2.7070 us/op 1.05
pass gossip attestations to forkchoice per slot 3.2452 ms/op 2.8860 ms/op 1.12
computeDeltas 3.0534 ms/op 2.8906 ms/op 1.06
computeProposerBoostScoreFromBalances 1.8185 ms/op 1.7748 ms/op 1.02
altair processAttestation - 250000 vs - 7PWei normalcase 2.3444 ms/op 2.2028 ms/op 1.06
altair processAttestation - 250000 vs - 7PWei worstcase 3.5223 ms/op 3.3339 ms/op 1.06
altair processAttestation - setStatus - 1/6 committees join 149.53 us/op 142.43 us/op 1.05
altair processAttestation - setStatus - 1/3 committees join 288.88 us/op 285.07 us/op 1.01
altair processAttestation - setStatus - 1/2 committees join 389.01 us/op 375.00 us/op 1.04
altair processAttestation - setStatus - 2/3 committees join 477.00 us/op 463.61 us/op 1.03
altair processAttestation - setStatus - 4/5 committees join 658.61 us/op 649.73 us/op 1.01
altair processAttestation - setStatus - 100% committees join 765.71 us/op 746.08 us/op 1.03
altair processBlock - 250000 vs - 7PWei normalcase 16.924 ms/op 15.066 ms/op 1.12
altair processBlock - 250000 vs - 7PWei normalcase hashState 24.121 ms/op 29.437 ms/op 0.82
altair processBlock - 250000 vs - 7PWei worstcase 47.086 ms/op 45.823 ms/op 1.03
altair processBlock - 250000 vs - 7PWei worstcase hashState 66.400 ms/op 65.755 ms/op 1.01
phase0 processBlock - 250000 vs - 7PWei normalcase 2.1927 ms/op 2.0091 ms/op 1.09
phase0 processBlock - 250000 vs - 7PWei worstcase 29.334 ms/op 27.984 ms/op 1.05
altair processEth1Data - 250000 vs - 7PWei normalcase 488.83 us/op 428.72 us/op 1.14
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 8.3480 us/op 6.8880 us/op 1.21
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 27.446 us/op 19.540 us/op 1.40
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 10.901 us/op 8.2600 us/op 1.32
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 8.2910 us/op 6.5580 us/op 1.26
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 106.31 us/op 74.101 us/op 1.43
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 661.91 us/op 614.66 us/op 1.08
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 16384 895.90 us/op 883.37 us/op 1.01
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 16384 860.40 us/op 826.26 us/op 1.04
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 16384 2.3410 ms/op 2.3044 ms/op 1.02
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 16384 1.4720 ms/op 1.5677 ms/op 0.94
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 16384 3.8710 ms/op 3.5874 ms/op 1.08
Tree 40 250000 create 317.83 ms/op 276.33 ms/op 1.15
Tree 40 250000 get(125000) 189.62 ns/op 171.51 ns/op 1.11
Tree 40 250000 set(125000) 925.93 ns/op 833.66 ns/op 1.11
Tree 40 250000 toArray() 22.861 ms/op 16.894 ms/op 1.35
Tree 40 250000 iterate all - toArray() + loop 22.763 ms/op 17.106 ms/op 1.33
Tree 40 250000 iterate all - get(i) 69.825 ms/op 63.729 ms/op 1.10
MutableVector 250000 create 11.226 ms/op 10.149 ms/op 1.11
MutableVector 250000 get(125000) 6.3350 ns/op 6.2850 ns/op 1.01
MutableVector 250000 set(125000) 277.22 ns/op 256.08 ns/op 1.08
MutableVector 250000 toArray() 3.1545 ms/op 2.8111 ms/op 1.12
MutableVector 250000 iterate all - toArray() + loop 3.1298 ms/op 2.8084 ms/op 1.11
MutableVector 250000 iterate all - get(i) 1.5192 ms/op 1.4398 ms/op 1.06
Array 250000 create 2.8081 ms/op 2.7772 ms/op 1.01
Array 250000 clone - spread 1.1982 ms/op 1.0880 ms/op 1.10
Array 250000 get(125000) 0.54100 ns/op 0.52100 ns/op 1.04
Array 250000 set(125000) 0.61800 ns/op 0.60500 ns/op 1.02
Array 250000 iterate all - loop 102.53 us/op 80.040 us/op 1.28
effectiveBalanceIncrements clone Uint8Array 300000 31.872 us/op 23.878 us/op 1.33
effectiveBalanceIncrements clone MutableVector 300000 326.00 ns/op 324.00 ns/op 1.01
effectiveBalanceIncrements rw all Uint8Array 300000 167.91 us/op 165.29 us/op 1.02
effectiveBalanceIncrements rw all MutableVector 300000 79.998 ms/op 75.321 ms/op 1.06
phase0 afterProcessEpoch - 250000 vs - 7PWei 114.18 ms/op 111.56 ms/op 1.02
phase0 beforeProcessEpoch - 250000 vs - 7PWei 40.535 ms/op 40.088 ms/op 1.01
altair processEpoch - mainnet_e81889 306.52 ms/op 333.33 ms/op 0.92
mainnet_e81889 - altair beforeProcessEpoch 66.011 ms/op 65.681 ms/op 1.01
mainnet_e81889 - altair processJustificationAndFinalization 19.262 us/op 17.693 us/op 1.09
mainnet_e81889 - altair processInactivityUpdates 6.0176 ms/op 5.1674 ms/op 1.16
mainnet_e81889 - altair processRewardsAndPenalties 63.715 ms/op 48.111 ms/op 1.32
mainnet_e81889 - altair processRegistryUpdates 2.9460 us/op 2.8620 us/op 1.03
mainnet_e81889 - altair processSlashings 667.00 ns/op 474.00 ns/op 1.41
mainnet_e81889 - altair processEth1DataReset 601.00 ns/op 498.00 ns/op 1.21
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.3148 ms/op 1.2355 ms/op 1.06
mainnet_e81889 - altair processSlashingsReset 7.2970 us/op 4.9290 us/op 1.48
mainnet_e81889 - altair processRandaoMixesReset 10.323 us/op 4.6320 us/op 2.23
mainnet_e81889 - altair processHistoricalRootsUpdate 782.00 ns/op 587.00 ns/op 1.33
mainnet_e81889 - altair processParticipationFlagUpdates 2.7050 us/op 2.4400 us/op 1.11
mainnet_e81889 - altair processSyncCommitteeUpdates 641.00 ns/op 455.00 ns/op 1.41
mainnet_e81889 - altair afterProcessEpoch 126.68 ms/op 116.92 ms/op 1.08
phase0 processEpoch - mainnet_e58758 369.41 ms/op 317.39 ms/op 1.16
mainnet_e58758 - phase0 beforeProcessEpoch 148.97 ms/op 123.21 ms/op 1.21
mainnet_e58758 - phase0 processJustificationAndFinalization 18.495 us/op 15.067 us/op 1.23
mainnet_e58758 - phase0 processRewardsAndPenalties 64.488 ms/op 56.773 ms/op 1.14
mainnet_e58758 - phase0 processRegistryUpdates 8.3540 us/op 7.9130 us/op 1.06
mainnet_e58758 - phase0 processSlashings 518.00 ns/op 422.00 ns/op 1.23
mainnet_e58758 - phase0 processEth1DataReset 796.00 ns/op 434.00 ns/op 1.83
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0623 ms/op 941.73 us/op 1.13
mainnet_e58758 - phase0 processSlashingsReset 3.6520 us/op 3.2730 us/op 1.12
mainnet_e58758 - phase0 processRandaoMixesReset 4.4860 us/op 6.6070 us/op 0.68
mainnet_e58758 - phase0 processHistoricalRootsUpdate 612.00 ns/op 705.00 ns/op 0.87
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.6920 us/op 4.4950 us/op 0.82
mainnet_e58758 - phase0 afterProcessEpoch 101.08 ms/op 94.513 ms/op 1.07
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2911 ms/op 1.1843 ms/op 1.09
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5970 ms/op 1.4405 ms/op 1.11
altair processInactivityUpdates - 250000 normalcase 28.199 ms/op 22.136 ms/op 1.27
altair processInactivityUpdates - 250000 worstcase 26.821 ms/op 20.496 ms/op 1.31
phase0 processRegistryUpdates - 250000 normalcase 9.2370 us/op 5.7750 us/op 1.60
phase0 processRegistryUpdates - 250000 badcase_full_deposits 277.15 us/op 224.20 us/op 1.24
phase0 processRegistryUpdates - 250000 worstcase 0.5 121.56 ms/op 119.27 ms/op 1.02
altair processRewardsAndPenalties - 250000 normalcase 66.607 ms/op 46.467 ms/op 1.43
altair processRewardsAndPenalties - 250000 worstcase 67.935 ms/op 47.994 ms/op 1.42
phase0 getAttestationDeltas - 250000 normalcase 8.0134 ms/op 6.4677 ms/op 1.24
phase0 getAttestationDeltas - 250000 worstcase 6.6790 ms/op 6.6074 ms/op 1.01
phase0 processSlashings - 250000 worstcase 3.5820 ms/op 3.3379 ms/op 1.07
altair processSyncCommitteeUpdates - 250000 174.42 ms/op 173.98 ms/op 1.00
BeaconState.hashTreeRoot - No change 315.00 ns/op 266.00 ns/op 1.18
BeaconState.hashTreeRoot - 1 full validator 53.238 us/op 52.757 us/op 1.01
BeaconState.hashTreeRoot - 32 full validator 557.09 us/op 517.27 us/op 1.08
BeaconState.hashTreeRoot - 512 full validator 5.2825 ms/op 5.2669 ms/op 1.00
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 64.775 us/op 61.216 us/op 1.06
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 865.82 us/op 855.00 us/op 1.01
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 11.937 ms/op 11.092 ms/op 1.08
BeaconState.hashTreeRoot - 1 balances 47.751 us/op 48.595 us/op 0.98
BeaconState.hashTreeRoot - 32 balances 452.98 us/op 446.26 us/op 1.02
BeaconState.hashTreeRoot - 512 balances 4.5472 ms/op 4.3998 ms/op 1.03
BeaconState.hashTreeRoot - 250000 balances 75.459 ms/op 73.057 ms/op 1.03
aggregationBits - 2048 els - zipIndexesInBitList 15.306 us/op 15.795 us/op 0.97
regular array get 100000 times 32.628 us/op 31.478 us/op 1.04
wrappedArray get 100000 times 32.642 us/op 31.353 us/op 1.04
arrayWithProxy get 100000 times 15.806 ms/op 15.493 ms/op 1.02
ssz.Root.equals 535.00 ns/op 525.00 ns/op 1.02
byteArrayEquals 534.00 ns/op 514.00 ns/op 1.04
shuffle list - 16384 els 6.7927 ms/op 6.6280 ms/op 1.02
shuffle list - 250000 els 99.504 ms/op 95.815 ms/op 1.04
processSlot - 1 slots 8.3400 us/op 8.3640 us/op 1.00
processSlot - 32 slots 1.3217 ms/op 1.3065 ms/op 1.01
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.095 ms/op 33.231 ms/op 1.12
getCommitteeAssignments - req 1 vs - 250000 vc 2.8505 ms/op 2.8689 ms/op 0.99
getCommitteeAssignments - req 100 vs - 250000 vc 4.1304 ms/op 4.0586 ms/op 1.02
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5689 ms/op 4.4145 ms/op 1.03
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.9800 ns/op 4.3600 ns/op 1.14
state getBlockRootAtSlot - 250000 vs - 7PWei 923.59 ns/op 997.69 ns/op 0.93
computeProposers - vc 250000 10.688 ms/op 10.302 ms/op 1.04
computeEpochShuffling - vc 250000 102.08 ms/op 101.75 ms/op 1.00
getNextSyncCommittee - vc 250000 166.92 ms/op 172.88 ms/op 0.97
computeSigningRoot for AttestationData 12.732 us/op 13.130 us/op 0.97
hash AttestationData serialized data then Buffer.toString(base64) 2.4982 us/op 2.4019 us/op 1.04
toHexString serialized data 1.2195 us/op 1.1000 us/op 1.11
Buffer.toString(base64) 368.30 ns/op 313.72 ns/op 1.17

by benchmarkbot/action

@nflaig nflaig marked this pull request as draft May 5, 2023 16:21
@@ -69,7 +69,7 @@
"@lodestar/types": "^1.8.0"
},
"peerDependencies": {
"libp2p": "0.41.0"
"libp2p": "~0.42.2"
Copy link
Member Author

Choose a reason for hiding this comment

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

This fixes the warning if beacon-node package is installed, however top-level install still shows a warning, not sure how to get rid of that, might be related to

Checked peer deps via check-peer-dependencies, looks mostly correct now

@nflaig nflaig marked this pull request as ready for review May 8, 2023 08:48
@wemeetagain wemeetagain merged commit a1b2546 into unstable May 8, 2023
@wemeetagain wemeetagain deleted the nflaig/remove-unmet-peer-deps branch May 8, 2023 13:57
@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