Skip to content

Conversation

@nflaig
Copy link
Member

@nflaig nflaig commented Aug 25, 2025

Motivation

Latest updates from ethereum/beacon-APIs#546

Description

Update getBlobs beacon api to use versioned_hashes instead of indices as filter

@nflaig nflaig requested a review from a team as a code owner August 25, 2025 16:58
Copy link
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.

Summary of Changes

Hello @nflaig, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the getBlobs Beacon API endpoint to align with recent changes in the Ethereum beacon-APIs specification. Specifically, it modifies the filtering mechanism for blobs from using numerical indices to cryptographic versioned_hashes, reflecting the ongoing evolution of the Ethereum protocol, particularly in the context of EIP-4844 (Dencun upgrade).

Highlights

  • API Signature Update: The "getBlobs" endpoint's query parameter for filtering blobs has been changed from "indices" (an array of numbers) to "versioned_hashes" (an array of strings), impacting both type definitions and request/response handling.
  • Internal Blob Filtering Logic: The backend implementation of "getBlobs" has been refactored to process "versioned_hashes". This involves deriving versioned hashes from KZG commitments within the block and then selecting the corresponding blobs.
  • Test Data Alignment: Unit tests for the "getBlobs" endpoint have been updated to reflect the new "versioned_hashes" parameter, ensuring consistency with the API's revised signature.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
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 updates the getBlobs beacon API to filter by versioned_hashes instead of indices, aligning with recent specification changes. The changes correctly update the API route definitions, test data, and implementation logic. I have two suggestions for the implementation in packages/beacon-node/src/api/impl/beacon/blocks/index.ts. First, the uniqueness check for versionedHashes should be case-insensitive to match the lookup logic. Second, the logic for finding blob indices can be optimized for better performance and readability by using a Map.

@codecov
Copy link

codecov bot commented Aug 25, 2025

Codecov Report

❌ Patch coverage is 37.03704% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.14%. Comparing base (7b42620) to head (ca4c8ca).
⚠️ Report is 3 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #8264      +/-   ##
============================================
- Coverage     54.15%   54.14%   -0.01%     
============================================
  Files           849      849              
  Lines         63991    64012      +21     
  Branches       4852     4852              
============================================
+ Hits          34652    34658       +6     
- Misses        29262    29277      +15     
  Partials         77       77              
🚀 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.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 25, 2025

Performance Report

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: efa2669 Previous: 7b42620 Ratio
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.2233 ms/op 3.8095 ms/op 0.32
Full benchmark results
Benchmark suite Current: efa2669 Previous: 7b42620 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 744.23 us/op 1.0216 ms/op 0.73
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 31.492 us/op 36.500 us/op 0.86
BLS verify - blst 900.50 us/op 854.38 us/op 1.05
BLS verifyMultipleSignatures 3 - blst 1.7533 ms/op 1.2401 ms/op 1.41
BLS verifyMultipleSignatures 8 - blst 2.1099 ms/op 1.8988 ms/op 1.11
BLS verifyMultipleSignatures 32 - blst 4.5069 ms/op 5.6240 ms/op 0.80
BLS verifyMultipleSignatures 64 - blst 8.4014 ms/op 10.843 ms/op 0.77
BLS verifyMultipleSignatures 128 - blst 16.199 ms/op 17.512 ms/op 0.93
BLS deserializing 10000 signatures 621.22 ms/op 706.09 ms/op 0.88
BLS deserializing 100000 signatures 6.2504 s/op 7.1793 s/op 0.87
BLS verifyMultipleSignatures - same message - 3 - blst 946.80 us/op 1.0872 ms/op 0.87
BLS verifyMultipleSignatures - same message - 8 - blst 1.0905 ms/op 1.3466 ms/op 0.81
BLS verifyMultipleSignatures - same message - 32 - blst 1.6794 ms/op 1.8882 ms/op 0.89
BLS verifyMultipleSignatures - same message - 64 - blst 2.4903 ms/op 2.7608 ms/op 0.90
BLS verifyMultipleSignatures - same message - 128 - blst 4.2398 ms/op 4.9012 ms/op 0.87
BLS aggregatePubkeys 32 - blst 17.754 us/op 20.684 us/op 0.86
BLS aggregatePubkeys 128 - blst 62.850 us/op 74.159 us/op 0.85
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 46.180 ms/op 62.453 ms/op 0.74
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 48.288 ms/op 55.268 ms/op 0.87
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 35.537 ms/op 47.740 ms/op 0.74
getSlashingsAndExits - default max 50.265 us/op 82.962 us/op 0.61
getSlashingsAndExits - 2k 319.67 us/op 367.42 us/op 0.87
proposeBlockBody type=full, size=empty 5.2905 ms/op 6.2171 ms/op 0.85
isKnown best case - 1 super set check 414.00 ns/op 222.00 ns/op 1.86
isKnown normal case - 2 super set checks 414.00 ns/op 220.00 ns/op 1.88
isKnown worse case - 16 super set checks 412.00 ns/op 220.00 ns/op 1.87
InMemoryCheckpointStateCache - add get delete 2.4670 us/op 2.6360 us/op 0.94
validate api signedAggregateAndProof - struct 1.4907 ms/op 1.6252 ms/op 0.92
validate gossip signedAggregateAndProof - struct 1.4728 ms/op 1.5193 ms/op 0.97
batch validate gossip attestation - vc 640000 - chunk 32 105.99 us/op 126.56 us/op 0.84
batch validate gossip attestation - vc 640000 - chunk 64 90.003 us/op 118.01 us/op 0.76
batch validate gossip attestation - vc 640000 - chunk 128 86.326 us/op 119.84 us/op 0.72
batch validate gossip attestation - vc 640000 - chunk 256 91.571 us/op 119.24 us/op 0.77
pickEth1Vote - no votes 805.10 us/op 1.1633 ms/op 0.69
pickEth1Vote - max votes 4.9899 ms/op 8.3254 ms/op 0.60
pickEth1Vote - Eth1Data hashTreeRoot value x2048 8.6683 ms/op 14.850 ms/op 0.58
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 13.388 ms/op 23.149 ms/op 0.58
pickEth1Vote - Eth1Data fastSerialize value x2048 434.37 us/op 494.52 us/op 0.88
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.6087 ms/op 2.3546 ms/op 1.11
bytes32 toHexString 623.00 ns/op 395.00 ns/op 1.58
bytes32 Buffer.toString(hex) 477.00 ns/op 313.00 ns/op 1.52
bytes32 Buffer.toString(hex) from Uint8Array 664.00 ns/op 349.00 ns/op 1.90
bytes32 Buffer.toString(hex) + 0x 424.00 ns/op 298.00 ns/op 1.42
Object access 1 prop 0.37200 ns/op 0.14000 ns/op 2.66
Map access 1 prop 0.36600 ns/op 0.13600 ns/op 2.69
Object get x1000 5.1440 ns/op 6.3580 ns/op 0.81
Map get x1000 5.7160 ns/op 6.9120 ns/op 0.83
Object set x1000 18.909 ns/op 39.275 ns/op 0.48
Map set x1000 16.511 ns/op 27.746 ns/op 0.60
Return object 10000 times 0.28680 ns/op 0.30090 ns/op 0.95
Throw Error 10000 times 3.5225 us/op 4.5700 us/op 0.77
toHex 99.274 ns/op 143.57 ns/op 0.69
Buffer.from 93.567 ns/op 138.50 ns/op 0.68
shared Buffer 67.637 ns/op 94.457 ns/op 0.72
fastMsgIdFn sha256 / 200 bytes 1.9460 us/op 2.4670 us/op 0.79
fastMsgIdFn h32 xxhash / 200 bytes 387.00 ns/op 217.00 ns/op 1.78
fastMsgIdFn h64 xxhash / 200 bytes 433.00 ns/op 307.00 ns/op 1.41
fastMsgIdFn sha256 / 1000 bytes 5.7150 us/op 7.6770 us/op 0.74
fastMsgIdFn h32 xxhash / 1000 bytes 509.00 ns/op 356.00 ns/op 1.43
fastMsgIdFn h64 xxhash / 1000 bytes 505.00 ns/op 374.00 ns/op 1.35
fastMsgIdFn sha256 / 10000 bytes 49.166 us/op 67.232 us/op 0.73
fastMsgIdFn h32 xxhash / 10000 bytes 1.9120 us/op 1.9170 us/op 1.00
fastMsgIdFn h64 xxhash / 10000 bytes 1.3360 us/op 1.3120 us/op 1.02
send data - 1000 256B messages 12.205 ms/op 18.949 ms/op 0.64
send data - 1000 512B messages 15.139 ms/op 22.892 ms/op 0.66
send data - 1000 1024B messages 21.256 ms/op 31.952 ms/op 0.67
send data - 1000 1200B messages 14.411 ms/op 28.797 ms/op 0.50
send data - 1000 2048B messages 14.754 ms/op 34.231 ms/op 0.43
send data - 1000 4096B messages 16.669 ms/op 36.091 ms/op 0.46
send data - 1000 16384B messages 24.663 ms/op 55.916 ms/op 0.44
send data - 1000 65536B messages 63.330 ms/op 140.89 ms/op 0.45
enrSubnets - fastDeserialize 64 bits 969.00 ns/op 935.00 ns/op 1.04
enrSubnets - ssz BitVector 64 bits 498.00 ns/op 367.00 ns/op 1.36
enrSubnets - fastDeserialize 4 bits 323.00 ns/op 134.00 ns/op 2.41
enrSubnets - ssz BitVector 4 bits 503.00 ns/op 339.00 ns/op 1.48
prioritizePeers score -10:0 att 32-0.1 sync 2-0 195.85 us/op 261.89 us/op 0.75
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 237.80 us/op 289.77 us/op 0.82
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 382.23 us/op 415.50 us/op 0.92
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 662.50 us/op 810.34 us/op 0.82
prioritizePeers score 0:0 att 64-1 sync 4-1 740.32 us/op 977.70 us/op 0.76
array of 16000 items push then shift 1.2910 us/op 1.7906 us/op 0.72
LinkedList of 16000 items push then shift 6.3710 ns/op 10.931 ns/op 0.58
array of 16000 items push then pop 63.308 ns/op 93.318 ns/op 0.68
LinkedList of 16000 items push then pop 6.1350 ns/op 8.1190 ns/op 0.76
array of 24000 items push then shift 1.8938 us/op 2.6762 us/op 0.71
LinkedList of 24000 items push then shift 6.3260 ns/op 8.1570 ns/op 0.78
array of 24000 items push then pop 88.849 ns/op 127.22 ns/op 0.70
LinkedList of 24000 items push then pop 6.1500 ns/op 7.6280 ns/op 0.81
intersect bitArray bitLen 8 5.6250 ns/op 6.6210 ns/op 0.85
intersect array and set length 8 32.405 ns/op 40.106 ns/op 0.81
intersect bitArray bitLen 128 26.647 ns/op 31.352 ns/op 0.85
intersect array and set length 128 541.40 ns/op 647.35 ns/op 0.84
bitArray.getTrueBitIndexes() bitLen 128 1.1450 us/op 1.1480 us/op 1.00
bitArray.getTrueBitIndexes() bitLen 248 1.8160 us/op 2.2650 us/op 0.80
bitArray.getTrueBitIndexes() bitLen 512 3.4030 us/op 4.2880 us/op 0.79
Buffer.concat 32 items 750.00 ns/op 750.00 ns/op 1.00
Uint8Array.set 32 items 1.0860 us/op 1.4180 us/op 0.77
Buffer.copy 2.2920 us/op 3.4740 us/op 0.66
Uint8Array.set - with subarray 1.7940 us/op 3.9590 us/op 0.45
Uint8Array.set - without subarray 908.00 ns/op 1.8460 us/op 0.49
getUint32 - dataview 383.00 ns/op 218.00 ns/op 1.76
getUint32 - manual 316.00 ns/op 136.00 ns/op 2.32
Set add up to 64 items then delete first 1.8918 us/op 2.6004 us/op 0.73
OrderedSet add up to 64 items then delete first 2.8015 us/op 4.2441 us/op 0.66
Set add up to 64 items then delete last 2.1128 us/op 3.5199 us/op 0.60
OrderedSet add up to 64 items then delete last 3.2826 us/op 5.4191 us/op 0.61
Set add up to 64 items then delete middle 2.1168 us/op 3.3352 us/op 0.63
OrderedSet add up to 64 items then delete middle 4.6824 us/op 6.9302 us/op 0.68
Set add up to 128 items then delete first 4.0623 us/op 7.0878 us/op 0.57
OrderedSet add up to 128 items then delete first 6.2079 us/op 11.196 us/op 0.55
Set add up to 128 items then delete last 4.0645 us/op 7.1907 us/op 0.57
OrderedSet add up to 128 items then delete last 6.4300 us/op 12.190 us/op 0.53
Set add up to 128 items then delete middle 4.0465 us/op 6.9249 us/op 0.58
OrderedSet add up to 128 items then delete middle 12.001 us/op 17.488 us/op 0.69
Set add up to 256 items then delete first 8.0104 us/op 14.276 us/op 0.56
OrderedSet add up to 256 items then delete first 12.192 us/op 21.127 us/op 0.58
Set add up to 256 items then delete last 8.0148 us/op 13.426 us/op 0.60
OrderedSet add up to 256 items then delete last 12.564 us/op 23.299 us/op 0.54
Set add up to 256 items then delete middle 7.9594 us/op 13.859 us/op 0.57
OrderedSet add up to 256 items then delete middle 34.570 us/op 49.352 us/op 0.70
transfer serialized Status (84 B) 1.9090 us/op 2.5160 us/op 0.76
copy serialized Status (84 B) 1.1850 us/op 1.3520 us/op 0.88
transfer serialized SignedVoluntaryExit (112 B) 1.9080 us/op 2.5220 us/op 0.76
copy serialized SignedVoluntaryExit (112 B) 1.2310 us/op 1.5760 us/op 0.78
transfer serialized ProposerSlashing (416 B) 2.0420 us/op 2.9720 us/op 0.69
copy serialized ProposerSlashing (416 B) 1.2790 us/op 1.8300 us/op 0.70
transfer serialized Attestation (485 B) 1.9830 us/op 3.4370 us/op 0.58
copy serialized Attestation (485 B) 1.3210 us/op 2.9020 us/op 0.46
transfer serialized AttesterSlashing (33232 B) 2.1090 us/op 3.1240 us/op 0.68
copy serialized AttesterSlashing (33232 B) 2.6260 us/op 6.1420 us/op 0.43
transfer serialized Small SignedBeaconBlock (128000 B) 2.1020 us/op 4.0910 us/op 0.51
copy serialized Small SignedBeaconBlock (128000 B) 5.8650 us/op 17.450 us/op 0.34
transfer serialized Avg SignedBeaconBlock (200000 B) 2.2310 us/op 4.6560 us/op 0.48
copy serialized Avg SignedBeaconBlock (200000 B) 8.3090 us/op 25.547 us/op 0.33
transfer serialized BlobsSidecar (524380 B) 2.8820 us/op 5.6240 us/op 0.51
copy serialized BlobsSidecar (524380 B) 57.202 us/op 90.773 us/op 0.63
transfer serialized Big SignedBeaconBlock (1000000 B) 3.3480 us/op 7.1200 us/op 0.47
copy serialized Big SignedBeaconBlock (1000000 B) 113.29 us/op 155.94 us/op 0.73
pass gossip attestations to forkchoice per slot 2.8902 ms/op 3.4069 ms/op 0.85
forkChoice updateHead vc 100000 bc 64 eq 0 356.64 us/op 515.29 us/op 0.69
forkChoice updateHead vc 600000 bc 64 eq 0 2.6487 ms/op 3.8044 ms/op 0.70
forkChoice updateHead vc 1000000 bc 64 eq 0 4.5292 ms/op 6.7359 ms/op 0.67
forkChoice updateHead vc 600000 bc 320 eq 0 2.3666 ms/op 3.9364 ms/op 0.60
forkChoice updateHead vc 600000 bc 1200 eq 0 2.6545 ms/op 3.7637 ms/op 0.71
forkChoice updateHead vc 600000 bc 7200 eq 0 2.5996 ms/op 4.0768 ms/op 0.64
forkChoice updateHead vc 600000 bc 64 eq 1000 9.5740 ms/op 11.892 ms/op 0.81
forkChoice updateHead vc 600000 bc 64 eq 10000 9.8097 ms/op 11.901 ms/op 0.82
forkChoice updateHead vc 600000 bc 64 eq 300000 11.546 ms/op 26.963 ms/op 0.43
computeDeltas 500000 validators 300 proto nodes 3.1439 ms/op 4.5903 ms/op 0.68
computeDeltas 500000 validators 1200 proto nodes 3.1646 ms/op 4.7849 ms/op 0.66
computeDeltas 500000 validators 7200 proto nodes 3.2046 ms/op 4.6972 ms/op 0.68
computeDeltas 750000 validators 300 proto nodes 5.0716 ms/op 7.1884 ms/op 0.71
computeDeltas 750000 validators 1200 proto nodes 4.8643 ms/op 6.8323 ms/op 0.71
computeDeltas 750000 validators 7200 proto nodes 4.9643 ms/op 7.3723 ms/op 0.67
computeDeltas 1400000 validators 300 proto nodes 9.5379 ms/op 11.602 ms/op 0.82
computeDeltas 1400000 validators 1200 proto nodes 9.0338 ms/op 11.457 ms/op 0.79
computeDeltas 1400000 validators 7200 proto nodes 8.8381 ms/op 11.260 ms/op 0.78
computeDeltas 2100000 validators 300 proto nodes 13.512 ms/op 18.006 ms/op 0.75
computeDeltas 2100000 validators 1200 proto nodes 13.450 ms/op 17.905 ms/op 0.75
computeDeltas 2100000 validators 7200 proto nodes 13.374 ms/op 17.038 ms/op 0.78
altair processAttestation - 250000 vs - 7PWei normalcase 1.6843 ms/op 2.6908 ms/op 0.63
altair processAttestation - 250000 vs - 7PWei worstcase 2.3528 ms/op 3.2535 ms/op 0.72
altair processAttestation - setStatus - 1/6 committees join 97.930 us/op 141.82 us/op 0.69
altair processAttestation - setStatus - 1/3 committees join 183.56 us/op 267.42 us/op 0.69
altair processAttestation - setStatus - 1/2 committees join 273.27 us/op 358.61 us/op 0.76
altair processAttestation - setStatus - 2/3 committees join 361.15 us/op 478.46 us/op 0.75
altair processAttestation - setStatus - 4/5 committees join 494.37 us/op 631.72 us/op 0.78
altair processAttestation - setStatus - 100% committees join 594.82 us/op 762.94 us/op 0.78
altair processBlock - 250000 vs - 7PWei normalcase 4.5730 ms/op 5.3908 ms/op 0.85
altair processBlock - 250000 vs - 7PWei normalcase hashState 31.452 ms/op 30.488 ms/op 1.03
altair processBlock - 250000 vs - 7PWei worstcase 37.511 ms/op 43.479 ms/op 0.86
altair processBlock - 250000 vs - 7PWei worstcase hashState 83.497 ms/op 82.770 ms/op 1.01
phase0 processBlock - 250000 vs - 7PWei normalcase 1.6373 ms/op 1.9909 ms/op 0.82
phase0 processBlock - 250000 vs - 7PWei worstcase 23.764 ms/op 24.979 ms/op 0.95
altair processEth1Data - 250000 vs - 7PWei normalcase 278.23 us/op 351.10 us/op 0.79
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.3190 us/op 6.7090 us/op 0.79
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 33.192 us/op 45.562 us/op 0.73
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 11.077 us/op 11.476 us/op 0.97
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.0080 us/op 8.4500 us/op 0.71
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 146.05 us/op 217.19 us/op 0.67
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.3489 ms/op 2.3917 ms/op 0.56
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8007 ms/op 2.5800 ms/op 0.70
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.7886 ms/op 2.5580 ms/op 0.70
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.6885 ms/op 5.1260 ms/op 0.72
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.9376 ms/op 2.6306 ms/op 0.74
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.7972 ms/op 5.1473 ms/op 0.74
Tree 40 250000 create 362.15 ms/op 518.23 ms/op 0.70
Tree 40 250000 get(125000) 109.91 ns/op 148.96 ns/op 0.74
Tree 40 250000 set(125000) 1.2463 us/op 1.6770 us/op 0.74
Tree 40 250000 toArray() 10.086 ms/op 21.408 ms/op 0.47
Tree 40 250000 iterate all - toArray() + loop 10.168 ms/op 21.612 ms/op 0.47
Tree 40 250000 iterate all - get(i) 41.993 ms/op 59.032 ms/op 0.71
Array 250000 create 1.9422 ms/op 2.7573 ms/op 0.70
Array 250000 clone - spread 640.53 us/op 1.4748 ms/op 0.43
Array 250000 get(125000) 0.55600 ns/op 0.42600 ns/op 1.31
Array 250000 set(125000) 0.57400 ns/op 0.50700 ns/op 1.13
Array 250000 iterate all - loop 100.92 us/op 85.923 us/op 1.17
phase0 afterProcessEpoch - 250000 vs - 7PWei 38.070 ms/op 43.352 ms/op 0.88
Array.fill - length 1000000 2.5770 ms/op 3.5164 ms/op 0.73
Array push - length 1000000 9.4920 ms/op 19.786 ms/op 0.48
Array.get 0.25778 ns/op 0.29274 ns/op 0.88
Uint8Array.get 0.41451 ns/op 0.45506 ns/op 0.91
phase0 beforeProcessEpoch - 250000 vs - 7PWei 13.259 ms/op 20.001 ms/op 0.66
altair processEpoch - mainnet_e81889 240.30 ms/op 288.14 ms/op 0.83
mainnet_e81889 - altair beforeProcessEpoch 13.336 ms/op 18.865 ms/op 0.71
mainnet_e81889 - altair processJustificationAndFinalization 5.9420 us/op 6.8300 us/op 0.87
mainnet_e81889 - altair processInactivityUpdates 3.6604 ms/op 5.5344 ms/op 0.66
mainnet_e81889 - altair processRewardsAndPenalties 33.571 ms/op 44.742 ms/op 0.75
mainnet_e81889 - altair processRegistryUpdates 831.00 ns/op 687.00 ns/op 1.21
mainnet_e81889 - altair processSlashings 393.00 ns/op 206.00 ns/op 1.91
mainnet_e81889 - altair processEth1DataReset 387.00 ns/op 201.00 ns/op 1.93
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.1466 ms/op 1.2261 ms/op 0.94
mainnet_e81889 - altair processSlashingsReset 1.2120 us/op 1.0170 us/op 1.19
mainnet_e81889 - altair processRandaoMixesReset 1.3090 us/op 1.3040 us/op 1.00
mainnet_e81889 - altair processHistoricalRootsUpdate 375.00 ns/op 189.00 ns/op 1.98
mainnet_e81889 - altair processParticipationFlagUpdates 689.00 ns/op 545.00 ns/op 1.26
mainnet_e81889 - altair processSyncCommitteeUpdates 352.00 ns/op 149.00 ns/op 2.36
mainnet_e81889 - altair afterProcessEpoch 39.042 ms/op 45.430 ms/op 0.86
capella processEpoch - mainnet_e217614 959.93 ms/op 1.0461 s/op 0.92
mainnet_e217614 - capella beforeProcessEpoch 58.354 ms/op 72.463 ms/op 0.81
mainnet_e217614 - capella processJustificationAndFinalization 4.4920 us/op 7.0480 us/op 0.64
mainnet_e217614 - capella processInactivityUpdates 12.920 ms/op 14.767 ms/op 0.87
mainnet_e217614 - capella processRewardsAndPenalties 182.19 ms/op 199.91 ms/op 0.91
mainnet_e217614 - capella processRegistryUpdates 5.4770 us/op 7.0420 us/op 0.78
mainnet_e217614 - capella processSlashings 384.00 ns/op 200.00 ns/op 1.92
mainnet_e217614 - capella processEth1DataReset 383.00 ns/op 199.00 ns/op 1.92
mainnet_e217614 - capella processEffectiveBalanceUpdates 3.7913 ms/op 11.987 ms/op 0.32
mainnet_e217614 - capella processSlashingsReset 1.0400 us/op 1.0480 us/op 0.99
mainnet_e217614 - capella processRandaoMixesReset 1.4730 us/op 1.5030 us/op 0.98
mainnet_e217614 - capella processHistoricalRootsUpdate 385.00 ns/op 201.00 ns/op 1.92
mainnet_e217614 - capella processParticipationFlagUpdates 693.00 ns/op 544.00 ns/op 1.27
mainnet_e217614 - capella afterProcessEpoch 107.77 ms/op 120.77 ms/op 0.89
phase0 processEpoch - mainnet_e58758 271.80 ms/op 332.43 ms/op 0.82
mainnet_e58758 - phase0 beforeProcessEpoch 61.433 ms/op 82.958 ms/op 0.74
mainnet_e58758 - phase0 processJustificationAndFinalization 7.5560 us/op 7.1020 us/op 1.06
mainnet_e58758 - phase0 processRewardsAndPenalties 31.663 ms/op 45.499 ms/op 0.70
mainnet_e58758 - phase0 processRegistryUpdates 2.7340 us/op 3.2690 us/op 0.84
mainnet_e58758 - phase0 processSlashings 390.00 ns/op 190.00 ns/op 2.05
mainnet_e58758 - phase0 processEth1DataReset 461.00 ns/op 204.00 ns/op 2.26
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 993.98 us/op 2.2523 ms/op 0.44
mainnet_e58758 - phase0 processSlashingsReset 1.3490 us/op 1.0710 us/op 1.26
mainnet_e58758 - phase0 processRandaoMixesReset 1.3010 us/op 1.3570 us/op 0.96
mainnet_e58758 - phase0 processHistoricalRootsUpdate 394.00 ns/op 217.00 ns/op 1.82
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.1430 us/op 1.0800 us/op 1.06
mainnet_e58758 - phase0 afterProcessEpoch 32.278 ms/op 41.089 ms/op 0.79
phase0 processEffectiveBalanceUpdates - 250000 normalcase 956.26 us/op 1.3956 ms/op 0.69
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.2233 ms/op 3.8095 ms/op 0.32
altair processInactivityUpdates - 250000 normalcase 16.842 ms/op 21.994 ms/op 0.77
altair processInactivityUpdates - 250000 worstcase 15.078 ms/op 20.587 ms/op 0.73
phase0 processRegistryUpdates - 250000 normalcase 5.3340 us/op 9.3880 us/op 0.57
phase0 processRegistryUpdates - 250000 badcase_full_deposits 292.19 us/op 379.23 us/op 0.77
phase0 processRegistryUpdates - 250000 worstcase 0.5 93.407 ms/op 122.53 ms/op 0.76
altair processRewardsAndPenalties - 250000 normalcase 26.233 ms/op 29.476 ms/op 0.89
altair processRewardsAndPenalties - 250000 worstcase 25.713 ms/op 28.929 ms/op 0.89
phase0 getAttestationDeltas - 250000 normalcase 5.8894 ms/op 8.5611 ms/op 0.69
phase0 getAttestationDeltas - 250000 worstcase 4.6607 ms/op 8.1613 ms/op 0.57
phase0 processSlashings - 250000 worstcase 88.407 us/op 135.20 us/op 0.65
altair processSyncCommitteeUpdates - 250000 9.2652 ms/op 11.643 ms/op 0.80
BeaconState.hashTreeRoot - No change 421.00 ns/op 223.00 ns/op 1.89
BeaconState.hashTreeRoot - 1 full validator 83.413 us/op 93.463 us/op 0.89
BeaconState.hashTreeRoot - 32 full validator 903.35 us/op 1.1042 ms/op 0.82
BeaconState.hashTreeRoot - 512 full validator 11.386 ms/op 12.988 ms/op 0.88
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 99.876 us/op 110.66 us/op 0.90
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.6908 ms/op 1.6548 ms/op 1.02
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 24.582 ms/op 33.015 ms/op 0.74
BeaconState.hashTreeRoot - 1 balances 64.343 us/op 107.05 us/op 0.60
BeaconState.hashTreeRoot - 32 balances 658.88 us/op 1.3299 ms/op 0.50
BeaconState.hashTreeRoot - 512 balances 5.8947 ms/op 9.5782 ms/op 0.62
BeaconState.hashTreeRoot - 250000 balances 157.74 ms/op 177.29 ms/op 0.89
aggregationBits - 2048 els - zipIndexesInBitList 18.831 us/op 26.624 us/op 0.71
byteArrayEquals 32 41.591 ns/op 57.423 ns/op 0.72
Buffer.compare 32 14.776 ns/op 18.367 ns/op 0.80
byteArrayEquals 1024 1.2186 us/op 1.7363 us/op 0.70
Buffer.compare 1024 22.874 ns/op 27.325 ns/op 0.84
byteArrayEquals 16384 19.415 us/op 27.235 us/op 0.71
Buffer.compare 16384 159.78 ns/op 207.37 ns/op 0.77
byteArrayEquals 123687377 150.56 ms/op 204.81 ms/op 0.74
Buffer.compare 123687377 3.7802 ms/op 10.458 ms/op 0.36
byteArrayEquals 32 - diff last byte 42.081 ns/op 57.915 ns/op 0.73
Buffer.compare 32 - diff last byte 15.865 ns/op 18.773 ns/op 0.85
byteArrayEquals 1024 - diff last byte 1.2520 us/op 1.7637 us/op 0.71
Buffer.compare 1024 - diff last byte 24.692 ns/op 28.890 ns/op 0.85
byteArrayEquals 16384 - diff last byte 19.921 us/op 28.737 us/op 0.69
Buffer.compare 16384 - diff last byte 191.88 ns/op 214.62 ns/op 0.89
byteArrayEquals 123687377 - diff last byte 151.23 ms/op 218.94 ms/op 0.69
Buffer.compare 123687377 - diff last byte 5.7924 ms/op 11.146 ms/op 0.52
byteArrayEquals 32 - random bytes 4.7050 ns/op 5.5990 ns/op 0.84
Buffer.compare 32 - random bytes 14.975 ns/op 18.383 ns/op 0.81
byteArrayEquals 1024 - random bytes 4.6690 ns/op 5.5810 ns/op 0.84
Buffer.compare 1024 - random bytes 16.246 ns/op 19.222 ns/op 0.85
byteArrayEquals 16384 - random bytes 4.8950 ns/op 5.7590 ns/op 0.85
Buffer.compare 16384 - random bytes 16.018 ns/op 20.127 ns/op 0.80
byteArrayEquals 123687377 - random bytes 7.7500 ns/op 7.2000 ns/op 1.08
Buffer.compare 123687377 - random bytes 18.480 ns/op 20.950 ns/op 0.88
regular array get 100000 times 39.472 us/op 36.645 us/op 1.08
wrappedArray get 100000 times 39.732 us/op 41.397 us/op 0.96
arrayWithProxy get 100000 times 9.8457 ms/op 14.297 ms/op 0.69
ssz.Root.equals 38.738 ns/op 53.173 ns/op 0.73
byteArrayEquals 37.879 ns/op 49.609 ns/op 0.76
Buffer.compare 8.7000 ns/op 11.442 ns/op 0.76
processSlot - 1 slots 8.8440 us/op 12.715 us/op 0.70
processSlot - 32 slots 2.1991 ms/op 2.8469 ms/op 0.77
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 3.3143 ms/op 3.8265 ms/op 0.87
getCommitteeAssignments - req 1 vs - 250000 vc 1.7824 ms/op 2.3697 ms/op 0.75
getCommitteeAssignments - req 100 vs - 250000 vc 3.4885 ms/op 4.6268 ms/op 0.75
getCommitteeAssignments - req 1000 vs - 250000 vc 3.6917 ms/op 4.7868 ms/op 0.77
findModifiedValidators - 10000 modified validators 757.35 ms/op 802.67 ms/op 0.94
findModifiedValidators - 1000 modified validators 658.02 ms/op 885.69 ms/op 0.74
findModifiedValidators - 100 modified validators 183.97 ms/op 242.83 ms/op 0.76
findModifiedValidators - 10 modified validators 155.18 ms/op 207.87 ms/op 0.75
findModifiedValidators - 1 modified validators 136.55 ms/op 286.65 ms/op 0.48
findModifiedValidators - no difference 141.36 ms/op 209.99 ms/op 0.67
compare ViewDUs 6.4717 s/op 7.9105 s/op 0.82
compare each validator Uint8Array 1.5790 s/op 2.4373 s/op 0.65
compare ViewDU to Uint8Array 742.88 ms/op 1.7979 s/op 0.41
migrate state 1000000 validators, 24 modified, 0 new 858.72 ms/op 1.3252 s/op 0.65
migrate state 1000000 validators, 1700 modified, 1000 new 1.1497 s/op 1.9456 s/op 0.59
migrate state 1000000 validators, 3400 modified, 2000 new 1.1491 s/op 1.8184 s/op 0.63
migrate state 1500000 validators, 24 modified, 0 new 854.43 ms/op 1.0345 s/op 0.83
migrate state 1500000 validators, 1700 modified, 1000 new 1.0793 s/op 1.2513 s/op 0.86
migrate state 1500000 validators, 3400 modified, 2000 new 1.2709 s/op 1.4557 s/op 0.87
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.8700 ns/op 4.6200 ns/op 1.27
state getBlockRootAtSlot - 250000 vs - 7PWei 758.58 ns/op 483.98 ns/op 1.57
naive computeProposerIndex 100000 validators 49.658 ms/op 59.295 ms/op 0.84
computeProposerIndex 100000 validators 1.4352 ms/op 1.5396 ms/op 0.93
naiveGetNextSyncCommitteeIndices 1000 validators 6.2211 s/op 8.8782 s/op 0.70
getNextSyncCommitteeIndices 1000 validators 99.192 ms/op 136.25 ms/op 0.73
naiveGetNextSyncCommitteeIndices 10000 validators 6.0420 s/op 9.4906 s/op 0.64
getNextSyncCommitteeIndices 10000 validators 96.942 ms/op 122.28 ms/op 0.79
naiveGetNextSyncCommitteeIndices 100000 validators 6.0490 s/op 10.379 s/op 0.58
getNextSyncCommitteeIndices 100000 validators 93.468 ms/op 162.92 ms/op 0.57
naive computeShuffledIndex 100000 validators 20.887 s/op 30.915 s/op 0.68
cached computeShuffledIndex 100000 validators 476.56 ms/op 621.13 ms/op 0.77
naive computeShuffledIndex 2000000 validators 463.66 s/op 497.26 s/op 0.93
cached computeShuffledIndex 2000000 validators 18.963 s/op 38.685 s/op 0.49
computeProposers - vc 250000 548.60 us/op 640.10 us/op 0.86
computeEpochShuffling - vc 250000 38.033 ms/op 43.601 ms/op 0.87
getNextSyncCommittee - vc 250000 9.3766 ms/op 11.010 ms/op 0.85
computeSigningRoot for AttestationData 18.253 us/op 24.951 us/op 0.73
hash AttestationData serialized data then Buffer.toString(base64) 1.1858 us/op 1.6169 us/op 0.73
toHexString serialized data 958.72 ns/op 1.2146 us/op 0.79
Buffer.toString(base64) 110.40 ns/op 154.92 ns/op 0.71
nodejs block root to RootHex using toHex 107.25 ns/op 158.53 ns/op 0.68
nodejs block root to RootHex using toRootHex 77.078 ns/op 90.435 ns/op 0.85
nodejs fromhex(blob) 98.759 ms/op 117.73 ms/op 0.84
nodejs fromHexInto(blob) 81.194 ms/op 95.367 ms/op 0.85
browser block root to RootHex using the deprecated toHexString 186.32 ns/op 216.65 ns/op 0.86
browser block root to RootHex using toHex 151.30 ns/op 178.66 ns/op 0.85
browser block root to RootHex using toRootHex 139.62 ns/op 162.63 ns/op 0.86
browser fromHexInto(blob) 646.82 us/op 834.74 us/op 0.77
browser fromHex(blob) 651.27 ms/op 804.88 ms/op 0.81

by benchmarkbot/action

@nflaig nflaig changed the title feat: update getBlobs to use versioned_hashes instead of indices as filter feat: update blobs endpoint to use versioned_hashes instead of indices as filter Aug 28, 2025
@nflaig
Copy link
Member Author

nflaig commented Sep 2, 2025

upstream spec PR has been merged

@wemeetagain wemeetagain merged commit c9145b8 into unstable Sep 2, 2025
26 of 28 checks passed
@wemeetagain wemeetagain deleted the nflaig/update-getblobs branch September 2, 2025 14:21
@wemeetagain
Copy link
Member

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