Skip to content

fix: use payload request limit for envelope byPeer range quota - #9710

Merged
nflaig merged 3 commits into
unstablefrom
nc/envelope-range-quota
Aug 4, 2026
Merged

fix: use payload request limit for envelope byPeer range quota#9710
nflaig merged 3 commits into
unstablefrom
nc/envelope-range-quota

Conversation

@ensi321

@ensi321 ensi321 commented Jul 25, 2026

Copy link
Copy Markdown
Member

Motivation

Port of an outstanding fix from the glamsterdam-devnet-7 branch (#9587) that never landed on unstable.

#9050 added the ExecutionPayloadEnvelopesByRange req/resp method with a byPeer quota of MAX_REQUEST_BLOCKS_DENEB (128), while the spec caps envelope range requests at MAX_REQUEST_PAYLOADS per https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.12/specs/gloas/p2p-interface.md#executionpayloadenvelopesbyrange-v1. The getRequestCount side already uses MAX_REQUEST_PAYLOADS; the byPeer quota was left inconsistent.

Description

  • Use config.MAX_REQUEST_PAYLOADS for the ExecutionPayloadEnvelopesByRange byPeer quota
  • Add a unit test asserting the quota matches MAX_REQUEST_PAYLOADS

Cherry-picked from glamsterdam-devnet-7 (88b8052, original author @nflaig); applied without conflicts.

AI Assistance Disclosure

Cherry-pick selection and verification done with AI assistance (Claude Code); original commit authored by @nflaig on the devnet-7 branch.

🤖 Generated with Claude Code

@ensi321
ensi321 requested a review from a team as a code owner July 25, 2026 02:15

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c422cccc36

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/beacon-node/test/unit/network/reqresp/rateLimit.test.ts Outdated
@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Performance Report

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 0099b20 Previous: f6a0d68 Ratio
Full columns - reconstruct all 6 blobs 108.97 us/op 495.87 us/op 0.22
Full benchmark results
Benchmark suite Current: 0099b20 Previous: f6a0d68 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.4488 ms/op 920.69 us/op 1.57
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 42.869 us/op 40.070 us/op 1.07
BLS verify - blst 751.76 us/op 729.53 us/op 1.03
BLS verifyMultipleSignatures 3 - blst 1.4140 ms/op 1.2976 ms/op 1.09
BLS verifyMultipleSignatures 8 - blst 2.2420 ms/op 2.0747 ms/op 1.08
BLS verifyMultipleSignatures 32 - blst 7.0926 ms/op 6.3641 ms/op 1.11
BLS verifyMultipleSignatures 64 - blst 13.377 ms/op 12.378 ms/op 1.08
BLS verifyMultipleSignatures 128 - blst 26.458 ms/op 24.481 ms/op 1.08
BLS deserializing 10000 signatures 650.56 ms/op 627.72 ms/op 1.04
BLS deserializing 100000 signatures 6.4711 s/op 6.2758 s/op 1.03
BLS verifyMultipleSignatures - same message - 3 - blst 792.74 us/op 757.78 us/op 1.05
BLS verifyMultipleSignatures - same message - 8 - blst 862.34 us/op 884.07 us/op 0.98
BLS verifyMultipleSignatures - same message - 32 - blst 1.4941 ms/op 1.4804 ms/op 1.01
BLS verifyMultipleSignatures - same message - 64 - blst 2.3896 ms/op 2.3797 ms/op 1.00
BLS verifyMultipleSignatures - same message - 128 - blst 4.0960 ms/op 4.0379 ms/op 1.01
BLS aggregatePubkeys 32 - blst 18.080 us/op 17.551 us/op 1.03
BLS aggregatePubkeys 128 - blst 64.410 us/op 62.517 us/op 1.03
getSlashingsAndExits - default max 58.291 us/op 54.511 us/op 1.07
getSlashingsAndExits - 2k 429.85 us/op 425.90 us/op 1.01
proposeBlockBody type=full, size=empty 700.87 us/op 555.88 us/op 1.26
isKnown best case - 1 super set check 197.00 ns/op 187.00 ns/op 1.05
isKnown normal case - 2 super set checks 166.00 ns/op 156.00 ns/op 1.06
isKnown worse case - 16 super set checks 164.00 ns/op 155.00 ns/op 1.06
validate api signedAggregateAndProof - struct 1.5686 ms/op 1.4649 ms/op 1.07
validate gossip signedAggregateAndProof - struct 1.5515 ms/op 1.4594 ms/op 1.06
batch validate gossip attestation - vc 640000 - chunk 32 114.35 us/op 108.83 us/op 1.05
batch validate gossip attestation - vc 640000 - chunk 64 102.56 us/op 96.028 us/op 1.07
batch validate gossip attestation - vc 640000 - chunk 128 93.234 us/op 91.398 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 256 87.308 us/op 89.707 us/op 0.97
bytes32 toHexString 293.00 ns/op 289.00 ns/op 1.01
bytes32 Buffer.toString(hex) 172.00 ns/op 176.00 ns/op 0.98
bytes32 Buffer.toString(hex) from Uint8Array 233.00 ns/op 241.00 ns/op 0.97
bytes32 Buffer.toString(hex) + 0x 173.00 ns/op 172.00 ns/op 1.01
Return object 10000 times 0.21510 ns/op 0.20940 ns/op 1.03
Throw Error 10000 times 3.3794 us/op 3.2305 us/op 1.05
toHex 100.97 ns/op 94.719 ns/op 1.07
Buffer.from 92.227 ns/op 83.892 ns/op 1.10
shared Buffer 61.165 ns/op 55.940 ns/op 1.09
fastMsgIdFn sha256 / 200 bytes 1.4910 us/op 1.4510 us/op 1.03
fastMsgIdFn h32 xxhash / 200 bytes 156.00 ns/op 158.00 ns/op 0.99
fastMsgIdFn h64 xxhash / 200 bytes 208.00 ns/op 206.00 ns/op 1.01
fastMsgIdFn sha256 / 1000 bytes 4.8210 us/op 4.6690 us/op 1.03
fastMsgIdFn h32 xxhash / 1000 bytes 246.00 ns/op 253.00 ns/op 0.97
fastMsgIdFn h64 xxhash / 1000 bytes 256.00 ns/op 257.00 ns/op 1.00
fastMsgIdFn sha256 / 10000 bytes 42.731 us/op 40.943 us/op 1.04
fastMsgIdFn h32 xxhash / 10000 bytes 1.3050 us/op 1.2610 us/op 1.03
fastMsgIdFn h64 xxhash / 10000 bytes 852.00 ns/op 830.00 ns/op 1.03
send data - 1000 256B messages 4.6658 ms/op 4.6803 ms/op 1.00
send data - 1000 512B messages 5.9228 ms/op 5.8100 ms/op 1.02
send data - 1000 1024B messages 6.1179 ms/op 6.1642 ms/op 0.99
send data - 1000 1200B messages 6.9220 ms/op 6.9578 ms/op 0.99
send data - 1000 2048B messages 10.114 ms/op 22.039 ms/op 0.46
send data - 1000 4096B messages 44.162 ms/op 63.320 ms/op 0.70
send data - 1000 16384B messages 326.81 ms/op 371.30 ms/op 0.88
send data - 1000 65536B messages 1.5050 s/op 1.1464 s/op 1.31
enrSubnets - fastDeserialize 64 bits 779.00 ns/op 713.00 ns/op 1.09
enrSubnets - ssz BitVector 64 bits 267.00 ns/op 255.00 ns/op 1.05
enrSubnets - fastDeserialize 4 bits 127.00 ns/op 98.000 ns/op 1.30
enrSubnets - ssz BitVector 4 bits 281.00 ns/op 255.00 ns/op 1.10
prioritizePeers score -10:0 att 32-0.1 sync 2-0 208.59 us/op 191.77 us/op 1.09
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 236.34 us/op 220.15 us/op 1.07
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 342.46 us/op 320.81 us/op 1.07
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 611.61 us/op 573.55 us/op 1.07
prioritizePeers score 0:0 att 64-1 sync 4-1 714.13 us/op 667.83 us/op 1.07
array of 16000 items push then shift 1.3076 us/op 1.1740 us/op 1.11
LinkedList of 16000 items push then shift 7.3100 ns/op 7.1880 ns/op 1.02
array of 16000 items push then pop 67.992 ns/op 63.254 ns/op 1.07
LinkedList of 16000 items push then pop 6.2100 ns/op 5.6830 ns/op 1.09
array of 24000 items push then shift 1.9251 us/op 1.7746 us/op 1.08
LinkedList of 24000 items push then shift 7.0010 ns/op 7.0050 ns/op 1.00
array of 24000 items push then pop 95.701 ns/op 88.352 ns/op 1.08
LinkedList of 24000 items push then pop 6.4160 ns/op 5.8470 ns/op 1.10
intersect bitArray bitLen 8 3.9510 ns/op 3.7540 ns/op 1.05
intersect array and set length 8 30.161 ns/op 28.254 ns/op 1.07
intersect bitArray bitLen 128 23.632 ns/op 22.156 ns/op 1.07
intersect array and set length 128 502.89 ns/op 482.36 ns/op 1.04
bitArray.getTrueBitIndexes() bitLen 128 949.00 ns/op 926.00 ns/op 1.02
bitArray.getTrueBitIndexes() bitLen 248 1.6800 us/op 1.6660 us/op 1.01
bitArray.getTrueBitIndexes() bitLen 512 3.4730 us/op 3.4230 us/op 1.01
Full columns - reconstruct all 6 blobs 108.97 us/op 495.87 us/op 0.22
Full columns - reconstruct half of the blobs out of 6 209.47 us/op 72.537 us/op 2.89
Full columns - reconstruct single blob out of 6 31.846 us/op 34.381 us/op 0.93
Half columns - reconstruct all 6 blobs 395.17 ms/op 377.09 ms/op 1.05
Half columns - reconstruct half of the blobs out of 6 196.87 ms/op 187.39 ms/op 1.05
Half columns - reconstruct single blob out of 6 70.267 ms/op 66.807 ms/op 1.05
Set add up to 64 items then delete first 1.6711 us/op 1.5583 us/op 1.07
OrderedSet add up to 64 items then delete first 2.5273 us/op 2.3925 us/op 1.06
Set add up to 64 items then delete last 1.8846 us/op 1.7631 us/op 1.07
OrderedSet add up to 64 items then delete last 2.7850 us/op 2.6643 us/op 1.05
Set add up to 64 items then delete middle 1.8865 us/op 1.7441 us/op 1.08
OrderedSet add up to 64 items then delete middle 4.2551 us/op 4.0222 us/op 1.06
Set add up to 128 items then delete first 4.0051 us/op 3.5831 us/op 1.12
OrderedSet add up to 128 items then delete first 6.2782 us/op 5.3221 us/op 1.18
Set add up to 128 items then delete last 3.6330 us/op 3.3452 us/op 1.09
OrderedSet add up to 128 items then delete last 5.4032 us/op 5.1139 us/op 1.06
Set add up to 128 items then delete middle 3.6669 us/op 3.3753 us/op 1.09
OrderedSet add up to 128 items then delete middle 11.383 us/op 10.510 us/op 1.08
Set add up to 256 items then delete first 7.4338 us/op 7.5167 us/op 0.99
OrderedSet add up to 256 items then delete first 11.670 us/op 11.787 us/op 0.99
Set add up to 256 items then delete last 7.1763 us/op 7.0978 us/op 1.01
OrderedSet add up to 256 items then delete last 11.091 us/op 10.997 us/op 1.01
Set add up to 256 items then delete middle 7.2815 us/op 7.0121 us/op 1.04
OrderedSet add up to 256 items then delete middle 35.555 us/op 33.203 us/op 1.07
runFastConfirmationRules vc:100000 bc:96 eq:0 5.2059 ms/op 4.3412 ms/op 1.20
runFastConfirmationRules vc:600000 bc:96 eq:0 34.672 ms/op 35.032 ms/op 0.99
runFastConfirmationRules vc:1000000 bc:96 eq:0 57.813 ms/op 60.093 ms/op 0.96
runFastConfirmationRules vc:600000 bc:320 eq:0 34.831 ms/op 35.536 ms/op 0.98
runFastConfirmationRules vc:100000 bc:96 eq:1000 1.1245 s/op 1.0579 s/op 1.06
pass gossip attestations to forkchoice per slot 2.6269 ms/op 2.5462 ms/op 1.03
forkChoice updateHead vc 100000 bc 64 eq 0 432.08 us/op 399.07 us/op 1.08
forkChoice updateHead vc 600000 bc 64 eq 0 2.5911 ms/op 2.4134 ms/op 1.07
forkChoice updateHead vc 1000000 bc 64 eq 0 3.9233 ms/op 3.9421 ms/op 1.00
forkChoice updateHead vc 600000 bc 320 eq 0 2.5880 ms/op 2.3940 ms/op 1.08
forkChoice updateHead vc 600000 bc 1200 eq 0 2.5884 ms/op 2.3881 ms/op 1.08
forkChoice updateHead vc 600000 bc 7200 eq 0 2.9475 ms/op 3.3436 ms/op 0.88
forkChoice updateHead vc 600000 bc 64 eq 1000 2.6231 ms/op 2.4117 ms/op 1.09
forkChoice updateHead vc 600000 bc 64 eq 10000 2.7571 ms/op 2.4559 ms/op 1.12
forkChoice updateHead vc 600000 bc 64 eq 300000 6.6701 ms/op 6.3187 ms/op 1.06
computeDeltas 1400000 validators 0% inactive 12.710 ms/op 12.138 ms/op 1.05
computeDeltas 1400000 validators 10% inactive 11.922 ms/op 11.251 ms/op 1.06
computeDeltas 1400000 validators 20% inactive 11.268 ms/op 10.840 ms/op 1.04
computeDeltas 1400000 validators 50% inactive 9.0945 ms/op 8.5754 ms/op 1.06
computeDeltas 2100000 validators 0% inactive 19.252 ms/op 18.161 ms/op 1.06
computeDeltas 2100000 validators 10% inactive 18.038 ms/op 17.466 ms/op 1.03
computeDeltas 2100000 validators 20% inactive 17.138 ms/op 15.979 ms/op 1.07
computeDeltas 2100000 validators 50% inactive 11.126 ms/op 10.706 ms/op 1.04
altair processAttestation - 250000 vs - 7PWei normalcase 1.7243 ms/op 2.7704 ms/op 0.62
altair processAttestation - 250000 vs - 7PWei worstcase 2.4649 ms/op 3.4683 ms/op 0.71
altair processAttestation - setStatus - 1/6 committees join 99.653 us/op 97.085 us/op 1.03
altair processAttestation - setStatus - 1/3 committees join 196.60 us/op 204.76 us/op 0.96
altair processAttestation - setStatus - 1/2 committees join 284.08 us/op 275.75 us/op 1.03
altair processAttestation - setStatus - 2/3 committees join 370.19 us/op 356.27 us/op 1.04
altair processAttestation - setStatus - 4/5 committees join 513.23 us/op 490.17 us/op 1.05
altair processAttestation - setStatus - 100% committees join 617.72 us/op 587.79 us/op 1.05
altair processBlock - 250000 vs - 7PWei normalcase 4.8049 ms/op 4.1240 ms/op 1.17
altair processBlock - 250000 vs - 7PWei normalcase hashState 13.944 ms/op 16.465 ms/op 0.85
altair processBlock - 250000 vs - 7PWei worstcase 23.167 ms/op 21.657 ms/op 1.07
altair processBlock - 250000 vs - 7PWei worstcase hashState 46.475 ms/op 44.641 ms/op 1.04
phase0 processBlock - 250000 vs - 7PWei normalcase 1.4380 ms/op 1.4159 ms/op 1.02
phase0 processBlock - 250000 vs - 7PWei worstcase 18.283 ms/op 16.561 ms/op 1.10
altair processEth1Data - 250000 vs - 7PWei normalcase 332.60 us/op 286.15 us/op 1.16
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 3.5300 us/op 4.8750 us/op 0.72
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 23.499 us/op 20.182 us/op 1.16
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 6.9320 us/op 6.2120 us/op 1.12
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 3.6990 us/op 4.6750 us/op 0.79
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 95.521 us/op 93.393 us/op 1.02
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.3711 ms/op 1.3491 ms/op 1.02
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8407 ms/op 1.7943 ms/op 1.03
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.9695 ms/op 1.8052 ms/op 1.09
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.5122 ms/op 4.3727 ms/op 1.03
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.0776 ms/op 2.0146 ms/op 1.03
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.7999 ms/op 4.8464 ms/op 0.78
Tree 40 250000 create 364.51 ms/op 330.84 ms/op 1.10
Tree 40 250000 get(125000) 98.591 ns/op 87.851 ns/op 1.12
Tree 40 250000 set(125000) 1.0401 us/op 965.73 ns/op 1.08
Tree 40 250000 toArray() 13.654 ms/op 16.466 ms/op 0.83
Tree 40 250000 iterate all - toArray() + loop 14.131 ms/op 17.350 ms/op 0.81
Tree 40 250000 iterate all - get(i) 42.428 ms/op 38.866 ms/op 1.09
Array 250000 create 2.2010 ms/op 2.0956 ms/op 1.05
Array 250000 clone - spread 672.11 us/op 648.81 us/op 1.04
Array 250000 get(125000) 0.30600 ns/op 0.28600 ns/op 1.07
Array 250000 set(125000) 0.31000 ns/op 0.28700 ns/op 1.08
Array 250000 iterate all - loop 58.418 us/op 55.620 us/op 1.05
phase0 afterProcessEpoch - 250000 vs - 7PWei 41.063 ms/op 38.666 ms/op 1.06
Array.fill - length 1000000 2.2390 ms/op 6.2398 ms/op 0.36
Array push - length 1000000 7.5981 ms/op 7.8085 ms/op 0.97
Array.get 0.20961 ns/op 0.20622 ns/op 1.02
Uint8Array.get 0.23873 ns/op 0.22754 ns/op 1.05
phase0 beforeProcessEpoch - 250000 vs - 7PWei 19.352 ms/op 15.558 ms/op 1.24
altair processEpoch - mainnet_e81889 333.67 ms/op 263.82 ms/op 1.26
mainnet_e81889 - altair beforeProcessEpoch 44.648 ms/op 21.698 ms/op 2.06
mainnet_e81889 - altair processJustificationAndFinalization 8.5170 us/op 6.4360 us/op 1.32
mainnet_e81889 - altair processInactivityUpdates 5.7712 ms/op 5.7486 ms/op 1.00
mainnet_e81889 - altair processRewardsAndPenalties 20.226 ms/op 20.073 ms/op 1.01
mainnet_e81889 - altair processRegistryUpdates 610.00 ns/op 578.00 ns/op 1.06
mainnet_e81889 - altair processSlashings 156.00 ns/op 137.00 ns/op 1.14
mainnet_e81889 - altair processEth1DataReset 151.00 ns/op 134.00 ns/op 1.13
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.7421 ms/op 2.8210 ms/op 0.62
mainnet_e81889 - altair processSlashingsReset 737.00 ns/op 725.00 ns/op 1.02
mainnet_e81889 - altair processRandaoMixesReset 1.4190 us/op 1.3920 us/op 1.02
mainnet_e81889 - altair processHistoricalRootsUpdate 148.00 ns/op 133.00 ns/op 1.11
mainnet_e81889 - altair processParticipationFlagUpdates 491.00 ns/op 456.00 ns/op 1.08
mainnet_e81889 - altair processSyncCommitteeUpdates 118.00 ns/op 109.00 ns/op 1.08
mainnet_e81889 - altair afterProcessEpoch 41.084 ms/op 41.859 ms/op 0.98
capella processEpoch - mainnet_e217614 986.57 ms/op 856.94 ms/op 1.15
mainnet_e217614 - capella beforeProcessEpoch 56.521 ms/op 61.958 ms/op 0.91
mainnet_e217614 - capella processJustificationAndFinalization 7.9990 us/op 6.7570 us/op 1.18
mainnet_e217614 - capella processInactivityUpdates 15.715 ms/op 15.766 ms/op 1.00
mainnet_e217614 - capella processRewardsAndPenalties 92.639 ms/op 96.668 ms/op 0.96
mainnet_e217614 - capella processRegistryUpdates 4.4520 us/op 4.6530 us/op 0.96
mainnet_e217614 - capella processSlashings 155.00 ns/op 145.00 ns/op 1.07
mainnet_e217614 - capella processEth1DataReset 156.00 ns/op 144.00 ns/op 1.08
mainnet_e217614 - capella processEffectiveBalanceUpdates 14.945 ms/op 20.880 ms/op 0.72
mainnet_e217614 - capella processSlashingsReset 696.00 ns/op 716.00 ns/op 0.97
mainnet_e217614 - capella processRandaoMixesReset 1.4010 us/op 1.3800 us/op 1.02
mainnet_e217614 - capella processHistoricalRootsUpdate 151.00 ns/op 144.00 ns/op 1.05
mainnet_e217614 - capella processParticipationFlagUpdates 488.00 ns/op 462.00 ns/op 1.06
mainnet_e217614 - capella afterProcessEpoch 111.19 ms/op 107.58 ms/op 1.03
phase0 processEpoch - mainnet_e58758 319.43 ms/op 326.17 ms/op 0.98
mainnet_e58758 - phase0 beforeProcessEpoch 68.456 ms/op 70.694 ms/op 0.97
mainnet_e58758 - phase0 processJustificationAndFinalization 6.9760 us/op 6.4750 us/op 1.08
mainnet_e58758 - phase0 processRewardsAndPenalties 16.947 ms/op 16.198 ms/op 1.05
mainnet_e58758 - phase0 processRegistryUpdates 2.3350 us/op 3.3540 us/op 0.70
mainnet_e58758 - phase0 processSlashings 152.00 ns/op 133.00 ns/op 1.14
mainnet_e58758 - phase0 processEth1DataReset 142.00 ns/op 133.00 ns/op 1.07
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 867.34 us/op 1.7802 ms/op 0.49
mainnet_e58758 - phase0 processSlashingsReset 875.00 ns/op 904.00 ns/op 0.97
mainnet_e58758 - phase0 processRandaoMixesReset 1.4650 us/op 1.3680 us/op 1.07
mainnet_e58758 - phase0 processHistoricalRootsUpdate 149.00 ns/op 136.00 ns/op 1.10
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.2820 us/op 1.2900 us/op 0.99
mainnet_e58758 - phase0 afterProcessEpoch 33.990 ms/op 33.138 ms/op 1.03
phase0 processEffectiveBalanceUpdates - 250000 normalcase 972.34 us/op 976.74 us/op 1.00
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.1485 ms/op 1.7790 ms/op 1.21
altair processInactivityUpdates - 250000 normalcase 10.838 ms/op 11.505 ms/op 0.94
altair processInactivityUpdates - 250000 worstcase 10.953 ms/op 11.512 ms/op 0.95
phase0 processRegistryUpdates - 250000 normalcase 2.9460 us/op 2.2100 us/op 1.33
phase0 processRegistryUpdates - 250000 badcase_full_deposits 142.74 us/op 134.84 us/op 1.06
phase0 processRegistryUpdates - 250000 worstcase 0.5 67.957 ms/op 76.471 ms/op 0.89
altair processRewardsAndPenalties - 250000 normalcase 15.486 ms/op 16.078 ms/op 0.96
altair processRewardsAndPenalties - 250000 worstcase 15.182 ms/op 15.185 ms/op 1.00
phase0 getAttestationDeltas - 250000 normalcase 5.1873 ms/op 5.2009 ms/op 1.00
phase0 getAttestationDeltas - 250000 worstcase 5.1187 ms/op 7.3142 ms/op 0.70
phase0 processSlashings - 250000 worstcase 56.703 us/op 60.366 us/op 0.94
altair processSyncCommitteeUpdates - 250000 9.8072 ms/op 10.185 ms/op 0.96
BeaconState.hashTreeRoot - No change 180.00 ns/op 168.00 ns/op 1.07
BeaconState.hashTreeRoot - 1 full validator 61.484 us/op 86.462 us/op 0.71
BeaconState.hashTreeRoot - 32 full validator 620.04 us/op 902.42 us/op 0.69
BeaconState.hashTreeRoot - 512 full validator 6.3055 ms/op 8.5496 ms/op 0.74
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 119.92 us/op 107.49 us/op 1.12
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.6891 ms/op 1.4907 ms/op 1.13
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 14.296 ms/op 20.492 ms/op 0.70
BeaconState.hashTreeRoot - 1 balances 79.201 us/op 77.660 us/op 1.02
BeaconState.hashTreeRoot - 32 balances 550.55 us/op 713.91 us/op 0.77
BeaconState.hashTreeRoot - 512 balances 4.9068 ms/op 6.4851 ms/op 0.76
BeaconState.hashTreeRoot - 250000 balances 161.63 ms/op 144.56 ms/op 1.12
aggregationBits - 2048 els - zipIndexesInBitList 19.669 us/op 19.773 us/op 0.99
regular array get 100000 times 22.746 us/op 22.581 us/op 1.01
wrappedArray get 100000 times 22.716 us/op 22.720 us/op 1.00
arrayWithProxy get 100000 times 10.166 ms/op 13.073 ms/op 0.78
ssz.Root.equals 21.459 ns/op 21.024 ns/op 1.02
byteArrayEquals 21.276 ns/op 20.883 ns/op 1.02
Buffer.compare 8.9250 ns/op 8.6400 ns/op 1.03
processSlot - 1 slots 10.155 us/op 10.671 us/op 0.95
processSlot - 32 slots 2.4028 ms/op 2.2372 ms/op 1.07
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 4.0157 ms/op 4.9355 ms/op 0.81
getCommitteeAssignments - req 1 vs - 250000 vc 1.6016 ms/op 1.6198 ms/op 0.99
getCommitteeAssignments - req 100 vs - 250000 vc 3.2695 ms/op 3.3328 ms/op 0.98
getCommitteeAssignments - req 1000 vs - 250000 vc 3.5133 ms/op 3.6009 ms/op 0.98
findModifiedValidators - 10000 modified validators 785.19 ms/op 789.12 ms/op 1.00
findModifiedValidators - 1000 modified validators 532.25 ms/op 519.32 ms/op 1.02
findModifiedValidators - 100 modified validators 263.13 ms/op 345.91 ms/op 0.76
findModifiedValidators - 10 modified validators 171.94 ms/op 170.25 ms/op 1.01
findModifiedValidators - 1 modified validators 133.10 ms/op 192.00 ms/op 0.69
findModifiedValidators - no difference 134.72 ms/op 193.35 ms/op 0.70
migrate state 1500000 validators, 3400 modified, 2000 new 3.5936 s/op 3.3173 s/op 1.08
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.8100 ns/op 3.7000 ns/op 1.03
state getBlockRootAtSlot - 250000 vs - 7PWei 462.60 ns/op 420.93 ns/op 1.10
computeProposerIndex 100000 validators 1.2827 ms/op 1.3373 ms/op 0.96
getNextSyncCommitteeIndices 1000 validators 2.7116 ms/op 2.8621 ms/op 0.95
getNextSyncCommitteeIndices 10000 validators 24.174 ms/op 25.690 ms/op 0.94
getNextSyncCommitteeIndices 100000 validators 80.504 ms/op 87.904 ms/op 0.92
computeProposers - vc 250000 528.28 us/op 575.42 us/op 0.92
computeEpochShuffling - vc 250000 37.211 ms/op 40.149 ms/op 0.93
getNextSyncCommittee - vc 250000 9.0924 ms/op 9.4953 ms/op 0.96
nodejs block root to RootHex using toHex 92.152 ns/op 97.220 ns/op 0.95
nodejs block root to RootHex using toRootHex 59.007 ns/op 59.848 ns/op 0.99
nodejs fromHex(blob) 816.67 us/op 877.90 us/op 0.93
nodejs fromHexInto(blob) 661.71 us/op 622.41 us/op 1.06
nodejs block root to RootHex using the deprecated toHexString 498.73 ns/op 471.19 ns/op 1.06
nodejs byteArrayEquals 32 bytes (block root) 25.929 ns/op 26.045 ns/op 1.00
nodejs byteArrayEquals 48 bytes (pubkey) 37.560 ns/op 36.971 ns/op 1.02
nodejs byteArrayEquals 96 bytes (signature) 39.842 ns/op 33.821 ns/op 1.18
nodejs byteArrayEquals 1024 bytes 45.878 ns/op 41.186 ns/op 1.11
nodejs byteArrayEquals 131072 bytes (blob) 1.7417 us/op 1.7331 us/op 1.00
browser block root to RootHex using toHex 146.04 ns/op 140.96 ns/op 1.04
browser block root to RootHex using toRootHex 131.61 ns/op 128.42 ns/op 1.02
browser fromHex(blob) 1.6294 ms/op 1.6743 ms/op 0.97
browser fromHexInto(blob) 663.04 us/op 624.45 us/op 1.06
browser block root to RootHex using the deprecated toHexString 348.04 ns/op 327.44 ns/op 1.06
browser byteArrayEquals 32 bytes (block root) 27.930 ns/op 27.419 ns/op 1.02
browser byteArrayEquals 48 bytes (pubkey) 39.292 ns/op 39.083 ns/op 1.01
browser byteArrayEquals 96 bytes (signature) 73.898 ns/op 72.420 ns/op 1.02
browser byteArrayEquals 1024 bytes 748.55 ns/op 752.21 ns/op 1.00
browser byteArrayEquals 131072 bytes (blob) 94.931 us/op 95.093 us/op 1.00

by benchmarkbot/action

…the two limits

MAX_REQUEST_PAYLOADS and MAX_REQUEST_BLOCKS_DENEB both default to 128, so
the test also passed against the previous implementation using the block
limit. Verified the test now fails when the quota reads
MAX_REQUEST_BLOCKS_DENEB and passes with the fix.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread packages/beacon-node/test/unit/network/reqresp/rateLimit.test.ts Outdated
@nflaig
nflaig enabled auto-merge (squash) August 4, 2026 09:18
@nflaig
nflaig merged commit d9bad17 into unstable Aug 4, 2026
19 checks passed
@nflaig
nflaig deleted the nc/envelope-range-quota branch August 4, 2026 09:38
@wemeetagain

Copy link
Copy Markdown
Member

🎉 This PR is included in v1.46.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants