Skip to content

feat: assert chain segment in range sync#9361

Merged
nflaig merged 1 commit into
unstablefrom
te/range_sync_assert_linear_chain_segment
May 13, 2026
Merged

feat: assert chain segment in range sync#9361
nflaig merged 1 commit into
unstablefrom
te/range_sync_assert_linear_chain_segment

Conversation

@twoeths
Copy link
Copy Markdown
Contributor

@twoeths twoeths commented May 13, 2026

Motivation

  • we only valid chain segment in processBlocks(), we should have validated earlier right after we download it

Description

  • enhance assertLinearChainSegment() with an optional parentBlock
  • call it right after we download a range segment
  • add logs penalize peer

AI Assistance Disclosure

Made with Claude

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 implements linearity validation for block segments during range sync by updating the assertLinearChainSegment utility to handle null parent blocks and integrating it into the RangeSync process. It also introduces new error codes for invalid chain segments and includes comprehensive unit tests for the updated validation logic. Feedback was provided regarding the performance of logging operations, suggesting that expensive data transformations for verbose logs should be wrapped in a log-level check to avoid unnecessary overhead in production.

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

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 5f38eca Previous: 1d4e5f4 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 878.31 us/op 850.94 us/op 1.03
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 39.215 us/op 41.214 us/op 0.95
BLS verify - blst 718.80 us/op 637.19 us/op 1.13
BLS verifyMultipleSignatures 3 - blst 1.3157 ms/op 1.3090 ms/op 1.01
BLS verifyMultipleSignatures 8 - blst 2.1205 ms/op 2.0788 ms/op 1.02
BLS verifyMultipleSignatures 32 - blst 6.7827 ms/op 6.4826 ms/op 1.05
BLS verifyMultipleSignatures 64 - blst 12.908 ms/op 12.656 ms/op 1.02
BLS verifyMultipleSignatures 128 - blst 24.866 ms/op 24.575 ms/op 1.01
BLS deserializing 10000 signatures 625.96 ms/op 621.16 ms/op 1.01
BLS deserializing 100000 signatures 6.0550 s/op 6.2138 s/op 0.97
BLS verifyMultipleSignatures - same message - 3 - blst 760.04 us/op 775.93 us/op 0.98
BLS verifyMultipleSignatures - same message - 8 - blst 790.36 us/op 883.23 us/op 0.89
BLS verifyMultipleSignatures - same message - 32 - blst 1.3694 ms/op 1.5267 ms/op 0.90
BLS verifyMultipleSignatures - same message - 64 - blst 2.1850 ms/op 2.3939 ms/op 0.91
BLS verifyMultipleSignatures - same message - 128 - blst 3.8467 ms/op 3.9834 ms/op 0.97
BLS aggregatePubkeys 32 - blst 16.769 us/op 17.408 us/op 0.96
BLS aggregatePubkeys 128 - blst 59.855 us/op 61.759 us/op 0.97
getSlashingsAndExits - default max 44.293 us/op 52.570 us/op 0.84
getSlashingsAndExits - 2k 338.14 us/op 380.40 us/op 0.89
proposeBlockBody type=full, size=empty 607.78 us/op 665.85 us/op 0.91
isKnown best case - 1 super set check 166.00 ns/op 384.00 ns/op 0.43
isKnown normal case - 2 super set checks 163.00 ns/op 370.00 ns/op 0.44
isKnown worse case - 16 super set checks 164.00 ns/op 376.00 ns/op 0.44
validate api signedAggregateAndProof - struct 1.4854 ms/op 1.4682 ms/op 1.01
validate gossip signedAggregateAndProof - struct 1.4883 ms/op 1.4704 ms/op 1.01
batch validate gossip attestation - vc 640000 - chunk 32 106.28 us/op 104.95 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 64 91.524 us/op 92.901 us/op 0.99
batch validate gossip attestation - vc 640000 - chunk 128 84.830 us/op 86.055 us/op 0.99
batch validate gossip attestation - vc 640000 - chunk 256 81.114 us/op 83.797 us/op 0.97
bytes32 toHexString 276.00 ns/op 481.00 ns/op 0.57
bytes32 Buffer.toString(hex) 172.00 ns/op 386.00 ns/op 0.45
bytes32 Buffer.toString(hex) from Uint8Array 236.00 ns/op 464.00 ns/op 0.51
bytes32 Buffer.toString(hex) + 0x 177.00 ns/op 382.00 ns/op 0.46
Return object 10000 times 0.21180 ns/op 0.22810 ns/op 0.93
Throw Error 10000 times 3.3139 us/op 3.3011 us/op 1.00
toHex 88.998 ns/op 91.855 ns/op 0.97
Buffer.from 83.175 ns/op 82.601 ns/op 1.01
shared Buffer 54.906 ns/op 54.522 ns/op 1.01
fastMsgIdFn sha256 / 200 bytes 1.4530 us/op 1.6770 us/op 0.87
fastMsgIdFn h32 xxhash / 200 bytes 146.00 ns/op 347.00 ns/op 0.42
fastMsgIdFn h64 xxhash / 200 bytes 196.00 ns/op 402.00 ns/op 0.49
fastMsgIdFn sha256 / 1000 bytes 4.5850 us/op 4.8800 us/op 0.94
fastMsgIdFn h32 xxhash / 1000 bytes 232.00 ns/op 437.00 ns/op 0.53
fastMsgIdFn h64 xxhash / 1000 bytes 246.00 ns/op 448.00 ns/op 0.55
fastMsgIdFn sha256 / 10000 bytes 40.648 us/op 41.001 us/op 0.99
fastMsgIdFn h32 xxhash / 10000 bytes 1.2200 us/op 1.4480 us/op 0.84
fastMsgIdFn h64 xxhash / 10000 bytes 795.00 ns/op 1.0120 us/op 0.79
send data - 1000 256B messages 5.9074 ms/op 4.2482 ms/op 1.39
send data - 1000 512B messages 4.8979 ms/op 4.8027 ms/op 1.02
send data - 1000 1024B messages 4.8766 ms/op 4.6790 ms/op 1.04
send data - 1000 1200B messages 6.6969 ms/op 5.0597 ms/op 1.32
send data - 1000 2048B messages 5.5923 ms/op 5.0317 ms/op 1.11
send data - 1000 4096B messages 6.3917 ms/op 5.8747 ms/op 1.09
send data - 1000 16384B messages 19.974 ms/op 29.333 ms/op 0.68
send data - 1000 65536B messages 168.06 ms/op 123.89 ms/op 1.36
enrSubnets - fastDeserialize 64 bits 728.00 ns/op 956.00 ns/op 0.76
enrSubnets - ssz BitVector 64 bits 261.00 ns/op 476.00 ns/op 0.55
enrSubnets - fastDeserialize 4 bits 100.00 ns/op 292.00 ns/op 0.34
enrSubnets - ssz BitVector 4 bits 264.00 ns/op 476.00 ns/op 0.55
prioritizePeers score -10:0 att 32-0.1 sync 2-0 206.38 us/op 210.60 us/op 0.98
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 234.47 us/op 247.36 us/op 0.95
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 337.34 us/op 334.21 us/op 1.01
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 618.58 us/op 586.83 us/op 1.05
prioritizePeers score 0:0 att 64-1 sync 4-1 722.87 us/op 687.24 us/op 1.05
array of 16000 items push then shift 1.3209 us/op 1.2237 us/op 1.08
LinkedList of 16000 items push then shift 7.3810 ns/op 7.5390 ns/op 0.98
array of 16000 items push then pop 65.090 ns/op 67.113 ns/op 0.97
LinkedList of 16000 items push then pop 5.8570 ns/op 6.0450 ns/op 0.97
array of 24000 items push then shift 1.7815 us/op 1.8399 us/op 0.97
LinkedList of 24000 items push then shift 6.8760 ns/op 7.2660 ns/op 0.95
array of 24000 items push then pop 92.697 ns/op 94.903 ns/op 0.98
LinkedList of 24000 items push then pop 5.9550 ns/op 6.1910 ns/op 0.96
intersect bitArray bitLen 8 4.7210 ns/op 4.8480 ns/op 0.97
intersect array and set length 8 30.556 ns/op 28.781 ns/op 1.06
intersect bitArray bitLen 128 23.642 ns/op 23.798 ns/op 0.99
intersect array and set length 128 484.31 ns/op 484.85 ns/op 1.00
bitArray.getTrueBitIndexes() bitLen 128 1.0200 us/op 1.3040 us/op 0.78
bitArray.getTrueBitIndexes() bitLen 248 1.7510 us/op 2.0190 us/op 0.87
bitArray.getTrueBitIndexes() bitLen 512 3.4850 us/op 3.9160 us/op 0.89
Full columns - reconstruct all 6 blobs 116.03 us/op 117.67 us/op 0.99
Full columns - reconstruct half of the blobs out of 6 91.197 us/op 68.361 us/op 1.33
Full columns - reconstruct single blob out of 6 46.693 us/op 34.701 us/op 1.35
Half columns - reconstruct all 6 blobs 381.66 ms/op 373.95 ms/op 1.02
Half columns - reconstruct half of the blobs out of 6 190.62 ms/op 189.60 ms/op 1.01
Half columns - reconstruct single blob out of 6 67.792 ms/op 70.404 ms/op 0.96
Full columns - reconstruct all 10 blobs 279.35 us/op 231.60 us/op 1.21
Full columns - reconstruct half of the blobs out of 10 144.04 us/op 265.22 us/op 0.54
Full columns - reconstruct single blob out of 10 31.002 us/op 34.176 us/op 0.91
Half columns - reconstruct all 10 blobs 633.00 ms/op 648.80 ms/op 0.98
Half columns - reconstruct half of the blobs out of 10 318.29 ms/op 328.57 ms/op 0.97
Half columns - reconstruct single blob out of 10 67.629 ms/op 67.295 ms/op 1.00
Full columns - reconstruct all 20 blobs 546.86 us/op 777.13 us/op 0.70
Full columns - reconstruct half of the blobs out of 20 198.16 us/op 428.79 us/op 0.46
Full columns - reconstruct single blob out of 20 31.286 us/op 30.803 us/op 1.02
Half columns - reconstruct all 20 blobs 1.2786 s/op 1.2320 s/op 1.04
Half columns - reconstruct half of the blobs out of 20 643.49 ms/op 618.83 ms/op 1.04
Half columns - reconstruct single blob out of 20 68.953 ms/op 65.663 ms/op 1.05
Set add up to 64 items then delete first 2.4861 us/op 2.0006 us/op 1.24
OrderedSet add up to 64 items then delete first 3.2396 us/op 3.1735 us/op 1.02
Set add up to 64 items then delete last 2.3185 us/op 2.0191 us/op 1.15
OrderedSet add up to 64 items then delete last 3.2409 us/op 3.2454 us/op 1.00
Set add up to 64 items then delete middle 2.1916 us/op 2.0559 us/op 1.07
OrderedSet add up to 64 items then delete middle 4.9014 us/op 4.7278 us/op 1.04
Set add up to 128 items then delete first 4.0592 us/op 3.9718 us/op 1.02
OrderedSet add up to 128 items then delete first 6.2020 us/op 5.8213 us/op 1.07
Set add up to 128 items then delete last 3.8762 us/op 3.7563 us/op 1.03
OrderedSet add up to 128 items then delete last 5.9610 us/op 5.7750 us/op 1.03
Set add up to 128 items then delete middle 3.8673 us/op 3.7152 us/op 1.04
OrderedSet add up to 128 items then delete middle 11.989 us/op 11.648 us/op 1.03
Set add up to 256 items then delete first 7.6488 us/op 7.3030 us/op 1.05
OrderedSet add up to 256 items then delete first 11.520 us/op 11.254 us/op 1.02
Set add up to 256 items then delete last 7.6936 us/op 7.3753 us/op 1.04
OrderedSet add up to 256 items then delete last 11.957 us/op 11.555 us/op 1.03
Set add up to 256 items then delete middle 7.6721 us/op 7.3729 us/op 1.04
OrderedSet add up to 256 items then delete middle 34.912 us/op 35.629 us/op 0.98
pass gossip attestations to forkchoice per slot 2.5862 ms/op 2.4767 ms/op 1.04
forkChoice updateHead vc 100000 bc 64 eq 0 404.49 us/op 380.71 us/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 0 2.3379 ms/op 2.2562 ms/op 1.04
forkChoice updateHead vc 1000000 bc 64 eq 0 3.9073 ms/op 3.7659 ms/op 1.04
forkChoice updateHead vc 600000 bc 320 eq 0 2.3508 ms/op 2.2583 ms/op 1.04
forkChoice updateHead vc 600000 bc 1200 eq 0 2.4760 ms/op 2.2777 ms/op 1.09
forkChoice updateHead vc 600000 bc 7200 eq 0 2.6840 ms/op 2.5793 ms/op 1.04
forkChoice updateHead vc 600000 bc 64 eq 1000 2.8888 ms/op 2.8190 ms/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 10000 3.0124 ms/op 2.9344 ms/op 1.03
forkChoice updateHead vc 600000 bc 64 eq 300000 6.7848 ms/op 6.7190 ms/op 1.01
computeDeltas 1400000 validators 0% inactive 12.544 ms/op 12.210 ms/op 1.03
computeDeltas 1400000 validators 10% inactive 11.797 ms/op 11.485 ms/op 1.03
computeDeltas 1400000 validators 20% inactive 10.570 ms/op 10.384 ms/op 1.02
computeDeltas 1400000 validators 50% inactive 8.1914 ms/op 7.9494 ms/op 1.03
computeDeltas 2100000 validators 0% inactive 18.528 ms/op 18.505 ms/op 1.00
computeDeltas 2100000 validators 10% inactive 17.780 ms/op 17.227 ms/op 1.03
computeDeltas 2100000 validators 20% inactive 15.983 ms/op 15.570 ms/op 1.03
computeDeltas 2100000 validators 50% inactive 9.2415 ms/op 9.1919 ms/op 1.01
altair processAttestation - 250000 vs - 7PWei normalcase 2.0361 ms/op 1.8590 ms/op 1.10
altair processAttestation - 250000 vs - 7PWei worstcase 3.0333 ms/op 2.9691 ms/op 1.02
altair processAttestation - setStatus - 1/6 committees join 105.19 us/op 98.394 us/op 1.07
altair processAttestation - setStatus - 1/3 committees join 198.86 us/op 198.25 us/op 1.00
altair processAttestation - setStatus - 1/2 committees join 289.46 us/op 277.32 us/op 1.04
altair processAttestation - setStatus - 2/3 committees join 371.91 us/op 369.84 us/op 1.01
altair processAttestation - setStatus - 4/5 committees join 518.81 us/op 512.19 us/op 1.01
altair processAttestation - setStatus - 100% committees join 595.64 us/op 585.04 us/op 1.02
altair processBlock - 250000 vs - 7PWei normalcase 3.8032 ms/op 4.2515 ms/op 0.89
altair processBlock - 250000 vs - 7PWei normalcase hashState 15.862 ms/op 16.250 ms/op 0.98
altair processBlock - 250000 vs - 7PWei worstcase 21.289 ms/op 22.007 ms/op 0.97
altair processBlock - 250000 vs - 7PWei worstcase hashState 47.028 ms/op 44.801 ms/op 1.05
phase0 processBlock - 250000 vs - 7PWei normalcase 1.3605 ms/op 1.5535 ms/op 0.88
phase0 processBlock - 250000 vs - 7PWei worstcase 17.412 ms/op 18.301 ms/op 0.95
altair processEth1Data - 250000 vs - 7PWei normalcase 284.28 us/op 290.38 us/op 0.98
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 3.0900 us/op 3.7460 us/op 0.82
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 21.013 us/op 19.779 us/op 1.06
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 5.9730 us/op 6.2720 us/op 0.95
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 3.5990 us/op 3.7480 us/op 0.96
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 96.280 us/op 92.171 us/op 1.04
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.3741 ms/op 1.3747 ms/op 1.00
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8218 ms/op 1.8244 ms/op 1.00
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8071 ms/op 1.7981 ms/op 1.00
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.7175 ms/op 3.6647 ms/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.0514 ms/op 2.0133 ms/op 1.02
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.9161 ms/op 4.0768 ms/op 0.96
Tree 40 250000 create 309.06 ms/op 341.45 ms/op 0.91
Tree 40 250000 get(125000) 91.781 ns/op 89.888 ns/op 1.02
Tree 40 250000 set(125000) 991.12 ns/op 1.0071 us/op 0.98
Tree 40 250000 toArray() 12.179 ms/op 16.570 ms/op 0.74
Tree 40 250000 iterate all - toArray() + loop 12.671 ms/op 15.436 ms/op 0.82
Tree 40 250000 iterate all - get(i) 34.306 ms/op 40.539 ms/op 0.85
Array 250000 create 2.0929 ms/op 2.3012 ms/op 0.91
Array 250000 clone - spread 655.09 us/op 709.71 us/op 0.92
Array 250000 get(125000) 0.29600 ns/op 0.47700 ns/op 0.62
Array 250000 set(125000) 0.30000 ns/op 0.48000 ns/op 0.63
Array 250000 iterate all - loop 56.843 us/op 57.086 us/op 1.00
phase0 afterProcessEpoch - 250000 vs - 7PWei 38.758 ms/op 39.733 ms/op 0.98
Array.fill - length 1000000 2.1018 ms/op 2.2156 ms/op 0.95
Array push - length 1000000 8.7305 ms/op 10.099 ms/op 0.86
Array.get 0.21060 ns/op 0.20448 ns/op 1.03
Uint8Array.get 0.24103 ns/op 0.23319 ns/op 1.03
phase0 beforeProcessEpoch - 250000 vs - 7PWei 15.832 ms/op 14.677 ms/op 1.08
altair processEpoch - mainnet_e81889 246.31 ms/op 276.85 ms/op 0.89
mainnet_e81889 - altair beforeProcessEpoch 19.299 ms/op 14.859 ms/op 1.30
mainnet_e81889 - altair processJustificationAndFinalization 5.8540 us/op 5.8630 us/op 1.00
mainnet_e81889 - altair processInactivityUpdates 3.4899 ms/op 3.8627 ms/op 0.90
mainnet_e81889 - altair processRewardsAndPenalties 19.865 ms/op 18.899 ms/op 1.05
mainnet_e81889 - altair processRegistryUpdates 526.00 ns/op 740.00 ns/op 0.71
mainnet_e81889 - altair processSlashings 136.00 ns/op 338.00 ns/op 0.40
mainnet_e81889 - altair processEth1DataReset 133.00 ns/op 339.00 ns/op 0.39
mainnet_e81889 - altair processEffectiveBalanceUpdates 3.7590 ms/op 1.8199 ms/op 2.07
mainnet_e81889 - altair processSlashingsReset 685.00 ns/op 892.00 ns/op 0.77
mainnet_e81889 - altair processRandaoMixesReset 1.1940 us/op 1.4730 us/op 0.81
mainnet_e81889 - altair processHistoricalRootsUpdate 133.00 ns/op 345.00 ns/op 0.39
mainnet_e81889 - altair processParticipationFlagUpdates 419.00 ns/op 638.00 ns/op 0.66
mainnet_e81889 - altair processSyncCommitteeUpdates 110.00 ns/op 323.00 ns/op 0.34
mainnet_e81889 - altair afterProcessEpoch 41.596 ms/op 39.411 ms/op 1.06
capella processEpoch - mainnet_e217614 832.93 ms/op 778.86 ms/op 1.07
mainnet_e217614 - capella beforeProcessEpoch 65.735 ms/op 62.328 ms/op 1.05
mainnet_e217614 - capella processJustificationAndFinalization 6.4820 us/op 6.7460 us/op 0.96
mainnet_e217614 - capella processInactivityUpdates 15.540 ms/op 14.156 ms/op 1.10
mainnet_e217614 - capella processRewardsAndPenalties 91.103 ms/op 89.933 ms/op 1.01
mainnet_e217614 - capella processRegistryUpdates 4.4480 us/op 4.4460 us/op 1.00
mainnet_e217614 - capella processSlashings 135.00 ns/op 337.00 ns/op 0.40
mainnet_e217614 - capella processEth1DataReset 132.00 ns/op 338.00 ns/op 0.39
mainnet_e217614 - capella processEffectiveBalanceUpdates 14.322 ms/op 13.247 ms/op 1.08
mainnet_e217614 - capella processSlashingsReset 672.00 ns/op 882.00 ns/op 0.76
mainnet_e217614 - capella processRandaoMixesReset 1.2620 us/op 1.4030 us/op 0.90
mainnet_e217614 - capella processHistoricalRootsUpdate 134.00 ns/op 335.00 ns/op 0.40
mainnet_e217614 - capella processParticipationFlagUpdates 423.00 ns/op 637.00 ns/op 0.66
mainnet_e217614 - capella afterProcessEpoch 109.49 ms/op 108.43 ms/op 1.01
phase0 processEpoch - mainnet_e58758 299.05 ms/op 320.84 ms/op 0.93
mainnet_e58758 - phase0 beforeProcessEpoch 64.264 ms/op 70.328 ms/op 0.91
mainnet_e58758 - phase0 processJustificationAndFinalization 6.4900 us/op 6.6970 us/op 0.97
mainnet_e58758 - phase0 processRewardsAndPenalties 16.473 ms/op 15.840 ms/op 1.04
mainnet_e58758 - phase0 processRegistryUpdates 2.2440 us/op 2.4370 us/op 0.92
mainnet_e58758 - phase0 processSlashings 135.00 ns/op 344.00 ns/op 0.39
mainnet_e58758 - phase0 processEth1DataReset 134.00 ns/op 339.00 ns/op 0.40
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 869.94 us/op 866.41 us/op 1.00
mainnet_e58758 - phase0 processSlashingsReset 967.00 ns/op 1.0850 us/op 0.89
mainnet_e58758 - phase0 processRandaoMixesReset 1.4020 us/op 1.6410 us/op 0.85
mainnet_e58758 - phase0 processHistoricalRootsUpdate 138.00 ns/op 345.00 ns/op 0.40
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.2490 us/op 1.4880 us/op 0.84
mainnet_e58758 - phase0 afterProcessEpoch 33.550 ms/op 32.637 ms/op 1.03
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.1058 ms/op 971.34 us/op 1.14
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5596 ms/op 1.5052 ms/op 1.04
altair processInactivityUpdates - 250000 normalcase 13.796 ms/op 12.649 ms/op 1.09
altair processInactivityUpdates - 250000 worstcase 11.197 ms/op 12.812 ms/op 0.87
phase0 processRegistryUpdates - 250000 normalcase 2.0800 us/op 2.7010 us/op 0.77
phase0 processRegistryUpdates - 250000 badcase_full_deposits 145.60 us/op 145.19 us/op 1.00
phase0 processRegistryUpdates - 250000 worstcase 0.5 63.505 ms/op 79.096 ms/op 0.80
altair processRewardsAndPenalties - 250000 normalcase 15.765 ms/op 18.654 ms/op 0.85
altair processRewardsAndPenalties - 250000 worstcase 15.259 ms/op 16.337 ms/op 0.93
phase0 getAttestationDeltas - 250000 normalcase 5.6655 ms/op 8.1442 ms/op 0.70
phase0 getAttestationDeltas - 250000 worstcase 5.3117 ms/op 5.3995 ms/op 0.98
phase0 processSlashings - 250000 worstcase 60.610 us/op 59.453 us/op 1.02
altair processSyncCommitteeUpdates - 250000 10.013 ms/op 11.854 ms/op 0.84
BeaconState.hashTreeRoot - No change 172.00 ns/op 387.00 ns/op 0.44
BeaconState.hashTreeRoot - 1 full validator 72.386 us/op 85.714 us/op 0.84
BeaconState.hashTreeRoot - 32 full validator 835.48 us/op 831.66 us/op 1.00
BeaconState.hashTreeRoot - 512 full validator 7.4413 ms/op 8.9121 ms/op 0.83
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 92.465 us/op 101.33 us/op 0.91
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.4397 ms/op 1.3774 ms/op 1.05
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 17.244 ms/op 20.167 ms/op 0.86
BeaconState.hashTreeRoot - 1 balances 76.297 us/op 85.929 us/op 0.89
BeaconState.hashTreeRoot - 32 balances 732.36 us/op 711.07 us/op 1.03
BeaconState.hashTreeRoot - 512 balances 5.4439 ms/op 6.7768 ms/op 0.80
BeaconState.hashTreeRoot - 250000 balances 114.56 ms/op 142.31 ms/op 0.80
aggregationBits - 2048 els - zipIndexesInBitList 19.098 us/op 19.506 us/op 0.98
regular array get 100000 times 22.470 us/op 22.363 us/op 1.00
wrappedArray get 100000 times 22.482 us/op 22.289 us/op 1.01
arrayWithProxy get 100000 times 12.536 ms/op 12.407 ms/op 1.01
ssz.Root.equals 20.967 ns/op 20.942 ns/op 1.00
byteArrayEquals 20.753 ns/op 20.627 ns/op 1.01
Buffer.compare 8.6350 ns/op 8.7630 ns/op 0.99
processSlot - 1 slots 9.4170 us/op 11.063 us/op 0.85
processSlot - 32 slots 2.0009 ms/op 2.1551 ms/op 0.93
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 4.9344 ms/op 3.5289 ms/op 1.40
getCommitteeAssignments - req 1 vs - 250000 vc 1.6026 ms/op 1.6345 ms/op 0.98
getCommitteeAssignments - req 100 vs - 250000 vc 3.3016 ms/op 3.3107 ms/op 1.00
getCommitteeAssignments - req 1000 vs - 250000 vc 3.5436 ms/op 3.5997 ms/op 0.98
findModifiedValidators - 10000 modified validators 605.19 ms/op 648.55 ms/op 0.93
findModifiedValidators - 1000 modified validators 468.96 ms/op 525.76 ms/op 0.89
findModifiedValidators - 100 modified validators 268.90 ms/op 402.34 ms/op 0.67
findModifiedValidators - 10 modified validators 256.68 ms/op 270.96 ms/op 0.95
findModifiedValidators - 1 modified validators 138.92 ms/op 288.77 ms/op 0.48
findModifiedValidators - no difference 152.46 ms/op 200.69 ms/op 0.76
migrate state 1500000 validators, 3400 modified, 2000 new 2.8779 s/op 3.2519 s/op 0.89
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.5300 ns/op 5.6300 ns/op 0.63
state getBlockRootAtSlot - 250000 vs - 7PWei 332.77 ns/op 408.94 ns/op 0.81
computeProposerIndex 100000 validators 1.2847 ms/op 1.3729 ms/op 0.94
getNextSyncCommitteeIndices 1000 validators 2.7416 ms/op 2.8834 ms/op 0.95
getNextSyncCommitteeIndices 10000 validators 24.166 ms/op 25.765 ms/op 0.94
getNextSyncCommitteeIndices 100000 validators 83.887 ms/op 92.834 ms/op 0.90
computeProposers - vc 250000 525.35 us/op 555.87 us/op 0.95
computeEpochShuffling - vc 250000 37.421 ms/op 41.658 ms/op 0.90
getNextSyncCommittee - vc 250000 9.0680 ms/op 10.690 ms/op 0.85
nodejs block root to RootHex using toHex 88.616 ns/op 95.549 ns/op 0.93
nodejs block root to RootHex using toRootHex 54.357 ns/op 56.400 ns/op 0.96
nodejs fromHex(blob) 707.08 us/op 901.45 us/op 0.78
nodejs fromHexInto(blob) 597.91 us/op 633.72 us/op 0.94
nodejs block root to RootHex using the deprecated toHexString 338.87 ns/op 364.35 ns/op 0.93
nodejs byteArrayEquals 32 bytes (block root) 24.933 ns/op 25.909 ns/op 0.96
nodejs byteArrayEquals 48 bytes (pubkey) 35.901 ns/op 37.154 ns/op 0.97
nodejs byteArrayEquals 96 bytes (signature) 32.756 ns/op 34.005 ns/op 0.96
nodejs byteArrayEquals 1024 bytes 38.526 ns/op 43.411 ns/op 0.89
nodejs byteArrayEquals 131072 bytes (blob) 1.6893 us/op 1.7615 us/op 0.96
browser block root to RootHex using toHex 137.16 ns/op 141.09 ns/op 0.97
browser block root to RootHex using toRootHex 124.34 ns/op 125.08 ns/op 0.99
browser fromHex(blob) 1.4415 ms/op 1.6254 ms/op 0.89
browser fromHexInto(blob) 592.91 us/op 630.20 us/op 0.94
browser block root to RootHex using the deprecated toHexString 438.97 ns/op 482.41 ns/op 0.91
browser byteArrayEquals 32 bytes (block root) 26.559 ns/op 28.051 ns/op 0.95
browser byteArrayEquals 48 bytes (pubkey) 37.410 ns/op 39.504 ns/op 0.95
browser byteArrayEquals 96 bytes (signature) 70.074 ns/op 74.327 ns/op 0.94
browser byteArrayEquals 1024 bytes 718.05 ns/op 752.69 ns/op 0.95
browser byteArrayEquals 131072 bytes (blob) 89.844 us/op 95.916 us/op 0.94

by benchmarkbot/action

@twoeths twoeths marked this pull request as ready for review May 13, 2026 06:56
@twoeths twoeths requested a review from a team as a code owner May 13, 2026 06:56
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 ac258a8 into unstable May 13, 2026
19 checks passed
@nflaig nflaig deleted the te/range_sync_assert_linear_chain_segment branch May 13, 2026 09:32
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