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

fix: set gossipsubDHigh as 9 #5427

Merged
merged 1 commit into from
May 1, 2023
Merged

fix: set gossipsubDHigh as 9 #5427

merged 1 commit into from
May 1, 2023

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Apr 27, 2023

Motivation

When there are too many mesh peers, gossip block cannot be processed timely, see #5420

Description

  • Set gossipsubDHigh=9 for now, should work on removing it on upcoming release and keep the issue open

part of #5420

@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 70a4b26 Previous: 05c93ba Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 822.48 us/op 974.33 us/op 0.84
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 74.662 us/op 49.607 us/op 1.51
BLS verify - blst-native 1.3434 ms/op 1.2217 ms/op 1.10
BLS verifyMultipleSignatures 3 - blst-native 2.6942 ms/op 2.4873 ms/op 1.08
BLS verifyMultipleSignatures 8 - blst-native 6.2019 ms/op 5.5251 ms/op 1.12
BLS verifyMultipleSignatures 32 - blst-native 21.019 ms/op 19.451 ms/op 1.08
BLS aggregatePubkeys 32 - blst-native 28.445 us/op 26.368 us/op 1.08
BLS aggregatePubkeys 128 - blst-native 110.45 us/op 102.30 us/op 1.08
getAttestationsForBlock 89.892 ms/op 53.632 ms/op 1.68
isKnown best case - 1 super set check 288.00 ns/op 262.00 ns/op 1.10
isKnown normal case - 2 super set checks 284.00 ns/op 254.00 ns/op 1.12
isKnown worse case - 16 super set checks 317.00 ns/op 255.00 ns/op 1.24
CheckpointStateCache - add get delete 6.8000 us/op 5.0700 us/op 1.34
validate gossip signedAggregateAndProof - struct 3.0396 ms/op 2.8550 ms/op 1.06
validate gossip attestation - struct 1.5059 ms/op 1.3671 ms/op 1.10
pickEth1Vote - no votes 1.5996 ms/op 1.2638 ms/op 1.27
pickEth1Vote - max votes 16.224 ms/op 11.955 ms/op 1.36
pickEth1Vote - Eth1Data hashTreeRoot value x2048 12.095 ms/op 9.2578 ms/op 1.31
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 21.123 ms/op 15.715 ms/op 1.34
pickEth1Vote - Eth1Data fastSerialize value x2048 965.17 us/op 656.46 us/op 1.47
pickEth1Vote - Eth1Data fastSerialize tree x2048 7.2777 ms/op 7.0556 ms/op 1.03
bytes32 toHexString 965.00 ns/op 497.00 ns/op 1.94
bytes32 Buffer.toString(hex) 555.00 ns/op 366.00 ns/op 1.52
bytes32 Buffer.toString(hex) from Uint8Array 801.00 ns/op 562.00 ns/op 1.43
bytes32 Buffer.toString(hex) + 0x 499.00 ns/op 368.00 ns/op 1.36
Object access 1 prop 0.26100 ns/op 0.16500 ns/op 1.58
Map access 1 prop 0.20200 ns/op 0.16200 ns/op 1.25
Object get x1000 10.638 ns/op 6.8320 ns/op 1.56
Map get x1000 0.88700 ns/op 0.60700 ns/op 1.46
Object set x1000 94.000 ns/op 52.739 ns/op 1.78
Map set x1000 67.203 ns/op 43.626 ns/op 1.54
Return object 10000 times 0.32390 ns/op 0.24060 ns/op 1.35
Throw Error 10000 times 5.1321 us/op 4.3829 us/op 1.17
fastMsgIdFn sha256 / 200 bytes 4.1850 us/op 3.5760 us/op 1.17
fastMsgIdFn h32 xxhash / 200 bytes 351.00 ns/op 289.00 ns/op 1.21
fastMsgIdFn h64 xxhash / 200 bytes 543.00 ns/op 419.00 ns/op 1.30
fastMsgIdFn sha256 / 1000 bytes 13.124 us/op 12.030 us/op 1.09
fastMsgIdFn h32 xxhash / 1000 bytes 489.00 ns/op 424.00 ns/op 1.15
fastMsgIdFn h64 xxhash / 1000 bytes 634.00 ns/op 482.00 ns/op 1.32
fastMsgIdFn sha256 / 10000 bytes 125.01 us/op 106.52 us/op 1.17
fastMsgIdFn h32 xxhash / 10000 bytes 2.2120 us/op 2.0200 us/op 1.10
fastMsgIdFn h64 xxhash / 10000 bytes 1.6350 us/op 1.3880 us/op 1.18
enrSubnets - fastDeserialize 64 bits 1.9940 us/op 1.3240 us/op 1.51
enrSubnets - ssz BitVector 64 bits 655.00 ns/op 490.00 ns/op 1.34
enrSubnets - fastDeserialize 4 bits 228.00 ns/op 167.00 ns/op 1.37
enrSubnets - ssz BitVector 4 bits 655.00 ns/op 493.00 ns/op 1.33
prioritizePeers score -10:0 att 32-0.1 sync 2-0 144.23 us/op 106.89 us/op 1.35
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 176.41 us/op 151.52 us/op 1.16
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 210.56 us/op 177.25 us/op 1.19
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 391.08 us/op 310.34 us/op 1.26
prioritizePeers score 0:0 att 64-1 sync 4-1 477.62 us/op 382.77 us/op 1.25
array of 16000 items push then shift 1.9152 us/op 1.6483 us/op 1.16
LinkedList of 16000 items push then shift 10.015 ns/op 8.8650 ns/op 1.13
array of 16000 items push then pop 112.82 ns/op 84.471 ns/op 1.34
LinkedList of 16000 items push then pop 9.9230 ns/op 8.7900 ns/op 1.13
array of 24000 items push then shift 2.5497 us/op 2.3618 us/op 1.08
LinkedList of 24000 items push then shift 9.7370 ns/op 8.8100 ns/op 1.11
array of 24000 items push then pop 107.47 ns/op 72.940 ns/op 1.47
LinkedList of 24000 items push then pop 11.816 ns/op 8.6290 ns/op 1.37
intersect bitArray bitLen 8 21.002 ns/op 13.630 ns/op 1.54
intersect array and set length 8 117.69 ns/op 79.247 ns/op 1.49
intersect bitArray bitLen 128 55.445 ns/op 45.285 ns/op 1.22
intersect array and set length 128 1.2816 us/op 1.0767 us/op 1.19
Buffer.concat 32 items 3.3690 us/op 2.8820 us/op 1.17
Uint8Array.set 32 items 3.2420 us/op 2.8230 us/op 1.15
pass gossip attestations to forkchoice per slot 4.0678 ms/op 3.0429 ms/op 1.34
computeDeltas 3.9444 ms/op 2.9551 ms/op 1.33
computeProposerBoostScoreFromBalances 2.1507 ms/op 1.8010 ms/op 1.19
altair processAttestation - 250000 vs - 7PWei normalcase 3.3915 ms/op 2.2894 ms/op 1.48
altair processAttestation - 250000 vs - 7PWei worstcase 4.3720 ms/op 3.5874 ms/op 1.22
altair processAttestation - setStatus - 1/6 committees join 151.38 us/op 145.68 us/op 1.04
altair processAttestation - setStatus - 1/3 committees join 294.94 us/op 278.65 us/op 1.06
altair processAttestation - setStatus - 1/2 committees join 397.37 us/op 375.38 us/op 1.06
altair processAttestation - setStatus - 2/3 committees join 492.02 us/op 465.88 us/op 1.06
altair processAttestation - setStatus - 4/5 committees join 688.76 us/op 676.17 us/op 1.02
altair processAttestation - setStatus - 100% committees join 804.44 us/op 788.83 us/op 1.02
altair processBlock - 250000 vs - 7PWei normalcase 18.334 ms/op 19.890 ms/op 0.92
altair processBlock - 250000 vs - 7PWei normalcase hashState 24.269 ms/op 25.580 ms/op 0.95
altair processBlock - 250000 vs - 7PWei worstcase 48.987 ms/op 51.272 ms/op 0.96
altair processBlock - 250000 vs - 7PWei worstcase hashState 70.514 ms/op 65.965 ms/op 1.07
phase0 processBlock - 250000 vs - 7PWei normalcase 2.4688 ms/op 2.0125 ms/op 1.23
phase0 processBlock - 250000 vs - 7PWei worstcase 29.236 ms/op 30.569 ms/op 0.96
altair processEth1Data - 250000 vs - 7PWei normalcase 466.82 us/op 479.91 us/op 0.97
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 8.5040 us/op 7.9410 us/op 1.07
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 27.677 us/op 26.373 us/op 1.05
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 13.620 us/op 9.5250 us/op 1.43
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 10.160 us/op 7.4760 us/op 1.36
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 119.59 us/op 101.97 us/op 1.17
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 689.24 us/op 645.40 us/op 1.07
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 16384 936.13 us/op 949.98 us/op 0.99
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 16384 968.25 us/op 1.0076 ms/op 0.96
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 16384 2.4370 ms/op 2.4338 ms/op 1.00
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 16384 1.5357 ms/op 1.5356 ms/op 1.00
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 16384 3.9879 ms/op 4.0388 ms/op 0.99
Tree 40 250000 create 321.41 ms/op 380.83 ms/op 0.84
Tree 40 250000 get(125000) 192.75 ns/op 196.23 ns/op 0.98
Tree 40 250000 set(125000) 934.91 ns/op 969.71 ns/op 0.96
Tree 40 250000 toArray() 23.086 ms/op 19.150 ms/op 1.21
Tree 40 250000 iterate all - toArray() + loop 23.252 ms/op 20.397 ms/op 1.14
Tree 40 250000 iterate all - get(i) 77.119 ms/op 74.160 ms/op 1.04
MutableVector 250000 create 10.875 ms/op 11.149 ms/op 0.98
MutableVector 250000 get(125000) 6.6430 ns/op 6.4330 ns/op 1.03
MutableVector 250000 set(125000) 298.51 ns/op 269.88 ns/op 1.11
MutableVector 250000 toArray() 3.9223 ms/op 3.7597 ms/op 1.04
MutableVector 250000 iterate all - toArray() + loop 3.9354 ms/op 4.0087 ms/op 0.98
MutableVector 250000 iterate all - get(i) 1.6700 ms/op 1.6260 ms/op 1.03
Array 250000 create 3.7336 ms/op 3.8892 ms/op 0.96
Array 250000 clone - spread 1.3334 ms/op 1.2317 ms/op 1.08
Array 250000 get(125000) 0.65400 ns/op 0.57500 ns/op 1.14
Array 250000 set(125000) 0.74900 ns/op 0.64600 ns/op 1.16
Array 250000 iterate all - loop 89.894 us/op 89.102 us/op 1.01
effectiveBalanceIncrements clone Uint8Array 300000 36.166 us/op 37.301 us/op 0.97
effectiveBalanceIncrements clone MutableVector 300000 338.00 ns/op 328.00 ns/op 1.03
effectiveBalanceIncrements rw all Uint8Array 300000 170.63 us/op 176.68 us/op 0.97
effectiveBalanceIncrements rw all MutableVector 300000 80.742 ms/op 94.482 ms/op 0.85
phase0 afterProcessEpoch - 250000 vs - 7PWei 116.66 ms/op 122.09 ms/op 0.96
phase0 beforeProcessEpoch - 250000 vs - 7PWei 36.616 ms/op 43.677 ms/op 0.84
altair processEpoch - mainnet_e81889 327.11 ms/op 327.11 ms/op 1.00
mainnet_e81889 - altair beforeProcessEpoch 68.072 ms/op 55.296 ms/op 1.23
mainnet_e81889 - altair processJustificationAndFinalization 16.154 us/op 22.000 us/op 0.73
mainnet_e81889 - altair processInactivityUpdates 6.2625 ms/op 7.1660 ms/op 0.87
mainnet_e81889 - altair processRewardsAndPenalties 66.466 ms/op 74.015 ms/op 0.90
mainnet_e81889 - altair processRegistryUpdates 2.9860 us/op 3.3490 us/op 0.89
mainnet_e81889 - altair processSlashings 479.00 ns/op 716.00 ns/op 0.67
mainnet_e81889 - altair processEth1DataReset 514.00 ns/op 617.00 ns/op 0.83
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2763 ms/op 1.3497 ms/op 0.95
mainnet_e81889 - altair processSlashingsReset 4.0290 us/op 5.4340 us/op 0.74
mainnet_e81889 - altair processRandaoMixesReset 5.4450 us/op 7.4600 us/op 0.73
mainnet_e81889 - altair processHistoricalRootsUpdate 630.00 ns/op 1.1890 us/op 0.53
mainnet_e81889 - altair processParticipationFlagUpdates 3.9160 us/op 2.5220 us/op 1.55
mainnet_e81889 - altair processSyncCommitteeUpdates 483.00 ns/op 677.00 ns/op 0.71
mainnet_e81889 - altair afterProcessEpoch 127.70 ms/op 131.79 ms/op 0.97
phase0 processEpoch - mainnet_e58758 333.91 ms/op 362.26 ms/op 0.92
mainnet_e58758 - phase0 beforeProcessEpoch 110.87 ms/op 131.00 ms/op 0.85
mainnet_e58758 - phase0 processJustificationAndFinalization 16.365 us/op 19.038 us/op 0.86
mainnet_e58758 - phase0 processRewardsAndPenalties 54.950 ms/op 56.895 ms/op 0.97
mainnet_e58758 - phase0 processRegistryUpdates 7.8900 us/op 11.314 us/op 0.70
mainnet_e58758 - phase0 processSlashings 559.00 ns/op 792.00 ns/op 0.71
mainnet_e58758 - phase0 processEth1DataReset 539.00 ns/op 562.00 ns/op 0.96
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0107 ms/op 1.0964 ms/op 0.92
mainnet_e58758 - phase0 processSlashingsReset 3.8900 us/op 5.8590 us/op 0.66
mainnet_e58758 - phase0 processRandaoMixesReset 4.5830 us/op 14.056 us/op 0.33
mainnet_e58758 - phase0 processHistoricalRootsUpdate 673.00 ns/op 946.00 ns/op 0.71
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.1800 us/op 5.8840 us/op 0.71
mainnet_e58758 - phase0 afterProcessEpoch 98.320 ms/op 99.194 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2641 ms/op 1.3049 ms/op 0.97
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5680 ms/op 1.6107 ms/op 0.97
altair processInactivityUpdates - 250000 normalcase 22.669 ms/op 28.739 ms/op 0.79
altair processInactivityUpdates - 250000 worstcase 19.757 ms/op 27.249 ms/op 0.73
phase0 processRegistryUpdates - 250000 normalcase 7.0130 us/op 8.0210 us/op 0.87
phase0 processRegistryUpdates - 250000 badcase_full_deposits 258.00 us/op 293.42 us/op 0.88
phase0 processRegistryUpdates - 250000 worstcase 0.5 122.90 ms/op 130.15 ms/op 0.94
altair processRewardsAndPenalties - 250000 normalcase 47.603 ms/op 70.816 ms/op 0.67
altair processRewardsAndPenalties - 250000 worstcase 60.144 ms/op 69.181 ms/op 0.87
phase0 getAttestationDeltas - 250000 normalcase 6.7936 ms/op 7.3144 ms/op 0.93
phase0 getAttestationDeltas - 250000 worstcase 6.9620 ms/op 7.3269 ms/op 0.95
phase0 processSlashings - 250000 worstcase 3.6628 ms/op 3.5365 ms/op 1.04
altair processSyncCommitteeUpdates - 250000 181.41 ms/op 193.02 ms/op 0.94
BeaconState.hashTreeRoot - No change 287.00 ns/op 273.00 ns/op 1.05
BeaconState.hashTreeRoot - 1 full validator 52.948 us/op 53.394 us/op 0.99
BeaconState.hashTreeRoot - 32 full validator 530.94 us/op 539.49 us/op 0.98
BeaconState.hashTreeRoot - 512 full validator 5.6739 ms/op 5.3724 ms/op 1.06
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 66.389 us/op 62.340 us/op 1.06
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 928.42 us/op 928.12 us/op 1.00
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 11.831 ms/op 12.484 ms/op 0.95
BeaconState.hashTreeRoot - 1 balances 48.771 us/op 52.162 us/op 0.93
BeaconState.hashTreeRoot - 32 balances 465.34 us/op 445.41 us/op 1.04
BeaconState.hashTreeRoot - 512 balances 4.6321 ms/op 4.6729 ms/op 0.99
BeaconState.hashTreeRoot - 250000 balances 80.673 ms/op 71.098 ms/op 1.13
aggregationBits - 2048 els - zipIndexesInBitList 16.631 us/op 15.820 us/op 1.05
regular array get 100000 times 33.839 us/op 34.410 us/op 0.98
wrappedArray get 100000 times 34.072 us/op 32.984 us/op 1.03
arrayWithProxy get 100000 times 16.569 ms/op 16.923 ms/op 0.98
ssz.Root.equals 586.00 ns/op 579.00 ns/op 1.01
byteArrayEquals 576.00 ns/op 567.00 ns/op 1.02
shuffle list - 16384 els 7.1325 ms/op 7.3034 ms/op 0.98
shuffle list - 250000 els 102.66 ms/op 104.74 ms/op 0.98
processSlot - 1 slots 8.6850 us/op 9.3840 us/op 0.93
processSlot - 32 slots 1.4043 ms/op 1.4516 ms/op 0.97
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 32.784 ms/op 36.780 ms/op 0.89
getCommitteeAssignments - req 1 vs - 250000 vc 3.0068 ms/op 2.9790 ms/op 1.01
getCommitteeAssignments - req 100 vs - 250000 vc 4.2122 ms/op 4.2250 ms/op 1.00
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5507 ms/op 4.6470 ms/op 0.98
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.8200 ns/op 5.0300 ns/op 0.96
state getBlockRootAtSlot - 250000 vs - 7PWei 914.48 ns/op 675.78 ns/op 1.35
computeProposers - vc 250000 12.455 ms/op 11.277 ms/op 1.10
computeEpochShuffling - vc 250000 106.88 ms/op 112.91 ms/op 0.95
getNextSyncCommittee - vc 250000 192.16 ms/op 190.92 ms/op 1.01
computeSigningRoot for AttestationData 14.371 us/op 14.883 us/op 0.97
hash AttestationData serialized data then Buffer.toString(base64) 2.5948 us/op 2.6264 us/op 0.99
toHexString serialized data 1.3465 us/op 1.2541 us/op 1.07
Buffer.toString(base64) 396.50 ns/op 371.75 ns/op 1.07

by benchmarkbot/action

@twoeths twoeths marked this pull request as ready for review April 27, 2023 22:22
@twoeths twoeths requested a review from a team as a code owner April 27, 2023 22:22
Copy link
Contributor

@dapplion dapplion left a comment

Choose a reason for hiding this comment

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

Chatted offline for rationale, let's merge for now temporarily while Lodestar attestation process queue is optimized to handle full mainnet traffic. Then revert to spec value

@twoeths twoeths merged commit 4981f5e into unstable May 1, 2023
@twoeths twoeths deleted the tuyen/gossipsubDHigh branch May 1, 2023 04:31
@wemeetagain
Copy link
Member

🎉 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.

3 participants