Skip to content

Comments

feat: serve data columns by root for finalized epochs#8250

Merged
matthewkeil merged 6 commits intounstablefrom
nflaig/finalized-columns-by-root
Sep 2, 2025
Merged

feat: serve data columns by root for finalized epochs#8250
matthewkeil merged 6 commits intounstablefrom
nflaig/finalized-columns-by-root

Conversation

@nflaig
Copy link
Member

@nflaig nflaig commented Aug 22, 2025

Motivation

As per spec ethereum/consensus-specs#4394 we should be able to serve data columns by root for finalized epochs.

Description

Serve data columns by root for finalized epochs

Closes #7960

@nflaig nflaig requested a review from a team as a code owner August 22, 2025 12:57
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 introduces a new feature that allows the system to serve data columns by root for finalized epochs. Previously, this functionality was limited to non-finalized blocks. The change aligns the system with a new Ethereum consensus specification, enabling clients to request historical data columns. This enhancement improves data accessibility and compliance with updated protocol requirements.

Highlights

  • Support for Finalized Epochs: The system can now retrieve data columns for blocks that have been finalized, by looking up their slot in the block archive if they are not in the active fork choice.
  • Adjusted Minimum Request Epoch: The calculation for the minimum request epoch has been updated to remove the constraint of the finalizedEpoch, allowing clients to request data from older, finalized periods.
  • Dynamic Data Retrieval Strategy: Data column sidecars are now fetched from the appropriate database based on whether the block is non-finalized (using dataColumnSidecar by block root) or finalized (using dataColumnSidecarArchive by slot).
  • Hex Conversion Utility Update: The utility for converting roots to hex strings was updated to toRootHex for consistency and correctness.
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 successfully implements the serving of data columns by root for finalized epochs, aligning with the specified spec changes. The logic correctly handles both non-finalized blocks from the fork choice and finalized blocks from the database archive. The code is clean and the changes are logical. I've identified one minor issue regarding a redundant check that appears to be dead code, which could be removed to improve clarity.

@codecov
Copy link

codecov bot commented Aug 22, 2025

Codecov Report

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

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #8250      +/-   ##
============================================
- Coverage     54.15%   54.14%   -0.01%     
============================================
  Files           849      849              
  Lines         63991    63996       +5     
  Branches       4852     4851       -1     
============================================
  Hits          34652    34652              
- Misses        29262    29267       +5     
  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 22, 2025

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 54e7313 Previous: 7b42620 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.1619 ms/op 1.0216 ms/op 1.14
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 41.060 us/op 36.500 us/op 1.12
BLS verify - blst 1.0888 ms/op 854.38 us/op 1.27
BLS verifyMultipleSignatures 3 - blst 1.5589 ms/op 1.2401 ms/op 1.26
BLS verifyMultipleSignatures 8 - blst 2.0681 ms/op 1.8988 ms/op 1.09
BLS verifyMultipleSignatures 32 - blst 6.4192 ms/op 5.6240 ms/op 1.14
BLS verifyMultipleSignatures 64 - blst 11.711 ms/op 10.843 ms/op 1.08
BLS verifyMultipleSignatures 128 - blst 19.986 ms/op 17.512 ms/op 1.14
BLS deserializing 10000 signatures 990.72 ms/op 706.09 ms/op 1.40
BLS deserializing 100000 signatures 9.1340 s/op 7.1793 s/op 1.27
BLS verifyMultipleSignatures - same message - 3 - blst 1.3859 ms/op 1.0872 ms/op 1.27
BLS verifyMultipleSignatures - same message - 8 - blst 1.5317 ms/op 1.3466 ms/op 1.14
BLS verifyMultipleSignatures - same message - 32 - blst 2.5042 ms/op 1.8882 ms/op 1.33
BLS verifyMultipleSignatures - same message - 64 - blst 4.1158 ms/op 2.7608 ms/op 1.49
BLS verifyMultipleSignatures - same message - 128 - blst 6.9960 ms/op 4.9012 ms/op 1.43
BLS aggregatePubkeys 32 - blst 34.478 us/op 20.684 us/op 1.67
BLS aggregatePubkeys 128 - blst 121.47 us/op 74.159 us/op 1.64
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 89.975 ms/op 62.453 ms/op 1.44
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 90.271 ms/op 55.268 ms/op 1.63
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 53.351 ms/op 47.740 ms/op 1.12
getSlashingsAndExits - default max 214.06 us/op 82.962 us/op 2.58
getSlashingsAndExits - 2k 714.64 us/op 367.42 us/op 1.95
proposeBlockBody type=full, size=empty 9.8943 ms/op 6.2171 ms/op 1.59
isKnown best case - 1 super set check 426.00 ns/op 222.00 ns/op 1.92
isKnown normal case - 2 super set checks 255.00 ns/op 220.00 ns/op 1.16
isKnown worse case - 16 super set checks 305.00 ns/op 220.00 ns/op 1.39
InMemoryCheckpointStateCache - add get delete 3.0010 us/op 2.6360 us/op 1.14
validate api signedAggregateAndProof - struct 2.9175 ms/op 1.6252 ms/op 1.80
validate gossip signedAggregateAndProof - struct 2.7473 ms/op 1.5193 ms/op 1.81
batch validate gossip attestation - vc 640000 - chunk 32 178.44 us/op 126.56 us/op 1.41
batch validate gossip attestation - vc 640000 - chunk 64 162.64 us/op 118.01 us/op 1.38
batch validate gossip attestation - vc 640000 - chunk 128 123.04 us/op 119.84 us/op 1.03
batch validate gossip attestation - vc 640000 - chunk 256 115.67 us/op 119.24 us/op 0.97
pickEth1Vote - no votes 1.0751 ms/op 1.1633 ms/op 0.92
pickEth1Vote - max votes 10.900 ms/op 8.3254 ms/op 1.31
pickEth1Vote - Eth1Data hashTreeRoot value x2048 15.538 ms/op 14.850 ms/op 1.05
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 24.299 ms/op 23.149 ms/op 1.05
pickEth1Vote - Eth1Data fastSerialize value x2048 493.99 us/op 494.52 us/op 1.00
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.8516 ms/op 2.3546 ms/op 1.64
bytes32 toHexString 405.00 ns/op 395.00 ns/op 1.03
bytes32 Buffer.toString(hex) 305.00 ns/op 313.00 ns/op 0.97
bytes32 Buffer.toString(hex) from Uint8Array 360.00 ns/op 349.00 ns/op 1.03
bytes32 Buffer.toString(hex) + 0x 271.00 ns/op 298.00 ns/op 0.91
Object access 1 prop 0.13200 ns/op 0.14000 ns/op 0.94
Map access 1 prop 0.14200 ns/op 0.13600 ns/op 1.04
Object get x1000 6.3900 ns/op 6.3580 ns/op 1.01
Map get x1000 6.9180 ns/op 6.9120 ns/op 1.00
Object set x1000 34.626 ns/op 39.275 ns/op 0.88
Map set x1000 23.533 ns/op 27.746 ns/op 0.85
Return object 10000 times 0.31780 ns/op 0.30090 ns/op 1.06
Throw Error 10000 times 4.8734 us/op 4.5700 us/op 1.07
toHex 149.84 ns/op 143.57 ns/op 1.04
Buffer.from 132.05 ns/op 138.50 ns/op 0.95
shared Buffer 87.135 ns/op 94.457 ns/op 0.92
fastMsgIdFn sha256 / 200 bytes 2.4050 us/op 2.4670 us/op 0.97
fastMsgIdFn h32 xxhash / 200 bytes 213.00 ns/op 217.00 ns/op 0.98
fastMsgIdFn h64 xxhash / 200 bytes 305.00 ns/op 307.00 ns/op 0.99
fastMsgIdFn sha256 / 1000 bytes 7.7490 us/op 7.6770 us/op 1.01
fastMsgIdFn h32 xxhash / 1000 bytes 355.00 ns/op 356.00 ns/op 1.00
fastMsgIdFn h64 xxhash / 1000 bytes 384.00 ns/op 374.00 ns/op 1.03
fastMsgIdFn sha256 / 10000 bytes 72.610 us/op 67.232 us/op 1.08
fastMsgIdFn h32 xxhash / 10000 bytes 2.0250 us/op 1.9170 us/op 1.06
fastMsgIdFn h64 xxhash / 10000 bytes 1.3510 us/op 1.3120 us/op 1.03
send data - 1000 256B messages 19.313 ms/op 18.949 ms/op 1.02
send data - 1000 512B messages 23.007 ms/op 22.892 ms/op 1.01
send data - 1000 1024B messages 31.603 ms/op 31.952 ms/op 0.99
send data - 1000 1200B messages 36.512 ms/op 28.797 ms/op 1.27
send data - 1000 2048B messages 35.868 ms/op 34.231 ms/op 1.05
send data - 1000 4096B messages 34.934 ms/op 36.091 ms/op 0.97
send data - 1000 16384B messages 57.294 ms/op 55.916 ms/op 1.02
send data - 1000 65536B messages 129.85 ms/op 140.89 ms/op 0.92
enrSubnets - fastDeserialize 64 bits 946.00 ns/op 935.00 ns/op 1.01
enrSubnets - ssz BitVector 64 bits 335.00 ns/op 367.00 ns/op 0.91
enrSubnets - fastDeserialize 4 bits 130.00 ns/op 134.00 ns/op 0.97
enrSubnets - ssz BitVector 4 bits 339.00 ns/op 339.00 ns/op 1.00
prioritizePeers score -10:0 att 32-0.1 sync 2-0 248.31 us/op 261.89 us/op 0.95
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 282.10 us/op 289.77 us/op 0.97
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 411.26 us/op 415.50 us/op 0.99
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 776.17 us/op 810.34 us/op 0.96
prioritizePeers score 0:0 att 64-1 sync 4-1 988.89 us/op 977.70 us/op 1.01
array of 16000 items push then shift 1.8335 us/op 1.7906 us/op 1.02
LinkedList of 16000 items push then shift 9.0830 ns/op 10.931 ns/op 0.83
array of 16000 items push then pop 86.881 ns/op 93.318 ns/op 0.93
LinkedList of 16000 items push then pop 7.9720 ns/op 8.1190 ns/op 0.98
array of 24000 items push then shift 2.5449 us/op 2.6762 us/op 0.95
LinkedList of 24000 items push then shift 7.9150 ns/op 8.1570 ns/op 0.97
array of 24000 items push then pop 115.17 ns/op 127.22 ns/op 0.91
LinkedList of 24000 items push then pop 7.5220 ns/op 7.6280 ns/op 0.99
intersect bitArray bitLen 8 6.7890 ns/op 6.6210 ns/op 1.03
intersect array and set length 8 39.897 ns/op 40.106 ns/op 0.99
intersect bitArray bitLen 128 31.950 ns/op 31.352 ns/op 1.02
intersect array and set length 128 649.98 ns/op 647.35 ns/op 1.00
bitArray.getTrueBitIndexes() bitLen 128 1.1060 us/op 1.1480 us/op 0.96
bitArray.getTrueBitIndexes() bitLen 248 1.9620 us/op 2.2650 us/op 0.87
bitArray.getTrueBitIndexes() bitLen 512 3.9580 us/op 4.2880 us/op 0.92
Buffer.concat 32 items 756.00 ns/op 750.00 ns/op 1.01
Uint8Array.set 32 items 1.9090 us/op 1.4180 us/op 1.35
Buffer.copy 2.8120 us/op 3.4740 us/op 0.81
Uint8Array.set - with subarray 2.9120 us/op 3.9590 us/op 0.74
Uint8Array.set - without subarray 1.8070 us/op 1.8460 us/op 0.98
getUint32 - dataview 205.00 ns/op 218.00 ns/op 0.94
getUint32 - manual 135.00 ns/op 136.00 ns/op 0.99
Set add up to 64 items then delete first 2.4647 us/op 2.6004 us/op 0.95
OrderedSet add up to 64 items then delete first 4.5298 us/op 4.2441 us/op 1.07
Set add up to 64 items then delete last 2.4809 us/op 3.5199 us/op 0.70
OrderedSet add up to 64 items then delete last 4.2212 us/op 5.4191 us/op 0.78
Set add up to 64 items then delete middle 2.4649 us/op 3.3352 us/op 0.74
OrderedSet add up to 64 items then delete middle 6.2559 us/op 6.9302 us/op 0.90
Set add up to 128 items then delete first 6.3095 us/op 7.0878 us/op 0.89
OrderedSet add up to 128 items then delete first 8.5592 us/op 11.196 us/op 0.76
Set add up to 128 items then delete last 5.1125 us/op 7.1907 us/op 0.71
OrderedSet add up to 128 items then delete last 8.0623 us/op 12.190 us/op 0.66
Set add up to 128 items then delete middle 5.7620 us/op 6.9249 us/op 0.83
OrderedSet add up to 128 items then delete middle 16.846 us/op 17.488 us/op 0.96
Set add up to 256 items then delete first 12.017 us/op 14.276 us/op 0.84
OrderedSet add up to 256 items then delete first 18.132 us/op 21.127 us/op 0.86
Set add up to 256 items then delete last 12.801 us/op 13.426 us/op 0.95
OrderedSet add up to 256 items then delete last 18.365 us/op 23.299 us/op 0.79
Set add up to 256 items then delete middle 12.594 us/op 13.859 us/op 0.91
OrderedSet add up to 256 items then delete middle 48.072 us/op 49.352 us/op 0.97
transfer serialized Status (84 B) 2.6440 us/op 2.5160 us/op 1.05
copy serialized Status (84 B) 1.4470 us/op 1.3520 us/op 1.07
transfer serialized SignedVoluntaryExit (112 B) 2.5760 us/op 2.5220 us/op 1.02
copy serialized SignedVoluntaryExit (112 B) 1.4030 us/op 1.5760 us/op 0.89
transfer serialized ProposerSlashing (416 B) 2.6470 us/op 2.9720 us/op 0.89
copy serialized ProposerSlashing (416 B) 2.3170 us/op 1.8300 us/op 1.27
transfer serialized Attestation (485 B) 3.3120 us/op 3.4370 us/op 0.96
copy serialized Attestation (485 B) 1.5420 us/op 2.9020 us/op 0.53
transfer serialized AttesterSlashing (33232 B) 3.6270 us/op 3.1240 us/op 1.16
copy serialized AttesterSlashing (33232 B) 3.8660 us/op 6.1420 us/op 0.63
transfer serialized Small SignedBeaconBlock (128000 B) 3.3610 us/op 4.0910 us/op 0.82
copy serialized Small SignedBeaconBlock (128000 B) 9.3530 us/op 17.450 us/op 0.54
transfer serialized Avg SignedBeaconBlock (200000 B) 3.7870 us/op 4.6560 us/op 0.81
copy serialized Avg SignedBeaconBlock (200000 B) 14.238 us/op 25.547 us/op 0.56
transfer serialized BlobsSidecar (524380 B) 3.6770 us/op 5.6240 us/op 0.65
copy serialized BlobsSidecar (524380 B) 69.307 us/op 90.773 us/op 0.76
transfer serialized Big SignedBeaconBlock (1000000 B) 3.9900 us/op 7.1200 us/op 0.56
copy serialized Big SignedBeaconBlock (1000000 B) 116.29 us/op 155.94 us/op 0.75
pass gossip attestations to forkchoice per slot 3.1224 ms/op 3.4069 ms/op 0.92
forkChoice updateHead vc 100000 bc 64 eq 0 505.59 us/op 515.29 us/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 0 3.2033 ms/op 3.8044 ms/op 0.84
forkChoice updateHead vc 1000000 bc 64 eq 0 5.4603 ms/op 6.7359 ms/op 0.81
forkChoice updateHead vc 600000 bc 320 eq 0 3.1135 ms/op 3.9364 ms/op 0.79
forkChoice updateHead vc 600000 bc 1200 eq 0 3.1722 ms/op 3.7637 ms/op 0.84
forkChoice updateHead vc 600000 bc 7200 eq 0 3.3711 ms/op 4.0768 ms/op 0.83
forkChoice updateHead vc 600000 bc 64 eq 1000 11.140 ms/op 11.892 ms/op 0.94
forkChoice updateHead vc 600000 bc 64 eq 10000 10.915 ms/op 11.901 ms/op 0.92
forkChoice updateHead vc 600000 bc 64 eq 300000 14.990 ms/op 26.963 ms/op 0.56
computeDeltas 500000 validators 300 proto nodes 4.1531 ms/op 4.5903 ms/op 0.90
computeDeltas 500000 validators 1200 proto nodes 4.0657 ms/op 4.7849 ms/op 0.85
computeDeltas 500000 validators 7200 proto nodes 4.0639 ms/op 4.6972 ms/op 0.87
computeDeltas 750000 validators 300 proto nodes 6.0370 ms/op 7.1884 ms/op 0.84
computeDeltas 750000 validators 1200 proto nodes 5.9462 ms/op 6.8323 ms/op 0.87
computeDeltas 750000 validators 7200 proto nodes 6.0995 ms/op 7.3723 ms/op 0.83
computeDeltas 1400000 validators 300 proto nodes 11.344 ms/op 11.602 ms/op 0.98
computeDeltas 1400000 validators 1200 proto nodes 11.542 ms/op 11.457 ms/op 1.01
computeDeltas 1400000 validators 7200 proto nodes 11.764 ms/op 11.260 ms/op 1.04
computeDeltas 2100000 validators 300 proto nodes 17.950 ms/op 18.006 ms/op 1.00
computeDeltas 2100000 validators 1200 proto nodes 18.949 ms/op 17.905 ms/op 1.06
computeDeltas 2100000 validators 7200 proto nodes 18.590 ms/op 17.038 ms/op 1.09
altair processAttestation - 250000 vs - 7PWei normalcase 3.1089 ms/op 2.6908 ms/op 1.16
altair processAttestation - 250000 vs - 7PWei worstcase 3.9656 ms/op 3.2535 ms/op 1.22
altair processAttestation - setStatus - 1/6 committees join 177.31 us/op 141.82 us/op 1.25
altair processAttestation - setStatus - 1/3 committees join 310.32 us/op 267.42 us/op 1.16
altair processAttestation - setStatus - 1/2 committees join 413.32 us/op 358.61 us/op 1.15
altair processAttestation - setStatus - 2/3 committees join 530.93 us/op 478.46 us/op 1.11
altair processAttestation - setStatus - 4/5 committees join 768.77 us/op 631.72 us/op 1.22
altair processAttestation - setStatus - 100% committees join 869.93 us/op 762.94 us/op 1.14
altair processBlock - 250000 vs - 7PWei normalcase 7.2826 ms/op 5.3908 ms/op 1.35
altair processBlock - 250000 vs - 7PWei normalcase hashState 38.973 ms/op 30.488 ms/op 1.28
altair processBlock - 250000 vs - 7PWei worstcase 47.084 ms/op 43.479 ms/op 1.08
altair processBlock - 250000 vs - 7PWei worstcase hashState 103.16 ms/op 82.770 ms/op 1.25
phase0 processBlock - 250000 vs - 7PWei normalcase 2.2735 ms/op 1.9909 ms/op 1.14
phase0 processBlock - 250000 vs - 7PWei worstcase 27.672 ms/op 24.979 ms/op 1.11
altair processEth1Data - 250000 vs - 7PWei normalcase 409.11 us/op 351.10 us/op 1.17
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 8.3390 us/op 6.7090 us/op 1.24
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 64.195 us/op 45.562 us/op 1.41
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 16.612 us/op 11.476 us/op 1.45
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 9.5440 us/op 8.4500 us/op 1.13
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 211.84 us/op 217.19 us/op 0.98
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 2.3914 ms/op 2.3917 ms/op 1.00
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 3.3553 ms/op 2.5800 ms/op 1.30
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 3.0963 ms/op 2.5580 ms/op 1.21
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 8.8589 ms/op 5.1260 ms/op 1.73
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 4.0873 ms/op 2.6306 ms/op 1.55
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 6.9123 ms/op 5.1473 ms/op 1.34
Tree 40 250000 create 725.98 ms/op 518.23 ms/op 1.40
Tree 40 250000 get(125000) 194.27 ns/op 148.96 ns/op 1.30
Tree 40 250000 set(125000) 2.9961 us/op 1.6770 us/op 1.79
Tree 40 250000 toArray() 24.932 ms/op 21.408 ms/op 1.16
Tree 40 250000 iterate all - toArray() + loop 23.560 ms/op 21.612 ms/op 1.09
Tree 40 250000 iterate all - get(i) 64.835 ms/op 59.032 ms/op 1.10
Array 250000 create 3.1674 ms/op 2.7573 ms/op 1.15
Array 250000 clone - spread 1.8724 ms/op 1.4748 ms/op 1.27
Array 250000 get(125000) 0.48700 ns/op 0.42600 ns/op 1.14
Array 250000 set(125000) 0.53100 ns/op 0.50700 ns/op 1.05
Array 250000 iterate all - loop 108.76 us/op 85.923 us/op 1.27
phase0 afterProcessEpoch - 250000 vs - 7PWei 43.871 ms/op 43.352 ms/op 1.01
Array.fill - length 1000000 5.6541 ms/op 3.5164 ms/op 1.61
Array push - length 1000000 21.577 ms/op 19.786 ms/op 1.09
Array.get 0.36691 ns/op 0.29274 ns/op 1.25
Uint8Array.get 0.49724 ns/op 0.45506 ns/op 1.09
phase0 beforeProcessEpoch - 250000 vs - 7PWei 31.360 ms/op 20.001 ms/op 1.57
altair processEpoch - mainnet_e81889 439.75 ms/op 288.14 ms/op 1.53
mainnet_e81889 - altair beforeProcessEpoch 32.590 ms/op 18.865 ms/op 1.73
mainnet_e81889 - altair processJustificationAndFinalization 12.939 us/op 6.8300 us/op 1.89
mainnet_e81889 - altair processInactivityUpdates 10.196 ms/op 5.5344 ms/op 1.84
mainnet_e81889 - altair processRewardsAndPenalties 61.451 ms/op 44.742 ms/op 1.37
mainnet_e81889 - altair processRegistryUpdates 1.4870 us/op 687.00 ns/op 2.16
mainnet_e81889 - altair processSlashings 303.00 ns/op 206.00 ns/op 1.47
mainnet_e81889 - altair processEth1DataReset 392.00 ns/op 201.00 ns/op 1.95
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4594 ms/op 1.2261 ms/op 1.19
mainnet_e81889 - altair processSlashingsReset 1.5810 us/op 1.0170 us/op 1.55
mainnet_e81889 - altair processRandaoMixesReset 2.6610 us/op 1.3040 us/op 2.04
mainnet_e81889 - altair processHistoricalRootsUpdate 400.00 ns/op 189.00 ns/op 2.12
mainnet_e81889 - altair processParticipationFlagUpdates 1.2980 us/op 545.00 ns/op 2.38
mainnet_e81889 - altair processSyncCommitteeUpdates 295.00 ns/op 149.00 ns/op 1.98
mainnet_e81889 - altair afterProcessEpoch 53.133 ms/op 45.430 ms/op 1.17
capella processEpoch - mainnet_e217614 1.9521 s/op 1.0461 s/op 1.87
mainnet_e217614 - capella beforeProcessEpoch 151.78 ms/op 72.463 ms/op 2.09
mainnet_e217614 - capella processJustificationAndFinalization 15.398 us/op 7.0480 us/op 2.18
mainnet_e217614 - capella processInactivityUpdates 28.424 ms/op 14.767 ms/op 1.92
mainnet_e217614 - capella processRewardsAndPenalties 327.72 ms/op 199.91 ms/op 1.64
mainnet_e217614 - capella processRegistryUpdates 13.668 us/op 7.0420 us/op 1.94
mainnet_e217614 - capella processSlashings 366.00 ns/op 200.00 ns/op 1.83
mainnet_e217614 - capella processEth1DataReset 422.00 ns/op 199.00 ns/op 2.12
mainnet_e217614 - capella processEffectiveBalanceUpdates 8.4962 ms/op 11.987 ms/op 0.71
mainnet_e217614 - capella processSlashingsReset 2.0840 us/op 1.0480 us/op 1.99
mainnet_e217614 - capella processRandaoMixesReset 3.1940 us/op 1.5030 us/op 2.13
mainnet_e217614 - capella processHistoricalRootsUpdate 431.00 ns/op 201.00 ns/op 2.14
mainnet_e217614 - capella processParticipationFlagUpdates 1.4360 us/op 544.00 ns/op 2.64
mainnet_e217614 - capella afterProcessEpoch 140.06 ms/op 120.77 ms/op 1.16
phase0 processEpoch - mainnet_e58758 448.59 ms/op 332.43 ms/op 1.35
mainnet_e58758 - phase0 beforeProcessEpoch 141.55 ms/op 82.958 ms/op 1.71
mainnet_e58758 - phase0 processJustificationAndFinalization 11.784 us/op 7.1020 us/op 1.66
mainnet_e58758 - phase0 processRewardsAndPenalties 61.183 ms/op 45.499 ms/op 1.34
mainnet_e58758 - phase0 processRegistryUpdates 3.9350 us/op 3.2690 us/op 1.20
mainnet_e58758 - phase0 processSlashings 223.00 ns/op 190.00 ns/op 1.17
mainnet_e58758 - phase0 processEth1DataReset 292.00 ns/op 204.00 ns/op 1.43
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 5.5339 ms/op 2.2523 ms/op 2.46
mainnet_e58758 - phase0 processSlashingsReset 1.6030 us/op 1.0710 us/op 1.50
mainnet_e58758 - phase0 processRandaoMixesReset 1.8300 us/op 1.3570 us/op 1.35
mainnet_e58758 - phase0 processHistoricalRootsUpdate 294.00 ns/op 217.00 ns/op 1.35
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.7750 us/op 1.0800 us/op 1.64
mainnet_e58758 - phase0 afterProcessEpoch 42.105 ms/op 41.089 ms/op 1.02
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.9326 ms/op 1.3956 ms/op 1.38
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 5.1595 ms/op 3.8095 ms/op 1.35
altair processInactivityUpdates - 250000 normalcase 26.955 ms/op 21.994 ms/op 1.23
altair processInactivityUpdates - 250000 worstcase 30.795 ms/op 20.587 ms/op 1.50
phase0 processRegistryUpdates - 250000 normalcase 15.844 us/op 9.3880 us/op 1.69
phase0 processRegistryUpdates - 250000 badcase_full_deposits 572.85 us/op 379.23 us/op 1.51
phase0 processRegistryUpdates - 250000 worstcase 0.5 163.96 ms/op 122.53 ms/op 1.34
altair processRewardsAndPenalties - 250000 normalcase 37.489 ms/op 29.476 ms/op 1.27
altair processRewardsAndPenalties - 250000 worstcase 38.628 ms/op 28.929 ms/op 1.34
phase0 getAttestationDeltas - 250000 normalcase 22.111 ms/op 8.5611 ms/op 2.58
phase0 getAttestationDeltas - 250000 worstcase 8.5553 ms/op 8.1613 ms/op 1.05
phase0 processSlashings - 250000 worstcase 141.75 us/op 135.20 us/op 1.05
altair processSyncCommitteeUpdates - 250000 16.511 ms/op 11.643 ms/op 1.42
BeaconState.hashTreeRoot - No change 385.00 ns/op 223.00 ns/op 1.73
BeaconState.hashTreeRoot - 1 full validator 120.06 us/op 93.463 us/op 1.28
BeaconState.hashTreeRoot - 32 full validator 2.1599 ms/op 1.1042 ms/op 1.96
BeaconState.hashTreeRoot - 512 full validator 19.990 ms/op 12.988 ms/op 1.54
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 205.17 us/op 110.66 us/op 1.85
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.6780 ms/op 1.6548 ms/op 1.62
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 40.346 ms/op 33.015 ms/op 1.22
BeaconState.hashTreeRoot - 1 balances 175.61 us/op 107.05 us/op 1.64
BeaconState.hashTreeRoot - 32 balances 1.0571 ms/op 1.3299 ms/op 0.79
BeaconState.hashTreeRoot - 512 balances 14.780 ms/op 9.5782 ms/op 1.54
BeaconState.hashTreeRoot - 250000 balances 278.54 ms/op 177.29 ms/op 1.57
aggregationBits - 2048 els - zipIndexesInBitList 29.330 us/op 26.624 us/op 1.10
byteArrayEquals 32 60.263 ns/op 57.423 ns/op 1.05
Buffer.compare 32 19.320 ns/op 18.367 ns/op 1.05
byteArrayEquals 1024 2.1619 us/op 1.7363 us/op 1.25
Buffer.compare 1024 28.065 ns/op 27.325 ns/op 1.03
byteArrayEquals 16384 29.646 us/op 27.235 us/op 1.09
Buffer.compare 16384 239.98 ns/op 207.37 ns/op 1.16
byteArrayEquals 123687377 239.04 ms/op 204.81 ms/op 1.17
Buffer.compare 123687377 14.643 ms/op 10.458 ms/op 1.40
byteArrayEquals 32 - diff last byte 62.224 ns/op 57.915 ns/op 1.07
Buffer.compare 32 - diff last byte 20.027 ns/op 18.773 ns/op 1.07
byteArrayEquals 1024 - diff last byte 1.8045 us/op 1.7637 us/op 1.02
Buffer.compare 1024 - diff last byte 31.297 ns/op 28.890 ns/op 1.08
byteArrayEquals 16384 - diff last byte 31.567 us/op 28.737 us/op 1.10
Buffer.compare 16384 - diff last byte 231.09 ns/op 214.62 ns/op 1.08
byteArrayEquals 123687377 - diff last byte 247.38 ms/op 218.94 ms/op 1.13
Buffer.compare 123687377 - diff last byte 17.408 ms/op 11.146 ms/op 1.56
byteArrayEquals 32 - random bytes 9.6120 ns/op 5.5990 ns/op 1.72
Buffer.compare 32 - random bytes 34.521 ns/op 18.383 ns/op 1.88
byteArrayEquals 1024 - random bytes 9.6890 ns/op 5.5810 ns/op 1.74
Buffer.compare 1024 - random bytes 27.242 ns/op 19.222 ns/op 1.42
byteArrayEquals 16384 - random bytes 6.8540 ns/op 5.7590 ns/op 1.19
Buffer.compare 16384 - random bytes 31.113 ns/op 20.127 ns/op 1.55
byteArrayEquals 123687377 - random bytes 7.4700 ns/op 7.2000 ns/op 1.04
Buffer.compare 123687377 - random bytes 33.500 ns/op 20.950 ns/op 1.60
regular array get 100000 times 82.406 us/op 36.645 us/op 2.25
wrappedArray get 100000 times 59.763 us/op 41.397 us/op 1.44
arrayWithProxy get 100000 times 28.675 ms/op 14.297 ms/op 2.01
ssz.Root.equals 90.398 ns/op 53.173 ns/op 1.70
byteArrayEquals 64.634 ns/op 49.609 ns/op 1.30
Buffer.compare 17.088 ns/op 11.442 ns/op 1.49
processSlot - 1 slots 18.639 us/op 12.715 us/op 1.47
processSlot - 32 slots 4.4403 ms/op 2.8469 ms/op 1.56
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 8.1648 ms/op 3.8265 ms/op 2.13
getCommitteeAssignments - req 1 vs - 250000 vc 2.6972 ms/op 2.3697 ms/op 1.14
getCommitteeAssignments - req 100 vs - 250000 vc 5.1047 ms/op 4.6268 ms/op 1.10
getCommitteeAssignments - req 1000 vs - 250000 vc 5.2654 ms/op 4.7868 ms/op 1.10
findModifiedValidators - 10000 modified validators 1.3108 s/op 802.67 ms/op 1.63
findModifiedValidators - 1000 modified validators 907.48 ms/op 885.69 ms/op 1.02
findModifiedValidators - 100 modified validators 530.55 ms/op 242.83 ms/op 2.18
findModifiedValidators - 10 modified validators 472.28 ms/op 207.87 ms/op 2.27
findModifiedValidators - 1 modified validators 495.40 ms/op 286.65 ms/op 1.73
findModifiedValidators - no difference 535.52 ms/op 209.99 ms/op 2.55
compare ViewDUs 10.380 s/op 7.9105 s/op 1.31
compare each validator Uint8Array 2.7464 s/op 2.4373 s/op 1.13
compare ViewDU to Uint8Array 2.1446 s/op 1.7979 s/op 1.19
migrate state 1000000 validators, 24 modified, 0 new 1.5505 s/op 1.3252 s/op 1.17
migrate state 1000000 validators, 1700 modified, 1000 new 1.7954 s/op 1.9456 s/op 0.92
migrate state 1000000 validators, 3400 modified, 2000 new 1.7815 s/op 1.8184 s/op 0.98
migrate state 1500000 validators, 24 modified, 0 new 1.2081 s/op 1.0345 s/op 1.17
migrate state 1500000 validators, 1700 modified, 1000 new 1.5198 s/op 1.2513 s/op 1.21
migrate state 1500000 validators, 3400 modified, 2000 new 1.7980 s/op 1.4557 s/op 1.24
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.4000 ns/op 4.6200 ns/op 1.39
state getBlockRootAtSlot - 250000 vs - 7PWei 673.42 ns/op 483.98 ns/op 1.39
naive computeProposerIndex 100000 validators 87.398 ms/op 59.295 ms/op 1.47
computeProposerIndex 100000 validators 1.6441 ms/op 1.5396 ms/op 1.07
naiveGetNextSyncCommitteeIndices 1000 validators 9.8580 s/op 8.8782 s/op 1.11
getNextSyncCommitteeIndices 1000 validators 139.56 ms/op 136.25 ms/op 1.02
naiveGetNextSyncCommitteeIndices 10000 validators 9.8908 s/op 9.4906 s/op 1.04
getNextSyncCommitteeIndices 10000 validators 135.95 ms/op 122.28 ms/op 1.11
naiveGetNextSyncCommitteeIndices 100000 validators 9.7573 s/op 10.379 s/op 0.94
getNextSyncCommitteeIndices 100000 validators 138.65 ms/op 162.92 ms/op 0.85
naive computeShuffledIndex 100000 validators 31.018 s/op 30.915 s/op 1.00
cached computeShuffledIndex 100000 validators 645.97 ms/op 621.13 ms/op 1.04
naive computeShuffledIndex 2000000 validators 546.74 s/op 497.26 s/op 1.10
cached computeShuffledIndex 2000000 validators 35.563 s/op 38.685 s/op 0.92
computeProposers - vc 250000 628.06 us/op 640.10 us/op 0.98
computeEpochShuffling - vc 250000 42.687 ms/op 43.601 ms/op 0.98
getNextSyncCommittee - vc 250000 10.467 ms/op 11.010 ms/op 0.95
computeSigningRoot for AttestationData 20.773 us/op 24.951 us/op 0.83
hash AttestationData serialized data then Buffer.toString(base64) 1.5794 us/op 1.6169 us/op 0.98
toHexString serialized data 1.2742 us/op 1.2146 us/op 1.05
Buffer.toString(base64) 152.59 ns/op 154.92 ns/op 0.98
nodejs block root to RootHex using toHex 157.86 ns/op 158.53 ns/op 1.00
nodejs block root to RootHex using toRootHex 86.904 ns/op 90.435 ns/op 0.96
nodejs fromhex(blob) 112.25 ms/op 117.73 ms/op 0.95
nodejs fromHexInto(blob) 97.775 ms/op 95.367 ms/op 1.03
browser block root to RootHex using the deprecated toHexString 217.10 ns/op 216.65 ns/op 1.00
browser block root to RootHex using toHex 177.91 ns/op 178.66 ns/op 1.00
browser block root to RootHex using toRootHex 168.07 ns/op 162.63 ns/op 1.03
browser fromHexInto(blob) 836.04 us/op 834.74 us/op 1.00
browser fromHex(blob) 814.94 ms/op 804.88 ms/op 1.01

by benchmarkbot/action

twoeths
twoeths previously approved these changes Aug 23, 2025
Copy link
Member

@matthewkeil matthewkeil left a comment

Choose a reason for hiding this comment

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

LGTM!! 🚀

@matthewkeil matthewkeil enabled auto-merge (squash) September 2, 2025 12:18
@matthewkeil matthewkeil merged commit 684db9f into unstable Sep 2, 2025
24 of 27 checks passed
@matthewkeil matthewkeil deleted the nflaig/finalized-columns-by-root branch September 2, 2025 12:39
@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.

Serve finalized data columns by root via req/resp

4 participants