Skip to content

fix: update attestation data index extraction - #9158

Merged
twoeths merged 8 commits into
unstablefrom
nflaig/data-index-extraction
Apr 3, 2026
Merged

fix: update attestation data index extraction#9158
twoeths merged 8 commits into
unstablefrom
nflaig/data-index-extraction

Conversation

@nflaig

@nflaig nflaig commented Apr 2, 2026

Copy link
Copy Markdown
Member

Follow up to #9025 to fix attestation data index extraction, currently it seems we extract the committee index but for how we use it (post gloas), we want the data.index

relevant code

const attIndex =
topicType === GossipType.beacon_attestation
? getIndexFromSingleAttestationSerialized(fork, message.msg.data)
: getIndexFromSignedAggregateAndProofSerialized(message.msg.data);
if (attIndex === 1 && !this.chain.forkChoice.hasPayloadHexUnsafe(root)) {

@nflaig
nflaig requested a review from a team as a code owner April 2, 2026 13:46

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

Copy link
Copy Markdown
Contributor

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 refactors SSZ byte extraction utilities to clarify the distinction between committee indices and data indices, particularly for post-Electra/Gloas logic where the index field is repurposed. Key changes include renaming existing functions and introducing getDataIndexFromSingleAttestationSerialized along with corresponding unit tests. Feedback suggests making getDataIndexFromSingleAttestationSerialized fork-aware to maintain consistency with other utility functions and ensure robustness across different fork layouts.

Comment thread packages/beacon-node/src/util/sszBytes.ts Outdated
@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: cf17494 Previous: 8b81ee6 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 871.20 us/op 897.89 us/op 0.97
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 40.331 us/op 38.221 us/op 1.06
BLS verify - blst 648.04 us/op 631.71 us/op 1.03
BLS verifyMultipleSignatures 3 - blst 1.3816 ms/op 1.2890 ms/op 1.07
BLS verifyMultipleSignatures 8 - blst 2.2183 ms/op 2.0581 ms/op 1.08
BLS verifyMultipleSignatures 32 - blst 6.9877 ms/op 6.5589 ms/op 1.07
BLS verifyMultipleSignatures 64 - blst 13.125 ms/op 12.616 ms/op 1.04
BLS verifyMultipleSignatures 128 - blst 25.973 ms/op 24.455 ms/op 1.06
BLS deserializing 10000 signatures 630.94 ms/op 620.54 ms/op 1.02
BLS deserializing 100000 signatures 6.3099 s/op 6.2137 s/op 1.02
BLS verifyMultipleSignatures - same message - 3 - blst 773.87 us/op 730.95 us/op 1.06
BLS verifyMultipleSignatures - same message - 8 - blst 886.18 us/op 805.76 us/op 1.10
BLS verifyMultipleSignatures - same message - 32 - blst 1.4451 ms/op 1.4922 ms/op 0.97
BLS verifyMultipleSignatures - same message - 64 - blst 2.3669 ms/op 2.3906 ms/op 0.99
BLS verifyMultipleSignatures - same message - 128 - blst 4.0255 ms/op 3.9794 ms/op 1.01
BLS aggregatePubkeys 32 - blst 17.594 us/op 17.032 us/op 1.03
BLS aggregatePubkeys 128 - blst 63.449 us/op 61.127 us/op 1.04
getSlashingsAndExits - default max 46.836 us/op 43.859 us/op 1.07
getSlashingsAndExits - 2k 328.31 us/op 356.92 us/op 0.92
proposeBlockBody type=full, size=empty 659.68 us/op 532.51 us/op 1.24
isKnown best case - 1 super set check 167.00 ns/op 183.00 ns/op 0.91
isKnown normal case - 2 super set checks 171.00 ns/op 163.00 ns/op 1.05
isKnown worse case - 16 super set checks 159.00 ns/op 165.00 ns/op 0.96
validate api signedAggregateAndProof - struct 1.5272 ms/op 1.4148 ms/op 1.08
validate gossip signedAggregateAndProof - struct 1.5314 ms/op 1.4225 ms/op 1.08
batch validate gossip attestation - vc 640000 - chunk 32 105.98 us/op 100.92 us/op 1.05
batch validate gossip attestation - vc 640000 - chunk 64 91.964 us/op 88.818 us/op 1.04
batch validate gossip attestation - vc 640000 - chunk 128 85.511 us/op 82.969 us/op 1.03
batch validate gossip attestation - vc 640000 - chunk 256 81.749 us/op 80.607 us/op 1.01
bytes32 toHexString 300.00 ns/op 267.00 ns/op 1.12
bytes32 Buffer.toString(hex) 186.00 ns/op 172.00 ns/op 1.08
bytes32 Buffer.toString(hex) from Uint8Array 254.00 ns/op 245.00 ns/op 1.04
bytes32 Buffer.toString(hex) + 0x 182.00 ns/op 173.00 ns/op 1.05
Return object 10000 times 0.20800 ns/op 0.20430 ns/op 1.02
Throw Error 10000 times 3.2717 us/op 3.1469 us/op 1.04
toHex 105.37 ns/op 90.732 ns/op 1.16
Buffer.from 95.232 ns/op 83.139 ns/op 1.15
shared Buffer 64.938 ns/op 56.957 ns/op 1.14
fastMsgIdFn sha256 / 200 bytes 1.5000 us/op 1.4110 us/op 1.06
fastMsgIdFn h32 xxhash / 200 bytes 151.00 ns/op 147.00 ns/op 1.03
fastMsgIdFn h64 xxhash / 200 bytes 195.00 ns/op 194.00 ns/op 1.01
fastMsgIdFn sha256 / 1000 bytes 4.9720 us/op 4.5000 us/op 1.10
fastMsgIdFn h32 xxhash / 1000 bytes 236.00 ns/op 234.00 ns/op 1.01
fastMsgIdFn h64 xxhash / 1000 bytes 244.00 ns/op 240.00 ns/op 1.02
fastMsgIdFn sha256 / 10000 bytes 44.318 us/op 39.868 us/op 1.11
fastMsgIdFn h32 xxhash / 10000 bytes 1.2710 us/op 1.2220 us/op 1.04
fastMsgIdFn h64 xxhash / 10000 bytes 808.00 ns/op 796.00 ns/op 1.02
send data - 1000 256B messages 3.8963 ms/op 4.2410 ms/op 0.92
send data - 1000 512B messages 4.0194 ms/op 4.1894 ms/op 0.96
send data - 1000 1024B messages 4.1958 ms/op 4.2691 ms/op 0.98
send data - 1000 1200B messages 4.4476 ms/op 4.6198 ms/op 0.96
send data - 1000 2048B messages 4.5782 ms/op 4.7627 ms/op 0.96
send data - 1000 4096B messages 5.1826 ms/op 5.4421 ms/op 0.95
send data - 1000 16384B messages 23.917 ms/op 29.233 ms/op 0.82
send data - 1000 65536B messages 139.31 ms/op 210.08 ms/op 0.66
enrSubnets - fastDeserialize 64 bits 722.00 ns/op 701.00 ns/op 1.03
enrSubnets - ssz BitVector 64 bits 248.00 ns/op 248.00 ns/op 1.00
enrSubnets - fastDeserialize 4 bits 106.00 ns/op 105.00 ns/op 1.01
enrSubnets - ssz BitVector 4 bits 254.00 ns/op 252.00 ns/op 1.01
prioritizePeers score -10:0 att 32-0.1 sync 2-0 207.83 us/op 194.99 us/op 1.07
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 250.23 us/op 223.24 us/op 1.12
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 349.06 us/op 332.40 us/op 1.05
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 610.42 us/op 575.68 us/op 1.06
prioritizePeers score 0:0 att 64-1 sync 4-1 708.41 us/op 674.80 us/op 1.05
array of 16000 items push then shift 1.2843 us/op 1.2372 us/op 1.04
LinkedList of 16000 items push then shift 6.7730 ns/op 7.2270 ns/op 0.94
array of 16000 items push then pop 65.615 ns/op 67.046 ns/op 0.98
LinkedList of 16000 items push then pop 6.0130 ns/op 5.7940 ns/op 1.04
array of 24000 items push then shift 1.9911 us/op 1.8070 us/op 1.10
LinkedList of 24000 items push then shift 6.3390 ns/op 6.8190 ns/op 0.93
array of 24000 items push then pop 93.812 ns/op 93.670 ns/op 1.00
LinkedList of 24000 items push then pop 6.0310 ns/op 5.8340 ns/op 1.03
intersect bitArray bitLen 8 4.6940 ns/op 4.6390 ns/op 1.01
intersect array and set length 8 30.479 ns/op 29.482 ns/op 1.03
intersect bitArray bitLen 128 24.285 ns/op 23.392 ns/op 1.04
intersect array and set length 128 515.79 ns/op 479.55 ns/op 1.08
bitArray.getTrueBitIndexes() bitLen 128 1.0380 us/op 1.0180 us/op 1.02
bitArray.getTrueBitIndexes() bitLen 248 1.7620 us/op 1.7130 us/op 1.03
bitArray.getTrueBitIndexes() bitLen 512 3.5150 us/op 3.4970 us/op 1.01
Full columns - reconstruct all 6 blobs 118.29 us/op 145.41 us/op 0.81
Full columns - reconstruct half of the blobs out of 6 233.21 us/op 124.54 us/op 1.87
Full columns - reconstruct single blob out of 6 35.849 us/op 31.465 us/op 1.14
Half columns - reconstruct all 6 blobs 384.64 ms/op 372.07 ms/op 1.03
Half columns - reconstruct half of the blobs out of 6 191.85 ms/op 187.02 ms/op 1.03
Half columns - reconstruct single blob out of 6 67.301 ms/op 67.171 ms/op 1.00
Full columns - reconstruct all 10 blobs 215.77 us/op 245.36 us/op 0.88
Full columns - reconstruct half of the blobs out of 10 140.15 us/op 139.53 us/op 1.00
Full columns - reconstruct single blob out of 10 31.917 us/op 43.945 us/op 0.73
Half columns - reconstruct all 10 blobs 630.68 ms/op 629.27 ms/op 1.00
Half columns - reconstruct half of the blobs out of 10 317.98 ms/op 308.78 ms/op 1.03
Half columns - reconstruct single blob out of 10 67.250 ms/op 65.549 ms/op 1.03
Full columns - reconstruct all 20 blobs 1.6915 ms/op 2.0418 ms/op 0.83
Full columns - reconstruct half of the blobs out of 20 189.88 us/op 376.49 us/op 0.50
Full columns - reconstruct single blob out of 20 33.911 us/op 25.707 us/op 1.32
Half columns - reconstruct all 20 blobs 1.2656 s/op 1.2100 s/op 1.05
Half columns - reconstruct half of the blobs out of 20 634.36 ms/op 615.53 ms/op 1.03
Half columns - reconstruct single blob out of 20 66.746 ms/op 67.258 ms/op 0.99
Set add up to 64 items then delete first 2.1742 us/op 2.0502 us/op 1.06
OrderedSet add up to 64 items then delete first 3.4586 us/op 3.2482 us/op 1.06
Set add up to 64 items then delete last 2.4636 us/op 2.0523 us/op 1.20
OrderedSet add up to 64 items then delete last 3.3850 us/op 3.1296 us/op 1.08
Set add up to 64 items then delete middle 2.1871 us/op 2.0259 us/op 1.08
OrderedSet add up to 64 items then delete middle 4.8224 us/op 4.4952 us/op 1.07
Set add up to 128 items then delete first 4.3453 us/op 4.0021 us/op 1.09
OrderedSet add up to 128 items then delete first 6.7160 us/op 5.9882 us/op 1.12
Set add up to 128 items then delete last 3.9654 us/op 3.6881 us/op 1.08
OrderedSet add up to 128 items then delete last 6.0334 us/op 5.5092 us/op 1.10
Set add up to 128 items then delete middle 3.9726 us/op 3.6629 us/op 1.08
OrderedSet add up to 128 items then delete middle 11.778 us/op 11.354 us/op 1.04
Set add up to 256 items then delete first 8.0964 us/op 7.5123 us/op 1.08
OrderedSet add up to 256 items then delete first 12.511 us/op 11.666 us/op 1.07
Set add up to 256 items then delete last 7.8990 us/op 7.3153 us/op 1.08
OrderedSet add up to 256 items then delete last 11.871 us/op 11.166 us/op 1.06
Set add up to 256 items then delete middle 7.8240 us/op 7.2048 us/op 1.09
OrderedSet add up to 256 items then delete middle 34.840 us/op 37.315 us/op 0.93
pass gossip attestations to forkchoice per slot 2.5263 ms/op 2.4796 ms/op 1.02
forkChoice updateHead vc 100000 bc 64 eq 0 472.32 us/op 381.16 us/op 1.24
forkChoice updateHead vc 600000 bc 64 eq 0 2.8833 ms/op 2.2751 ms/op 1.27
forkChoice updateHead vc 1000000 bc 64 eq 0 4.7577 ms/op 3.7688 ms/op 1.26
forkChoice updateHead vc 600000 bc 320 eq 0 2.8421 ms/op 2.2909 ms/op 1.24
forkChoice updateHead vc 600000 bc 1200 eq 0 2.8725 ms/op 2.3395 ms/op 1.23
forkChoice updateHead vc 600000 bc 7200 eq 0 3.1714 ms/op 2.6996 ms/op 1.17
forkChoice updateHead vc 600000 bc 64 eq 1000 3.4952 ms/op 2.8557 ms/op 1.22
forkChoice updateHead vc 600000 bc 64 eq 10000 3.5310 ms/op 2.9894 ms/op 1.18
forkChoice updateHead vc 600000 bc 64 eq 300000 8.1739 ms/op 7.5422 ms/op 1.08
computeDeltas 1400000 validators 0% inactive 11.378 ms/op 12.927 ms/op 0.88
computeDeltas 1400000 validators 10% inactive 10.614 ms/op 12.531 ms/op 0.85
computeDeltas 1400000 validators 20% inactive 9.5195 ms/op 10.973 ms/op 0.87
computeDeltas 1400000 validators 50% inactive 7.0967 ms/op 8.4396 ms/op 0.84
computeDeltas 2100000 validators 0% inactive 16.933 ms/op 19.131 ms/op 0.89
computeDeltas 2100000 validators 10% inactive 15.878 ms/op 17.984 ms/op 0.88
computeDeltas 2100000 validators 20% inactive 14.253 ms/op 16.265 ms/op 0.88
computeDeltas 2100000 validators 50% inactive 10.515 ms/op 12.465 ms/op 0.84
altair processAttestation - 250000 vs - 7PWei normalcase 1.7281 ms/op 2.0687 ms/op 0.84
altair processAttestation - 250000 vs - 7PWei worstcase 2.4717 ms/op 2.9528 ms/op 0.84
altair processAttestation - setStatus - 1/6 committees join 110.86 us/op 100.48 us/op 1.10
altair processAttestation - setStatus - 1/3 committees join 213.06 us/op 198.78 us/op 1.07
altair processAttestation - setStatus - 1/2 committees join 300.13 us/op 274.94 us/op 1.09
altair processAttestation - setStatus - 2/3 committees join 388.06 us/op 352.06 us/op 1.10
altair processAttestation - setStatus - 4/5 committees join 526.00 us/op 501.95 us/op 1.05
altair processAttestation - setStatus - 100% committees join 624.45 us/op 571.47 us/op 1.09
altair processBlock - 250000 vs - 7PWei normalcase 2.9620 ms/op 4.9806 ms/op 0.59
altair processBlock - 250000 vs - 7PWei normalcase hashState 11.725 ms/op 16.207 ms/op 0.72
altair processBlock - 250000 vs - 7PWei worstcase 19.931 ms/op 21.413 ms/op 0.93
altair processBlock - 250000 vs - 7PWei worstcase hashState 39.422 ms/op 44.937 ms/op 0.88
phase0 processBlock - 250000 vs - 7PWei normalcase 1.3608 ms/op 1.3962 ms/op 0.97
phase0 processBlock - 250000 vs - 7PWei worstcase 16.920 ms/op 17.162 ms/op 0.99
altair processEth1Data - 250000 vs - 7PWei normalcase 294.51 us/op 306.32 us/op 0.96
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 3.8870 us/op 3.2580 us/op 1.19
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 23.437 us/op 22.569 us/op 1.04
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 6.5350 us/op 6.0710 us/op 1.08
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 4.2520 us/op 4.0510 us/op 1.05
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 104.52 us/op 90.966 us/op 1.15
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.4003 ms/op 1.3343 ms/op 1.05
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8492 ms/op 1.7402 ms/op 1.06
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8612 ms/op 1.7240 ms/op 1.08
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.8302 ms/op 3.5574 ms/op 1.08
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.0999 ms/op 2.0206 ms/op 1.04
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.1860 ms/op 3.9670 ms/op 1.06
Tree 40 250000 create 329.55 ms/op 322.57 ms/op 1.02
Tree 40 250000 get(125000) 99.579 ns/op 88.707 ns/op 1.12
Tree 40 250000 set(125000) 1.0769 us/op 973.93 ns/op 1.11
Tree 40 250000 toArray() 9.5223 ms/op 14.299 ms/op 0.67
Tree 40 250000 iterate all - toArray() + loop 9.6119 ms/op 12.230 ms/op 0.79
Tree 40 250000 iterate all - get(i) 34.293 ms/op 37.712 ms/op 0.91
Array 250000 create 2.0330 ms/op 2.1518 ms/op 0.94
Array 250000 clone - spread 634.47 us/op 660.31 us/op 0.96
Array 250000 get(125000) 0.29300 ns/op 0.30100 ns/op 0.97
Array 250000 set(125000) 0.29600 ns/op 0.29600 ns/op 1.00
Array 250000 iterate all - loop 56.527 us/op 57.084 us/op 0.99
phase0 afterProcessEpoch - 250000 vs - 7PWei 40.327 ms/op 48.833 ms/op 0.83
Array.fill - length 1000000 2.2972 ms/op 2.0327 ms/op 1.13
Array push - length 1000000 7.8949 ms/op 8.6210 ms/op 0.92
Array.get 0.20339 ns/op 0.19556 ns/op 1.04
Uint8Array.get 0.26706 ns/op 0.22133 ns/op 1.21
phase0 beforeProcessEpoch - 250000 vs - 7PWei 12.182 ms/op 14.026 ms/op 0.87
altair processEpoch - mainnet_e81889 247.37 ms/op 257.89 ms/op 0.96
mainnet_e81889 - altair beforeProcessEpoch 20.741 ms/op 14.809 ms/op 1.40
mainnet_e81889 - altair processJustificationAndFinalization 4.7550 us/op 5.8320 us/op 0.82
mainnet_e81889 - altair processInactivityUpdates 3.6441 ms/op 4.4666 ms/op 0.82
mainnet_e81889 - altair processRewardsAndPenalties 17.809 ms/op 21.060 ms/op 0.85
mainnet_e81889 - altair processRegistryUpdates 533.00 ns/op 526.00 ns/op 1.01
mainnet_e81889 - altair processSlashings 133.00 ns/op 136.00 ns/op 0.98
mainnet_e81889 - altair processEth1DataReset 127.00 ns/op 126.00 ns/op 1.01
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.3171 ms/op 1.2895 ms/op 1.02
mainnet_e81889 - altair processSlashingsReset 702.00 ns/op 690.00 ns/op 1.02
mainnet_e81889 - altair processRandaoMixesReset 993.00 ns/op 1.1620 us/op 0.85
mainnet_e81889 - altair processHistoricalRootsUpdate 136.00 ns/op 127.00 ns/op 1.07
mainnet_e81889 - altair processParticipationFlagUpdates 432.00 ns/op 415.00 ns/op 1.04
mainnet_e81889 - altair processSyncCommitteeUpdates 108.00 ns/op 100.00 ns/op 1.08
mainnet_e81889 - altair afterProcessEpoch 39.989 ms/op 40.599 ms/op 0.98
capella processEpoch - mainnet_e217614 747.71 ms/op 817.38 ms/op 0.91
mainnet_e217614 - capella beforeProcessEpoch 61.520 ms/op 56.897 ms/op 1.08
mainnet_e217614 - capella processJustificationAndFinalization 5.2750 us/op 5.9900 us/op 0.88
mainnet_e217614 - capella processInactivityUpdates 12.041 ms/op 15.084 ms/op 0.80
mainnet_e217614 - capella processRewardsAndPenalties 89.819 ms/op 91.579 ms/op 0.98
mainnet_e217614 - capella processRegistryUpdates 4.6560 us/op 4.2890 us/op 1.09
mainnet_e217614 - capella processSlashings 137.00 ns/op 125.00 ns/op 1.10
mainnet_e217614 - capella processEth1DataReset 133.00 ns/op 123.00 ns/op 1.08
mainnet_e217614 - capella processEffectiveBalanceUpdates 5.9876 ms/op 13.188 ms/op 0.45
mainnet_e217614 - capella processSlashingsReset 677.00 ns/op 664.00 ns/op 1.02
mainnet_e217614 - capella processRandaoMixesReset 1.0380 us/op 1.1750 us/op 0.88
mainnet_e217614 - capella processHistoricalRootsUpdate 133.00 ns/op 127.00 ns/op 1.05
mainnet_e217614 - capella processParticipationFlagUpdates 421.00 ns/op 406.00 ns/op 1.04
mainnet_e217614 - capella afterProcessEpoch 107.88 ms/op 104.29 ms/op 1.03
phase0 processEpoch - mainnet_e58758 261.62 ms/op 310.67 ms/op 0.84
mainnet_e58758 - phase0 beforeProcessEpoch 50.871 ms/op 70.901 ms/op 0.72
mainnet_e58758 - phase0 processJustificationAndFinalization 5.1150 us/op 6.4140 us/op 0.80
mainnet_e58758 - phase0 processRewardsAndPenalties 16.270 ms/op 15.645 ms/op 1.04
mainnet_e58758 - phase0 processRegistryUpdates 2.2980 us/op 2.1620 us/op 1.06
mainnet_e58758 - phase0 processSlashings 134.00 ns/op 129.00 ns/op 1.04
mainnet_e58758 - phase0 processEth1DataReset 148.00 ns/op 123.00 ns/op 1.20
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 860.90 us/op 1.2125 ms/op 0.71
mainnet_e58758 - phase0 processSlashingsReset 821.00 ns/op 876.00 ns/op 0.94
mainnet_e58758 - phase0 processRandaoMixesReset 1.0330 us/op 1.3150 us/op 0.79
mainnet_e58758 - phase0 processHistoricalRootsUpdate 143.00 ns/op 129.00 ns/op 1.11
mainnet_e58758 - phase0 processParticipationRecordUpdates 968.00 ns/op 1.1340 us/op 0.85
mainnet_e58758 - phase0 afterProcessEpoch 32.509 ms/op 33.375 ms/op 0.97
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0285 ms/op 966.36 us/op 1.06
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.8538 ms/op 1.5378 ms/op 1.21
altair processInactivityUpdates - 250000 normalcase 10.547 ms/op 11.442 ms/op 0.92
altair processInactivityUpdates - 250000 worstcase 10.519 ms/op 10.811 ms/op 0.97
phase0 processRegistryUpdates - 250000 normalcase 2.4800 us/op 2.0610 us/op 1.20
phase0 processRegistryUpdates - 250000 badcase_full_deposits 156.36 us/op 136.02 us/op 1.15
phase0 processRegistryUpdates - 250000 worstcase 0.5 58.452 ms/op 67.360 ms/op 0.87
altair processRewardsAndPenalties - 250000 normalcase 15.142 ms/op 15.758 ms/op 0.96
altair processRewardsAndPenalties - 250000 worstcase 13.804 ms/op 15.005 ms/op 0.92
phase0 getAttestationDeltas - 250000 normalcase 5.4104 ms/op 5.2174 ms/op 1.04
phase0 getAttestationDeltas - 250000 worstcase 5.4570 ms/op 5.3097 ms/op 1.03
phase0 processSlashings - 250000 worstcase 60.161 us/op 63.371 us/op 0.95
altair processSyncCommitteeUpdates - 250000 10.073 ms/op 9.9210 ms/op 1.02
BeaconState.hashTreeRoot - No change 184.00 ns/op 163.00 ns/op 1.13
BeaconState.hashTreeRoot - 1 full validator 72.303 us/op 71.329 us/op 1.01
BeaconState.hashTreeRoot - 32 full validator 812.26 us/op 868.70 us/op 0.94
BeaconState.hashTreeRoot - 512 full validator 7.7558 ms/op 7.6902 ms/op 1.01
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 79.772 us/op 104.94 us/op 0.76
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.2960 ms/op 1.4138 ms/op 0.92
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 15.048 ms/op 17.271 ms/op 0.87
BeaconState.hashTreeRoot - 1 balances 69.026 us/op 83.880 us/op 0.82
BeaconState.hashTreeRoot - 32 balances 679.57 us/op 778.16 us/op 0.87
BeaconState.hashTreeRoot - 512 balances 5.7928 ms/op 5.8731 ms/op 0.99
BeaconState.hashTreeRoot - 250000 balances 125.12 ms/op 123.38 ms/op 1.01
aggregationBits - 2048 els - zipIndexesInBitList 19.658 us/op 19.298 us/op 1.02
regular array get 100000 times 23.359 us/op 22.467 us/op 1.04
wrappedArray get 100000 times 23.381 us/op 22.380 us/op 1.04
arrayWithProxy get 100000 times 10.160 ms/op 9.2294 ms/op 1.10
ssz.Root.equals 21.704 ns/op 20.743 ns/op 1.05
byteArrayEquals 21.619 ns/op 20.533 ns/op 1.05
Buffer.compare 8.9360 ns/op 8.5910 ns/op 1.04
processSlot - 1 slots 8.3500 us/op 8.3290 us/op 1.00
processSlot - 32 slots 1.6222 ms/op 2.0012 ms/op 0.81
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 1.8644 ms/op 5.1630 ms/op 0.36
getCommitteeAssignments - req 1 vs - 250000 vc 1.7034 ms/op 1.7021 ms/op 1.00
getCommitteeAssignments - req 100 vs - 250000 vc 3.4213 ms/op 3.4288 ms/op 1.00
getCommitteeAssignments - req 1000 vs - 250000 vc 3.7104 ms/op 3.7614 ms/op 0.99
findModifiedValidators - 10000 modified validators 802.26 ms/op 753.38 ms/op 1.06
findModifiedValidators - 1000 modified validators 509.41 ms/op 550.29 ms/op 0.93
findModifiedValidators - 100 modified validators 277.94 ms/op 367.83 ms/op 0.76
findModifiedValidators - 10 modified validators 252.15 ms/op 283.39 ms/op 0.89
findModifiedValidators - 1 modified validators 145.47 ms/op 188.46 ms/op 0.77
findModifiedValidators - no difference 164.58 ms/op 153.76 ms/op 1.07
migrate state 1500000 validators, 3400 modified, 2000 new 2.8446 s/op 3.2084 s/op 0.89
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.6400 ns/op 3.5400 ns/op 1.03
state getBlockRootAtSlot - 250000 vs - 7PWei 283.66 ns/op 395.23 ns/op 0.72
computeProposerIndex 100000 validators 1.3190 ms/op 1.2770 ms/op 1.03
getNextSyncCommitteeIndices 1000 validators 2.8383 ms/op 2.7419 ms/op 1.04
getNextSyncCommitteeIndices 10000 validators 24.858 ms/op 24.029 ms/op 1.03
getNextSyncCommitteeIndices 100000 validators 86.077 ms/op 78.952 ms/op 1.09
computeProposers - vc 250000 544.89 us/op 521.57 us/op 1.04
computeEpochShuffling - vc 250000 38.179 ms/op 36.731 ms/op 1.04
getNextSyncCommittee - vc 250000 9.2985 ms/op 8.9951 ms/op 1.03
nodejs block root to RootHex using toHex 122.11 ns/op 98.191 ns/op 1.24
nodejs block root to RootHex using toRootHex 73.045 ns/op 62.993 ns/op 1.16
nodejs fromHex(blob) 762.50 us/op 720.99 us/op 1.06
nodejs fromHexInto(blob) 663.73 us/op 593.87 us/op 1.12
nodejs block root to RootHex using the deprecated toHexString 508.02 ns/op 339.24 ns/op 1.50
nodejs byteArrayEquals 32 bytes (block root) 25.655 ns/op 24.618 ns/op 1.04
nodejs byteArrayEquals 48 bytes (pubkey) 37.055 ns/op 35.499 ns/op 1.04
nodejs byteArrayEquals 96 bytes (signature) 38.939 ns/op 31.034 ns/op 1.25
nodejs byteArrayEquals 1024 bytes 43.063 ns/op 37.023 ns/op 1.16
nodejs byteArrayEquals 131072 bytes (blob) 1.7504 us/op 1.6418 us/op 1.07
browser block root to RootHex using toHex 146.52 ns/op 136.29 ns/op 1.08
browser block root to RootHex using toRootHex 131.81 ns/op 123.32 ns/op 1.07
browser fromHex(blob) 1.6071 ms/op 1.4424 ms/op 1.11
browser fromHexInto(blob) 662.16 us/op 597.42 us/op 1.11
browser block root to RootHex using the deprecated toHexString 344.99 ns/op 447.52 ns/op 0.77
browser byteArrayEquals 32 bytes (block root) 27.593 ns/op 26.764 ns/op 1.03
browser byteArrayEquals 48 bytes (pubkey) 38.979 ns/op 37.439 ns/op 1.04
browser byteArrayEquals 96 bytes (signature) 72.858 ns/op 70.064 ns/op 1.04
browser byteArrayEquals 1024 bytes 743.90 ns/op 715.09 ns/op 1.04
browser byteArrayEquals 131072 bytes (blob) 93.801 us/op 90.022 us/op 1.04

by benchmarkbot/action

@nflaig
nflaig marked this pull request as draft April 2, 2026 14:39
@nflaig

nflaig commented Apr 2, 2026

Copy link
Copy Markdown
Member Author

@codex review

@nflaig
nflaig marked this pull request as ready for review April 2, 2026 15:12

@twoeths twoeths left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

good catch!

@twoeths
twoeths merged commit 89ddaae into unstable Apr 3, 2026
19 checks passed
@twoeths
twoeths deleted the nflaig/data-index-extraction branch April 3, 2026 02:05
@codecov

codecov Bot commented Apr 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.52%. Comparing base (e8407e9) to head (d33b3d4).
⚠️ Report is 1 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #9158   +/-   ##
=========================================
  Coverage     52.52%   52.52%           
=========================================
  Files           848      848           
  Lines         61447    61447           
  Branches       4528     4528           
=========================================
  Hits          32272    32272           
  Misses        29110    29110           
  Partials         65       65           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wemeetagain

Copy link
Copy Markdown
Member

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

3 participants