这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@nflaig
Copy link
Member

@nflaig nflaig commented Oct 17, 2025

Reverts #7448 to unhide prune history option. I've been running this on mainnet for a while and it's seems pretty stable with no noticable impact on performance. The feature is already widely used even though it was hidden so might as well show it in our docs.

Metrics from my node

image

I did a few tweaks to how we query keys but nothing really improved the fetch keys duration.

Caveat still remains that it's quite slow on first startup if the previous db is large but that's a one time operation.

Closes #7556

@nflaig nflaig requested a review from a team as a code owner October 17, 2025 20:51
@gemini-code-assist
Copy link
Contributor

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 re-enables and documents the --chain.pruneHistory option, making it accessible to users after successful long-term testing on mainnet. The change reflects confidence in the feature's stability and utility for validators aiming to minimize data storage. Additionally, it refines associated metrics for improved monitoring of pruning performance.

Highlights

  • Feature Visibility: The --chain.pruneHistory option, which allows validators to prune historical blocks and states, has been unhidden. This reverts a previous change that concealed the option.
  • Documentation Update: The 'Pruning history' section in the data-retention.md documentation has been made visible, providing users with information on how to utilize the --chain.pruneHistory flag.
  • Metrics Granularity: The lodestar_prune_history_fetch_keys_time_seconds metric now includes more granular buckets (0.3s, 0.5s) to provide better insight into the performance of key fetching during history pruning.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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 unhides the --chain.pruneHistory option, making it visible in the CLI and documentation. The changes are straightforward and achieve the intended goal. I've added one suggestion to improve the documentation by including a caveat about the initial performance of this feature, as mentioned in the PR description. This will help manage user expectations.

@nflaig
Copy link
Member Author

nflaig commented Oct 17, 2025

/gemini review

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 unhides the --chain.pruneHistory option, making it officially supported. The accompanying documentation update is clear and helpfully includes a warning about the initial pruning time on large databases. The adjustment to the histogram buckets for lodestar_prune_history_fetch_keys_time_seconds is a good improvement for metrics granularity. I've added one suggestion to also update the buckets for the pruneKeys metric for consistency, as it appears to have a similar performance profile.

@codecov
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.18%. Comparing base (f259361) to head (c50cba9).
⚠️ Report is 3 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #8547      +/-   ##
============================================
- Coverage     52.18%   52.18%   -0.01%     
============================================
  Files           852      852              
  Lines         65299    65298       -1     
  Branches       4790     4792       +2     
============================================
- Hits          34079    34078       -1     
  Misses        31151    31151              
  Partials         69       69              
🚀 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 Oct 17, 2025

Performance Report

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 3fe00e3 Previous: f259361 Ratio
naive computeShuffledIndex 2000000 validators 458.14 s/op 1625.7 s/op 0.28
computeProposers - vc 250000 602.80 us/op 2.1095 ms/op 0.29
Full benchmark results
Benchmark suite Current: 3fe00e3 Previous: f259361 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 939.03 us/op 1.0176 ms/op 0.92
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 34.352 us/op 38.461 us/op 0.89
BLS verify - blst 1.5342 ms/op 922.15 us/op 1.66
BLS verifyMultipleSignatures 3 - blst 2.5339 ms/op 1.2762 ms/op 1.99
BLS verifyMultipleSignatures 8 - blst 1.7886 ms/op 1.8210 ms/op 0.98
BLS verifyMultipleSignatures 32 - blst 6.6622 ms/op 5.8346 ms/op 1.14
BLS verifyMultipleSignatures 64 - blst 10.774 ms/op 11.004 ms/op 0.98
BLS verifyMultipleSignatures 128 - blst 16.990 ms/op 21.217 ms/op 0.80
BLS deserializing 10000 signatures 680.69 ms/op 793.68 ms/op 0.86
BLS deserializing 100000 signatures 6.8322 s/op 7.9069 s/op 0.86
BLS verifyMultipleSignatures - same message - 3 - blst 835.81 us/op 975.01 us/op 0.86
BLS verifyMultipleSignatures - same message - 8 - blst 994.12 us/op 1.1908 ms/op 0.83
BLS verifyMultipleSignatures - same message - 32 - blst 1.6541 ms/op 2.0086 ms/op 0.82
BLS verifyMultipleSignatures - same message - 64 - blst 2.5237 ms/op 2.7615 ms/op 0.91
BLS verifyMultipleSignatures - same message - 128 - blst 4.2469 ms/op 4.7809 ms/op 0.89
BLS aggregatePubkeys 32 - blst 18.739 us/op 20.924 us/op 0.90
BLS aggregatePubkeys 128 - blst 65.323 us/op 76.002 us/op 0.86
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 57.563 ms/op 50.918 ms/op 1.13
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 50.418 ms/op 46.989 ms/op 1.07
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 45.360 ms/op 37.692 ms/op 1.20
getSlashingsAndExits - default max 69.170 us/op 83.826 us/op 0.83
getSlashingsAndExits - 2k 292.80 us/op 287.90 us/op 1.02
isKnown best case - 1 super set check 200.00 ns/op 236.00 ns/op 0.85
isKnown normal case - 2 super set checks 198.00 ns/op 233.00 ns/op 0.85
isKnown worse case - 16 super set checks 196.00 ns/op 227.00 ns/op 0.86
InMemoryCheckpointStateCache - add get delete 2.2470 us/op 2.7120 us/op 0.83
validate api signedAggregateAndProof - struct 2.6009 ms/op 1.5384 ms/op 1.69
validate gossip signedAggregateAndProof - struct 1.7237 ms/op 1.7249 ms/op 1.00
batch validate gossip attestation - vc 640000 - chunk 32 116.33 us/op 128.84 us/op 0.90
batch validate gossip attestation - vc 640000 - chunk 64 99.662 us/op 115.36 us/op 0.86
batch validate gossip attestation - vc 640000 - chunk 128 93.793 us/op 110.25 us/op 0.85
batch validate gossip attestation - vc 640000 - chunk 256 92.530 us/op 110.11 us/op 0.84
pickEth1Vote - no votes 948.53 us/op 1.0449 ms/op 0.91
pickEth1Vote - max votes 6.9291 ms/op 5.9299 ms/op 1.17
pickEth1Vote - Eth1Data hashTreeRoot value x2048 11.481 ms/op 11.908 ms/op 0.96
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 21.260 ms/op 15.605 ms/op 1.36
pickEth1Vote - Eth1Data fastSerialize value x2048 441.98 us/op 467.84 us/op 0.94
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.4417 ms/op 2.9564 ms/op 1.50
bytes32 toHexString 361.00 ns/op 406.00 ns/op 0.89
bytes32 Buffer.toString(hex) 254.00 ns/op 333.00 ns/op 0.76
bytes32 Buffer.toString(hex) from Uint8Array 340.00 ns/op 359.00 ns/op 0.95
bytes32 Buffer.toString(hex) + 0x 254.00 ns/op 335.00 ns/op 0.76
Object access 1 prop 0.11400 ns/op 0.14500 ns/op 0.79
Map access 1 prop 0.12000 ns/op 0.15300 ns/op 0.78
Object get x1000 7.0670 ns/op 6.7700 ns/op 1.04
Map get x1000 6.3240 ns/op 7.4040 ns/op 0.85
Object set x1000 27.605 ns/op 32.647 ns/op 0.85
Map set x1000 19.098 ns/op 20.321 ns/op 0.94
Return object 10000 times 0.28510 ns/op 0.29710 ns/op 0.96
Throw Error 10000 times 4.1853 us/op 4.3509 us/op 0.96
toHex 145.17 ns/op 158.79 ns/op 0.91
Buffer.from 133.28 ns/op 155.21 ns/op 0.86
shared Buffer 81.474 ns/op 108.86 ns/op 0.75
fastMsgIdFn sha256 / 200 bytes 2.2290 us/op 2.5870 us/op 0.86
fastMsgIdFn h32 xxhash / 200 bytes 208.00 ns/op 227.00 ns/op 0.92
fastMsgIdFn h64 xxhash / 200 bytes 262.00 ns/op 297.00 ns/op 0.88
fastMsgIdFn sha256 / 1000 bytes 7.4990 us/op 8.5740 us/op 0.87
fastMsgIdFn h32 xxhash / 1000 bytes 335.00 ns/op 377.00 ns/op 0.89
fastMsgIdFn h64 xxhash / 1000 bytes 343.00 ns/op 381.00 ns/op 0.90
fastMsgIdFn sha256 / 10000 bytes 68.219 us/op 70.517 us/op 0.97
fastMsgIdFn h32 xxhash / 10000 bytes 1.8060 us/op 2.0100 us/op 0.90
fastMsgIdFn h64 xxhash / 10000 bytes 1.1940 us/op 1.3470 us/op 0.89
send data - 1000 256B messages 15.759 ms/op 19.704 ms/op 0.80
send data - 1000 512B messages 18.577 ms/op 23.859 ms/op 0.78
send data - 1000 1024B messages 26.224 ms/op 29.520 ms/op 0.89
send data - 1000 1200B messages 23.352 ms/op 31.376 ms/op 0.74
send data - 1000 2048B messages 24.694 ms/op 26.067 ms/op 0.95
send data - 1000 4096B messages 27.308 ms/op 28.602 ms/op 0.95
send data - 1000 16384B messages 44.150 ms/op 47.125 ms/op 0.94
send data - 1000 65536B messages 112.82 ms/op 118.81 ms/op 0.95
enrSubnets - fastDeserialize 64 bits 877.00 ns/op 1.0240 us/op 0.86
enrSubnets - ssz BitVector 64 bits 328.00 ns/op 485.00 ns/op 0.68
enrSubnets - fastDeserialize 4 bits 125.00 ns/op 153.00 ns/op 0.82
enrSubnets - ssz BitVector 4 bits 321.00 ns/op 367.00 ns/op 0.87
prioritizePeers score -10:0 att 32-0.1 sync 2-0 233.04 us/op 260.71 us/op 0.89
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 256.05 us/op 292.53 us/op 0.88
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 376.58 us/op 429.14 us/op 0.88
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 708.39 us/op 803.89 us/op 0.88
prioritizePeers score 0:0 att 64-1 sync 4-1 854.83 us/op 984.19 us/op 0.87
array of 16000 items push then shift 1.6174 us/op 1.8029 us/op 0.90
LinkedList of 16000 items push then shift 6.8570 ns/op 7.7240 ns/op 0.89
array of 16000 items push then pop 71.747 ns/op 84.624 ns/op 0.85
LinkedList of 16000 items push then pop 6.7920 ns/op 7.7910 ns/op 0.87
array of 24000 items push then shift 2.2687 us/op 2.5850 us/op 0.88
LinkedList of 24000 items push then shift 6.8430 ns/op 10.147 ns/op 0.67
array of 24000 items push then pop 101.88 ns/op 129.59 ns/op 0.79
LinkedList of 24000 items push then pop 6.9990 ns/op 15.772 ns/op 0.44
intersect bitArray bitLen 8 6.3450 ns/op 11.645 ns/op 0.54
intersect array and set length 8 37.633 ns/op 48.847 ns/op 0.77
intersect bitArray bitLen 128 29.692 ns/op 37.954 ns/op 0.78
intersect array and set length 128 624.79 ns/op 816.59 ns/op 0.77
bitArray.getTrueBitIndexes() bitLen 128 1.0290 us/op 1.2540 us/op 0.82
bitArray.getTrueBitIndexes() bitLen 248 1.7530 us/op 2.2150 us/op 0.79
bitArray.getTrueBitIndexes() bitLen 512 3.5070 us/op 4.3430 us/op 0.81
Buffer.concat 32 items 611.00 ns/op 706.00 ns/op 0.87
Uint8Array.set 32 items 1.3770 us/op 1.2510 us/op 1.10
Buffer.copy 2.3570 us/op 2.9670 us/op 0.79
Uint8Array.set - with subarray 1.9610 us/op 3.2060 us/op 0.61
Uint8Array.set - without subarray 1.1090 us/op 1.9610 us/op 0.57
getUint32 - dataview 190.00 ns/op 203.00 ns/op 0.94
getUint32 - manual 118.00 ns/op 123.00 ns/op 0.96
Set add up to 64 items then delete first 2.1616 us/op 2.2526 us/op 0.96
OrderedSet add up to 64 items then delete first 3.2700 us/op 3.7077 us/op 0.88
Set add up to 64 items then delete last 2.2820 us/op 2.8812 us/op 0.79
OrderedSet add up to 64 items then delete last 3.5622 us/op 4.3557 us/op 0.82
Set add up to 64 items then delete middle 2.4648 us/op 3.0087 us/op 0.82
OrderedSet add up to 64 items then delete middle 5.1343 us/op 5.4405 us/op 0.94
Set add up to 128 items then delete first 5.0483 us/op 5.2775 us/op 0.96
OrderedSet add up to 128 items then delete first 7.6399 us/op 8.2479 us/op 0.93
Set add up to 128 items then delete last 4.9072 us/op 5.1388 us/op 0.95
OrderedSet add up to 128 items then delete last 7.2607 us/op 8.9625 us/op 0.81
Set add up to 128 items then delete middle 4.8341 us/op 5.2246 us/op 0.93
OrderedSet add up to 128 items then delete middle 13.622 us/op 17.666 us/op 0.77
Set add up to 256 items then delete first 10.412 us/op 12.385 us/op 0.84
OrderedSet add up to 256 items then delete first 15.953 us/op 19.743 us/op 0.81
Set add up to 256 items then delete last 9.6866 us/op 11.520 us/op 0.84
OrderedSet add up to 256 items then delete last 14.522 us/op 17.159 us/op 0.85
Set add up to 256 items then delete middle 9.4687 us/op 10.967 us/op 0.86
OrderedSet add up to 256 items then delete middle 41.230 us/op 49.632 us/op 0.83
transfer serialized Status (84 B) 2.2380 us/op 2.7040 us/op 0.83
copy serialized Status (84 B) 1.1560 us/op 1.5350 us/op 0.75
transfer serialized SignedVoluntaryExit (112 B) 2.2110 us/op 2.6410 us/op 0.84
copy serialized SignedVoluntaryExit (112 B) 1.1750 us/op 1.4080 us/op 0.83
transfer serialized ProposerSlashing (416 B) 2.7270 us/op 2.6100 us/op 1.04
copy serialized ProposerSlashing (416 B) 1.4450 us/op 1.9630 us/op 0.74
transfer serialized Attestation (485 B) 2.3680 us/op 3.5080 us/op 0.68
copy serialized Attestation (485 B) 1.2280 us/op 1.8620 us/op 0.66
transfer serialized AttesterSlashing (33232 B) 2.4360 us/op 2.8410 us/op 0.86
copy serialized AttesterSlashing (33232 B) 3.3520 us/op 3.9800 us/op 0.84
transfer serialized Small SignedBeaconBlock (128000 B) 3.1030 us/op 3.4220 us/op 0.91
copy serialized Small SignedBeaconBlock (128000 B) 8.4940 us/op 9.2040 us/op 0.92
transfer serialized Avg SignedBeaconBlock (200000 B) 3.3480 us/op 3.8520 us/op 0.87
copy serialized Avg SignedBeaconBlock (200000 B) 13.331 us/op 13.985 us/op 0.95
transfer serialized BlobsSidecar (524380 B) 3.3470 us/op 3.8490 us/op 0.87
copy serialized BlobsSidecar (524380 B) 86.423 us/op 71.446 us/op 1.21
transfer serialized Big SignedBeaconBlock (1000000 B) 3.4390 us/op 3.7880 us/op 0.91
copy serialized Big SignedBeaconBlock (1000000 B) 107.10 us/op 109.51 us/op 0.98
pass gossip attestations to forkchoice per slot 2.7066 ms/op 3.4203 ms/op 0.79
forkChoice updateHead vc 100000 bc 64 eq 0 497.43 us/op 536.09 us/op 0.93
forkChoice updateHead vc 600000 bc 64 eq 0 3.0468 ms/op 3.3352 ms/op 0.91
forkChoice updateHead vc 1000000 bc 64 eq 0 5.1990 ms/op 5.6887 ms/op 0.91
forkChoice updateHead vc 600000 bc 320 eq 0 3.0363 ms/op 3.5820 ms/op 0.85
forkChoice updateHead vc 600000 bc 1200 eq 0 3.0910 ms/op 3.3464 ms/op 0.92
forkChoice updateHead vc 600000 bc 7200 eq 0 3.3259 ms/op 3.6605 ms/op 0.91
forkChoice updateHead vc 600000 bc 64 eq 1000 2.9286 ms/op 3.2572 ms/op 0.90
forkChoice updateHead vc 600000 bc 64 eq 10000 3.0333 ms/op 3.5489 ms/op 0.85
forkChoice updateHead vc 600000 bc 64 eq 300000 9.3079 ms/op 11.383 ms/op 0.82
computeDeltas 1400000 validators 300 proto nodes 11.893 ms/op 14.139 ms/op 0.84
computeDeltas 1400000 validators 1200 proto nodes 12.285 ms/op 13.444 ms/op 0.91
computeDeltas 1400000 validators 7200 proto nodes 12.495 ms/op 16.040 ms/op 0.78
computeDeltas 2100000 validators 300 proto nodes 18.827 ms/op 21.751 ms/op 0.87
computeDeltas 2100000 validators 1200 proto nodes 18.381 ms/op 21.859 ms/op 0.84
computeDeltas 2100000 validators 7200 proto nodes 18.325 ms/op 22.229 ms/op 0.82
altair processAttestation - 250000 vs - 7PWei normalcase 1.9834 ms/op 2.3223 ms/op 0.85
altair processAttestation - 250000 vs - 7PWei worstcase 3.2595 ms/op 3.4509 ms/op 0.94
altair processAttestation - setStatus - 1/6 committees join 121.45 us/op 146.22 us/op 0.83
altair processAttestation - setStatus - 1/3 committees join 229.10 us/op 281.27 us/op 0.81
altair processAttestation - setStatus - 1/2 committees join 327.43 us/op 395.37 us/op 0.83
altair processAttestation - setStatus - 2/3 committees join 418.58 us/op 495.80 us/op 0.84
altair processAttestation - setStatus - 4/5 committees join 583.43 us/op 721.88 us/op 0.81
altair processAttestation - setStatus - 100% committees join 692.75 us/op 779.77 us/op 0.89
altair processBlock - 250000 vs - 7PWei normalcase 4.7375 ms/op 4.7571 ms/op 1.00
altair processBlock - 250000 vs - 7PWei normalcase hashState 32.931 ms/op 34.688 ms/op 0.95
altair processBlock - 250000 vs - 7PWei worstcase 39.019 ms/op 45.530 ms/op 0.86
altair processBlock - 250000 vs - 7PWei worstcase hashState 82.940 ms/op 81.812 ms/op 1.01
phase0 processBlock - 250000 vs - 7PWei normalcase 1.8540 ms/op 1.7567 ms/op 1.06
phase0 processBlock - 250000 vs - 7PWei worstcase 19.450 ms/op 21.942 ms/op 0.89
altair processEth1Data - 250000 vs - 7PWei normalcase 336.44 us/op 359.75 us/op 0.94
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.5310 us/op 5.8590 us/op 1.63
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 35.526 us/op 37.237 us/op 0.95
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 9.8050 us/op 10.161 us/op 0.96
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.7490 us/op 6.1360 us/op 1.10
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 248.03 us/op 145.94 us/op 1.70
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.9152 ms/op 1.8462 ms/op 1.04
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.3428 ms/op 2.3954 ms/op 0.98
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.3275 ms/op 2.4924 ms/op 0.93
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.5816 ms/op 4.8833 ms/op 0.94
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.3558 ms/op 2.8654 ms/op 0.82
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.6789 ms/op 5.4659 ms/op 0.86
Tree 40 250000 create 405.98 ms/op 594.32 ms/op 0.68
Tree 40 250000 get(125000) 142.29 ns/op 167.47 ns/op 0.85
Tree 40 250000 set(125000) 1.3890 us/op 1.5199 us/op 0.91
Tree 40 250000 toArray() 14.658 ms/op 18.539 ms/op 0.79
Tree 40 250000 iterate all - toArray() + loop 14.934 ms/op 18.338 ms/op 0.81
Tree 40 250000 iterate all - get(i) 49.197 ms/op 67.672 ms/op 0.73
Array 250000 create 2.3853 ms/op 3.3286 ms/op 0.72
Array 250000 clone - spread 798.72 us/op 832.39 us/op 0.96
Array 250000 get(125000) 0.40600 ns/op 0.43000 ns/op 0.94
Array 250000 set(125000) 0.43800 ns/op 0.51000 ns/op 0.86
Array 250000 iterate all - loop 82.943 us/op 98.552 us/op 0.84
phase0 afterProcessEpoch - 250000 vs - 7PWei 40.852 ms/op 43.153 ms/op 0.95
Array.fill - length 1000000 3.3869 ms/op 3.5935 ms/op 0.94
Array push - length 1000000 12.692 ms/op 13.536 ms/op 0.94
Array.get 0.27439 ns/op 0.30625 ns/op 0.90
Uint8Array.get 0.43865 ns/op 0.50469 ns/op 0.87
phase0 beforeProcessEpoch - 250000 vs - 7PWei 15.502 ms/op 16.029 ms/op 0.97
altair processEpoch - mainnet_e81889 293.92 ms/op 285.78 ms/op 1.03
mainnet_e81889 - altair beforeProcessEpoch 18.920 ms/op 17.737 ms/op 1.07
mainnet_e81889 - altair processJustificationAndFinalization 6.7500 us/op 5.9800 us/op 1.13
mainnet_e81889 - altair processInactivityUpdates 4.4878 ms/op 4.9887 ms/op 0.90
mainnet_e81889 - altair processRewardsAndPenalties 41.881 ms/op 39.620 ms/op 1.06
mainnet_e81889 - altair processRegistryUpdates 707.00 ns/op 760.00 ns/op 0.93
mainnet_e81889 - altair processSlashings 179.00 ns/op 218.00 ns/op 0.82
mainnet_e81889 - altair processEth1DataReset 173.00 ns/op 188.00 ns/op 0.92
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.1753 ms/op 1.4167 ms/op 0.83
mainnet_e81889 - altair processSlashingsReset 991.00 ns/op 989.00 ns/op 1.00
mainnet_e81889 - altair processRandaoMixesReset 1.2560 us/op 1.3510 us/op 0.93
mainnet_e81889 - altair processHistoricalRootsUpdate 196.00 ns/op 273.00 ns/op 0.72
mainnet_e81889 - altair processParticipationFlagUpdates 512.00 ns/op 793.00 ns/op 0.65
mainnet_e81889 - altair processSyncCommitteeUpdates 145.00 ns/op 180.00 ns/op 0.81
mainnet_e81889 - altair afterProcessEpoch 44.083 ms/op 50.476 ms/op 0.87
capella processEpoch - mainnet_e217614 963.32 ms/op 1.3404 s/op 0.72
mainnet_e217614 - capella beforeProcessEpoch 62.168 ms/op 75.420 ms/op 0.82
mainnet_e217614 - capella processJustificationAndFinalization 5.0580 us/op 5.6900 us/op 0.89
mainnet_e217614 - capella processInactivityUpdates 14.381 ms/op 18.492 ms/op 0.78
mainnet_e217614 - capella processRewardsAndPenalties 222.37 ms/op 216.41 ms/op 1.03
mainnet_e217614 - capella processRegistryUpdates 6.1850 us/op 8.0410 us/op 0.77
mainnet_e217614 - capella processSlashings 198.00 ns/op 221.00 ns/op 0.90
mainnet_e217614 - capella processEth1DataReset 172.00 ns/op 222.00 ns/op 0.77
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.0209 ms/op 5.1044 ms/op 0.79
mainnet_e217614 - capella processSlashingsReset 1.1390 us/op 1.3300 us/op 0.86
mainnet_e217614 - capella processRandaoMixesReset 1.4260 us/op 1.4250 us/op 1.00
mainnet_e217614 - capella processHistoricalRootsUpdate 182.00 ns/op 290.00 ns/op 0.63
mainnet_e217614 - capella processParticipationFlagUpdates 515.00 ns/op 634.00 ns/op 0.81
mainnet_e217614 - capella afterProcessEpoch 115.71 ms/op 160.28 ms/op 0.72
phase0 processEpoch - mainnet_e58758 343.64 ms/op 388.81 ms/op 0.88
mainnet_e58758 - phase0 beforeProcessEpoch 81.308 ms/op 103.39 ms/op 0.79
mainnet_e58758 - phase0 processJustificationAndFinalization 5.8490 us/op 10.234 us/op 0.57
mainnet_e58758 - phase0 processRewardsAndPenalties 40.052 ms/op 40.099 ms/op 1.00
mainnet_e58758 - phase0 processRegistryUpdates 3.2970 us/op 3.3700 us/op 0.98
mainnet_e58758 - phase0 processSlashings 178.00 ns/op 210.00 ns/op 0.85
mainnet_e58758 - phase0 processEth1DataReset 182.00 ns/op 221.00 ns/op 0.82
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1467 ms/op 1.4144 ms/op 0.81
mainnet_e58758 - phase0 processSlashingsReset 913.00 ns/op 1.1170 us/op 0.82
mainnet_e58758 - phase0 processRandaoMixesReset 1.1530 us/op 1.5700 us/op 0.73
mainnet_e58758 - phase0 processHistoricalRootsUpdate 193.00 ns/op 236.00 ns/op 0.82
mainnet_e58758 - phase0 processParticipationRecordUpdates 864.00 ns/op 1.1390 us/op 0.76
mainnet_e58758 - phase0 afterProcessEpoch 35.039 ms/op 44.219 ms/op 0.79
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2075 ms/op 1.5125 ms/op 0.80
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.9439 ms/op 1.9661 ms/op 0.99
altair processInactivityUpdates - 250000 normalcase 18.716 ms/op 19.059 ms/op 0.98
altair processInactivityUpdates - 250000 worstcase 27.841 ms/op 19.965 ms/op 1.39
phase0 processRegistryUpdates - 250000 normalcase 7.0240 us/op 7.2560 us/op 0.97
phase0 processRegistryUpdates - 250000 badcase_full_deposits 420.25 us/op 255.19 us/op 1.65
phase0 processRegistryUpdates - 250000 worstcase 0.5 92.522 ms/op 113.22 ms/op 0.82
altair processRewardsAndPenalties - 250000 normalcase 37.704 ms/op 31.462 ms/op 1.20
altair processRewardsAndPenalties - 250000 worstcase 34.289 ms/op 30.558 ms/op 1.12
phase0 getAttestationDeltas - 250000 normalcase 6.9097 ms/op 9.3719 ms/op 0.74
phase0 getAttestationDeltas - 250000 worstcase 5.8358 ms/op 6.7628 ms/op 0.86
phase0 processSlashings - 250000 worstcase 121.96 us/op 91.011 us/op 1.34
altair processSyncCommitteeUpdates - 250000 10.893 ms/op 13.012 ms/op 0.84
BeaconState.hashTreeRoot - No change 222.00 ns/op 251.00 ns/op 0.88
BeaconState.hashTreeRoot - 1 full validator 86.455 us/op 102.45 us/op 0.84
BeaconState.hashTreeRoot - 32 full validator 1.2589 ms/op 1.3635 ms/op 0.92
BeaconState.hashTreeRoot - 512 full validator 11.702 ms/op 13.706 ms/op 0.85
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 147.65 us/op 125.90 us/op 1.17
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.5692 ms/op 1.8367 ms/op 1.40
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 25.052 ms/op 26.201 ms/op 0.96
BeaconState.hashTreeRoot - 1 balances 86.684 us/op 95.155 us/op 0.91
BeaconState.hashTreeRoot - 32 balances 1.2100 ms/op 868.85 us/op 1.39
BeaconState.hashTreeRoot - 512 balances 9.7112 ms/op 8.8255 ms/op 1.10
BeaconState.hashTreeRoot - 250000 balances 186.07 ms/op 206.21 ms/op 0.90
aggregationBits - 2048 els - zipIndexesInBitList 21.242 us/op 26.494 us/op 0.80
byteArrayEquals 32 53.362 ns/op 66.265 ns/op 0.81
Buffer.compare 32 17.174 ns/op 21.294 ns/op 0.81
byteArrayEquals 1024 1.5802 us/op 2.0150 us/op 0.78
Buffer.compare 1024 25.470 ns/op 32.270 ns/op 0.79
byteArrayEquals 16384 25.146 us/op 31.842 us/op 0.79
Buffer.compare 16384 200.47 ns/op 261.80 ns/op 0.77
byteArrayEquals 123687377 192.13 ms/op 235.23 ms/op 0.82
Buffer.compare 123687377 6.1350 ms/op 6.9697 ms/op 0.88
byteArrayEquals 32 - diff last byte 53.673 ns/op 64.277 ns/op 0.84
Buffer.compare 32 - diff last byte 17.432 ns/op 21.577 ns/op 0.81
byteArrayEquals 1024 - diff last byte 1.6098 us/op 2.2901 us/op 0.70
Buffer.compare 1024 - diff last byte 27.102 ns/op 39.151 ns/op 0.69
byteArrayEquals 16384 - diff last byte 25.675 us/op 40.835 us/op 0.63
Buffer.compare 16384 - diff last byte 206.94 ns/op 230.52 ns/op 0.90
byteArrayEquals 123687377 - diff last byte 193.33 ms/op 229.55 ms/op 0.84
Buffer.compare 123687377 - diff last byte 6.1872 ms/op 7.1828 ms/op 0.86
byteArrayEquals 32 - random bytes 5.2490 ns/op 10.738 ns/op 0.49
Buffer.compare 32 - random bytes 17.434 ns/op 37.113 ns/op 0.47
byteArrayEquals 1024 - random bytes 5.4710 ns/op 10.466 ns/op 0.52
Buffer.compare 1024 - random bytes 17.456 ns/op 31.912 ns/op 0.55
byteArrayEquals 16384 - random bytes 5.2270 ns/op 10.787 ns/op 0.48
Buffer.compare 16384 - random bytes 17.440 ns/op 31.598 ns/op 0.55
byteArrayEquals 123687377 - random bytes 6.5400 ns/op 7.3300 ns/op 0.89
Buffer.compare 123687377 - random bytes 19.330 ns/op 20.080 ns/op 0.96
regular array get 100000 times 32.035 us/op 42.562 us/op 0.75
wrappedArray get 100000 times 31.908 us/op 37.844 us/op 0.84
arrayWithProxy get 100000 times 12.414 ms/op 22.380 ms/op 0.55
ssz.Root.equals 45.389 ns/op 55.961 ns/op 0.81
byteArrayEquals 44.326 ns/op 54.491 ns/op 0.81
Buffer.compare 10.103 ns/op 12.806 ns/op 0.79
processSlot - 1 slots 10.958 us/op 11.142 us/op 0.98
processSlot - 32 slots 3.3622 ms/op 3.9114 ms/op 0.86
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 2.8195 ms/op 3.2625 ms/op 0.86
getCommitteeAssignments - req 1 vs - 250000 vc 2.1318 ms/op 2.6542 ms/op 0.80
getCommitteeAssignments - req 100 vs - 250000 vc 4.0820 ms/op 5.0342 ms/op 0.81
getCommitteeAssignments - req 1000 vs - 250000 vc 4.3925 ms/op 5.4141 ms/op 0.81
findModifiedValidators - 10000 modified validators 729.96 ms/op 823.35 ms/op 0.89
findModifiedValidators - 1000 modified validators 704.18 ms/op 739.28 ms/op 0.95
findModifiedValidators - 100 modified validators 241.68 ms/op 245.67 ms/op 0.98
findModifiedValidators - 10 modified validators 131.58 ms/op 304.26 ms/op 0.43
findModifiedValidators - 1 modified validators 150.90 ms/op 202.23 ms/op 0.75
findModifiedValidators - no difference 156.34 ms/op 275.91 ms/op 0.57
compare ViewDUs 6.1892 s/op 7.5304 s/op 0.82
compare each validator Uint8Array 1.9130 s/op 1.9842 s/op 0.96
compare ViewDU to Uint8Array 978.73 ms/op 2.0376 s/op 0.48
migrate state 1000000 validators, 24 modified, 0 new 911.93 ms/op 1.2438 s/op 0.73
migrate state 1000000 validators, 1700 modified, 1000 new 1.2238 s/op 1.7883 s/op 0.68
migrate state 1000000 validators, 3400 modified, 2000 new 1.3899 s/op 1.5565 s/op 0.89
migrate state 1500000 validators, 24 modified, 0 new 893.97 ms/op 1.1786 s/op 0.76
migrate state 1500000 validators, 1700 modified, 1000 new 1.1770 s/op 1.3722 s/op 0.86
migrate state 1500000 validators, 3400 modified, 2000 new 1.4111 s/op 1.6501 s/op 0.86
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.2000 ns/op 5.4400 ns/op 0.77
state getBlockRootAtSlot - 250000 vs - 7PWei 649.01 ns/op 725.40 ns/op 0.89
naive computeProposerIndex 100000 validators 47.580 ms/op 66.813 ms/op 0.71
computeProposerIndex 100000 validators 1.4827 ms/op 1.5761 ms/op 0.94
naiveGetNextSyncCommitteeIndices 1000 validators 7.2853 s/op 10.514 s/op 0.69
getNextSyncCommitteeIndices 1000 validators 111.84 ms/op 141.16 ms/op 0.79
naiveGetNextSyncCommitteeIndices 10000 validators 7.4570 s/op 10.700 s/op 0.70
getNextSyncCommitteeIndices 10000 validators 110.89 ms/op 129.45 ms/op 0.86
naiveGetNextSyncCommitteeIndices 100000 validators 7.1991 s/op 11.761 s/op 0.61
getNextSyncCommitteeIndices 100000 validators 111.20 ms/op 140.07 ms/op 0.79
naive computeShuffledIndex 100000 validators 25.034 s/op 43.476 s/op 0.58
cached computeShuffledIndex 100000 validators 527.48 ms/op 1.0127 s/op 0.52
naive computeShuffledIndex 2000000 validators 458.14 s/op 1625.7 s/op 0.28
cached computeShuffledIndex 2000000 validators 28.154 s/op 41.938 s/op 0.67
computeProposers - vc 250000 602.80 us/op 2.1095 ms/op 0.29
computeEpochShuffling - vc 250000 40.901 ms/op 80.269 ms/op 0.51
getNextSyncCommittee - vc 250000 10.102 ms/op 14.071 ms/op 0.72
computeSigningRoot for AttestationData 21.431 us/op 26.732 us/op 0.80
hash AttestationData serialized data then Buffer.toString(base64) 1.5689 us/op 2.2945 us/op 0.68
toHexString serialized data 1.0809 us/op 1.7949 us/op 0.60
Buffer.toString(base64) 152.49 ns/op 231.89 ns/op 0.66
nodejs block root to RootHex using toHex 152.47 ns/op 263.91 ns/op 0.58
nodejs block root to RootHex using toRootHex 89.857 ns/op 180.51 ns/op 0.50
nodejs fromhex(blob) 113.07 ms/op 206.75 ms/op 0.55
nodejs fromHexInto(blob) 96.498 ms/op 121.38 ms/op 0.79
browser block root to RootHex using the deprecated toHexString 219.09 ns/op 271.24 ns/op 0.81
browser block root to RootHex using toHex 175.12 ns/op 207.55 ns/op 0.84
browser block root to RootHex using toRootHex 168.06 ns/op 194.63 ns/op 0.86
browser fromHexInto(blob) 844.08 us/op 1.3020 ms/op 0.65
browser fromHex(blob) 808.15 ms/op 1.3634 s/op 0.59

by benchmarkbot/action

@wemeetagain wemeetagain merged commit e88fbeb into unstable Oct 20, 2025
20 of 21 checks passed
@wemeetagain wemeetagain deleted the nflaig/prune-history branch October 20, 2025 13:12
@wemeetagain
Copy link
Member

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

Prune history improvements

4 participants