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

Conversation

@nazarhussain
Copy link
Contributor

Motivation

Enable the organize import back which was disabled in #7982 to isolate the changes for import ordering

Description

  • Update the organize import config
  • Fix all linting errors

Steps to test or reproduce

  • Run all tests

@nazarhussain nazarhussain requested a review from a team as a code owner September 16, 2025 13:46
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 @nazarhussain, 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 reactivates and customizes the import organization feature in the project's "biome.jsonc" configuration. The primary goal is to standardize import ordering across the codebase, which enhances code readability and ensures consistency. This change also includes fixes for any linting errors that arose from the newly enforced import rules.

Highlights

  • Import Organization Re-enabled: The "organizeImports" feature in "biome.jsonc" has been switched from "off" to "on", re-activating automatic import sorting.
  • Custom Import Grouping Rules: A comprehensive "groups" configuration has been added to "organizeImports", defining a specific order for various import types including Bun, Node.js, npm, URLs, libraries, aliases, and project-specific paths.
  • Linting Error Resolution: All existing linting errors related to import ordering have been addressed and fixed as a result of enabling and configuring the import organization.
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 enables and configures import organization using Biome. The configuration for grouping imports is a great addition for maintaining code consistency. However, I've noticed a small issue in the ordering of the import groups in biome.jsonc which prevents the intended behavior. The group for @chainsafe and @lodestar packages is placed after the general package group, making it ineffective. I've suggested a correction to the group order to fix this.

@codecov
Copy link

codecov bot commented Sep 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.24%. Comparing base (83964b4) to head (fd1d45d).
⚠️ Report is 2 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #8410      +/-   ##
============================================
- Coverage     52.26%   52.24%   -0.02%     
============================================
  Files           853      853              
  Lines         64784    64770      -14     
  Branches       4766     4766              
============================================
- Hits          33858    33841      -17     
- Misses        30856    30859       +3     
  Partials         70       70              
🚀 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 Sep 16, 2025

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: fb1e3bf Previous: 7a3b3a9 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 798.24 us/op 982.49 us/op 0.81
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 29.594 us/op 35.590 us/op 0.83
BLS verify - blst 912.17 us/op 781.31 us/op 1.17
BLS verifyMultipleSignatures 3 - blst 1.3785 ms/op 1.2172 ms/op 1.13
BLS verifyMultipleSignatures 8 - blst 1.5340 ms/op 1.6523 ms/op 0.93
BLS verifyMultipleSignatures 32 - blst 4.5494 ms/op 4.9029 ms/op 0.93
BLS verifyMultipleSignatures 64 - blst 8.5436 ms/op 9.5546 ms/op 0.89
BLS verifyMultipleSignatures 128 - blst 16.304 ms/op 17.054 ms/op 0.96
BLS deserializing 10000 signatures 636.85 ms/op 697.27 ms/op 0.91
BLS deserializing 100000 signatures 6.4366 s/op 6.9047 s/op 0.93
BLS verifyMultipleSignatures - same message - 3 - blst 989.38 us/op 852.35 us/op 1.16
BLS verifyMultipleSignatures - same message - 8 - blst 1.1156 ms/op 1.0770 ms/op 1.04
BLS verifyMultipleSignatures - same message - 32 - blst 1.7657 ms/op 1.7005 ms/op 1.04
BLS verifyMultipleSignatures - same message - 64 - blst 2.5963 ms/op 2.6117 ms/op 0.99
BLS verifyMultipleSignatures - same message - 128 - blst 4.3396 ms/op 4.4218 ms/op 0.98
BLS aggregatePubkeys 32 - blst 18.180 us/op 19.397 us/op 0.94
BLS aggregatePubkeys 128 - blst 64.206 us/op 69.114 us/op 0.93
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 48.853 ms/op 47.653 ms/op 1.03
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 45.370 ms/op 45.298 ms/op 1.00
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 42.802 ms/op 34.927 ms/op 1.23
getSlashingsAndExits - default max 56.520 us/op 72.607 us/op 0.78
getSlashingsAndExits - 2k 245.25 us/op 285.48 us/op 0.86
isKnown best case - 1 super set check 402.00 ns/op 203.00 ns/op 1.98
isKnown normal case - 2 super set checks 402.00 ns/op 201.00 ns/op 2.00
isKnown worse case - 16 super set checks 400.00 ns/op 200.00 ns/op 2.00
InMemoryCheckpointStateCache - add get delete 2.4070 us/op 2.2610 us/op 1.06
validate api signedAggregateAndProof - struct 1.4126 ms/op 1.5206 ms/op 0.93
validate gossip signedAggregateAndProof - struct 1.6849 ms/op 1.3464 ms/op 1.25
batch validate gossip attestation - vc 640000 - chunk 32 105.50 us/op 110.80 us/op 0.95
batch validate gossip attestation - vc 640000 - chunk 64 93.848 us/op 99.029 us/op 0.95
batch validate gossip attestation - vc 640000 - chunk 128 89.413 us/op 92.963 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 256 93.556 us/op 98.564 us/op 0.95
pickEth1Vote - no votes 806.22 us/op 938.15 us/op 0.86
pickEth1Vote - max votes 5.1495 ms/op 6.1255 ms/op 0.84
pickEth1Vote - Eth1Data hashTreeRoot value x2048 10.749 ms/op 13.348 ms/op 0.81
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 18.689 ms/op 18.754 ms/op 1.00
pickEth1Vote - Eth1Data fastSerialize value x2048 357.54 us/op 411.54 us/op 0.87
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.5173 ms/op 4.3656 ms/op 0.81
bytes32 toHexString 503.00 ns/op 364.00 ns/op 1.38
bytes32 Buffer.toString(hex) 410.00 ns/op 231.00 ns/op 1.77
bytes32 Buffer.toString(hex) from Uint8Array 516.00 ns/op 318.00 ns/op 1.62
bytes32 Buffer.toString(hex) + 0x 428.00 ns/op 233.00 ns/op 1.84
Object access 1 prop 0.30000 ns/op 0.11500 ns/op 2.61
Map access 1 prop 0.30400 ns/op 0.11700 ns/op 2.60
Object get x1000 5.1240 ns/op 5.6750 ns/op 0.90
Map get x1000 5.8570 ns/op 6.2340 ns/op 0.94
Object set x1000 18.366 ns/op 28.969 ns/op 0.63
Map set x1000 16.409 ns/op 19.630 ns/op 0.84
Return object 10000 times 0.29560 ns/op 0.28160 ns/op 1.05
Throw Error 10000 times 3.4762 us/op 4.2124 us/op 0.83
toHex 100.64 ns/op 125.34 ns/op 0.80
Buffer.from 94.616 ns/op 120.31 ns/op 0.79
shared Buffer 67.430 ns/op 79.668 ns/op 0.85
fastMsgIdFn sha256 / 200 bytes 1.9260 us/op 2.1550 us/op 0.89
fastMsgIdFn h32 xxhash / 200 bytes 387.00 ns/op 197.00 ns/op 1.96
fastMsgIdFn h64 xxhash / 200 bytes 435.00 ns/op 255.00 ns/op 1.71
fastMsgIdFn sha256 / 1000 bytes 5.7340 us/op 7.0700 us/op 0.81
fastMsgIdFn h32 xxhash / 1000 bytes 513.00 ns/op 327.00 ns/op 1.57
fastMsgIdFn h64 xxhash / 1000 bytes 509.00 ns/op 333.00 ns/op 1.53
fastMsgIdFn sha256 / 10000 bytes 49.409 us/op 63.660 us/op 0.78
fastMsgIdFn h32 xxhash / 10000 bytes 1.9150 us/op 1.8250 us/op 1.05
fastMsgIdFn h64 xxhash / 10000 bytes 1.3400 us/op 1.2150 us/op 1.10
send data - 1000 256B messages 12.237 ms/op 15.142 ms/op 0.81
send data - 1000 512B messages 15.479 ms/op 19.815 ms/op 0.78
send data - 1000 1024B messages 22.021 ms/op 27.122 ms/op 0.81
send data - 1000 1200B messages 18.435 ms/op 23.745 ms/op 0.78
send data - 1000 2048B messages 18.998 ms/op 24.325 ms/op 0.78
send data - 1000 4096B messages 19.191 ms/op 27.498 ms/op 0.70
send data - 1000 16384B messages 28.897 ms/op 44.719 ms/op 0.65
send data - 1000 65536B messages 70.378 ms/op 112.60 ms/op 0.63
enrSubnets - fastDeserialize 64 bits 938.00 ns/op 949.00 ns/op 0.99
enrSubnets - ssz BitVector 64 bits 477.00 ns/op 320.00 ns/op 1.49
enrSubnets - fastDeserialize 4 bits 301.00 ns/op 126.00 ns/op 2.39
enrSubnets - ssz BitVector 4 bits 513.00 ns/op 323.00 ns/op 1.59
prioritizePeers score -10:0 att 32-0.1 sync 2-0 295.63 us/op 236.37 us/op 1.25
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 408.88 us/op 260.62 us/op 1.57
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 594.69 us/op 382.90 us/op 1.55
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 1.0421 ms/op 715.53 us/op 1.46
prioritizePeers score 0:0 att 64-1 sync 4-1 1.0333 ms/op 858.61 us/op 1.20
array of 16000 items push then shift 1.2988 us/op 1.6250 us/op 0.80
LinkedList of 16000 items push then shift 6.9120 ns/op 7.2270 ns/op 0.96
array of 16000 items push then pop 68.753 ns/op 76.053 ns/op 0.90
LinkedList of 16000 items push then pop 6.2010 ns/op 7.1000 ns/op 0.87
array of 24000 items push then shift 1.7812 us/op 2.3760 us/op 0.75
LinkedList of 24000 items push then shift 6.4880 ns/op 7.4010 ns/op 0.88
array of 24000 items push then pop 94.447 ns/op 105.03 ns/op 0.90
LinkedList of 24000 items push then pop 6.1240 ns/op 7.0490 ns/op 0.87
intersect bitArray bitLen 8 5.0670 ns/op 6.2960 ns/op 0.80
intersect array and set length 8 31.268 ns/op 37.727 ns/op 0.83
intersect bitArray bitLen 128 26.549 ns/op 29.434 ns/op 0.90
intersect array and set length 128 542.85 ns/op 612.24 ns/op 0.89
bitArray.getTrueBitIndexes() bitLen 128 1.4490 us/op 992.00 ns/op 1.46
bitArray.getTrueBitIndexes() bitLen 248 1.9480 us/op 1.7480 us/op 1.11
bitArray.getTrueBitIndexes() bitLen 512 5.0060 us/op 3.5680 us/op 1.40
Buffer.concat 32 items 841.00 ns/op 606.00 ns/op 1.39
Uint8Array.set 32 items 1.3390 us/op 912.00 ns/op 1.47
Buffer.copy 2.0190 us/op 2.0540 us/op 0.98
Uint8Array.set - with subarray 1.5850 us/op 1.5170 us/op 1.04
Uint8Array.set - without subarray 1.1550 us/op 856.00 ns/op 1.35
getUint32 - dataview 381.00 ns/op 194.00 ns/op 1.96
getUint32 - manual 308.00 ns/op 116.00 ns/op 2.66
Set add up to 64 items then delete first 1.6697 us/op 2.1416 us/op 0.78
OrderedSet add up to 64 items then delete first 2.6355 us/op 3.2557 us/op 0.81
Set add up to 64 items then delete last 1.9005 us/op 2.3947 us/op 0.79
OrderedSet add up to 64 items then delete last 2.9715 us/op 3.6970 us/op 0.80
Set add up to 64 items then delete middle 1.9605 us/op 2.2931 us/op 0.85
OrderedSet add up to 64 items then delete middle 5.0504 us/op 5.3180 us/op 0.95
Set add up to 128 items then delete first 3.8628 us/op 5.0152 us/op 0.77
OrderedSet add up to 128 items then delete first 6.2394 us/op 7.9715 us/op 0.78
Set add up to 128 items then delete last 3.7407 us/op 5.0411 us/op 0.74
OrderedSet add up to 128 items then delete last 6.0116 us/op 7.8343 us/op 0.77
Set add up to 128 items then delete middle 3.8175 us/op 5.4586 us/op 0.70
OrderedSet add up to 128 items then delete middle 11.825 us/op 14.891 us/op 0.79
Set add up to 256 items then delete first 8.3305 us/op 10.783 us/op 0.77
OrderedSet add up to 256 items then delete first 12.524 us/op 17.899 us/op 0.70
Set add up to 256 items then delete last 7.7317 us/op 10.148 us/op 0.76
OrderedSet add up to 256 items then delete last 12.715 us/op 15.364 us/op 0.83
Set add up to 256 items then delete middle 7.7275 us/op 10.244 us/op 0.75
OrderedSet add up to 256 items then delete middle 35.596 us/op 43.063 us/op 0.83
transfer serialized Status (84 B) 1.9730 us/op 2.2830 us/op 0.86
copy serialized Status (84 B) 1.2880 us/op 1.2230 us/op 1.05
transfer serialized SignedVoluntaryExit (112 B) 1.9680 us/op 2.3040 us/op 0.85
copy serialized SignedVoluntaryExit (112 B) 1.2220 us/op 1.2810 us/op 0.95
transfer serialized ProposerSlashing (416 B) 2.5780 us/op 2.4100 us/op 1.07
copy serialized ProposerSlashing (416 B) 1.2930 us/op 1.2610 us/op 1.03
transfer serialized Attestation (485 B) 2.0650 us/op 2.3130 us/op 0.89
copy serialized Attestation (485 B) 1.4210 us/op 1.3230 us/op 1.07
transfer serialized AttesterSlashing (33232 B) 2.3810 us/op 2.3910 us/op 1.00
copy serialized AttesterSlashing (33232 B) 3.5620 us/op 3.4390 us/op 1.04
transfer serialized Small SignedBeaconBlock (128000 B) 2.6000 us/op 2.7990 us/op 0.93
copy serialized Small SignedBeaconBlock (128000 B) 8.4810 us/op 9.7070 us/op 0.87
transfer serialized Avg SignedBeaconBlock (200000 B) 2.6630 us/op 3.2450 us/op 0.82
copy serialized Avg SignedBeaconBlock (200000 B) 12.600 us/op 16.654 us/op 0.76
transfer serialized BlobsSidecar (524380 B) 2.8350 us/op 3.3880 us/op 0.84
copy serialized BlobsSidecar (524380 B) 57.521 us/op 63.749 us/op 0.90
transfer serialized Big SignedBeaconBlock (1000000 B) 3.1630 us/op 3.6660 us/op 0.86
copy serialized Big SignedBeaconBlock (1000000 B) 104.29 us/op 121.10 us/op 0.86
pass gossip attestations to forkchoice per slot 2.4147 ms/op 2.7960 ms/op 0.86
forkChoice updateHead vc 100000 bc 64 eq 0 357.18 us/op 454.82 us/op 0.79
forkChoice updateHead vc 600000 bc 64 eq 0 2.2922 ms/op 2.7820 ms/op 0.82
forkChoice updateHead vc 1000000 bc 64 eq 0 3.6216 ms/op 4.8522 ms/op 0.75
forkChoice updateHead vc 600000 bc 320 eq 0 2.1668 ms/op 2.8825 ms/op 0.75
forkChoice updateHead vc 600000 bc 1200 eq 0 2.1913 ms/op 3.5963 ms/op 0.61
forkChoice updateHead vc 600000 bc 7200 eq 0 2.4394 ms/op 3.1185 ms/op 0.78
forkChoice updateHead vc 600000 bc 64 eq 1000 9.7739 ms/op 10.551 ms/op 0.93
forkChoice updateHead vc 600000 bc 64 eq 10000 9.5763 ms/op 10.348 ms/op 0.93
forkChoice updateHead vc 600000 bc 64 eq 300000 11.585 ms/op 13.530 ms/op 0.86
computeDeltas 500000 validators 300 proto nodes 3.1497 ms/op 3.9672 ms/op 0.79
computeDeltas 500000 validators 1200 proto nodes 3.1748 ms/op 4.1214 ms/op 0.77
computeDeltas 500000 validators 7200 proto nodes 2.9652 ms/op 4.0904 ms/op 0.72
computeDeltas 750000 validators 300 proto nodes 4.5637 ms/op 6.0003 ms/op 0.76
computeDeltas 750000 validators 1200 proto nodes 4.6017 ms/op 5.8985 ms/op 0.78
computeDeltas 750000 validators 7200 proto nodes 4.6716 ms/op 5.7664 ms/op 0.81
computeDeltas 1400000 validators 300 proto nodes 12.641 ms/op 10.758 ms/op 1.18
computeDeltas 1400000 validators 1200 proto nodes 11.078 ms/op 10.771 ms/op 1.03
computeDeltas 1400000 validators 7200 proto nodes 8.8368 ms/op 10.719 ms/op 0.82
computeDeltas 2100000 validators 300 proto nodes 13.660 ms/op 17.681 ms/op 0.77
computeDeltas 2100000 validators 1200 proto nodes 13.888 ms/op 17.531 ms/op 0.79
computeDeltas 2100000 validators 7200 proto nodes 14.739 ms/op 16.735 ms/op 0.88
altair processAttestation - 250000 vs - 7PWei normalcase 2.3861 ms/op 2.1602 ms/op 1.10
altair processAttestation - 250000 vs - 7PWei worstcase 2.7715 ms/op 2.9589 ms/op 0.94
altair processAttestation - setStatus - 1/6 committees join 109.40 us/op 128.98 us/op 0.85
altair processAttestation - setStatus - 1/3 committees join 208.55 us/op 251.62 us/op 0.83
altair processAttestation - setStatus - 1/2 committees join 279.72 us/op 354.75 us/op 0.79
altair processAttestation - setStatus - 2/3 committees join 360.10 us/op 430.26 us/op 0.84
altair processAttestation - setStatus - 4/5 committees join 532.30 us/op 596.97 us/op 0.89
altair processAttestation - setStatus - 100% committees join 608.34 us/op 713.17 us/op 0.85
altair processBlock - 250000 vs - 7PWei normalcase 3.5887 ms/op 4.3920 ms/op 0.82
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.932 ms/op 30.906 ms/op 0.97
altair processBlock - 250000 vs - 7PWei worstcase 40.155 ms/op 39.189 ms/op 1.02
altair processBlock - 250000 vs - 7PWei worstcase hashState 80.974 ms/op 81.526 ms/op 0.99
phase0 processBlock - 250000 vs - 7PWei normalcase 1.7767 ms/op 1.6090 ms/op 1.10
phase0 processBlock - 250000 vs - 7PWei worstcase 25.112 ms/op 23.551 ms/op 1.07
altair processEth1Data - 250000 vs - 7PWei normalcase 287.38 us/op 345.58 us/op 0.83
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.4560 us/op 7.8090 us/op 0.70
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 38.123 us/op 43.784 us/op 0.87
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 9.7410 us/op 11.357 us/op 0.86
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.6860 us/op 6.8910 us/op 0.83
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 158.46 us/op 167.97 us/op 0.94
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.4330 ms/op 1.9140 ms/op 0.75
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8640 ms/op 2.4874 ms/op 0.75
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8953 ms/op 2.4227 ms/op 0.78
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.8120 ms/op 4.5589 ms/op 0.84
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.9304 ms/op 2.5310 ms/op 0.76
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.8053 ms/op 4.7709 ms/op 0.80
Tree 40 250000 create 359.72 ms/op 429.36 ms/op 0.84
Tree 40 250000 get(125000) 115.98 ns/op 144.22 ns/op 0.80
Tree 40 250000 set(125000) 1.2722 us/op 1.4773 us/op 0.86
Tree 40 250000 toArray() 19.682 ms/op 16.516 ms/op 1.19
Tree 40 250000 iterate all - toArray() + loop 15.206 ms/op 16.256 ms/op 0.94
Tree 40 250000 iterate all - get(i) 50.678 ms/op 51.822 ms/op 0.98
Array 250000 create 2.9045 ms/op 2.4145 ms/op 1.20
Array 250000 clone - spread 680.07 us/op 810.99 us/op 0.84
Array 250000 get(125000) 0.84000 ns/op 0.40800 ns/op 2.06
Array 250000 set(125000) 0.60900 ns/op 0.44100 ns/op 1.38
Array 250000 iterate all - loop 78.368 us/op 83.334 us/op 0.94
phase0 afterProcessEpoch - 250000 vs - 7PWei 40.865 ms/op 41.886 ms/op 0.98
Array.fill - length 1000000 2.7212 ms/op 3.3834 ms/op 0.80
Array push - length 1000000 10.400 ms/op 13.770 ms/op 0.76
Array.get 0.27144 ns/op 0.28531 ns/op 0.95
Uint8Array.get 0.35127 ns/op 0.45057 ns/op 0.78
phase0 beforeProcessEpoch - 250000 vs - 7PWei 18.201 ms/op 21.238 ms/op 0.86
altair processEpoch - mainnet_e81889 244.48 ms/op 313.52 ms/op 0.78
mainnet_e81889 - altair beforeProcessEpoch 16.638 ms/op 21.185 ms/op 0.79
mainnet_e81889 - altair processJustificationAndFinalization 4.8530 us/op 5.6750 us/op 0.86
mainnet_e81889 - altair processInactivityUpdates 5.5050 ms/op 5.0292 ms/op 1.09
mainnet_e81889 - altair processRewardsAndPenalties 44.221 ms/op 45.641 ms/op 0.97
mainnet_e81889 - altair processRegistryUpdates 896.00 ns/op 896.00 ns/op 1.00
mainnet_e81889 - altair processSlashings 404.00 ns/op 193.00 ns/op 2.09
mainnet_e81889 - altair processEth1DataReset 387.00 ns/op 175.00 ns/op 2.21
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.0277 ms/op 1.2628 ms/op 0.81
mainnet_e81889 - altair processSlashingsReset 1.0140 us/op 894.00 ns/op 1.13
mainnet_e81889 - altair processRandaoMixesReset 1.5220 us/op 1.3270 us/op 1.15
mainnet_e81889 - altair processHistoricalRootsUpdate 438.00 ns/op 231.00 ns/op 1.90
mainnet_e81889 - altair processParticipationFlagUpdates 817.00 ns/op 857.00 ns/op 0.95
mainnet_e81889 - altair processSyncCommitteeUpdates 359.00 ns/op 147.00 ns/op 2.44
mainnet_e81889 - altair afterProcessEpoch 43.262 ms/op 46.609 ms/op 0.93
capella processEpoch - mainnet_e217614 739.22 ms/op 994.66 ms/op 0.74
mainnet_e217614 - capella beforeProcessEpoch 65.322 ms/op 69.180 ms/op 0.94
mainnet_e217614 - capella processJustificationAndFinalization 4.4450 us/op 5.6420 us/op 0.79
mainnet_e217614 - capella processInactivityUpdates 11.681 ms/op 15.630 ms/op 0.75
mainnet_e217614 - capella processRewardsAndPenalties 166.96 ms/op 193.25 ms/op 0.86
mainnet_e217614 - capella processRegistryUpdates 5.4560 us/op 6.6870 us/op 0.82
mainnet_e217614 - capella processSlashings 457.00 ns/op 178.00 ns/op 2.57
mainnet_e217614 - capella processEth1DataReset 377.00 ns/op 175.00 ns/op 2.15
mainnet_e217614 - capella processEffectiveBalanceUpdates 3.6700 ms/op 4.2865 ms/op 0.86
mainnet_e217614 - capella processSlashingsReset 1.0400 us/op 911.00 ns/op 1.14
mainnet_e217614 - capella processRandaoMixesReset 1.2410 us/op 1.3400 us/op 0.93
mainnet_e217614 - capella processHistoricalRootsUpdate 394.00 ns/op 175.00 ns/op 2.25
mainnet_e217614 - capella processParticipationFlagUpdates 729.00 ns/op 556.00 ns/op 1.31
mainnet_e217614 - capella afterProcessEpoch 113.34 ms/op 118.94 ms/op 0.95
phase0 processEpoch - mainnet_e58758 284.39 ms/op 314.72 ms/op 0.90
mainnet_e58758 - phase0 beforeProcessEpoch 76.364 ms/op 78.167 ms/op 0.98
mainnet_e58758 - phase0 processJustificationAndFinalization 4.6430 us/op 5.5780 us/op 0.83
mainnet_e58758 - phase0 processRewardsAndPenalties 28.500 ms/op 38.291 ms/op 0.74
mainnet_e58758 - phase0 processRegistryUpdates 2.8000 us/op 3.1160 us/op 0.90
mainnet_e58758 - phase0 processSlashings 403.00 ns/op 175.00 ns/op 2.30
mainnet_e58758 - phase0 processEth1DataReset 404.00 ns/op 171.00 ns/op 2.36
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1293 ms/op 1.1830 ms/op 0.95
mainnet_e58758 - phase0 processSlashingsReset 1.0840 us/op 1.0490 us/op 1.03
mainnet_e58758 - phase0 processRandaoMixesReset 1.2860 us/op 1.1820 us/op 1.09
mainnet_e58758 - phase0 processHistoricalRootsUpdate 410.00 ns/op 175.00 ns/op 2.34
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.2090 us/op 910.00 ns/op 1.33
mainnet_e58758 - phase0 afterProcessEpoch 32.238 ms/op 36.446 ms/op 0.88
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.7768 ms/op 1.3901 ms/op 1.28
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5172 ms/op 1.9060 ms/op 0.80
altair processInactivityUpdates - 250000 normalcase 17.778 ms/op 17.062 ms/op 1.04
altair processInactivityUpdates - 250000 worstcase 16.066 ms/op 18.001 ms/op 0.89
phase0 processRegistryUpdates - 250000 normalcase 5.8280 us/op 5.3920 us/op 1.08
phase0 processRegistryUpdates - 250000 badcase_full_deposits 295.01 us/op 295.35 us/op 1.00
phase0 processRegistryUpdates - 250000 worstcase 0.5 101.90 ms/op 102.61 ms/op 0.99
altair processRewardsAndPenalties - 250000 normalcase 29.522 ms/op 28.028 ms/op 1.05
altair processRewardsAndPenalties - 250000 worstcase 27.883 ms/op 24.519 ms/op 1.14
phase0 getAttestationDeltas - 250000 normalcase 6.1115 ms/op 8.9880 ms/op 0.68
phase0 getAttestationDeltas - 250000 worstcase 5.4081 ms/op 6.2321 ms/op 0.87
phase0 processSlashings - 250000 worstcase 88.453 us/op 116.07 us/op 0.76
altair processSyncCommitteeUpdates - 250000 9.9273 ms/op 11.297 ms/op 0.88
BeaconState.hashTreeRoot - No change 442.00 ns/op 222.00 ns/op 1.99
BeaconState.hashTreeRoot - 1 full validator 61.158 us/op 85.991 us/op 0.71
BeaconState.hashTreeRoot - 32 full validator 813.76 us/op 952.88 us/op 0.85
BeaconState.hashTreeRoot - 512 full validator 7.3469 ms/op 10.006 ms/op 0.73
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 74.241 us/op 107.44 us/op 0.69
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.0483 ms/op 1.5703 ms/op 0.67
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 21.748 ms/op 23.978 ms/op 0.91
BeaconState.hashTreeRoot - 1 balances 58.176 us/op 72.244 us/op 0.81
BeaconState.hashTreeRoot - 32 balances 538.51 us/op 668.89 us/op 0.81
BeaconState.hashTreeRoot - 512 balances 5.5536 ms/op 7.6535 ms/op 0.73
BeaconState.hashTreeRoot - 250000 balances 109.37 ms/op 157.14 ms/op 0.70
aggregationBits - 2048 els - zipIndexesInBitList 17.082 us/op 22.079 us/op 0.77
byteArrayEquals 32 47.395 ns/op 53.522 ns/op 0.89
Buffer.compare 32 15.630 ns/op 17.115 ns/op 0.91
byteArrayEquals 1024 1.2843 us/op 1.5894 us/op 0.81
Buffer.compare 1024 23.171 ns/op 24.458 ns/op 0.95
byteArrayEquals 16384 20.414 us/op 28.862 us/op 0.71
Buffer.compare 16384 177.65 ns/op 205.43 ns/op 0.86
byteArrayEquals 123687377 151.46 ms/op 204.50 ms/op 0.74
Buffer.compare 123687377 5.5153 ms/op 9.3802 ms/op 0.59
byteArrayEquals 32 - diff last byte 47.652 ns/op 52.594 ns/op 0.91
Buffer.compare 32 - diff last byte 15.917 ns/op 17.387 ns/op 0.92
byteArrayEquals 1024 - diff last byte 1.2777 us/op 1.6051 us/op 0.80
Buffer.compare 1024 - diff last byte 23.490 ns/op 26.116 ns/op 0.90
byteArrayEquals 16384 - diff last byte 20.253 us/op 25.832 us/op 0.78
Buffer.compare 16384 - diff last byte 182.92 ns/op 186.26 ns/op 0.98
byteArrayEquals 123687377 - diff last byte 145.45 ms/op 195.67 ms/op 0.74
Buffer.compare 123687377 - diff last byte 4.4575 ms/op 9.1723 ms/op 0.49
byteArrayEquals 32 - random bytes 4.9580 ns/op 5.1680 ns/op 0.96
Buffer.compare 32 - random bytes 15.775 ns/op 17.373 ns/op 0.91
byteArrayEquals 1024 - random bytes 5.0040 ns/op 5.1880 ns/op 0.96
Buffer.compare 1024 - random bytes 15.662 ns/op 17.220 ns/op 0.91
byteArrayEquals 16384 - random bytes 4.9470 ns/op 5.1560 ns/op 0.96
Buffer.compare 16384 - random bytes 15.917 ns/op 16.930 ns/op 0.94
byteArrayEquals 123687377 - random bytes 7.7700 ns/op 6.3700 ns/op 1.22
Buffer.compare 123687377 - random bytes 17.270 ns/op 18.400 ns/op 0.94
regular array get 100000 times 29.419 us/op 44.374 us/op 0.66
wrappedArray get 100000 times 29.053 us/op 33.176 us/op 0.88
arrayWithProxy get 100000 times 8.3332 ms/op 12.593 ms/op 0.66
ssz.Root.equals 41.765 ns/op 46.468 ns/op 0.90
byteArrayEquals 36.979 ns/op 45.773 ns/op 0.81
Buffer.compare 8.4410 ns/op 10.807 ns/op 0.78
processSlot - 1 slots 8.8590 us/op 10.771 us/op 0.82
processSlot - 32 slots 2.5985 ms/op 2.8370 ms/op 0.92
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 2.0354 ms/op 3.5624 ms/op 0.57
getCommitteeAssignments - req 1 vs - 250000 vc 1.8400 ms/op 2.1877 ms/op 0.84
getCommitteeAssignments - req 100 vs - 250000 vc 3.5526 ms/op 4.2027 ms/op 0.85
getCommitteeAssignments - req 1000 vs - 250000 vc 3.7969 ms/op 4.4591 ms/op 0.85
findModifiedValidators - 10000 modified validators 701.82 ms/op 786.30 ms/op 0.89
findModifiedValidators - 1000 modified validators 642.67 ms/op 771.70 ms/op 0.83
findModifiedValidators - 100 modified validators 232.07 ms/op 274.52 ms/op 0.85
findModifiedValidators - 10 modified validators 206.68 ms/op 144.94 ms/op 1.43
findModifiedValidators - 1 modified validators 254.68 ms/op 181.92 ms/op 1.40
findModifiedValidators - no difference 140.43 ms/op 201.76 ms/op 0.70
compare ViewDUs 6.2764 s/op 7.1920 s/op 0.87
compare each validator Uint8Array 1.3650 s/op 2.0308 s/op 0.67
compare ViewDU to Uint8Array 781.61 ms/op 1.5868 s/op 0.49
migrate state 1000000 validators, 24 modified, 0 new 846.27 ms/op 882.83 ms/op 0.96
migrate state 1000000 validators, 1700 modified, 1000 new 1.0471 s/op 1.2714 s/op 0.82
migrate state 1000000 validators, 3400 modified, 2000 new 1.2958 s/op 1.3778 s/op 0.94
migrate state 1500000 validators, 24 modified, 0 new 832.65 ms/op 976.34 ms/op 0.85
migrate state 1500000 validators, 1700 modified, 1000 new 1.0546 s/op 1.1896 s/op 0.89
migrate state 1500000 validators, 3400 modified, 2000 new 1.2639 s/op 1.3453 s/op 0.94
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.0400 ns/op 4.2700 ns/op 1.41
state getBlockRootAtSlot - 250000 vs - 7PWei 490.85 ns/op 490.12 ns/op 1.00
naive computeProposerIndex 100000 validators 46.998 ms/op 47.538 ms/op 0.99
computeProposerIndex 100000 validators 1.3521 ms/op 1.4784 ms/op 0.91
naiveGetNextSyncCommitteeIndices 1000 validators 6.9502 s/op 7.8830 s/op 0.88
getNextSyncCommitteeIndices 1000 validators 96.611 ms/op 120.55 ms/op 0.80
naiveGetNextSyncCommitteeIndices 10000 validators 6.7326 s/op 8.0166 s/op 0.84
getNextSyncCommitteeIndices 10000 validators 93.875 ms/op 130.10 ms/op 0.72
naiveGetNextSyncCommitteeIndices 100000 validators 6.6539 s/op 8.0305 s/op 0.83
getNextSyncCommitteeIndices 100000 validators 93.581 ms/op 114.00 ms/op 0.82
naive computeShuffledIndex 100000 validators 18.193 s/op 32.706 s/op 0.56
cached computeShuffledIndex 100000 validators 468.65 ms/op 740.38 ms/op 0.63
naive computeShuffledIndex 2000000 validators 453.59 s/op 486.28 s/op 0.93
cached computeShuffledIndex 2000000 validators 15.669 s/op 37.144 s/op 0.42
computeProposers - vc 250000 558.39 us/op 627.63 us/op 0.89
computeEpochShuffling - vc 250000 38.620 ms/op 42.233 ms/op 0.91
getNextSyncCommittee - vc 250000 9.4681 ms/op 10.383 ms/op 0.91
computeSigningRoot for AttestationData 16.076 us/op 19.398 us/op 0.83
hash AttestationData serialized data then Buffer.toString(base64) 1.1449 us/op 1.6479 us/op 0.69
toHexString serialized data 937.95 ns/op 1.3277 us/op 0.71
Buffer.toString(base64) 106.67 ns/op 170.99 ns/op 0.62
nodejs block root to RootHex using toHex 107.60 ns/op 145.54 ns/op 0.74
nodejs block root to RootHex using toRootHex 74.624 ns/op 86.850 ns/op 0.86
nodejs fromhex(blob) 85.723 ms/op 118.05 ms/op 0.73
nodejs fromHexInto(blob) 82.516 ms/op 94.996 ms/op 0.87
browser block root to RootHex using the deprecated toHexString 187.35 ns/op 229.03 ns/op 0.82
browser block root to RootHex using toHex 155.49 ns/op 214.57 ns/op 0.72
browser block root to RootHex using toRootHex 146.30 ns/op 163.36 ns/op 0.90
browser fromHexInto(blob) 687.99 us/op 846.56 us/op 0.81
browser fromHex(blob) 678.73 ms/op 794.58 ms/op 0.85

by benchmarkbot/action

@nazarhussain nazarhussain force-pushed the nh/enable-organize-imports branch from ed93216 to cc7c1b6 Compare September 19, 2025 07:48
@nazarhussain nazarhussain force-pushed the nh/enable-organize-imports branch from cc7c1b6 to 45ec19e Compare September 19, 2025 08:13
biome.jsonc Outdated
"npm:*",
"npm:*/**"
],
["@chainsafe/**", "@lodestar/**", "@/**"],
Copy link
Member

Choose a reason for hiding this comment

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

I think we want:

  • node/bun modules
  • external packages
  • @lodestar packages
  • internal imports
  • paths

@wemeetagain wemeetagain merged commit feed916 into unstable Sep 19, 2025
29 of 34 checks passed
@wemeetagain wemeetagain deleted the nh/enable-organize-imports branch September 19, 2025 23:59
@wemeetagain
Copy link
Member

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