Skip to content

feat: better self-rate-limit handling#9335

Merged
nflaig merged 3 commits intounstablefrom
cayman/rate-limit-backoff-2
May 7, 2026
Merged

feat: better self-rate-limit handling#9335
nflaig merged 3 commits intounstablefrom
cayman/rate-limit-backoff-2

Conversation

@wemeetagain
Copy link
Copy Markdown
Member

Motivation

Description

  • track rate limits per-peer, per-protocol on the reqresp layer (note that in range and unknown block sync the rate limit is still just per-peer for simplicity)
  • include rate-limit timestamp in rate limit errors (use this in range and unknown block sync for backoff time)
  • use rate limit in unknown block sync (see this comment: feat(reqresp): track peer rate-limit backoff in SelfRateLimiter #9034 (comment))
  • add a timer in range and unknown block sync to trigger another download attempt after backoff time (handles the case where all peers are rate-limited and the sync needs a wake-up)

AI Assistance Disclosure

  • codex assistance

@wemeetagain wemeetagain requested a review from a team as a code owner May 6, 2026 18:09
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a protocol-aware rate-limiting backoff mechanism for unknown block synchronization. It adds the UnknownBlockRateLimitedError class and updates BlockInputSync to handle retries using specific backoff timestamps. Additionally, SelfRateLimiter and UnknownBlockPeerBalancer were refactored to track and respect these limits per peer and protocol. Feedback suggests refactoring getNextRateLimitRetryAt to separate cleanup side effects from the query logic for better maintainability.

Comment thread packages/beacon-node/src/sync/unknownBlock.ts
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 3fa5e80 Previous: e3c96e7 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.3536 ms/op 867.40 us/op 1.56
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 41.510 us/op 38.878 us/op 1.07
BLS verify - blst 728.70 us/op 723.27 us/op 1.01
BLS verifyMultipleSignatures 3 - blst 1.3916 ms/op 1.3370 ms/op 1.04
BLS verifyMultipleSignatures 8 - blst 2.2155 ms/op 2.1358 ms/op 1.04
BLS verifyMultipleSignatures 32 - blst 7.4036 ms/op 6.6378 ms/op 1.12
BLS verifyMultipleSignatures 64 - blst 13.714 ms/op 12.964 ms/op 1.06
BLS verifyMultipleSignatures 128 - blst 26.797 ms/op 25.121 ms/op 1.07
BLS deserializing 10000 signatures 632.26 ms/op 638.73 ms/op 0.99
BLS deserializing 100000 signatures 6.5713 s/op 6.5219 s/op 1.01
BLS verifyMultipleSignatures - same message - 3 - blst 833.75 us/op 826.64 us/op 1.01
BLS verifyMultipleSignatures - same message - 8 - blst 918.68 us/op 895.88 us/op 1.03
BLS verifyMultipleSignatures - same message - 32 - blst 1.5107 ms/op 1.5405 ms/op 0.98
BLS verifyMultipleSignatures - same message - 64 - blst 2.4150 ms/op 2.4222 ms/op 1.00
BLS verifyMultipleSignatures - same message - 128 - blst 4.0894 ms/op 4.0633 ms/op 1.01
BLS aggregatePubkeys 32 - blst 18.601 us/op 17.929 us/op 1.04
BLS aggregatePubkeys 128 - blst 66.000 us/op 64.171 us/op 1.03
getSlashingsAndExits - default max 49.221 us/op 45.168 us/op 1.09
getSlashingsAndExits - 2k 401.24 us/op 354.78 us/op 1.13
proposeBlockBody type=full, size=empty 698.41 us/op 701.09 us/op 1.00
isKnown best case - 1 super set check 200.00 ns/op 201.00 ns/op 1.00
isKnown normal case - 2 super set checks 166.00 ns/op 172.00 ns/op 0.97
isKnown worse case - 16 super set checks 163.00 ns/op 167.00 ns/op 0.98
validate api signedAggregateAndProof - struct 1.5349 ms/op 1.5173 ms/op 1.01
validate gossip signedAggregateAndProof - struct 1.5296 ms/op 1.5076 ms/op 1.01
batch validate gossip attestation - vc 640000 - chunk 32 109.82 us/op 107.17 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 64 98.296 us/op 93.368 us/op 1.05
batch validate gossip attestation - vc 640000 - chunk 128 89.933 us/op 86.681 us/op 1.04
batch validate gossip attestation - vc 640000 - chunk 256 86.884 us/op 83.756 us/op 1.04
bytes32 toHexString 301.00 ns/op 287.00 ns/op 1.05
bytes32 Buffer.toString(hex) 185.00 ns/op 169.00 ns/op 1.09
bytes32 Buffer.toString(hex) from Uint8Array 254.00 ns/op 252.00 ns/op 1.01
bytes32 Buffer.toString(hex) + 0x 185.00 ns/op 173.00 ns/op 1.07
Return object 10000 times 0.22240 ns/op 0.21260 ns/op 1.05
Throw Error 10000 times 3.5659 us/op 3.2621 us/op 1.09
toHex 102.94 ns/op 93.735 ns/op 1.10
Buffer.from 92.418 ns/op 84.270 ns/op 1.10
shared Buffer 59.579 ns/op 55.735 ns/op 1.07
fastMsgIdFn sha256 / 200 bytes 1.5330 us/op 1.4740 us/op 1.04
fastMsgIdFn h32 xxhash / 200 bytes 160.00 ns/op 153.00 ns/op 1.05
fastMsgIdFn h64 xxhash / 200 bytes 213.00 ns/op 210.00 ns/op 1.01
fastMsgIdFn sha256 / 1000 bytes 4.9000 us/op 4.9450 us/op 0.99
fastMsgIdFn h32 xxhash / 1000 bytes 252.00 ns/op 250.00 ns/op 1.01
fastMsgIdFn h64 xxhash / 1000 bytes 266.00 ns/op 261.00 ns/op 1.02
fastMsgIdFn sha256 / 10000 bytes 43.274 us/op 43.560 us/op 0.99
fastMsgIdFn h32 xxhash / 10000 bytes 1.2920 us/op 1.2790 us/op 1.01
fastMsgIdFn h64 xxhash / 10000 bytes 835.00 ns/op 831.00 ns/op 1.00
send data - 1000 256B messages 4.2429 ms/op 4.1404 ms/op 1.02
send data - 1000 512B messages 4.4977 ms/op 4.4265 ms/op 1.02
send data - 1000 1024B messages 4.5748 ms/op 4.8105 ms/op 0.95
send data - 1000 1200B messages 4.8117 ms/op 5.0545 ms/op 0.95
send data - 1000 2048B messages 4.9003 ms/op 5.1966 ms/op 0.94
send data - 1000 4096B messages 5.5591 ms/op 7.0384 ms/op 0.79
send data - 1000 16384B messages 14.148 ms/op 21.391 ms/op 0.66
send data - 1000 65536B messages 187.57 ms/op 179.13 ms/op 1.05
enrSubnets - fastDeserialize 64 bits 765.00 ns/op 716.00 ns/op 1.07
enrSubnets - ssz BitVector 64 bits 264.00 ns/op 278.00 ns/op 0.95
enrSubnets - fastDeserialize 4 bits 107.00 ns/op 102.00 ns/op 1.05
enrSubnets - ssz BitVector 4 bits 267.00 ns/op 273.00 ns/op 0.98
prioritizePeers score -10:0 att 32-0.1 sync 2-0 214.83 us/op 203.76 us/op 1.05
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 228.54 us/op 250.11 us/op 0.91
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 332.09 us/op 350.37 us/op 0.95
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 623.63 us/op 599.41 us/op 1.04
prioritizePeers score 0:0 att 64-1 sync 4-1 744.99 us/op 694.09 us/op 1.07
array of 16000 items push then shift 1.3434 us/op 1.2388 us/op 1.08
LinkedList of 16000 items push then shift 7.5730 ns/op 7.4690 ns/op 1.01
array of 16000 items push then pop 67.009 ns/op 65.656 ns/op 1.02
LinkedList of 16000 items push then pop 6.2130 ns/op 5.9670 ns/op 1.04
array of 24000 items push then shift 1.9799 us/op 1.8481 us/op 1.07
LinkedList of 24000 items push then shift 7.1620 ns/op 7.0770 ns/op 1.01
array of 24000 items push then pop 95.792 ns/op 93.068 ns/op 1.03
LinkedList of 24000 items push then pop 6.2090 ns/op 5.9860 ns/op 1.04
intersect bitArray bitLen 8 4.8870 ns/op 4.7460 ns/op 1.03
intersect array and set length 8 30.180 ns/op 28.984 ns/op 1.04
intersect bitArray bitLen 128 24.670 ns/op 24.127 ns/op 1.02
intersect array and set length 128 513.62 ns/op 496.17 ns/op 1.04
bitArray.getTrueBitIndexes() bitLen 128 1.0700 us/op 1.0400 us/op 1.03
bitArray.getTrueBitIndexes() bitLen 248 1.7480 us/op 1.7590 us/op 0.99
bitArray.getTrueBitIndexes() bitLen 512 3.6360 us/op 3.5430 us/op 1.03
Full columns - reconstruct all 6 blobs 111.09 us/op 182.77 us/op 0.61
Full columns - reconstruct half of the blobs out of 6 62.375 us/op 66.004 us/op 0.95
Full columns - reconstruct single blob out of 6 31.459 us/op 30.258 us/op 1.04
Half columns - reconstruct all 6 blobs 391.52 ms/op 377.08 ms/op 1.04
Half columns - reconstruct half of the blobs out of 6 193.82 ms/op 187.57 ms/op 1.03
Half columns - reconstruct single blob out of 6 70.514 ms/op 68.112 ms/op 1.04
Full columns - reconstruct all 10 blobs 179.68 us/op 412.84 us/op 0.44
Full columns - reconstruct half of the blobs out of 10 95.379 us/op 153.49 us/op 0.62
Full columns - reconstruct single blob out of 10 32.246 us/op 47.714 us/op 0.68
Half columns - reconstruct all 10 blobs 644.60 ms/op 628.34 ms/op 1.03
Half columns - reconstruct half of the blobs out of 10 328.29 ms/op 316.49 ms/op 1.04
Half columns - reconstruct single blob out of 10 70.941 ms/op 66.754 ms/op 1.06
Full columns - reconstruct all 20 blobs 545.75 us/op 1.4682 ms/op 0.37
Full columns - reconstruct half of the blobs out of 20 228.89 us/op 350.75 us/op 0.65
Full columns - reconstruct single blob out of 20 33.088 us/op 28.789 us/op 1.15
Half columns - reconstruct all 20 blobs 1.2907 s/op 1.2349 s/op 1.05
Half columns - reconstruct half of the blobs out of 20 646.71 ms/op 612.20 ms/op 1.06
Half columns - reconstruct single blob out of 20 71.993 ms/op 65.737 ms/op 1.10
Set add up to 64 items then delete first 1.9910 us/op 2.3840 us/op 0.84
OrderedSet add up to 64 items then delete first 3.1752 us/op 3.1657 us/op 1.00
Set add up to 64 items then delete last 1.9858 us/op 2.2260 us/op 0.89
OrderedSet add up to 64 items then delete last 3.2368 us/op 3.2490 us/op 1.00
Set add up to 64 items then delete middle 2.0257 us/op 2.0511 us/op 0.99
OrderedSet add up to 64 items then delete middle 4.6749 us/op 4.7185 us/op 0.99
Set add up to 128 items then delete first 3.9477 us/op 3.9608 us/op 1.00
OrderedSet add up to 128 items then delete first 5.6388 us/op 5.9692 us/op 0.94
Set add up to 128 items then delete last 3.7371 us/op 3.7931 us/op 0.99
OrderedSet add up to 128 items then delete last 5.8377 us/op 5.7327 us/op 1.02
Set add up to 128 items then delete middle 3.7243 us/op 3.7163 us/op 1.00
OrderedSet add up to 128 items then delete middle 11.533 us/op 11.723 us/op 0.98
Set add up to 256 items then delete first 7.3986 us/op 7.3288 us/op 1.01
OrderedSet add up to 256 items then delete first 11.285 us/op 11.441 us/op 0.99
Set add up to 256 items then delete last 9.1405 us/op 7.4033 us/op 1.23
OrderedSet add up to 256 items then delete last 14.030 us/op 11.814 us/op 1.19
Set add up to 256 items then delete middle 9.4857 us/op 7.4904 us/op 1.27
OrderedSet add up to 256 items then delete middle 36.736 us/op 35.508 us/op 1.03
pass gossip attestations to forkchoice per slot 2.7783 ms/op 2.5267 ms/op 1.10
forkChoice updateHead vc 100000 bc 64 eq 0 415.01 us/op 393.17 us/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 0 2.4714 ms/op 2.3389 ms/op 1.06
forkChoice updateHead vc 1000000 bc 64 eq 0 4.0736 ms/op 3.8314 ms/op 1.06
forkChoice updateHead vc 600000 bc 320 eq 0 2.4682 ms/op 2.4258 ms/op 1.02
forkChoice updateHead vc 600000 bc 1200 eq 0 2.5741 ms/op 2.3561 ms/op 1.09
forkChoice updateHead vc 600000 bc 7200 eq 0 3.5100 ms/op 2.8075 ms/op 1.25
forkChoice updateHead vc 600000 bc 64 eq 1000 3.1676 ms/op 2.9124 ms/op 1.09
forkChoice updateHead vc 600000 bc 64 eq 10000 3.1677 ms/op 3.0687 ms/op 1.03
forkChoice updateHead vc 600000 bc 64 eq 300000 7.1998 ms/op 6.7290 ms/op 1.07
computeDeltas 1400000 validators 0% inactive 13.168 ms/op 12.468 ms/op 1.06
computeDeltas 1400000 validators 10% inactive 12.414 ms/op 11.609 ms/op 1.07
computeDeltas 1400000 validators 20% inactive 11.231 ms/op 10.432 ms/op 1.08
computeDeltas 1400000 validators 50% inactive 8.7153 ms/op 8.0622 ms/op 1.08
computeDeltas 2100000 validators 0% inactive 19.791 ms/op 18.556 ms/op 1.07
computeDeltas 2100000 validators 10% inactive 18.342 ms/op 17.455 ms/op 1.05
computeDeltas 2100000 validators 20% inactive 16.371 ms/op 15.908 ms/op 1.03
computeDeltas 2100000 validators 50% inactive 9.7300 ms/op 9.2818 ms/op 1.05
altair processAttestation - 250000 vs - 7PWei normalcase 2.5727 ms/op 2.6751 ms/op 0.96
altair processAttestation - 250000 vs - 7PWei worstcase 3.4940 ms/op 3.0720 ms/op 1.14
altair processAttestation - setStatus - 1/6 committees join 105.33 us/op 100.41 us/op 1.05
altair processAttestation - setStatus - 1/3 committees join 196.93 us/op 202.31 us/op 0.97
altair processAttestation - setStatus - 1/2 committees join 280.13 us/op 278.18 us/op 1.01
altair processAttestation - setStatus - 2/3 committees join 366.06 us/op 360.38 us/op 1.02
altair processAttestation - setStatus - 4/5 committees join 507.33 us/op 507.93 us/op 1.00
altair processAttestation - setStatus - 100% committees join 595.20 us/op 600.48 us/op 0.99
altair processBlock - 250000 vs - 7PWei normalcase 3.8991 ms/op 3.9460 ms/op 0.99
altair processBlock - 250000 vs - 7PWei normalcase hashState 19.177 ms/op 15.761 ms/op 1.22
altair processBlock - 250000 vs - 7PWei worstcase 21.903 ms/op 21.363 ms/op 1.03
altair processBlock - 250000 vs - 7PWei worstcase hashState 46.676 ms/op 42.009 ms/op 1.11
phase0 processBlock - 250000 vs - 7PWei normalcase 1.5376 ms/op 1.3878 ms/op 1.11
phase0 processBlock - 250000 vs - 7PWei worstcase 18.090 ms/op 17.505 ms/op 1.03
altair processEth1Data - 250000 vs - 7PWei normalcase 279.87 us/op 306.05 us/op 0.91
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 5.3710 us/op 3.8970 us/op 1.38
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 19.048 us/op 21.238 us/op 0.90
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 5.6010 us/op 6.1840 us/op 0.91
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 3.5160 us/op 3.6260 us/op 0.97
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 93.560 us/op 94.297 us/op 0.99
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.3114 ms/op 1.3747 ms/op 0.95
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.7439 ms/op 1.7783 ms/op 0.98
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.7284 ms/op 1.7546 ms/op 0.99
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.9632 ms/op 3.5480 ms/op 1.12
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.1314 ms/op 2.0460 ms/op 1.04
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.0897 ms/op 3.7865 ms/op 1.08
Tree 40 250000 create 361.61 ms/op 316.57 ms/op 1.14
Tree 40 250000 get(125000) 89.982 ns/op 90.192 ns/op 1.00
Tree 40 250000 set(125000) 961.10 ns/op 979.16 ns/op 0.98
Tree 40 250000 toArray() 16.147 ms/op 11.810 ms/op 1.37
Tree 40 250000 iterate all - toArray() + loop 17.621 ms/op 13.265 ms/op 1.33
Tree 40 250000 iterate all - get(i) 38.710 ms/op 36.939 ms/op 1.05
Array 250000 create 2.1860 ms/op 2.2530 ms/op 0.97
Array 250000 clone - spread 665.30 us/op 684.38 us/op 0.97
Array 250000 get(125000) 0.28600 ns/op 0.29400 ns/op 0.97
Array 250000 set(125000) 0.29200 ns/op 0.29800 ns/op 0.98
Array 250000 iterate all - loop 56.181 us/op 56.771 us/op 0.99
phase0 afterProcessEpoch - 250000 vs - 7PWei 38.133 ms/op 44.653 ms/op 0.85
Array.fill - length 1000000 2.2818 ms/op 2.0982 ms/op 1.09
Array push - length 1000000 7.9991 ms/op 8.8477 ms/op 0.90
Array.get 0.21136 ns/op 0.20277 ns/op 1.04
Uint8Array.get 0.23714 ns/op 0.24494 ns/op 0.97
phase0 beforeProcessEpoch - 250000 vs - 7PWei 15.812 ms/op 14.534 ms/op 1.09
altair processEpoch - mainnet_e81889 317.89 ms/op 294.13 ms/op 1.08
mainnet_e81889 - altair beforeProcessEpoch 22.656 ms/op 17.645 ms/op 1.28
mainnet_e81889 - altair processJustificationAndFinalization 6.8080 us/op 6.3890 us/op 1.07
mainnet_e81889 - altair processInactivityUpdates 4.1532 ms/op 7.3466 ms/op 0.57
mainnet_e81889 - altair processRewardsAndPenalties 19.375 ms/op 21.982 ms/op 0.88
mainnet_e81889 - altair processRegistryUpdates 516.00 ns/op 552.00 ns/op 0.93
mainnet_e81889 - altair processSlashings 130.00 ns/op 125.00 ns/op 1.04
mainnet_e81889 - altair processEth1DataReset 125.00 ns/op 131.00 ns/op 0.95
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.3514 ms/op 1.5597 ms/op 1.51
mainnet_e81889 - altair processSlashingsReset 665.00 ns/op 692.00 ns/op 0.96
mainnet_e81889 - altair processRandaoMixesReset 1.3390 us/op 1.3010 us/op 1.03
mainnet_e81889 - altair processHistoricalRootsUpdate 137.00 ns/op 129.00 ns/op 1.06
mainnet_e81889 - altair processParticipationFlagUpdates 430.00 ns/op 439.00 ns/op 0.98
mainnet_e81889 - altair processSyncCommitteeUpdates 111.00 ns/op 104.00 ns/op 1.07
mainnet_e81889 - altair afterProcessEpoch 42.853 ms/op 42.507 ms/op 1.01
capella processEpoch - mainnet_e217614 990.50 ms/op 835.04 ms/op 1.19
mainnet_e217614 - capella beforeProcessEpoch 62.778 ms/op 61.934 ms/op 1.01
mainnet_e217614 - capella processJustificationAndFinalization 6.9030 us/op 5.9020 us/op 1.17
mainnet_e217614 - capella processInactivityUpdates 17.704 ms/op 16.989 ms/op 1.04
mainnet_e217614 - capella processRewardsAndPenalties 101.17 ms/op 95.357 ms/op 1.06
mainnet_e217614 - capella processRegistryUpdates 4.6500 us/op 4.5100 us/op 1.03
mainnet_e217614 - capella processSlashings 143.00 ns/op 126.00 ns/op 1.13
mainnet_e217614 - capella processEth1DataReset 134.00 ns/op 122.00 ns/op 1.10
mainnet_e217614 - capella processEffectiveBalanceUpdates 9.3074 ms/op 12.943 ms/op 0.72
mainnet_e217614 - capella processSlashingsReset 696.00 ns/op 695.00 ns/op 1.00
mainnet_e217614 - capella processRandaoMixesReset 1.3380 us/op 1.1460 us/op 1.17
mainnet_e217614 - capella processHistoricalRootsUpdate 137.00 ns/op 125.00 ns/op 1.10
mainnet_e217614 - capella processParticipationFlagUpdates 433.00 ns/op 427.00 ns/op 1.01
mainnet_e217614 - capella afterProcessEpoch 111.30 ms/op 108.76 ms/op 1.02
phase0 processEpoch - mainnet_e58758 360.38 ms/op 301.34 ms/op 1.20
mainnet_e58758 - phase0 beforeProcessEpoch 70.912 ms/op 63.362 ms/op 1.12
mainnet_e58758 - phase0 processJustificationAndFinalization 7.0750 us/op 5.9510 us/op 1.19
mainnet_e58758 - phase0 processRewardsAndPenalties 16.823 ms/op 16.722 ms/op 1.01
mainnet_e58758 - phase0 processRegistryUpdates 2.2020 us/op 2.2080 us/op 1.00
mainnet_e58758 - phase0 processSlashings 130.00 ns/op 244.00 ns/op 0.53
mainnet_e58758 - phase0 processEth1DataReset 126.00 ns/op 125.00 ns/op 1.01
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 792.16 us/op 1.3702 ms/op 0.58
mainnet_e58758 - phase0 processSlashingsReset 864.00 ns/op 880.00 ns/op 0.98
mainnet_e58758 - phase0 processRandaoMixesReset 1.3950 us/op 1.1030 us/op 1.26
mainnet_e58758 - phase0 processHistoricalRootsUpdate 143.00 ns/op 128.00 ns/op 1.12
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.2080 us/op 1.0360 us/op 1.17
mainnet_e58758 - phase0 afterProcessEpoch 35.203 ms/op 33.969 ms/op 1.04
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3896 ms/op 974.08 us/op 1.43
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.6238 ms/op 1.5104 ms/op 1.08
altair processInactivityUpdates - 250000 normalcase 12.838 ms/op 11.294 ms/op 1.14
altair processInactivityUpdates - 250000 worstcase 12.890 ms/op 10.576 ms/op 1.22
phase0 processRegistryUpdates - 250000 normalcase 2.2700 us/op 2.1000 us/op 1.08
phase0 processRegistryUpdates - 250000 badcase_full_deposits 153.34 us/op 139.46 us/op 1.10
phase0 processRegistryUpdates - 250000 worstcase 0.5 65.478 ms/op 61.883 ms/op 1.06
altair processRewardsAndPenalties - 250000 normalcase 16.410 ms/op 16.653 ms/op 0.99
altair processRewardsAndPenalties - 250000 worstcase 18.235 ms/op 16.501 ms/op 1.11
phase0 getAttestationDeltas - 250000 normalcase 5.6699 ms/op 5.3886 ms/op 1.05
phase0 getAttestationDeltas - 250000 worstcase 5.2434 ms/op 5.3982 ms/op 0.97
phase0 processSlashings - 250000 worstcase 60.613 us/op 60.831 us/op 1.00
altair processSyncCommitteeUpdates - 250000 10.568 ms/op 9.9137 ms/op 1.07
BeaconState.hashTreeRoot - No change 206.00 ns/op 193.00 ns/op 1.07
BeaconState.hashTreeRoot - 1 full validator 88.745 us/op 84.966 us/op 1.04
BeaconState.hashTreeRoot - 32 full validator 968.60 us/op 924.57 us/op 1.05
BeaconState.hashTreeRoot - 512 full validator 9.0198 ms/op 9.4584 ms/op 0.95
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 119.54 us/op 113.26 us/op 1.06
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.3564 ms/op 1.6114 ms/op 1.46
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 18.566 ms/op 20.088 ms/op 0.92
BeaconState.hashTreeRoot - 1 balances 80.853 us/op 92.832 us/op 0.87
BeaconState.hashTreeRoot - 32 balances 1.0008 ms/op 890.20 us/op 1.12
BeaconState.hashTreeRoot - 512 balances 6.6514 ms/op 6.8654 ms/op 0.97
BeaconState.hashTreeRoot - 250000 balances 202.99 ms/op 173.89 ms/op 1.17
aggregationBits - 2048 els - zipIndexesInBitList 20.071 us/op 20.066 us/op 1.00
regular array get 100000 times 23.745 us/op 23.177 us/op 1.02
wrappedArray get 100000 times 23.722 us/op 23.070 us/op 1.03
arrayWithProxy get 100000 times 9.2156 ms/op 9.8055 ms/op 0.94
ssz.Root.equals 21.096 ns/op 21.782 ns/op 0.97
byteArrayEquals 20.854 ns/op 21.563 ns/op 0.97
Buffer.compare 8.6780 ns/op 8.9380 ns/op 0.97
processSlot - 1 slots 10.426 us/op 11.055 us/op 0.94
processSlot - 32 slots 2.5401 ms/op 2.5174 ms/op 1.01
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 3.6083 ms/op 4.7924 ms/op 0.75
getCommitteeAssignments - req 1 vs - 250000 vc 1.7322 ms/op 1.6281 ms/op 1.06
getCommitteeAssignments - req 100 vs - 250000 vc 3.5372 ms/op 3.3825 ms/op 1.05
getCommitteeAssignments - req 1000 vs - 250000 vc 3.7905 ms/op 3.6272 ms/op 1.05
findModifiedValidators - 10000 modified validators 746.89 ms/op 664.54 ms/op 1.12
findModifiedValidators - 1000 modified validators 492.22 ms/op 443.40 ms/op 1.11
findModifiedValidators - 100 modified validators 315.07 ms/op 347.86 ms/op 0.91
findModifiedValidators - 10 modified validators 188.11 ms/op 276.21 ms/op 0.68
findModifiedValidators - 1 modified validators 169.16 ms/op 228.16 ms/op 0.74
findModifiedValidators - no difference 165.16 ms/op 217.87 ms/op 0.76
migrate state 1500000 validators, 3400 modified, 2000 new 3.7774 s/op 3.1172 s/op 1.21
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.6200 ns/op 3.6700 ns/op 0.99
state getBlockRootAtSlot - 250000 vs - 7PWei 471.53 ns/op 429.73 ns/op 1.10
computeProposerIndex 100000 validators 1.2979 ms/op 1.3935 ms/op 0.93
getNextSyncCommitteeIndices 1000 validators 2.7774 ms/op 2.9246 ms/op 0.95
getNextSyncCommitteeIndices 10000 validators 24.256 ms/op 25.371 ms/op 0.96
getNextSyncCommitteeIndices 100000 validators 83.882 ms/op 88.324 ms/op 0.95
computeProposers - vc 250000 533.83 us/op 585.62 us/op 0.91
computeEpochShuffling - vc 250000 37.508 ms/op 40.126 ms/op 0.93
getNextSyncCommittee - vc 250000 9.1256 ms/op 10.064 ms/op 0.91
nodejs block root to RootHex using toHex 91.032 ns/op 94.242 ns/op 0.97
nodejs block root to RootHex using toRootHex 54.231 ns/op 56.511 ns/op 0.96
nodejs fromHex(blob) 831.39 us/op 807.46 us/op 1.03
nodejs fromHexInto(blob) 597.56 us/op 623.40 us/op 0.96
nodejs block root to RootHex using the deprecated toHexString 350.83 ns/op 460.29 ns/op 0.76
nodejs byteArrayEquals 32 bytes (block root) 24.841 ns/op 25.825 ns/op 0.96
nodejs byteArrayEquals 48 bytes (pubkey) 36.022 ns/op 37.146 ns/op 0.97
nodejs byteArrayEquals 96 bytes (signature) 32.144 ns/op 33.709 ns/op 0.95
nodejs byteArrayEquals 1024 bytes 39.589 ns/op 39.845 ns/op 0.99
nodejs byteArrayEquals 131072 bytes (blob) 1.6930 us/op 1.7497 us/op 0.97
browser block root to RootHex using toHex 147.38 ns/op 142.75 ns/op 1.03
browser block root to RootHex using toRootHex 134.25 ns/op 142.83 ns/op 0.94
browser fromHex(blob) 1.5855 ms/op 1.4920 ms/op 1.06
browser fromHexInto(blob) 638.18 us/op 619.99 us/op 1.03
browser block root to RootHex using the deprecated toHexString 498.74 ns/op 325.65 ns/op 1.53
browser byteArrayEquals 32 bytes (block root) 28.578 ns/op 27.854 ns/op 1.03
browser byteArrayEquals 48 bytes (pubkey) 40.197 ns/op 39.247 ns/op 1.02
browser byteArrayEquals 96 bytes (signature) 74.987 ns/op 73.033 ns/op 1.03
browser byteArrayEquals 1024 bytes 761.43 ns/op 747.22 ns/op 1.02
browser byteArrayEquals 131072 bytes (blob) 96.513 us/op 94.112 us/op 1.03

by benchmarkbot/action

Copy link
Copy Markdown
Member

@nflaig nflaig left a comment

Choose a reason for hiding this comment

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

LGTM

@nflaig nflaig merged commit ff409c4 into unstable May 7, 2026
19 of 20 checks passed
@nflaig nflaig deleted the cayman/rate-limit-backoff-2 branch May 7, 2026 10:55
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