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: update the rate limit quota for blobs req/resp by range/by root methods #5682

Merged
merged 1 commit into from
Jun 22, 2023

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Jun 22, 2023

relax quota for blobs in req/resp methods

@g11tech g11tech requested a review from a team as a code owner June 22, 2023 12:50
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 964942b Previous: c042a0b Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.0096 ms/op 818.93 us/op 1.23
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 51.927 us/op 43.584 us/op 1.19
BLS verify - blst-native 1.2554 ms/op 1.1977 ms/op 1.05
BLS verifyMultipleSignatures 3 - blst-native 2.5336 ms/op 2.4334 ms/op 1.04
BLS verifyMultipleSignatures 8 - blst-native 5.5273 ms/op 5.2270 ms/op 1.06
BLS verifyMultipleSignatures 32 - blst-native 19.609 ms/op 18.257 ms/op 1.07
BLS aggregatePubkeys 32 - blst-native 26.511 us/op 24.345 us/op 1.09
BLS aggregatePubkeys 128 - blst-native 99.959 us/op 94.588 us/op 1.06
getAttestationsForBlock 64.101 ms/op 51.011 ms/op 1.26
isKnown best case - 1 super set check 268.00 ns/op 252.00 ns/op 1.06
isKnown normal case - 2 super set checks 255.00 ns/op 245.00 ns/op 1.04
isKnown worse case - 16 super set checks 259.00 ns/op 243.00 ns/op 1.07
CheckpointStateCache - add get delete 5.7000 us/op 4.8800 us/op 1.17
validate gossip signedAggregateAndProof - struct 2.8911 ms/op 2.8031 ms/op 1.03
validate gossip attestation - struct 1.3356 ms/op 1.2539 ms/op 1.07
pickEth1Vote - no votes 1.3257 ms/op 1.2375 ms/op 1.07
pickEth1Vote - max votes 9.6116 ms/op 9.6204 ms/op 1.00
pickEth1Vote - Eth1Data hashTreeRoot value x2048 9.4470 ms/op 8.5676 ms/op 1.10
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 17.735 ms/op 14.165 ms/op 1.25
pickEth1Vote - Eth1Data fastSerialize value x2048 798.66 us/op 667.97 us/op 1.20
pickEth1Vote - Eth1Data fastSerialize tree x2048 7.9705 ms/op 6.5241 ms/op 1.22
bytes32 toHexString 716.00 ns/op 467.00 ns/op 1.53
bytes32 Buffer.toString(hex) 437.00 ns/op 323.00 ns/op 1.35
bytes32 Buffer.toString(hex) from Uint8Array 643.00 ns/op 514.00 ns/op 1.25
bytes32 Buffer.toString(hex) + 0x 423.00 ns/op 329.00 ns/op 1.29
Object access 1 prop 0.19200 ns/op 0.15100 ns/op 1.27
Map access 1 prop 0.17500 ns/op 0.14800 ns/op 1.18
Object get x1000 6.7050 ns/op 6.8210 ns/op 0.98
Map get x1000 0.68700 ns/op 0.56800 ns/op 1.21
Object set x1000 68.289 ns/op 48.130 ns/op 1.42
Map set x1000 52.930 ns/op 40.964 ns/op 1.29
Return object 10000 times 0.25240 ns/op 0.22240 ns/op 1.13
Throw Error 10000 times 4.3937 us/op 3.9669 us/op 1.11
fastMsgIdFn sha256 / 200 bytes 3.5930 us/op 3.2210 us/op 1.12
fastMsgIdFn h32 xxhash / 200 bytes 323.00 ns/op 261.00 ns/op 1.24
fastMsgIdFn h64 xxhash / 200 bytes 484.00 ns/op 369.00 ns/op 1.31
fastMsgIdFn sha256 / 1000 bytes 12.174 us/op 10.911 us/op 1.12
fastMsgIdFn h32 xxhash / 1000 bytes 472.00 ns/op 379.00 ns/op 1.25
fastMsgIdFn h64 xxhash / 1000 bytes 576.00 ns/op 432.00 ns/op 1.33
fastMsgIdFn sha256 / 10000 bytes 106.42 us/op 97.838 us/op 1.09
fastMsgIdFn h32 xxhash / 10000 bytes 2.0080 us/op 1.8260 us/op 1.10
fastMsgIdFn h64 xxhash / 10000 bytes 1.4000 us/op 1.3050 us/op 1.07
enrSubnets - fastDeserialize 64 bits 1.8660 us/op 1.2040 us/op 1.55
enrSubnets - ssz BitVector 64 bits 708.00 ns/op 469.00 ns/op 1.51
enrSubnets - fastDeserialize 4 bits 241.00 ns/op 156.00 ns/op 1.54
enrSubnets - ssz BitVector 4 bits 614.00 ns/op 466.00 ns/op 1.32
prioritizePeers score -10:0 att 32-0.1 sync 2-0 119.19 us/op 99.142 us/op 1.20
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 170.02 us/op 126.00 us/op 1.35
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 202.67 us/op 162.37 us/op 1.25
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 370.85 us/op 289.33 us/op 1.28
prioritizePeers score 0:0 att 64-1 sync 4-1 449.51 us/op 343.85 us/op 1.31
array of 16000 items push then shift 1.6881 us/op 1.5472 us/op 1.09
LinkedList of 16000 items push then shift 9.1310 ns/op 8.3460 ns/op 1.09
array of 16000 items push then pop 112.83 ns/op 82.288 ns/op 1.37
LinkedList of 16000 items push then pop 9.5420 ns/op 8.1920 ns/op 1.16
array of 24000 items push then shift 2.4613 us/op 2.3282 us/op 1.06
LinkedList of 24000 items push then shift 10.323 ns/op 8.5660 ns/op 1.21
array of 24000 items push then pop 84.300 ns/op 73.598 ns/op 1.15
LinkedList of 24000 items push then pop 10.385 ns/op 7.9890 ns/op 1.30
intersect bitArray bitLen 8 15.410 ns/op 12.617 ns/op 1.22
intersect array and set length 8 102.31 ns/op 73.919 ns/op 1.38
intersect bitArray bitLen 128 46.391 ns/op 41.713 ns/op 1.11
intersect array and set length 128 1.3254 us/op 1.0007 us/op 1.32
Buffer.concat 32 items 3.2200 us/op 2.7830 us/op 1.16
Uint8Array.set 32 items 2.7090 us/op 2.5540 us/op 1.06
transfer serialized Status (84 B) 2.2830 us/op 1.9880 us/op 1.15
copy serialized Status (84 B) 1.8920 us/op 1.6640 us/op 1.14
transfer serialized SignedVoluntaryExit (112 B) 2.4610 us/op 2.0370 us/op 1.21
copy serialized SignedVoluntaryExit (112 B) 2.0320 us/op 1.7160 us/op 1.18
transfer serialized ProposerSlashing (416 B) 2.9420 us/op 2.5830 us/op 1.14
copy serialized ProposerSlashing (416 B) 2.7070 us/op 2.8710 us/op 0.94
transfer serialized Attestation (485 B) 2.9190 us/op 3.1890 us/op 0.92
copy serialized Attestation (485 B) 2.7230 us/op 3.1450 us/op 0.87
transfer serialized AttesterSlashing (33232 B) 3.0020 us/op 3.2750 us/op 0.92
copy serialized AttesterSlashing (33232 B) 8.7370 us/op 6.2820 us/op 1.39
transfer serialized Small SignedBeaconBlock (128000 B) 3.2890 us/op 3.6990 us/op 0.89
copy serialized Small SignedBeaconBlock (128000 B) 22.453 us/op 14.449 us/op 1.55
transfer serialized Avg SignedBeaconBlock (200000 B) 4.1870 us/op 3.7540 us/op 1.12
copy serialized Avg SignedBeaconBlock (200000 B) 28.070 us/op 20.037 us/op 1.40
transfer serialized BlobsSidecar (524380 B) 4.4520 us/op 3.3010 us/op 1.35
copy serialized BlobsSidecar (524380 B) 189.34 us/op 177.46 us/op 1.07
transfer serialized Big SignedBeaconBlock (1000000 B) 4.5690 us/op 3.4360 us/op 1.33
copy serialized Big SignedBeaconBlock (1000000 B) 325.83 us/op 268.12 us/op 1.22
pass gossip attestations to forkchoice per slot 2.7637 ms/op 2.5745 ms/op 1.07
forkChoice updateHead vc 100000 bc 64 eq 0 2.1581 ms/op 2.0455 ms/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 0 12.418 ms/op 11.657 ms/op 1.07
forkChoice updateHead vc 1000000 bc 64 eq 0 24.563 ms/op 19.456 ms/op 1.26
forkChoice updateHead vc 600000 bc 320 eq 0 17.885 ms/op 15.653 ms/op 1.14
forkChoice updateHead vc 600000 bc 1200 eq 0 89.053 ms/op 75.837 ms/op 1.17
forkChoice updateHead vc 600000 bc 64 eq 1000 21.503 ms/op 19.781 ms/op 1.09
forkChoice updateHead vc 600000 bc 64 eq 10000 23.054 ms/op 21.687 ms/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 300000 32.694 ms/op 29.647 ms/op 1.10
computeDeltas 3.4404 ms/op 3.8162 ms/op 0.90
computeProposerBoostScoreFromBalances 1.8561 ms/op 1.7222 ms/op 1.08
altair processAttestation - 250000 vs - 7PWei normalcase 3.0685 ms/op 2.1019 ms/op 1.46
altair processAttestation - 250000 vs - 7PWei worstcase 4.9040 ms/op 3.1850 ms/op 1.54
altair processAttestation - setStatus - 1/6 committees join 150.39 us/op 139.41 us/op 1.08
altair processAttestation - setStatus - 1/3 committees join 297.58 us/op 270.07 us/op 1.10
altair processAttestation - setStatus - 1/2 committees join 397.38 us/op 352.35 us/op 1.13
altair processAttestation - setStatus - 2/3 committees join 489.45 us/op 441.92 us/op 1.11
altair processAttestation - setStatus - 4/5 committees join 699.35 us/op 642.41 us/op 1.09
altair processAttestation - setStatus - 100% committees join 798.77 us/op 753.81 us/op 1.06
altair processBlock - 250000 vs - 7PWei normalcase 19.558 ms/op 18.669 ms/op 1.05
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.066 ms/op 25.713 ms/op 1.13
altair processBlock - 250000 vs - 7PWei worstcase 56.091 ms/op 52.520 ms/op 1.07
altair processBlock - 250000 vs - 7PWei worstcase hashState 80.190 ms/op 65.404 ms/op 1.23
phase0 processBlock - 250000 vs - 7PWei normalcase 2.2618 ms/op 1.9396 ms/op 1.17
phase0 processBlock - 250000 vs - 7PWei worstcase 30.784 ms/op 27.298 ms/op 1.13
altair processEth1Data - 250000 vs - 7PWei normalcase 513.99 us/op 505.97 us/op 1.02
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.1980 us/op 6.8490 us/op 1.34
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 28.897 us/op 19.333 us/op 1.49
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 11.563 us/op 8.3280 us/op 1.39
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 8.3750 us/op 6.5550 us/op 1.28
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 114.71 us/op 74.383 us/op 1.54
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 782.41 us/op 621.45 us/op 1.26
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.0559 ms/op 899.36 us/op 1.17
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.0253 ms/op 865.43 us/op 1.18
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.9353 ms/op 2.1766 ms/op 1.35
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.8939 ms/op 1.4659 ms/op 1.29
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.0444 ms/op 3.4718 ms/op 1.16
Tree 40 250000 create 352.64 ms/op 308.99 ms/op 1.14
Tree 40 250000 get(125000) 199.14 ns/op 168.87 ns/op 1.18
Tree 40 250000 set(125000) 1.0696 us/op 823.16 ns/op 1.30
Tree 40 250000 toArray() 22.305 ms/op 16.082 ms/op 1.39
Tree 40 250000 iterate all - toArray() + loop 22.541 ms/op 15.964 ms/op 1.41
Tree 40 250000 iterate all - get(i) 76.626 ms/op 63.061 ms/op 1.22
MutableVector 250000 create 12.751 ms/op 11.224 ms/op 1.14
MutableVector 250000 get(125000) 6.6240 ns/op 6.3820 ns/op 1.04
MutableVector 250000 set(125000) 263.21 ns/op 248.60 ns/op 1.06
MutableVector 250000 toArray() 2.8859 ms/op 2.7686 ms/op 1.04
MutableVector 250000 iterate all - toArray() + loop 3.0578 ms/op 2.8917 ms/op 1.06
MutableVector 250000 iterate all - get(i) 1.5502 ms/op 1.4948 ms/op 1.04
Array 250000 create 2.7120 ms/op 2.5561 ms/op 1.06
Array 250000 clone - spread 1.1341 ms/op 1.1806 ms/op 0.96
Array 250000 get(125000) 0.58900 ns/op 0.57000 ns/op 1.03
Array 250000 set(125000) 0.66500 ns/op 0.65000 ns/op 1.02
Array 250000 iterate all - loop 89.672 us/op 108.45 us/op 0.83
effectiveBalanceIncrements clone Uint8Array 300000 31.007 us/op 29.213 us/op 1.06
effectiveBalanceIncrements clone MutableVector 300000 361.00 ns/op 370.00 ns/op 0.98
effectiveBalanceIncrements rw all Uint8Array 300000 174.43 us/op 165.28 us/op 1.06
effectiveBalanceIncrements rw all MutableVector 300000 85.894 ms/op 75.995 ms/op 1.13
phase0 afterProcessEpoch - 250000 vs - 7PWei 119.02 ms/op 107.67 ms/op 1.11
phase0 beforeProcessEpoch - 250000 vs - 7PWei 47.154 ms/op 40.642 ms/op 1.16
altair processEpoch - mainnet_e81889 348.41 ms/op 312.53 ms/op 1.11
mainnet_e81889 - altair beforeProcessEpoch 72.712 ms/op 63.980 ms/op 1.14
mainnet_e81889 - altair processJustificationAndFinalization 19.405 us/op 16.789 us/op 1.16
mainnet_e81889 - altair processInactivityUpdates 6.7013 ms/op 5.4066 ms/op 1.24
mainnet_e81889 - altair processRewardsAndPenalties 61.883 ms/op 72.736 ms/op 0.85
mainnet_e81889 - altair processRegistryUpdates 4.2770 us/op 2.8450 us/op 1.50
mainnet_e81889 - altair processSlashings 655.00 ns/op 468.00 ns/op 1.40
mainnet_e81889 - altair processEth1DataReset 579.00 ns/op 563.00 ns/op 1.03
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4956 ms/op 1.2252 ms/op 1.22
mainnet_e81889 - altair processSlashingsReset 4.1980 us/op 4.6450 us/op 0.90
mainnet_e81889 - altair processRandaoMixesReset 5.8000 us/op 4.4720 us/op 1.30
mainnet_e81889 - altair processHistoricalRootsUpdate 921.00 ns/op 714.00 ns/op 1.29
mainnet_e81889 - altair processParticipationFlagUpdates 3.1570 us/op 2.4330 us/op 1.30
mainnet_e81889 - altair processSyncCommitteeUpdates 916.00 ns/op 468.00 ns/op 1.96
mainnet_e81889 - altair afterProcessEpoch 136.19 ms/op 111.50 ms/op 1.22
phase0 processEpoch - mainnet_e58758 396.78 ms/op 313.84 ms/op 1.26
mainnet_e58758 - phase0 beforeProcessEpoch 162.97 ms/op 119.86 ms/op 1.36
mainnet_e58758 - phase0 processJustificationAndFinalization 27.250 us/op 15.797 us/op 1.73
mainnet_e58758 - phase0 processRewardsAndPenalties 68.783 ms/op 53.002 ms/op 1.30
mainnet_e58758 - phase0 processRegistryUpdates 9.0240 us/op 7.8830 us/op 1.14
mainnet_e58758 - phase0 processSlashings 660.00 ns/op 535.00 ns/op 1.23
mainnet_e58758 - phase0 processEth1DataReset 676.00 ns/op 583.00 ns/op 1.16
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.2423 ms/op 950.77 us/op 1.31
mainnet_e58758 - phase0 processSlashingsReset 6.1430 us/op 3.1090 us/op 1.98
mainnet_e58758 - phase0 processRandaoMixesReset 9.5660 us/op 4.7800 us/op 2.00
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.0200 us/op 831.00 ns/op 1.23
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.9390 us/op 4.0080 us/op 1.48
mainnet_e58758 - phase0 afterProcessEpoch 101.22 ms/op 95.370 ms/op 1.06
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.2300 ms/op 1.2014 ms/op 1.86
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 3.7638 ms/op 1.4182 ms/op 2.65
altair processInactivityUpdates - 250000 normalcase 52.662 ms/op 20.773 ms/op 2.54
altair processInactivityUpdates - 250000 worstcase 45.596 ms/op 20.586 ms/op 2.21
phase0 processRegistryUpdates - 250000 normalcase 19.820 us/op 6.2560 us/op 3.17
phase0 processRegistryUpdates - 250000 badcase_full_deposits 488.85 us/op 259.16 us/op 1.89
phase0 processRegistryUpdates - 250000 worstcase 0.5 204.40 ms/op 121.98 ms/op 1.68
altair processRewardsAndPenalties - 250000 normalcase 72.483 ms/op 42.836 ms/op 1.69
altair processRewardsAndPenalties - 250000 worstcase 73.972 ms/op 54.780 ms/op 1.35
phase0 getAttestationDeltas - 250000 normalcase 8.1394 ms/op 6.8446 ms/op 1.19
phase0 getAttestationDeltas - 250000 worstcase 7.5817 ms/op 6.8183 ms/op 1.11
phase0 processSlashings - 250000 worstcase 4.8870 ms/op 3.5221 ms/op 1.39
altair processSyncCommitteeUpdates - 250000 199.52 ms/op 177.04 ms/op 1.13
BeaconState.hashTreeRoot - No change 381.00 ns/op 277.00 ns/op 1.38
BeaconState.hashTreeRoot - 1 full validator 61.706 us/op 50.906 us/op 1.21
BeaconState.hashTreeRoot - 32 full validator 671.32 us/op 551.52 us/op 1.22
BeaconState.hashTreeRoot - 512 full validator 6.0195 ms/op 5.1405 ms/op 1.17
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 85.654 us/op 62.649 us/op 1.37
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.1901 ms/op 886.17 us/op 1.34
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 13.542 ms/op 11.464 ms/op 1.18
BeaconState.hashTreeRoot - 1 balances 60.568 us/op 48.873 us/op 1.24
BeaconState.hashTreeRoot - 32 balances 539.92 us/op 440.97 us/op 1.22
BeaconState.hashTreeRoot - 512 balances 5.5689 ms/op 4.3468 ms/op 1.28
BeaconState.hashTreeRoot - 250000 balances 92.042 ms/op 75.186 ms/op 1.22
aggregationBits - 2048 els - zipIndexesInBitList 25.068 us/op 16.433 us/op 1.53
regular array get 100000 times 58.396 us/op 32.766 us/op 1.78
wrappedArray get 100000 times 38.861 us/op 32.758 us/op 1.19
arrayWithProxy get 100000 times 20.118 ms/op 15.420 ms/op 1.30
ssz.Root.equals 852.00 ns/op 539.00 ns/op 1.58
byteArrayEquals 808.00 ns/op 532.00 ns/op 1.52
shuffle list - 16384 els 8.2391 ms/op 6.9522 ms/op 1.19
shuffle list - 250000 els 119.06 ms/op 99.837 ms/op 1.19
processSlot - 1 slots 10.650 us/op 8.9160 us/op 1.19
processSlot - 32 slots 1.8141 ms/op 1.3720 ms/op 1.32
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 47.482 ms/op 31.813 ms/op 1.49
getCommitteeAssignments - req 1 vs - 250000 vc 3.7203 ms/op 2.8622 ms/op 1.30
getCommitteeAssignments - req 100 vs - 250000 vc 5.0795 ms/op 4.1010 ms/op 1.24
getCommitteeAssignments - req 1000 vs - 250000 vc 5.4020 ms/op 4.5219 ms/op 1.19
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.6600 ns/op 4.5600 ns/op 1.24
state getBlockRootAtSlot - 250000 vs - 7PWei 836.72 ns/op 699.53 ns/op 1.20
computeProposers - vc 250000 13.028 ms/op 11.008 ms/op 1.18
computeEpochShuffling - vc 250000 143.20 ms/op 101.11 ms/op 1.42
getNextSyncCommittee - vc 250000 230.56 ms/op 179.53 ms/op 1.28
computeSigningRoot for AttestationData 16.214 us/op 14.152 us/op 1.15
hash AttestationData serialized data then Buffer.toString(base64) 2.9838 us/op 2.5100 us/op 1.19
toHexString serialized data 1.8509 us/op 1.1470 us/op 1.61
Buffer.toString(base64) 415.49 ns/op 318.35 ns/op 1.31

by benchmarkbot/action

@wemeetagain wemeetagain merged commit a939aaa into unstable Jun 22, 2023
12 checks passed
@wemeetagain wemeetagain deleted the g11tech/blob-quota branch June 22, 2023 13:25
@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

3 participants