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: disable rate limiting on local testnet node #5728

Merged
merged 1 commit into from
Jul 4, 2023

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jul 4, 2023

Motivation

As mentioned in #5719 (comment), starting external nodes (e.g. node2) after a while such that they need to sync a sufficient number of slots (thousands) will cause rate limiting.

Description

Disable rate limiting on node1 by setting --network.rateLimitMultiplier 0

@nflaig nflaig requested a review from a team as a code owner July 4, 2023 13:29
@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: c00d862 Previous: 0f0f533 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 958.44 us/op 733.85 us/op 1.31
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 49.250 us/op 57.330 us/op 0.86
BLS verify - blst-native 1.2659 ms/op 1.2511 ms/op 1.01
BLS verifyMultipleSignatures 3 - blst-native 2.5860 ms/op 2.5477 ms/op 1.02
BLS verifyMultipleSignatures 8 - blst-native 5.5065 ms/op 5.4935 ms/op 1.00
BLS verifyMultipleSignatures 32 - blst-native 20.059 ms/op 19.963 ms/op 1.00
BLS aggregatePubkeys 32 - blst-native 26.502 us/op 26.815 us/op 0.99
BLS aggregatePubkeys 128 - blst-native 105.89 us/op 105.35 us/op 1.01
getAttestationsForBlock 63.715 ms/op 62.250 ms/op 1.02
isKnown best case - 1 super set check 262.00 ns/op 273.00 ns/op 0.96
isKnown normal case - 2 super set checks 261.00 ns/op 259.00 ns/op 1.01
isKnown worse case - 16 super set checks 258.00 ns/op 268.00 ns/op 0.96
CheckpointStateCache - add get delete 5.5760 us/op 6.0680 us/op 0.92
validate gossip signedAggregateAndProof - struct 2.8607 ms/op 2.8823 ms/op 0.99
validate gossip attestation - struct 1.3549 ms/op 1.3740 ms/op 0.99
pickEth1Vote - no votes 1.4009 ms/op 1.4135 ms/op 0.99
pickEth1Vote - max votes 11.371 ms/op 10.198 ms/op 1.12
pickEth1Vote - Eth1Data hashTreeRoot value x2048 9.9156 ms/op 9.6596 ms/op 1.03
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 16.377 ms/op 17.636 ms/op 0.93
pickEth1Vote - Eth1Data fastSerialize value x2048 735.86 us/op 784.43 us/op 0.94
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.9615 ms/op 5.9407 ms/op 0.84
bytes32 toHexString 513.00 ns/op 672.00 ns/op 0.76
bytes32 Buffer.toString(hex) 381.00 ns/op 414.00 ns/op 0.92
bytes32 Buffer.toString(hex) from Uint8Array 571.00 ns/op 636.00 ns/op 0.90
bytes32 Buffer.toString(hex) + 0x 373.00 ns/op 412.00 ns/op 0.91
Object access 1 prop 0.17000 ns/op 0.18800 ns/op 0.90
Map access 1 prop 0.16000 ns/op 0.16800 ns/op 0.95
Object get x1000 6.6220 ns/op 7.4250 ns/op 0.89
Map get x1000 0.64000 ns/op 0.64600 ns/op 0.99
Object set x1000 55.901 ns/op 64.668 ns/op 0.86
Map set x1000 45.503 ns/op 52.806 ns/op 0.86
Return object 10000 times 0.24610 ns/op 0.25080 ns/op 0.98
Throw Error 10000 times 4.3140 us/op 4.2744 us/op 1.01
fastMsgIdFn sha256 / 200 bytes 3.5530 us/op 3.6290 us/op 0.98
fastMsgIdFn h32 xxhash / 200 bytes 295.00 ns/op 330.00 ns/op 0.89
fastMsgIdFn h64 xxhash / 200 bytes 420.00 ns/op 486.00 ns/op 0.86
fastMsgIdFn sha256 / 1000 bytes 11.985 us/op 12.146 us/op 0.99
fastMsgIdFn h32 xxhash / 1000 bytes 430.00 ns/op 462.00 ns/op 0.93
fastMsgIdFn h64 xxhash / 1000 bytes 488.00 ns/op 553.00 ns/op 0.88
fastMsgIdFn sha256 / 10000 bytes 106.33 us/op 106.89 us/op 0.99
fastMsgIdFn h32 xxhash / 10000 bytes 1.9480 us/op 2.0310 us/op 0.96
fastMsgIdFn h64 xxhash / 10000 bytes 1.4100 us/op 1.4880 us/op 0.95
enrSubnets - fastDeserialize 64 bits 1.3260 us/op 1.6920 us/op 0.78
enrSubnets - ssz BitVector 64 bits 538.00 ns/op 613.00 ns/op 0.88
enrSubnets - fastDeserialize 4 bits 190.00 ns/op 220.00 ns/op 0.86
enrSubnets - ssz BitVector 4 bits 546.00 ns/op 623.00 ns/op 0.88
prioritizePeers score -10:0 att 32-0.1 sync 2-0 118.82 us/op 133.45 us/op 0.89
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 140.36 us/op 155.95 us/op 0.90
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 186.17 us/op 202.89 us/op 0.92
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 296.62 us/op 367.87 us/op 0.81
prioritizePeers score 0:0 att 64-1 sync 4-1 361.58 us/op 429.45 us/op 0.84
array of 16000 items push then shift 1.6577 us/op 1.7239 us/op 0.96
LinkedList of 16000 items push then shift 8.9530 ns/op 9.3110 ns/op 0.96
array of 16000 items push then pop 86.902 ns/op 118.61 ns/op 0.73
LinkedList of 16000 items push then pop 8.7060 ns/op 9.2510 ns/op 0.94
array of 24000 items push then shift 2.3919 us/op 2.4618 us/op 0.97
LinkedList of 24000 items push then shift 8.9480 ns/op 10.893 ns/op 0.82
array of 24000 items push then pop 81.994 ns/op 87.219 ns/op 0.94
LinkedList of 24000 items push then pop 8.6420 ns/op 9.5350 ns/op 0.91
intersect bitArray bitLen 8 13.404 ns/op 13.786 ns/op 0.97
intersect array and set length 8 77.194 ns/op 90.737 ns/op 0.85
intersect bitArray bitLen 128 44.668 ns/op 45.958 ns/op 0.97
intersect array and set length 128 1.0525 us/op 1.2633 us/op 0.83
Buffer.concat 32 items 2.6090 us/op 3.0770 us/op 0.85
Uint8Array.set 32 items 2.1640 us/op 2.5020 us/op 0.86
transfer serialized Status (84 B) 1.9500 us/op 2.1950 us/op 0.89
copy serialized Status (84 B) 1.6870 us/op 1.7780 us/op 0.95
transfer serialized SignedVoluntaryExit (112 B) 2.0490 us/op 2.2370 us/op 0.92
copy serialized SignedVoluntaryExit (112 B) 1.8380 us/op 1.8550 us/op 0.99
transfer serialized ProposerSlashing (416 B) 3.1800 us/op 2.7790 us/op 1.14
copy serialized ProposerSlashing (416 B) 2.9440 us/op 2.8460 us/op 1.03
transfer serialized Attestation (485 B) 2.3010 us/op 2.9110 us/op 0.79
copy serialized Attestation (485 B) 2.2810 us/op 2.6540 us/op 0.86
transfer serialized AttesterSlashing (33232 B) 2.6580 us/op 2.9120 us/op 0.91
copy serialized AttesterSlashing (33232 B) 7.2320 us/op 7.0190 us/op 1.03
transfer serialized Small SignedBeaconBlock (128000 B) 2.7910 us/op 3.1700 us/op 0.88
copy serialized Small SignedBeaconBlock (128000 B) 48.278 us/op 16.481 us/op 2.93
transfer serialized Avg SignedBeaconBlock (200000 B) 3.4100 us/op 3.7810 us/op 0.90
copy serialized Avg SignedBeaconBlock (200000 B) 32.882 us/op 24.105 us/op 1.36
transfer serialized BlobsSidecar (524380 B) 3.3080 us/op 3.8370 us/op 0.86
copy serialized BlobsSidecar (524380 B) 167.89 us/op 209.06 us/op 0.80
transfer serialized Big SignedBeaconBlock (1000000 B) 3.4660 us/op 3.6640 us/op 0.95
copy serialized Big SignedBeaconBlock (1000000 B) 251.76 us/op 386.70 us/op 0.65
pass gossip attestations to forkchoice per slot 2.7812 ms/op 2.7072 ms/op 1.03
forkChoice updateHead vc 100000 bc 64 eq 0 2.1834 ms/op 2.1052 ms/op 1.04
forkChoice updateHead vc 600000 bc 64 eq 0 14.067 ms/op 13.202 ms/op 1.07
forkChoice updateHead vc 1000000 bc 64 eq 0 19.236 ms/op 21.614 ms/op 0.89
forkChoice updateHead vc 600000 bc 320 eq 0 16.931 ms/op 17.058 ms/op 0.99
forkChoice updateHead vc 600000 bc 1200 eq 0 83.766 ms/op 82.801 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 1000 21.309 ms/op 21.067 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 10000 22.811 ms/op 23.006 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 300000 33.252 ms/op 31.532 ms/op 1.05
computeDeltas 4.1176 ms/op 4.1245 ms/op 1.00
computeProposerBoostScoreFromBalances 1.7762 ms/op 1.7740 ms/op 1.00
altair processAttestation - 250000 vs - 7PWei normalcase 2.5491 ms/op 2.3159 ms/op 1.10
altair processAttestation - 250000 vs - 7PWei worstcase 3.7784 ms/op 3.9257 ms/op 0.96
altair processAttestation - setStatus - 1/6 committees join 147.98 us/op 141.27 us/op 1.05
altair processAttestation - setStatus - 1/3 committees join 276.29 us/op 272.26 us/op 1.01
altair processAttestation - setStatus - 1/2 committees join 382.05 us/op 362.04 us/op 1.06
altair processAttestation - setStatus - 2/3 committees join 465.41 us/op 459.87 us/op 1.01
altair processAttestation - setStatus - 4/5 committees join 674.03 us/op 659.69 us/op 1.02
altair processAttestation - setStatus - 100% committees join 790.95 us/op 744.21 us/op 1.06
altair processBlock - 250000 vs - 7PWei normalcase 21.049 ms/op 22.566 ms/op 0.93
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.364 ms/op 27.008 ms/op 1.09
altair processBlock - 250000 vs - 7PWei worstcase 55.093 ms/op 62.714 ms/op 0.88
altair processBlock - 250000 vs - 7PWei worstcase hashState 77.329 ms/op 84.625 ms/op 0.91
phase0 processBlock - 250000 vs - 7PWei normalcase 2.2235 ms/op 1.9348 ms/op 1.15
phase0 processBlock - 250000 vs - 7PWei worstcase 31.954 ms/op 28.307 ms/op 1.13
altair processEth1Data - 250000 vs - 7PWei normalcase 500.96 us/op 472.49 us/op 1.06
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.2710 us/op 11.278 us/op 0.82
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 30.101 us/op 31.388 us/op 0.96
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 14.118 us/op 13.473 us/op 1.05
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 9.4100 us/op 10.479 us/op 0.90
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 104.01 us/op 108.51 us/op 0.96
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 830.39 us/op 668.37 us/op 1.24
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.0545 ms/op 1.3241 ms/op 0.80
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.0700 ms/op 1.6136 ms/op 0.66
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.9461 ms/op 2.2995 ms/op 1.28
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.5912 ms/op 1.7020 ms/op 0.93
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.8919 ms/op 3.8483 ms/op 1.01
Tree 40 250000 create 303.63 ms/op 326.00 ms/op 0.93
Tree 40 250000 get(125000) 185.05 ns/op 195.66 ns/op 0.95
Tree 40 250000 set(125000) 968.50 ns/op 958.48 ns/op 1.01
Tree 40 250000 toArray() 19.800 ms/op 17.550 ms/op 1.13
Tree 40 250000 iterate all - toArray() + loop 20.462 ms/op 17.122 ms/op 1.20
Tree 40 250000 iterate all - get(i) 74.857 ms/op 70.844 ms/op 1.06
MutableVector 250000 create 13.108 ms/op 13.532 ms/op 0.97
MutableVector 250000 get(125000) 7.1270 ns/op 6.6850 ns/op 1.07
MutableVector 250000 set(125000) 324.98 ns/op 250.68 ns/op 1.30
MutableVector 250000 toArray() 4.2057 ms/op 2.9183 ms/op 1.44
MutableVector 250000 iterate all - toArray() + loop 4.0601 ms/op 3.0390 ms/op 1.34
MutableVector 250000 iterate all - get(i) 1.5774 ms/op 1.4974 ms/op 1.05
Array 250000 create 2.8498 ms/op 2.5352 ms/op 1.12
Array 250000 clone - spread 1.1187 ms/op 1.0784 ms/op 1.04
Array 250000 get(125000) 0.56600 ns/op 0.54800 ns/op 1.03
Array 250000 set(125000) 0.64200 ns/op 0.62300 ns/op 1.03
Array 250000 iterate all - loop 86.487 us/op 109.40 us/op 0.79
effectiveBalanceIncrements clone Uint8Array 300000 35.564 us/op 24.800 us/op 1.43
effectiveBalanceIncrements clone MutableVector 300000 340.00 ns/op 330.00 ns/op 1.03
effectiveBalanceIncrements rw all Uint8Array 300000 176.99 us/op 171.28 us/op 1.03
effectiveBalanceIncrements rw all MutableVector 300000 84.190 ms/op 80.570 ms/op 1.04
phase0 afterProcessEpoch - 250000 vs - 7PWei 121.01 ms/op 115.16 ms/op 1.05
phase0 beforeProcessEpoch - 250000 vs - 7PWei 45.347 ms/op 44.952 ms/op 1.01
altair processEpoch - mainnet_e81889 358.36 ms/op 340.91 ms/op 1.05
mainnet_e81889 - altair beforeProcessEpoch 76.125 ms/op 48.395 ms/op 1.57
mainnet_e81889 - altair processJustificationAndFinalization 29.430 us/op 25.959 us/op 1.13
mainnet_e81889 - altair processInactivityUpdates 6.4458 ms/op 5.7941 ms/op 1.11
mainnet_e81889 - altair processRewardsAndPenalties 61.256 ms/op 67.826 ms/op 0.90
mainnet_e81889 - altair processRegistryUpdates 4.4550 us/op 4.6940 us/op 0.95
mainnet_e81889 - altair processSlashings 1000.0 ns/op 976.00 ns/op 1.02
mainnet_e81889 - altair processEth1DataReset 1.0460 us/op 951.00 ns/op 1.10
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.5290 ms/op 1.5284 ms/op 1.00
mainnet_e81889 - altair processSlashingsReset 5.9070 us/op 5.5320 us/op 1.07
mainnet_e81889 - altair processRandaoMixesReset 13.617 us/op 8.5570 us/op 1.59
mainnet_e81889 - altair processHistoricalRootsUpdate 1.1700 us/op 1.1680 us/op 1.00
mainnet_e81889 - altair processParticipationFlagUpdates 4.9750 us/op 4.3870 us/op 1.13
mainnet_e81889 - altair processSyncCommitteeUpdates 920.00 ns/op 679.00 ns/op 1.35
mainnet_e81889 - altair afterProcessEpoch 137.19 ms/op 132.61 ms/op 1.03
phase0 processEpoch - mainnet_e58758 387.63 ms/op 396.06 ms/op 0.98
mainnet_e58758 - phase0 beforeProcessEpoch 168.94 ms/op 150.45 ms/op 1.12
mainnet_e58758 - phase0 processJustificationAndFinalization 27.759 us/op 31.720 us/op 0.88
mainnet_e58758 - phase0 processRewardsAndPenalties 75.007 ms/op 69.876 ms/op 1.07
mainnet_e58758 - phase0 processRegistryUpdates 13.829 us/op 10.585 us/op 1.31
mainnet_e58758 - phase0 processSlashings 835.00 ns/op 610.00 ns/op 1.37
mainnet_e58758 - phase0 processEth1DataReset 835.00 ns/op 663.00 ns/op 1.26
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.5427 ms/op 992.97 us/op 1.55
mainnet_e58758 - phase0 processSlashingsReset 6.8760 us/op 6.3880 us/op 1.08
mainnet_e58758 - phase0 processRandaoMixesReset 8.2430 us/op 5.8930 us/op 1.40
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.2540 us/op 1.0570 us/op 1.19
mainnet_e58758 - phase0 processParticipationRecordUpdates 7.1560 us/op 4.1110 us/op 1.74
mainnet_e58758 - phase0 afterProcessEpoch 98.268 ms/op 101.46 ms/op 0.97
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2203 ms/op 2.4414 ms/op 0.50
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.9097 ms/op 2.0673 ms/op 0.92
altair processInactivityUpdates - 250000 normalcase 29.056 ms/op 27.520 ms/op 1.06
altair processInactivityUpdates - 250000 worstcase 26.343 ms/op 31.018 ms/op 0.85
phase0 processRegistryUpdates - 250000 normalcase 11.006 us/op 12.652 us/op 0.87
phase0 processRegistryUpdates - 250000 badcase_full_deposits 343.94 us/op 470.73 us/op 0.73
phase0 processRegistryUpdates - 250000 worstcase 0.5 140.64 ms/op 140.11 ms/op 1.00
altair processRewardsAndPenalties - 250000 normalcase 73.914 ms/op 68.522 ms/op 1.08
altair processRewardsAndPenalties - 250000 worstcase 75.303 ms/op 75.383 ms/op 1.00
phase0 getAttestationDeltas - 250000 normalcase 9.4579 ms/op 7.0134 ms/op 1.35
phase0 getAttestationDeltas - 250000 worstcase 7.5945 ms/op 7.4914 ms/op 1.01
phase0 processSlashings - 250000 worstcase 3.4627 ms/op 3.6704 ms/op 0.94
altair processSyncCommitteeUpdates - 250000 194.44 ms/op 183.60 ms/op 1.06
BeaconState.hashTreeRoot - No change 326.00 ns/op 343.00 ns/op 0.95
BeaconState.hashTreeRoot - 1 full validator 58.665 us/op 50.431 us/op 1.16
BeaconState.hashTreeRoot - 32 full validator 695.23 us/op 555.30 us/op 1.25
BeaconState.hashTreeRoot - 512 full validator 6.1187 ms/op 5.8748 ms/op 1.04
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 62.391 us/op 68.366 us/op 0.91
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.0213 ms/op 906.10 us/op 1.13
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 12.545 ms/op 11.866 ms/op 1.06
BeaconState.hashTreeRoot - 1 balances 56.184 us/op 51.758 us/op 1.09
BeaconState.hashTreeRoot - 32 balances 549.56 us/op 536.21 us/op 1.02
BeaconState.hashTreeRoot - 512 balances 4.9208 ms/op 4.3548 ms/op 1.13
BeaconState.hashTreeRoot - 250000 balances 86.897 ms/op 81.481 ms/op 1.07
aggregationBits - 2048 els - zipIndexesInBitList 16.745 us/op 16.893 us/op 0.99
regular array get 100000 times 33.413 us/op 35.988 us/op 0.93
wrappedArray get 100000 times 32.696 us/op 33.410 us/op 0.98
arrayWithProxy get 100000 times 16.764 ms/op 15.672 ms/op 1.07
ssz.Root.equals 572.00 ns/op 569.00 ns/op 1.01
byteArrayEquals 569.00 ns/op 567.00 ns/op 1.00
shuffle list - 16384 els 7.2529 ms/op 6.8957 ms/op 1.05
shuffle list - 250000 els 102.72 ms/op 100.16 ms/op 1.03
processSlot - 1 slots 9.3520 us/op 9.4510 us/op 0.99
processSlot - 32 slots 1.4316 ms/op 1.4653 ms/op 0.98
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 40.277 ms/op 41.548 ms/op 0.97
getCommitteeAssignments - req 1 vs - 250000 vc 3.0683 ms/op 2.9896 ms/op 1.03
getCommitteeAssignments - req 100 vs - 250000 vc 4.3128 ms/op 4.1946 ms/op 1.03
getCommitteeAssignments - req 1000 vs - 250000 vc 4.6028 ms/op 4.6546 ms/op 0.99
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.9300 ns/op 4.3900 ns/op 1.35
state getBlockRootAtSlot - 250000 vs - 7PWei 729.26 ns/op 566.17 ns/op 1.29
computeProposers - vc 250000 11.338 ms/op 10.353 ms/op 1.10
computeEpochShuffling - vc 250000 113.73 ms/op 103.03 ms/op 1.10
getNextSyncCommittee - vc 250000 225.38 ms/op 182.14 ms/op 1.24
computeSigningRoot for AttestationData 16.098 us/op 13.947 us/op 1.15
hash AttestationData serialized data then Buffer.toString(base64) 2.7322 us/op 2.4847 us/op 1.10
toHexString serialized data 1.1439 us/op 1.1126 us/op 1.03
Buffer.toString(base64) 347.55 ns/op 341.78 ns/op 1.02

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 9335cc5 into unstable Jul 4, 2023
12 checks passed
@wemeetagain wemeetagain deleted the nflaig/disable-rate-limiting branch July 4, 2023 13:52
@wemeetagain
Copy link
Member

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

None yet

2 participants