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

Merge stable to unstable #5114

Merged
merged 4 commits into from
Feb 7, 2023
Merged

Merge stable to unstable #5114

merged 4 commits into from
Feb 7, 2023

Conversation

wemeetagain
Copy link
Member

No description provided.

wemeetagain and others added 4 commits February 6, 2023 03:41
* Fix PeerScore.update() function

* Introduce negativeGossipScoreIgnoreThreshold

* Track peer scores by client

* Reset gossip score by client
@wemeetagain wemeetagain requested a review from a team as a code owner February 7, 2023 19:52
Copy link
Contributor

@g11tech g11tech left a comment

Choose a reason for hiding this comment

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

lgtm

@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 24e2d6a Previous: 0efcb16 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 904.37 us/op 617.86 us/op 1.46
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 44.214 us/op 43.302 us/op 1.02
BLS verify - blst-native 1.2025 ms/op 1.1750 ms/op 1.02
BLS verifyMultipleSignatures 3 - blst-native 2.4406 ms/op 2.3810 ms/op 1.03
BLS verifyMultipleSignatures 8 - blst-native 5.2371 ms/op 5.1272 ms/op 1.02
BLS verifyMultipleSignatures 32 - blst-native 18.948 ms/op 18.482 ms/op 1.03
BLS aggregatePubkeys 32 - blst-native 25.436 us/op 24.657 us/op 1.03
BLS aggregatePubkeys 128 - blst-native 99.306 us/op 96.657 us/op 1.03
getAttestationsForBlock 53.800 ms/op 53.904 ms/op 1.00
isKnown best case - 1 super set check 272.00 ns/op 276.00 ns/op 0.99
isKnown normal case - 2 super set checks 266.00 ns/op 272.00 ns/op 0.98
isKnown worse case - 16 super set checks 268.00 ns/op 273.00 ns/op 0.98
CheckpointStateCache - add get delete 5.1920 us/op 5.0470 us/op 1.03
validate gossip signedAggregateAndProof - struct 2.7538 ms/op 2.6416 ms/op 1.04
validate gossip attestation - struct 1.3367 ms/op 1.2629 ms/op 1.06
pickEth1Vote - no votes 1.2550 ms/op 1.1687 ms/op 1.07
pickEth1Vote - max votes 9.8052 ms/op 10.859 ms/op 0.90
pickEth1Vote - Eth1Data hashTreeRoot value x2048 8.6980 ms/op 8.7832 ms/op 0.99
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 14.934 ms/op 14.816 ms/op 1.01
pickEth1Vote - Eth1Data fastSerialize value x2048 653.49 us/op 614.21 us/op 1.06
pickEth1Vote - Eth1Data fastSerialize tree x2048 7.8652 ms/op 7.0877 ms/op 1.11
bytes32 toHexString 485.00 ns/op 483.00 ns/op 1.00
bytes32 Buffer.toString(hex) 334.00 ns/op 342.00 ns/op 0.98
bytes32 Buffer.toString(hex) from Uint8Array 538.00 ns/op 571.00 ns/op 0.94
bytes32 Buffer.toString(hex) + 0x 335.00 ns/op 335.00 ns/op 1.00
Object access 1 prop 0.15600 ns/op 0.16400 ns/op 0.95
Map access 1 prop 0.15600 ns/op 0.16300 ns/op 0.96
Object get x1000 6.3620 ns/op 6.5540 ns/op 0.97
Map get x1000 0.60700 ns/op 0.58400 ns/op 1.04
Object set x1000 50.510 ns/op 52.351 ns/op 0.96
Map set x1000 42.119 ns/op 43.459 ns/op 0.97
Return object 10000 times 0.23120 ns/op 0.23860 ns/op 0.97
Throw Error 10000 times 4.1224 us/op 4.2125 us/op 0.98
fastMsgIdFn sha256 / 200 bytes 3.3580 us/op 3.4730 us/op 0.97
fastMsgIdFn h32 xxhash / 200 bytes 274.00 ns/op 286.00 ns/op 0.96
fastMsgIdFn h64 xxhash / 200 bytes 371.00 ns/op 385.00 ns/op 0.96
fastMsgIdFn sha256 / 1000 bytes 11.356 us/op 11.211 us/op 1.01
fastMsgIdFn h32 xxhash / 1000 bytes 400.00 ns/op 414.00 ns/op 0.97
fastMsgIdFn h64 xxhash / 1000 bytes 443.00 ns/op 470.00 ns/op 0.94
fastMsgIdFn sha256 / 10000 bytes 102.36 us/op 104.71 us/op 0.98
fastMsgIdFn h32 xxhash / 10000 bytes 1.8870 us/op 1.9400 us/op 0.97
fastMsgIdFn h64 xxhash / 10000 bytes 1.3280 us/op 1.3840 us/op 0.96
enrSubnets - fastDeserialize 64 bits 1.2510 us/op 1.3120 us/op 0.95
enrSubnets - ssz BitVector 64 bits 472.00 ns/op 496.00 ns/op 0.95
enrSubnets - fastDeserialize 4 bits 162.00 ns/op 172.00 ns/op 0.94
enrSubnets - ssz BitVector 4 bits 472.00 ns/op 505.00 ns/op 0.93
prioritizePeers score -10:0 att 32-0.1 sync 2-0 100.38 us/op 97.334 us/op 1.03
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 131.33 us/op 129.09 us/op 1.02
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 165.44 us/op 161.24 us/op 1.03
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 308.77 us/op 304.82 us/op 1.01
prioritizePeers score 0:0 att 64-1 sync 4-1 367.85 us/op 363.92 us/op 1.01
array of 16000 items push then shift 1.6393 us/op 1.6378 us/op 1.00
LinkedList of 16000 items push then shift 8.9660 ns/op 8.8980 ns/op 1.01
array of 16000 items push then pop 79.432 ns/op 84.463 ns/op 0.94
LinkedList of 16000 items push then pop 8.6210 ns/op 8.5840 ns/op 1.00
array of 24000 items push then shift 2.3760 us/op 2.3720 us/op 1.00
LinkedList of 24000 items push then shift 8.8920 ns/op 8.8040 ns/op 1.01
array of 24000 items push then pop 75.075 ns/op 73.518 ns/op 1.02
LinkedList of 24000 items push then pop 8.4910 ns/op 8.5530 ns/op 0.99
intersect bitArray bitLen 8 13.416 ns/op 13.424 ns/op 1.00
intersect array and set length 8 78.129 ns/op 78.868 ns/op 0.99
intersect bitArray bitLen 128 44.305 ns/op 44.498 ns/op 1.00
intersect array and set length 128 1.0560 us/op 1.0700 us/op 0.99
Buffer.concat 32 items 2.6490 us/op 2.7900 us/op 0.95
Uint8Array.set 32 items 2.8990 us/op 2.3090 us/op 1.26
pass gossip attestations to forkchoice per slot 3.9027 ms/op 3.7409 ms/op 1.04
computeDeltas 3.3130 ms/op 2.8804 ms/op 1.15
computeProposerBoostScoreFromBalances 1.8213 ms/op 1.7616 ms/op 1.03
altair processAttestation - 250000 vs - 7PWei normalcase 2.2243 ms/op 2.3310 ms/op 0.95
altair processAttestation - 250000 vs - 7PWei worstcase 3.3829 ms/op 3.2574 ms/op 1.04
altair processAttestation - setStatus - 1/6 committees join 146.33 us/op 144.56 us/op 1.01
altair processAttestation - setStatus - 1/3 committees join 296.12 us/op 278.64 us/op 1.06
altair processAttestation - setStatus - 1/2 committees join 390.86 us/op 380.02 us/op 1.03
altair processAttestation - setStatus - 2/3 committees join 480.62 us/op 470.50 us/op 1.02
altair processAttestation - setStatus - 4/5 committees join 664.17 us/op 660.67 us/op 1.01
altair processAttestation - setStatus - 100% committees join 776.56 us/op 765.00 us/op 1.02
altair processBlock - 250000 vs - 7PWei normalcase 17.015 ms/op 16.408 ms/op 1.04
altair processBlock - 250000 vs - 7PWei normalcase hashState 26.392 ms/op 26.657 ms/op 0.99
altair processBlock - 250000 vs - 7PWei worstcase 48.774 ms/op 52.236 ms/op 0.93
altair processBlock - 250000 vs - 7PWei worstcase hashState 68.034 ms/op 68.702 ms/op 0.99
phase0 processBlock - 250000 vs - 7PWei normalcase 2.3196 ms/op 2.2708 ms/op 1.02
phase0 processBlock - 250000 vs - 7PWei worstcase 30.033 ms/op 29.253 ms/op 1.03
altair processEth1Data - 250000 vs - 7PWei normalcase 475.83 us/op 461.73 us/op 1.03
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 7.5850 us/op 8.0400 us/op 0.94
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 22.736 us/op 20.706 us/op 1.10
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 8.4940 us/op 8.6810 us/op 0.98
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 6.5290 us/op 7.8850 us/op 0.83
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 87.733 us/op 99.244 us/op 0.88
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 659.52 us/op 643.42 us/op 1.03
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 16384 910.65 us/op 920.97 us/op 0.99
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 16384 884.61 us/op 892.07 us/op 0.99
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 16384 2.3676 ms/op 2.2816 ms/op 1.04
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 16384 1.5129 ms/op 1.4773 ms/op 1.02
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 16384 3.9656 ms/op 3.9325 ms/op 1.01
Tree 40 250000 create 304.33 ms/op 307.37 ms/op 0.99
Tree 40 250000 get(125000) 190.00 ns/op 182.91 ns/op 1.04
Tree 40 250000 set(125000) 928.18 ns/op 897.69 ns/op 1.03
Tree 40 250000 toArray() 20.929 ms/op 16.997 ms/op 1.23
Tree 40 250000 iterate all - toArray() + loop 21.060 ms/op 17.410 ms/op 1.21
Tree 40 250000 iterate all - get(i) 72.639 ms/op 68.078 ms/op 1.07
MutableVector 250000 create 10.432 ms/op 11.112 ms/op 0.94
MutableVector 250000 get(125000) 6.4690 ns/op 6.4260 ns/op 1.01
MutableVector 250000 set(125000) 281.59 ns/op 255.53 ns/op 1.10
MutableVector 250000 toArray() 3.3105 ms/op 2.7787 ms/op 1.19
MutableVector 250000 iterate all - toArray() + loop 3.8826 ms/op 2.8907 ms/op 1.34
MutableVector 250000 iterate all - get(i) 1.5515 ms/op 1.5189 ms/op 1.02
Array 250000 create 2.7335 ms/op 2.6936 ms/op 1.01
Array 250000 clone - spread 1.1151 ms/op 1.1910 ms/op 0.94
Array 250000 get(125000) 0.55400 ns/op 0.58100 ns/op 0.95
Array 250000 set(125000) 0.63300 ns/op 0.65700 ns/op 0.96
Array 250000 iterate all - loop 86.146 us/op 106.19 us/op 0.81
effectiveBalanceIncrements clone Uint8Array 300000 27.036 us/op 27.405 us/op 0.99
effectiveBalanceIncrements clone MutableVector 300000 327.00 ns/op 383.00 ns/op 0.85
effectiveBalanceIncrements rw all Uint8Array 300000 172.42 us/op 169.80 us/op 1.02
effectiveBalanceIncrements rw all MutableVector 300000 77.862 ms/op 82.718 ms/op 0.94
phase0 afterProcessEpoch - 250000 vs - 7PWei 114.68 ms/op 115.22 ms/op 1.00
phase0 beforeProcessEpoch - 250000 vs - 7PWei 43.355 ms/op 42.479 ms/op 1.02
altair processEpoch - mainnet_e81889 334.21 ms/op 328.31 ms/op 1.02
mainnet_e81889 - altair beforeProcessEpoch 68.033 ms/op 66.698 ms/op 1.02
mainnet_e81889 - altair processJustificationAndFinalization 16.613 us/op 16.413 us/op 1.01
mainnet_e81889 - altair processInactivityUpdates 5.6826 ms/op 5.6195 ms/op 1.01
mainnet_e81889 - altair processRewardsAndPenalties 47.317 ms/op 47.094 ms/op 1.00
mainnet_e81889 - altair processRegistryUpdates 2.8860 us/op 2.7610 us/op 1.05
mainnet_e81889 - altair processSlashings 505.00 ns/op 412.00 ns/op 1.23
mainnet_e81889 - altair processEth1DataReset 467.00 ns/op 471.00 ns/op 0.99
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2816 ms/op 1.2673 ms/op 1.01
mainnet_e81889 - altair processSlashingsReset 4.5390 us/op 4.5940 us/op 0.99
mainnet_e81889 - altair processRandaoMixesReset 4.2620 us/op 8.9840 us/op 0.47
mainnet_e81889 - altair processHistoricalRootsUpdate 904.00 ns/op 679.00 ns/op 1.33
mainnet_e81889 - altair processParticipationFlagUpdates 3.0270 us/op 2.5750 us/op 1.18
mainnet_e81889 - altair processSyncCommitteeUpdates 773.00 ns/op 489.00 ns/op 1.58
mainnet_e81889 - altair afterProcessEpoch 130.16 ms/op 129.69 ms/op 1.00
phase0 processEpoch - mainnet_e58758 358.67 ms/op 364.38 ms/op 0.98
mainnet_e58758 - phase0 beforeProcessEpoch 135.96 ms/op 139.05 ms/op 0.98
mainnet_e58758 - phase0 processJustificationAndFinalization 16.587 us/op 16.131 us/op 1.03
mainnet_e58758 - phase0 processRewardsAndPenalties 65.491 ms/op 66.947 ms/op 0.98
mainnet_e58758 - phase0 processRegistryUpdates 8.7660 us/op 7.7150 us/op 1.14
mainnet_e58758 - phase0 processSlashings 589.00 ns/op 539.00 ns/op 1.09
mainnet_e58758 - phase0 processEth1DataReset 524.00 ns/op 528.00 ns/op 0.99
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0456 ms/op 1.0245 ms/op 1.02
mainnet_e58758 - phase0 processSlashingsReset 4.3430 us/op 4.4140 us/op 0.98
mainnet_e58758 - phase0 processRandaoMixesReset 5.1370 us/op 4.9700 us/op 1.03
mainnet_e58758 - phase0 processHistoricalRootsUpdate 778.00 ns/op 757.00 ns/op 1.03
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.8690 us/op 5.4440 us/op 0.89
mainnet_e58758 - phase0 afterProcessEpoch 102.72 ms/op 101.20 ms/op 1.01
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2874 ms/op 1.2518 ms/op 1.03
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.6459 ms/op 1.4719 ms/op 1.12
altair processInactivityUpdates - 250000 normalcase 27.657 ms/op 23.225 ms/op 1.19
altair processInactivityUpdates - 250000 worstcase 26.556 ms/op 27.251 ms/op 0.97
phase0 processRegistryUpdates - 250000 normalcase 7.2140 us/op 7.5220 us/op 0.96
phase0 processRegistryUpdates - 250000 badcase_full_deposits 269.76 us/op 286.63 us/op 0.94
phase0 processRegistryUpdates - 250000 worstcase 0.5 138.48 ms/op 130.69 ms/op 1.06
altair processRewardsAndPenalties - 250000 normalcase 65.483 ms/op 65.465 ms/op 1.00
altair processRewardsAndPenalties - 250000 worstcase 71.016 ms/op 72.228 ms/op 0.98
phase0 getAttestationDeltas - 250000 normalcase 6.8223 ms/op 7.0787 ms/op 0.96
phase0 getAttestationDeltas - 250000 worstcase 6.8028 ms/op 6.7547 ms/op 1.01
phase0 processSlashings - 250000 worstcase 3.3983 ms/op 3.4048 ms/op 1.00
altair processSyncCommitteeUpdates - 250000 184.22 ms/op 176.37 ms/op 1.04
BeaconState.hashTreeRoot - No change 290.00 ns/op 306.00 ns/op 0.95
BeaconState.hashTreeRoot - 1 full validator 55.730 us/op 54.108 us/op 1.03
BeaconState.hashTreeRoot - 32 full validator 552.11 us/op 544.26 us/op 1.01
BeaconState.hashTreeRoot - 512 full validator 5.6897 ms/op 5.9584 ms/op 0.95
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 61.663 us/op 63.804 us/op 0.97
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 899.63 us/op 912.32 us/op 0.99
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 11.591 ms/op 11.691 ms/op 0.99
BeaconState.hashTreeRoot - 1 balances 52.450 us/op 49.564 us/op 1.06
BeaconState.hashTreeRoot - 32 balances 444.97 us/op 470.02 us/op 0.95
BeaconState.hashTreeRoot - 512 balances 4.4522 ms/op 4.5147 ms/op 0.99
BeaconState.hashTreeRoot - 250000 balances 76.028 ms/op 73.564 ms/op 1.03
aggregationBits - 2048 els - zipIndexesInBitList 15.846 us/op 15.821 us/op 1.00
regular array get 100000 times 33.537 us/op 42.515 us/op 0.79
wrappedArray get 100000 times 35.309 us/op 33.208 us/op 1.06
arrayWithProxy get 100000 times 16.212 ms/op 15.313 ms/op 1.06
ssz.Root.equals 578.00 ns/op 550.00 ns/op 1.05
byteArrayEquals 570.00 ns/op 554.00 ns/op 1.03
shuffle list - 16384 els 6.9243 ms/op 6.7965 ms/op 1.02
shuffle list - 250000 els 101.76 ms/op 99.994 ms/op 1.02
processSlot - 1 slots 8.9940 us/op 8.7400 us/op 1.03
processSlot - 32 slots 1.3336 ms/op 1.3464 ms/op 0.99
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 194.78 us/op 193.93 us/op 1.00
getCommitteeAssignments - req 1 vs - 250000 vc 2.9460 ms/op 2.8679 ms/op 1.03
getCommitteeAssignments - req 100 vs - 250000 vc 4.1838 ms/op 4.1510 ms/op 1.01
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5696 ms/op 4.3591 ms/op 1.05
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.8200 ns/op 4.9000 ns/op 0.98
state getBlockRootAtSlot - 250000 vs - 7PWei 581.10 ns/op 835.89 ns/op 0.70
computeProposers - vc 250000 10.634 ms/op 10.255 ms/op 1.04
computeEpochShuffling - vc 250000 104.95 ms/op 108.14 ms/op 0.97
getNextSyncCommittee - vc 250000 177.69 ms/op 179.44 ms/op 0.99

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 8640f80 into unstable Feb 7, 2023
@wemeetagain
Copy link
Member Author

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

4 participants