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

feat: set network.useWorker to false by default #5600

Merged
merged 1 commit into from
Jun 1, 2023

Conversation

wemeetagain
Copy link
Member

Motivation

Currently, using the worker thread results in good improvements, but it is not yet stable enough to cut a release.

In order to cut a release in a timely manner, we want to temporarily disable this feature by default.

Description

Set network.useWorker to false by default

@wemeetagain wemeetagain requested a review from a team as a code owner June 1, 2023 14:48
@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: fa66332 Previous: 51002d3 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 583.73 us/op 789.19 us/op 0.74
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 65.483 us/op 56.520 us/op 1.16
BLS verify - blst-native 1.3101 ms/op 1.3098 ms/op 1.00
BLS verifyMultipleSignatures 3 - blst-native 2.6783 ms/op 2.6545 ms/op 1.01
BLS verifyMultipleSignatures 8 - blst-native 5.7055 ms/op 5.7927 ms/op 0.98
BLS verifyMultipleSignatures 32 - blst-native 20.607 ms/op 21.243 ms/op 0.97
BLS aggregatePubkeys 32 - blst-native 27.552 us/op 27.803 us/op 0.99
BLS aggregatePubkeys 128 - blst-native 108.07 us/op 107.94 us/op 1.00
getAttestationsForBlock 79.140 ms/op 64.439 ms/op 1.23
isKnown best case - 1 super set check 275.00 ns/op 292.00 ns/op 0.94
isKnown normal case - 2 super set checks 278.00 ns/op 292.00 ns/op 0.95
isKnown worse case - 16 super set checks 287.00 ns/op 273.00 ns/op 1.05
CheckpointStateCache - add get delete 6.3530 us/op 6.3700 us/op 1.00
validate gossip signedAggregateAndProof - struct 3.1187 ms/op 3.1033 ms/op 1.00
validate gossip attestation - struct 1.4906 ms/op 1.4537 ms/op 1.03
pickEth1Vote - no votes 1.4682 ms/op 1.5117 ms/op 0.97
pickEth1Vote - max votes 12.041 ms/op 12.122 ms/op 0.99
pickEth1Vote - Eth1Data hashTreeRoot value x2048 11.098 ms/op 10.404 ms/op 1.07
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 17.220 ms/op 18.319 ms/op 0.94
pickEth1Vote - Eth1Data fastSerialize value x2048 768.18 us/op 799.69 us/op 0.96
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.9026 ms/op 6.3360 ms/op 0.93
bytes32 toHexString 553.00 ns/op 715.00 ns/op 0.77
bytes32 Buffer.toString(hex) 426.00 ns/op 455.00 ns/op 0.94
bytes32 Buffer.toString(hex) from Uint8Array 662.00 ns/op 674.00 ns/op 0.98
bytes32 Buffer.toString(hex) + 0x 420.00 ns/op 472.00 ns/op 0.89
Object access 1 prop 0.17600 ns/op 0.21600 ns/op 0.81
Map access 1 prop 0.17300 ns/op 0.18500 ns/op 0.94
Object get x1000 7.4080 ns/op 7.7060 ns/op 0.96
Map get x1000 0.61200 ns/op 0.71900 ns/op 0.85
Object set x1000 58.534 ns/op 79.064 ns/op 0.74
Map set x1000 48.030 ns/op 61.502 ns/op 0.78
Return object 10000 times 0.25360 ns/op 0.26840 ns/op 0.94
Throw Error 10000 times 4.3772 us/op 4.7595 us/op 0.92
fastMsgIdFn sha256 / 200 bytes 3.7510 us/op 3.9780 us/op 0.94
fastMsgIdFn h32 xxhash / 200 bytes 345.00 ns/op 343.00 ns/op 1.01
fastMsgIdFn h64 xxhash / 200 bytes 475.00 ns/op 524.00 ns/op 0.91
fastMsgIdFn sha256 / 1000 bytes 12.203 us/op 12.663 us/op 0.96
fastMsgIdFn h32 xxhash / 1000 bytes 459.00 ns/op 486.00 ns/op 0.94
fastMsgIdFn h64 xxhash / 1000 bytes 524.00 ns/op 604.00 ns/op 0.87
fastMsgIdFn sha256 / 10000 bytes 108.17 us/op 112.22 us/op 0.96
fastMsgIdFn h32 xxhash / 10000 bytes 2.0280 us/op 2.1330 us/op 0.95
fastMsgIdFn h64 xxhash / 10000 bytes 1.4930 us/op 1.4990 us/op 1.00
enrSubnets - fastDeserialize 64 bits 1.4000 us/op 1.8790 us/op 0.75
enrSubnets - ssz BitVector 64 bits 604.00 ns/op 645.00 ns/op 0.94
enrSubnets - fastDeserialize 4 bits 230.00 ns/op 219.00 ns/op 1.05
enrSubnets - ssz BitVector 4 bits 640.00 ns/op 711.00 ns/op 0.90
prioritizePeers score -10:0 att 32-0.1 sync 2-0 140.59 us/op 128.34 us/op 1.10
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 167.82 us/op 173.73 us/op 0.97
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 202.50 us/op 204.89 us/op 0.99
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 362.47 us/op 392.80 us/op 0.92
prioritizePeers score 0:0 att 64-1 sync 4-1 459.33 us/op 479.83 us/op 0.96
array of 16000 items push then shift 1.7808 us/op 1.7765 us/op 1.00
LinkedList of 16000 items push then shift 9.7460 ns/op 10.775 ns/op 0.90
array of 16000 items push then pop 120.64 ns/op 129.13 ns/op 0.93
LinkedList of 16000 items push then pop 9.5420 ns/op 11.328 ns/op 0.84
array of 24000 items push then shift 2.5689 us/op 2.7585 us/op 0.93
LinkedList of 24000 items push then shift 9.8150 ns/op 12.556 ns/op 0.78
array of 24000 items push then pop 100.26 ns/op 105.88 ns/op 0.95
LinkedList of 24000 items push then pop 9.6270 ns/op 11.329 ns/op 0.85
intersect bitArray bitLen 8 14.724 ns/op 15.127 ns/op 0.97
intersect array and set length 8 100.53 ns/op 129.73 ns/op 0.77
intersect bitArray bitLen 128 48.209 ns/op 49.488 ns/op 0.97
intersect array and set length 128 1.2445 us/op 1.5149 us/op 0.82
Buffer.concat 32 items 3.2580 us/op 3.5120 us/op 0.93
Uint8Array.set 32 items 2.3620 us/op 3.4450 us/op 0.69
transfer serialized Status (84 B) 2.1830 us/op 2.5940 us/op 0.84
copy serialized Status (84 B) 1.7870 us/op 2.0880 us/op 0.86
transfer serialized SignedVoluntaryExit (112 B) 2.4270 us/op 2.7110 us/op 0.90
copy serialized SignedVoluntaryExit (112 B) 1.9160 us/op 2.2820 us/op 0.84
transfer serialized ProposerSlashing (416 B) 2.5700 us/op 3.1530 us/op 0.82
copy serialized ProposerSlashing (416 B) 2.3500 us/op 2.7940 us/op 0.84
transfer serialized Attestation (485 B) 2.5600 us/op 2.8110 us/op 0.91
copy serialized Attestation (485 B) 2.5840 us/op 3.2400 us/op 0.80
transfer serialized AttesterSlashing (33232 B) 2.6860 us/op 3.6790 us/op 0.73
copy serialized AttesterSlashing (33232 B) 9.4420 us/op 12.154 us/op 0.78
transfer serialized Small SignedBeaconBlock (128000 B) 3.7950 us/op 4.1250 us/op 0.92
copy serialized Small SignedBeaconBlock (128000 B) 25.583 us/op 43.781 us/op 0.58
transfer serialized Avg SignedBeaconBlock (200000 B) 3.8680 us/op 4.6090 us/op 0.84
copy serialized Avg SignedBeaconBlock (200000 B) 77.337 us/op 41.217 us/op 1.88
transfer serialized BlobsSidecar (524380 B) 3.8550 us/op 4.6200 us/op 0.83
copy serialized BlobsSidecar (524380 B) 207.16 us/op 229.44 us/op 0.90
transfer serialized Big SignedBeaconBlock (1000000 B) 3.9270 us/op 4.5710 us/op 0.86
copy serialized Big SignedBeaconBlock (1000000 B) 369.16 us/op 373.04 us/op 0.99
pass gossip attestations to forkchoice per slot 2.8289 ms/op 3.0916 ms/op 0.92
forkChoice updateHead vc 100000 bc 64 eq 0 2.3288 ms/op 2.3168 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 0 13.276 ms/op 13.242 ms/op 1.00
forkChoice updateHead vc 1000000 bc 64 eq 0 25.889 ms/op 23.734 ms/op 1.09
forkChoice updateHead vc 600000 bc 320 eq 0 18.720 ms/op 18.427 ms/op 1.02
forkChoice updateHead vc 600000 bc 1200 eq 0 99.840 ms/op 95.477 ms/op 1.05
forkChoice updateHead vc 600000 bc 64 eq 1000 22.745 ms/op 23.426 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 10000 26.047 ms/op 24.989 ms/op 1.04
forkChoice updateHead vc 600000 bc 64 eq 300000 61.439 ms/op 51.573 ms/op 1.19
computeDeltas 3.6758 ms/op 3.3141 ms/op 1.11
computeProposerBoostScoreFromBalances 1.9167 ms/op 1.9094 ms/op 1.00
altair processAttestation - 250000 vs - 7PWei normalcase 3.6149 ms/op 4.0499 ms/op 0.89
altair processAttestation - 250000 vs - 7PWei worstcase 4.4924 ms/op 4.8762 ms/op 0.92
altair processAttestation - setStatus - 1/6 committees join 154.41 us/op 152.10 us/op 1.02
altair processAttestation - setStatus - 1/3 committees join 292.17 us/op 296.60 us/op 0.99
altair processAttestation - setStatus - 1/2 committees join 391.45 us/op 395.69 us/op 0.99
altair processAttestation - setStatus - 2/3 committees join 487.85 us/op 502.67 us/op 0.97
altair processAttestation - setStatus - 4/5 committees join 705.96 us/op 716.20 us/op 0.99
altair processAttestation - setStatus - 100% committees join 840.63 us/op 845.42 us/op 0.99
altair processBlock - 250000 vs - 7PWei normalcase 19.106 ms/op 21.274 ms/op 0.90
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.342 ms/op 29.208 ms/op 1.00
altair processBlock - 250000 vs - 7PWei worstcase 57.096 ms/op 57.379 ms/op 1.00
altair processBlock - 250000 vs - 7PWei worstcase hashState 75.624 ms/op 76.368 ms/op 0.99
phase0 processBlock - 250000 vs - 7PWei normalcase 2.0938 ms/op 3.0085 ms/op 0.70
phase0 processBlock - 250000 vs - 7PWei worstcase 29.921 ms/op 35.004 ms/op 0.85
altair processEth1Data - 250000 vs - 7PWei normalcase 482.95 us/op 681.02 us/op 0.71
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 8.4400 us/op 9.8420 us/op 0.86
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 27.695 us/op 35.471 us/op 0.78
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 11.181 us/op 15.203 us/op 0.74
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 8.0620 us/op 13.457 us/op 0.60
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 107.39 us/op 117.99 us/op 0.91
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 666.22 us/op 725.98 us/op 0.92
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 937.78 us/op 940.93 us/op 1.00
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 925.31 us/op 954.28 us/op 0.97
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.4181 ms/op 3.0619 ms/op 0.79
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.6890 ms/op 1.8000 ms/op 0.94
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.3358 ms/op 5.0851 ms/op 0.85
Tree 40 250000 create 384.44 ms/op 542.26 ms/op 0.71
Tree 40 250000 get(125000) 206.69 ns/op 212.03 ns/op 0.97
Tree 40 250000 set(125000) 1.1028 us/op 1.1545 us/op 0.96
Tree 40 250000 toArray() 22.785 ms/op 24.538 ms/op 0.93
Tree 40 250000 iterate all - toArray() + loop 24.207 ms/op 24.959 ms/op 0.97
Tree 40 250000 iterate all - get(i) 79.744 ms/op 80.138 ms/op 1.00
MutableVector 250000 create 12.924 ms/op 12.155 ms/op 1.06
MutableVector 250000 get(125000) 6.9360 ns/op 6.9980 ns/op 0.99
MutableVector 250000 set(125000) 396.93 ns/op 339.26 ns/op 1.17
MutableVector 250000 toArray() 4.0262 ms/op 3.9845 ms/op 1.01
MutableVector 250000 iterate all - toArray() + loop 3.7021 ms/op 4.2652 ms/op 0.87
MutableVector 250000 iterate all - get(i) 1.6409 ms/op 2.7826 ms/op 0.59
Array 250000 create 3.5746 ms/op 3.9583 ms/op 0.90
Array 250000 clone - spread 1.1868 ms/op 1.5557 ms/op 0.76
Array 250000 get(125000) 0.60500 ns/op 0.75200 ns/op 0.80
Array 250000 set(125000) 0.68200 ns/op 0.79500 ns/op 0.86
Array 250000 iterate all - loop 88.339 us/op 107.21 us/op 0.82
effectiveBalanceIncrements clone Uint8Array 300000 50.440 us/op 62.769 us/op 0.80
effectiveBalanceIncrements clone MutableVector 300000 359.00 ns/op 469.00 ns/op 0.77
effectiveBalanceIncrements rw all Uint8Array 300000 183.53 us/op 186.37 us/op 0.98
effectiveBalanceIncrements rw all MutableVector 300000 97.520 ms/op 113.19 ms/op 0.86
phase0 afterProcessEpoch - 250000 vs - 7PWei 126.63 ms/op 125.95 ms/op 1.01
phase0 beforeProcessEpoch - 250000 vs - 7PWei 53.459 ms/op 41.025 ms/op 1.30
altair processEpoch - mainnet_e81889 403.26 ms/op 381.05 ms/op 1.06
mainnet_e81889 - altair beforeProcessEpoch 86.822 ms/op 70.724 ms/op 1.23
mainnet_e81889 - altair processJustificationAndFinalization 22.297 us/op 17.718 us/op 1.26
mainnet_e81889 - altair processInactivityUpdates 7.1700 ms/op 6.8374 ms/op 1.05
mainnet_e81889 - altair processRewardsAndPenalties 60.141 ms/op 66.200 ms/op 0.91
mainnet_e81889 - altair processRegistryUpdates 5.3260 us/op 3.3050 us/op 1.61
mainnet_e81889 - altair processSlashings 798.00 ns/op 689.00 ns/op 1.16
mainnet_e81889 - altair processEth1DataReset 752.00 ns/op 499.00 ns/op 1.51
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4894 ms/op 1.3256 ms/op 1.12
mainnet_e81889 - altair processSlashingsReset 8.9140 us/op 5.8700 us/op 1.52
mainnet_e81889 - altair processRandaoMixesReset 13.031 us/op 4.3170 us/op 3.02
mainnet_e81889 - altair processHistoricalRootsUpdate 1.2720 us/op 955.00 ns/op 1.33
mainnet_e81889 - altair processParticipationFlagUpdates 2.7940 us/op 2.6040 us/op 1.07
mainnet_e81889 - altair processSyncCommitteeUpdates 870.00 ns/op 619.00 ns/op 1.41
mainnet_e81889 - altair afterProcessEpoch 145.38 ms/op 129.48 ms/op 1.12
phase0 processEpoch - mainnet_e58758 419.97 ms/op 351.13 ms/op 1.20
mainnet_e58758 - phase0 beforeProcessEpoch 177.47 ms/op 145.94 ms/op 1.22
mainnet_e58758 - phase0 processJustificationAndFinalization 31.998 us/op 22.197 us/op 1.44
mainnet_e58758 - phase0 processRewardsAndPenalties 72.577 ms/op 64.351 ms/op 1.13
mainnet_e58758 - phase0 processRegistryUpdates 12.444 us/op 8.0540 us/op 1.55
mainnet_e58758 - phase0 processSlashings 687.00 ns/op 490.00 ns/op 1.40
mainnet_e58758 - phase0 processEth1DataReset 653.00 ns/op 516.00 ns/op 1.27
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0841 ms/op 1.1936 ms/op 0.91
mainnet_e58758 - phase0 processSlashingsReset 4.9020 us/op 4.4890 us/op 1.09
mainnet_e58758 - phase0 processRandaoMixesReset 7.8970 us/op 5.0040 us/op 1.58
mainnet_e58758 - phase0 processHistoricalRootsUpdate 867.00 ns/op 707.00 ns/op 1.23
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.1970 us/op 4.0620 us/op 1.28
mainnet_e58758 - phase0 afterProcessEpoch 107.64 ms/op 102.08 ms/op 1.05
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.4219 ms/op 1.2958 ms/op 1.10
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.1935 ms/op 1.6446 ms/op 1.33
altair processInactivityUpdates - 250000 normalcase 30.899 ms/op 22.868 ms/op 1.35
altair processInactivityUpdates - 250000 worstcase 32.283 ms/op 26.795 ms/op 1.20
phase0 processRegistryUpdates - 250000 normalcase 16.982 us/op 8.8360 us/op 1.92
phase0 processRegistryUpdates - 250000 badcase_full_deposits 504.88 us/op 320.07 us/op 1.58
phase0 processRegistryUpdates - 250000 worstcase 0.5 195.93 ms/op 139.28 ms/op 1.41
altair processRewardsAndPenalties - 250000 normalcase 88.053 ms/op 70.002 ms/op 1.26
altair processRewardsAndPenalties - 250000 worstcase 82.568 ms/op 71.568 ms/op 1.15
phase0 getAttestationDeltas - 250000 normalcase 11.199 ms/op 8.1420 ms/op 1.38
phase0 getAttestationDeltas - 250000 worstcase 12.746 ms/op 8.2009 ms/op 1.55
phase0 processSlashings - 250000 worstcase 6.1294 ms/op 3.9382 ms/op 1.56
altair processSyncCommitteeUpdates - 250000 216.25 ms/op 198.59 ms/op 1.09
BeaconState.hashTreeRoot - No change 340.00 ns/op 289.00 ns/op 1.18
BeaconState.hashTreeRoot - 1 full validator 64.192 us/op 52.975 us/op 1.21
BeaconState.hashTreeRoot - 32 full validator 632.29 us/op 538.52 us/op 1.17
BeaconState.hashTreeRoot - 512 full validator 6.6235 ms/op 5.7799 ms/op 1.15
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 73.289 us/op 64.025 us/op 1.14
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.0399 ms/op 934.89 us/op 1.11
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 18.523 ms/op 13.040 ms/op 1.42
BeaconState.hashTreeRoot - 1 balances 57.603 us/op 52.570 us/op 1.10
BeaconState.hashTreeRoot - 32 balances 593.59 us/op 478.17 us/op 1.24
BeaconState.hashTreeRoot - 512 balances 5.2426 ms/op 4.9204 ms/op 1.07
BeaconState.hashTreeRoot - 250000 balances 87.516 ms/op 76.636 ms/op 1.14
aggregationBits - 2048 els - zipIndexesInBitList 20.781 us/op 19.661 us/op 1.06
regular array get 100000 times 46.663 us/op 34.143 us/op 1.37
wrappedArray get 100000 times 36.019 us/op 36.529 us/op 0.99
arrayWithProxy get 100000 times 18.535 ms/op 16.247 ms/op 1.14
ssz.Root.equals 630.00 ns/op 608.00 ns/op 1.04
byteArrayEquals 622.00 ns/op 604.00 ns/op 1.03
shuffle list - 16384 els 7.5929 ms/op 7.2109 ms/op 1.05
shuffle list - 250000 els 111.07 ms/op 103.76 ms/op 1.07
processSlot - 1 slots 10.297 us/op 9.3230 us/op 1.10
processSlot - 32 slots 1.5559 ms/op 1.4628 ms/op 1.06
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 45.774 ms/op 36.443 ms/op 1.26
getCommitteeAssignments - req 1 vs - 250000 vc 3.4090 ms/op 3.0072 ms/op 1.13
getCommitteeAssignments - req 100 vs - 250000 vc 4.9039 ms/op 4.2795 ms/op 1.15
getCommitteeAssignments - req 1000 vs - 250000 vc 5.7091 ms/op 4.6160 ms/op 1.24
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.1200 ns/op 4.9600 ns/op 1.23
state getBlockRootAtSlot - 250000 vs - 7PWei 1.0009 us/op 931.02 ns/op 1.08
computeProposers - vc 250000 14.056 ms/op 11.500 ms/op 1.22
computeEpochShuffling - vc 250000 124.78 ms/op 111.68 ms/op 1.12
getNextSyncCommittee - vc 250000 238.20 ms/op 184.68 ms/op 1.29
computeSigningRoot for AttestationData 17.678 us/op 13.510 us/op 1.31
hash AttestationData serialized data then Buffer.toString(base64) 3.0820 us/op 2.5670 us/op 1.20
toHexString serialized data 1.6283 us/op 1.1545 us/op 1.41
Buffer.toString(base64) 445.38 ns/op 343.01 ns/op 1.30

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 6e58fde into unstable Jun 1, 2023
@wemeetagain wemeetagain deleted the cayman/use-worker-false branch June 1, 2023 15:44
@wemeetagain
Copy link
Member Author

🎉 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