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

Revert "Pull gossip queues for better throughput (#5195)" #5305

Merged
merged 1 commit into from
Mar 27, 2023

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Mar 27, 2023

This reverts commit f03f911.

Motivation

v1.7.0-rc.0 has same issue to v1.6.0-rc.0 (check #5247)

Description

@twoeths twoeths requested a review from a team as a code owner March 27, 2023 07:46
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 6082cfc Previous: 358b9e0 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 955.33 us/op 802.63 us/op 1.19
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 55.032 us/op 43.793 us/op 1.26
BLS verify - blst-native 1.3455 ms/op 1.1669 ms/op 1.15
BLS verifyMultipleSignatures 3 - blst-native 2.7109 ms/op 2.3730 ms/op 1.14
BLS verifyMultipleSignatures 8 - blst-native 5.7284 ms/op 5.1014 ms/op 1.12
BLS verifyMultipleSignatures 32 - blst-native 19.974 ms/op 18.421 ms/op 1.08
BLS aggregatePubkeys 32 - blst-native 26.754 us/op 24.656 us/op 1.09
BLS aggregatePubkeys 128 - blst-native 105.84 us/op 96.252 us/op 1.10
getAttestationsForBlock 56.605 ms/op 51.296 ms/op 1.10
isKnown best case - 1 super set check 266.00 ns/op 248.00 ns/op 1.07
isKnown normal case - 2 super set checks 255.00 ns/op 246.00 ns/op 1.04
isKnown worse case - 16 super set checks 252.00 ns/op 244.00 ns/op 1.03
CheckpointStateCache - add get delete 6.0760 us/op 4.7230 us/op 1.29
validate gossip signedAggregateAndProof - struct 3.0655 ms/op 2.6616 ms/op 1.15
validate gossip attestation - struct 1.4196 ms/op 1.2762 ms/op 1.11
pickEth1Vote - no votes 1.3770 ms/op 1.1864 ms/op 1.16
pickEth1Vote - max votes 10.691 ms/op 11.440 ms/op 0.93
pickEth1Vote - Eth1Data hashTreeRoot value x2048 9.0880 ms/op 8.5610 ms/op 1.06
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 15.722 ms/op 12.598 ms/op 1.25
pickEth1Vote - Eth1Data fastSerialize value x2048 714.35 us/op 620.35 us/op 1.15
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.2180 ms/op 7.8305 ms/op 0.67
bytes32 toHexString 548.00 ns/op 483.00 ns/op 1.13
bytes32 Buffer.toString(hex) 367.00 ns/op 339.00 ns/op 1.08
bytes32 Buffer.toString(hex) from Uint8Array 579.00 ns/op 541.00 ns/op 1.07
bytes32 Buffer.toString(hex) + 0x 393.00 ns/op 347.00 ns/op 1.13
Object access 1 prop 0.16300 ns/op 0.16500 ns/op 0.99
Map access 1 prop 0.15800 ns/op 0.16300 ns/op 0.97
Object get x1000 7.2110 ns/op 6.4590 ns/op 1.12
Map get x1000 0.55600 ns/op 0.59700 ns/op 0.93
Object set x1000 55.399 ns/op 49.770 ns/op 1.11
Map set x1000 48.213 ns/op 43.192 ns/op 1.12
Return object 10000 times 0.25070 ns/op 0.22910 ns/op 1.09
Throw Error 10000 times 4.2684 us/op 4.0732 us/op 1.05
fastMsgIdFn sha256 / 200 bytes 3.6420 us/op 3.3420 us/op 1.09
fastMsgIdFn h32 xxhash / 200 bytes 307.00 ns/op 276.00 ns/op 1.11
fastMsgIdFn h64 xxhash / 200 bytes 464.00 ns/op 376.00 ns/op 1.23
fastMsgIdFn sha256 / 1000 bytes 11.982 us/op 11.240 us/op 1.07
fastMsgIdFn h32 xxhash / 1000 bytes 431.00 ns/op 398.00 ns/op 1.08
fastMsgIdFn h64 xxhash / 1000 bytes 524.00 ns/op 449.00 ns/op 1.17
fastMsgIdFn sha256 / 10000 bytes 106.90 us/op 100.83 us/op 1.06
fastMsgIdFn h32 xxhash / 10000 bytes 1.9990 us/op 1.8350 us/op 1.09
fastMsgIdFn h64 xxhash / 10000 bytes 1.4710 us/op 1.2860 us/op 1.14
enrSubnets - fastDeserialize 64 bits 1.3860 us/op 1.2510 us/op 1.11
enrSubnets - ssz BitVector 64 bits 506.00 ns/op 484.00 ns/op 1.05
enrSubnets - fastDeserialize 4 bits 184.00 ns/op 173.00 ns/op 1.06
enrSubnets - ssz BitVector 4 bits 526.00 ns/op 485.00 ns/op 1.08
prioritizePeers score -10:0 att 32-0.1 sync 2-0 114.81 us/op 106.35 us/op 1.08
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 160.57 us/op 132.43 us/op 1.21
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 199.78 us/op 166.71 us/op 1.20
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 366.98 us/op 301.36 us/op 1.22
prioritizePeers score 0:0 att 64-1 sync 4-1 413.56 us/op 366.55 us/op 1.13
array of 16000 items push then shift 1.7117 us/op 1.6248 us/op 1.05
LinkedList of 16000 items push then shift 9.2810 ns/op 8.8510 ns/op 1.05
array of 16000 items push then pop 119.00 ns/op 77.499 ns/op 1.54
LinkedList of 16000 items push then pop 9.0390 ns/op 8.1100 ns/op 1.11
array of 24000 items push then shift 2.4408 us/op 2.2506 us/op 1.08
LinkedList of 24000 items push then shift 9.2630 ns/op 8.3400 ns/op 1.11
array of 24000 items push then pop 85.915 ns/op 73.539 ns/op 1.17
LinkedList of 24000 items push then pop 8.9410 ns/op 8.2640 ns/op 1.08
intersect bitArray bitLen 8 13.824 ns/op 13.278 ns/op 1.04
intersect array and set length 8 88.516 ns/op 75.373 ns/op 1.17
intersect bitArray bitLen 128 45.873 ns/op 43.026 ns/op 1.07
intersect array and set length 128 1.2392 us/op 1.0237 us/op 1.21
Buffer.concat 32 items 2.8650 us/op 2.7560 us/op 1.04
Uint8Array.set 32 items 2.3750 us/op 2.8270 us/op 0.84
pass gossip attestations to forkchoice per slot 4.0841 ms/op 2.4449 ms/op 1.67
computeDeltas 3.0918 ms/op 2.8242 ms/op 1.09
computeProposerBoostScoreFromBalances 1.8252 ms/op 1.7790 ms/op 1.03
altair processAttestation - 250000 vs - 7PWei normalcase 3.1030 ms/op 2.0323 ms/op 1.53
altair processAttestation - 250000 vs - 7PWei worstcase 4.2939 ms/op 3.1499 ms/op 1.36
altair processAttestation - setStatus - 1/6 committees join 145.48 us/op 138.18 us/op 1.05
altair processAttestation - setStatus - 1/3 committees join 294.02 us/op 272.39 us/op 1.08
altair processAttestation - setStatus - 1/2 committees join 387.40 us/op 365.14 us/op 1.06
altair processAttestation - setStatus - 2/3 committees join 488.69 us/op 445.71 us/op 1.10
altair processAttestation - setStatus - 4/5 committees join 677.64 us/op 646.66 us/op 1.05
altair processAttestation - setStatus - 100% committees join 786.24 us/op 727.97 us/op 1.08
altair processBlock - 250000 vs - 7PWei normalcase 20.019 ms/op 18.456 ms/op 1.08
altair processBlock - 250000 vs - 7PWei normalcase hashState 27.654 ms/op 25.221 ms/op 1.10
altair processBlock - 250000 vs - 7PWei worstcase 56.089 ms/op 51.667 ms/op 1.09
altair processBlock - 250000 vs - 7PWei worstcase hashState 74.019 ms/op 67.758 ms/op 1.09
phase0 processBlock - 250000 vs - 7PWei normalcase 2.5259 ms/op 1.9420 ms/op 1.30
phase0 processBlock - 250000 vs - 7PWei worstcase 33.708 ms/op 27.958 ms/op 1.21
altair processEth1Data - 250000 vs - 7PWei normalcase 593.34 us/op 457.66 us/op 1.30
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 7.5910 us/op 6.6880 us/op 1.14
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 24.039 us/op 19.415 us/op 1.24
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 10.216 us/op 8.5810 us/op 1.19
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 8.0900 us/op 6.3410 us/op 1.28
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 102.41 us/op 74.715 us/op 1.37
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 708.85 us/op 612.15 us/op 1.16
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 16384 951.46 us/op 902.92 us/op 1.05
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 16384 944.85 us/op 912.39 us/op 1.04
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 16384 2.9253 ms/op 2.2769 ms/op 1.28
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 16384 1.6756 ms/op 1.4613 ms/op 1.15
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 16384 4.3410 ms/op 3.5228 ms/op 1.23
Tree 40 250000 create 393.51 ms/op 316.55 ms/op 1.24
Tree 40 250000 get(125000) 205.21 ns/op 185.04 ns/op 1.11
Tree 40 250000 set(125000) 1.1852 us/op 909.88 ns/op 1.30
Tree 40 250000 toArray() 23.439 ms/op 16.878 ms/op 1.39
Tree 40 250000 iterate all - toArray() + loop 23.674 ms/op 16.803 ms/op 1.41
Tree 40 250000 iterate all - get(i) 81.690 ms/op 66.781 ms/op 1.22
MutableVector 250000 create 11.954 ms/op 9.1913 ms/op 1.30
MutableVector 250000 get(125000) 7.0390 ns/op 6.3550 ns/op 1.11
MutableVector 250000 set(125000) 292.89 ns/op 255.66 ns/op 1.15
MutableVector 250000 toArray() 3.7501 ms/op 2.6966 ms/op 1.39
MutableVector 250000 iterate all - toArray() + loop 3.8383 ms/op 2.8467 ms/op 1.35
MutableVector 250000 iterate all - get(i) 1.5971 ms/op 1.5241 ms/op 1.05
Array 250000 create 3.5150 ms/op 2.5164 ms/op 1.40
Array 250000 clone - spread 1.2997 ms/op 1.2687 ms/op 1.02
Array 250000 get(125000) 0.65600 ns/op 0.62100 ns/op 1.06
Array 250000 set(125000) 0.73100 ns/op 0.69500 ns/op 1.05
Array 250000 iterate all - loop 88.283 us/op 109.03 us/op 0.81
effectiveBalanceIncrements clone Uint8Array 300000 47.537 us/op 28.010 us/op 1.70
effectiveBalanceIncrements clone MutableVector 300000 413.00 ns/op 418.00 ns/op 0.99
effectiveBalanceIncrements rw all Uint8Array 300000 182.08 us/op 168.01 us/op 1.08
effectiveBalanceIncrements rw all MutableVector 300000 97.536 ms/op 83.114 ms/op 1.17
phase0 afterProcessEpoch - 250000 vs - 7PWei 120.80 ms/op 108.85 ms/op 1.11
phase0 beforeProcessEpoch - 250000 vs - 7PWei 40.683 ms/op 33.544 ms/op 1.21
altair processEpoch - mainnet_e81889 331.37 ms/op 296.98 ms/op 1.12
mainnet_e81889 - altair beforeProcessEpoch 57.356 ms/op 61.321 ms/op 0.94
mainnet_e81889 - altair processJustificationAndFinalization 19.489 us/op 17.159 us/op 1.14
mainnet_e81889 - altair processInactivityUpdates 6.2599 ms/op 5.3121 ms/op 1.18
mainnet_e81889 - altair processRewardsAndPenalties 72.594 ms/op 68.066 ms/op 1.07
mainnet_e81889 - altair processRegistryUpdates 2.7430 us/op 2.7570 us/op 0.99
mainnet_e81889 - altair processSlashings 517.00 ns/op 619.00 ns/op 0.84
mainnet_e81889 - altair processEth1DataReset 607.00 ns/op 652.00 ns/op 0.93
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4263 ms/op 1.2000 ms/op 1.19
mainnet_e81889 - altair processSlashingsReset 4.7410 us/op 4.6290 us/op 1.02
mainnet_e81889 - altair processRandaoMixesReset 9.5250 us/op 4.6240 us/op 2.06
mainnet_e81889 - altair processHistoricalRootsUpdate 1.0760 us/op 672.00 ns/op 1.60
mainnet_e81889 - altair processParticipationFlagUpdates 3.8720 us/op 2.0560 us/op 1.88
mainnet_e81889 - altair processSyncCommitteeUpdates 1.1600 us/op 921.00 ns/op 1.26
mainnet_e81889 - altair afterProcessEpoch 145.00 ms/op 117.05 ms/op 1.24
phase0 processEpoch - mainnet_e58758 427.39 ms/op 359.29 ms/op 1.19
mainnet_e58758 - phase0 beforeProcessEpoch 147.75 ms/op 128.45 ms/op 1.15
mainnet_e58758 - phase0 processJustificationAndFinalization 18.292 us/op 16.739 us/op 1.09
mainnet_e58758 - phase0 processRewardsAndPenalties 69.265 ms/op 64.207 ms/op 1.08
mainnet_e58758 - phase0 processRegistryUpdates 11.460 us/op 8.1620 us/op 1.40
mainnet_e58758 - phase0 processSlashings 624.00 ns/op 529.00 ns/op 1.18
mainnet_e58758 - phase0 processEth1DataReset 548.00 ns/op 552.00 ns/op 0.99
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.0590 ms/op 949.15 us/op 2.17
mainnet_e58758 - phase0 processSlashingsReset 4.6860 us/op 3.6640 us/op 1.28
mainnet_e58758 - phase0 processRandaoMixesReset 5.3970 us/op 4.4320 us/op 1.22
mainnet_e58758 - phase0 processHistoricalRootsUpdate 620.00 ns/op 664.00 ns/op 0.93
mainnet_e58758 - phase0 processParticipationRecordUpdates 9.8230 us/op 4.0560 us/op 2.42
mainnet_e58758 - phase0 afterProcessEpoch 114.17 ms/op 93.201 ms/op 1.22
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3947 ms/op 1.1891 ms/op 1.17
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.6995 ms/op 1.4474 ms/op 1.17
altair processInactivityUpdates - 250000 normalcase 25.274 ms/op 18.568 ms/op 1.36
altair processInactivityUpdates - 250000 worstcase 28.493 ms/op 24.328 ms/op 1.17
phase0 processRegistryUpdates - 250000 normalcase 7.9700 us/op 6.8240 us/op 1.17
phase0 processRegistryUpdates - 250000 badcase_full_deposits 287.67 us/op 235.31 us/op 1.22
phase0 processRegistryUpdates - 250000 worstcase 0.5 129.70 ms/op 126.70 ms/op 1.02
altair processRewardsAndPenalties - 250000 normalcase 73.284 ms/op 65.120 ms/op 1.13
altair processRewardsAndPenalties - 250000 worstcase 78.115 ms/op 70.039 ms/op 1.12
phase0 getAttestationDeltas - 250000 normalcase 9.5530 ms/op 6.3844 ms/op 1.50
phase0 getAttestationDeltas - 250000 worstcase 9.3418 ms/op 6.4737 ms/op 1.44
phase0 processSlashings - 250000 worstcase 3.9454 ms/op 3.2262 ms/op 1.22
altair processSyncCommitteeUpdates - 250000 214.32 ms/op 171.26 ms/op 1.25
BeaconState.hashTreeRoot - No change 290.00 ns/op 334.00 ns/op 0.87
BeaconState.hashTreeRoot - 1 full validator 54.898 us/op 51.944 us/op 1.06
BeaconState.hashTreeRoot - 32 full validator 589.28 us/op 533.79 us/op 1.10
BeaconState.hashTreeRoot - 512 full validator 5.9652 ms/op 5.0232 ms/op 1.19
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 71.841 us/op 64.689 us/op 1.11
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 957.24 us/op 870.47 us/op 1.10
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 12.083 ms/op 10.888 ms/op 1.11
BeaconState.hashTreeRoot - 1 balances 55.601 us/op 49.222 us/op 1.13
BeaconState.hashTreeRoot - 32 balances 481.72 us/op 445.17 us/op 1.08
BeaconState.hashTreeRoot - 512 balances 4.7814 ms/op 4.2913 ms/op 1.11
BeaconState.hashTreeRoot - 250000 balances 77.824 ms/op 75.251 ms/op 1.03
aggregationBits - 2048 els - zipIndexesInBitList 16.968 us/op 14.973 us/op 1.13
regular array get 100000 times 48.585 us/op 31.807 us/op 1.53
wrappedArray get 100000 times 36.424 us/op 32.067 us/op 1.14
arrayWithProxy get 100000 times 17.784 ms/op 17.686 ms/op 1.01
ssz.Root.equals 583.00 ns/op 544.00 ns/op 1.07
byteArrayEquals 565.00 ns/op 527.00 ns/op 1.07
shuffle list - 16384 els 7.5547 ms/op 6.4408 ms/op 1.17
shuffle list - 250000 els 107.33 ms/op 94.398 ms/op 1.14
processSlot - 1 slots 10.587 us/op 9.0670 us/op 1.17
processSlot - 32 slots 1.4538 ms/op 1.3258 ms/op 1.10
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 38.552 ms/op 37.812 ms/op 1.02
getCommitteeAssignments - req 1 vs - 250000 vc 3.0782 ms/op 2.9068 ms/op 1.06
getCommitteeAssignments - req 100 vs - 250000 vc 4.3797 ms/op 4.1279 ms/op 1.06
getCommitteeAssignments - req 1000 vs - 250000 vc 4.9608 ms/op 4.4956 ms/op 1.10
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.9300 ns/op 4.6400 ns/op 1.06
state getBlockRootAtSlot - 250000 vs - 7PWei 670.06 ns/op 764.92 ns/op 0.88
computeProposers - vc 250000 11.173 ms/op 9.8933 ms/op 1.13
computeEpochShuffling - vc 250000 107.28 ms/op 96.539 ms/op 1.11
getNextSyncCommittee - vc 250000 183.23 ms/op 168.75 ms/op 1.09

by benchmarkbot/action

@nazarhussain
Copy link
Contributor

Reverted to unblock v1.7.0

@twoeths twoeths merged commit b861ab8 into unstable Mar 27, 2023
@twoeths twoeths deleted the tuyen/revert_new_gossip_queues branch March 27, 2023 10:52
twoeths added a commit that referenced this pull request Mar 27, 2023
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.7.0 🎉

twoeths added a commit that referenced this pull request Apr 7, 2023
wemeetagain pushed a commit that referenced this pull request Apr 7, 2023
@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