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

Conversation

@nazarhussain
Copy link
Contributor

Motivation

Add src directory to package sources along with the lib files to have working source map.

Description

  • Add src to the files.

Steps to test or reproduce

  • Run all tests

@nazarhussain nazarhussain requested a review from a team as a code owner September 24, 2025 13:05
@gemini-code-assist
Copy link
Contributor

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 addresses an issue where source maps were not functioning correctly for several packages within the repository. By explicitly including the src directory in the files array of each affected package's package.json, it ensures that consumers of these packages will have access to the original source code. This significantly improves the debugging experience and error traceability when working with the compiled or transpiled code.

Highlights

  • Source Map Support: The src directory has been added to the files array within the package.json of multiple packages. This change ensures that the original source code is included when these packages are published, which is crucial for enabling proper source map functionality and improving the debugging experience.
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.

@nazarhussain
Copy link
Contributor Author

Verified manually with a small script that source map points to correct source files. Notice the api/src/client/index.ts:31.

node --enable-source-maps check.js
/lodestar-1/packages/api/src/beacon/client/index.ts:31
  const {config} = modules;
         ^


TypeError: Cannot destructure property 'config' of 'modules' as it is undefined.
    at getClient (/lodestar-1/packages/api/src/beacon/client/index.ts:31:10)
    at file://lodestar-1/packages/api/check.js:3:13
    at ModuleJob.run (node:internal/modules/esm/module_job:271:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:547:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)

Node.js v22.13.0

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 adds the src directory to the files array in package.json for multiple packages to improve source map support. While this is a good change, the current configuration for the files array is incomplete and could be simplified. The build process generates .d.ts.map files which are not being included in the packages. I've left comments on each package.json file suggesting to replace the granular lib glob patterns with a simple "lib" entry. This will make the configuration more concise, robust, and ensure all necessary build artifacts, including the missing declaration maps, are published.

wemeetagain
wemeetagain previously approved these changes Sep 24, 2025
@codecov
Copy link

codecov bot commented Sep 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.22%. Comparing base (83de5b8) to head (dbec9e7).
⚠️ Report is 2 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #8460      +/-   ##
============================================
- Coverage     52.22%   52.22%   -0.01%     
============================================
  Files           853      853              
  Lines         64898    64898              
  Branches       4768     4766       -2     
============================================
- Hits          33893    33890       -3     
- Misses        30935    30938       +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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for some benchmarks.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold.

Benchmark suite Current: cc819c3 Previous: 83de5b8 Ratio
phase0 getAttestationDeltas - 250000 worstcase 18.784 ms/op 6.2566 ms/op 3.00
Full benchmark results
Benchmark suite Current: cc819c3 Previous: 83de5b8 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.1490 ms/op 979.12 us/op 1.17
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 44.694 us/op 37.179 us/op 1.20
BLS verify - blst 1.0789 ms/op 859.30 us/op 1.26
BLS verifyMultipleSignatures 3 - blst 1.5456 ms/op 1.6711 ms/op 0.92
BLS verifyMultipleSignatures 8 - blst 2.3941 ms/op 2.3458 ms/op 1.02
BLS verifyMultipleSignatures 32 - blst 8.0875 ms/op 5.6329 ms/op 1.44
BLS verifyMultipleSignatures 64 - blst 11.952 ms/op 10.815 ms/op 1.11
BLS verifyMultipleSignatures 128 - blst 21.161 ms/op 17.618 ms/op 1.20
BLS deserializing 10000 signatures 747.68 ms/op 719.59 ms/op 1.04
BLS deserializing 100000 signatures 7.4248 s/op 7.1073 s/op 1.04
BLS verifyMultipleSignatures - same message - 3 - blst 1.0910 ms/op 913.06 us/op 1.19
BLS verifyMultipleSignatures - same message - 8 - blst 1.1816 ms/op 1.1881 ms/op 0.99
BLS verifyMultipleSignatures - same message - 32 - blst 2.0697 ms/op 1.7130 ms/op 1.21
BLS verifyMultipleSignatures - same message - 64 - blst 3.1654 ms/op 2.6386 ms/op 1.20
BLS verifyMultipleSignatures - same message - 128 - blst 4.7116 ms/op 4.4392 ms/op 1.06
BLS aggregatePubkeys 32 - blst 20.099 us/op 19.868 us/op 1.01
BLS aggregatePubkeys 128 - blst 71.899 us/op 70.925 us/op 1.01
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 62.420 ms/op 54.504 ms/op 1.15
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 61.760 ms/op 56.465 ms/op 1.09
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 47.939 ms/op 42.025 ms/op 1.14
getSlashingsAndExits - default max 81.410 us/op 74.862 us/op 1.09
getSlashingsAndExits - 2k 516.12 us/op 328.58 us/op 1.57
isKnown best case - 1 super set check 225.00 ns/op 214.00 ns/op 1.05
isKnown normal case - 2 super set checks 219.00 ns/op 207.00 ns/op 1.06
isKnown worse case - 16 super set checks 228.00 ns/op 210.00 ns/op 1.09
InMemoryCheckpointStateCache - add get delete 3.4400 us/op 2.4760 us/op 1.39
validate api signedAggregateAndProof - struct 1.9815 ms/op 1.8461 ms/op 1.07
validate gossip signedAggregateAndProof - struct 2.1658 ms/op 2.5847 ms/op 0.84
batch validate gossip attestation - vc 640000 - chunk 32 152.13 us/op 117.73 us/op 1.29
batch validate gossip attestation - vc 640000 - chunk 64 126.50 us/op 104.24 us/op 1.21
batch validate gossip attestation - vc 640000 - chunk 128 128.55 us/op 97.264 us/op 1.32
batch validate gossip attestation - vc 640000 - chunk 256 119.43 us/op 98.564 us/op 1.21
pickEth1Vote - no votes 1.0622 ms/op 986.65 us/op 1.08
pickEth1Vote - max votes 10.685 ms/op 5.7759 ms/op 1.85
pickEth1Vote - Eth1Data hashTreeRoot value x2048 15.218 ms/op 11.081 ms/op 1.37
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 30.062 ms/op 15.055 ms/op 2.00
pickEth1Vote - Eth1Data fastSerialize value x2048 468.70 us/op 512.73 us/op 0.91
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.1608 ms/op 3.1140 ms/op 1.66
bytes32 toHexString 488.00 ns/op 384.00 ns/op 1.27
bytes32 Buffer.toString(hex) 319.00 ns/op 265.00 ns/op 1.20
bytes32 Buffer.toString(hex) from Uint8Array 388.00 ns/op 350.00 ns/op 1.11
bytes32 Buffer.toString(hex) + 0x 273.00 ns/op 262.00 ns/op 1.04
Object access 1 prop 0.14800 ns/op 0.12800 ns/op 1.16
Map access 1 prop 0.14700 ns/op 0.12600 ns/op 1.17
Object get x1000 6.1880 ns/op 6.0160 ns/op 1.03
Map get x1000 6.9670 ns/op 6.4230 ns/op 1.08
Object set x1000 36.913 ns/op 28.482 ns/op 1.30
Map set x1000 22.769 ns/op 19.320 ns/op 1.18
Return object 10000 times 0.31820 ns/op 0.29080 ns/op 1.09
Throw Error 10000 times 4.8238 us/op 4.3435 us/op 1.11
toHex 140.69 ns/op 135.16 ns/op 1.04
Buffer.from 132.55 ns/op 128.31 ns/op 1.03
shared Buffer 84.514 ns/op 97.747 ns/op 0.86
fastMsgIdFn sha256 / 200 bytes 2.5200 us/op 2.2330 us/op 1.13
fastMsgIdFn h32 xxhash / 200 bytes 241.00 ns/op 207.00 ns/op 1.16
fastMsgIdFn h64 xxhash / 200 bytes 298.00 ns/op 287.00 ns/op 1.04
fastMsgIdFn sha256 / 1000 bytes 7.9830 us/op 7.5590 us/op 1.06
fastMsgIdFn h32 xxhash / 1000 bytes 365.00 ns/op 340.00 ns/op 1.07
fastMsgIdFn h64 xxhash / 1000 bytes 424.00 ns/op 339.00 ns/op 1.25
fastMsgIdFn sha256 / 10000 bytes 67.384 us/op 66.247 us/op 1.02
fastMsgIdFn h32 xxhash / 10000 bytes 1.9440 us/op 1.8700 us/op 1.04
fastMsgIdFn h64 xxhash / 10000 bytes 1.2840 us/op 1.2500 us/op 1.03
send data - 1000 256B messages 20.608 ms/op 15.843 ms/op 1.30
send data - 1000 512B messages 24.656 ms/op 19.933 ms/op 1.24
send data - 1000 1024B messages 34.160 ms/op 27.895 ms/op 1.22
send data - 1000 1200B messages 30.349 ms/op 24.430 ms/op 1.24
send data - 1000 2048B messages 30.293 ms/op 26.143 ms/op 1.16
send data - 1000 4096B messages 37.569 ms/op 27.390 ms/op 1.37
send data - 1000 16384B messages 57.424 ms/op 43.360 ms/op 1.32
send data - 1000 65536B messages 163.73 ms/op 119.90 ms/op 1.37
enrSubnets - fastDeserialize 64 bits 975.00 ns/op 914.00 ns/op 1.07
enrSubnets - ssz BitVector 64 bits 407.00 ns/op 334.00 ns/op 1.22
enrSubnets - fastDeserialize 4 bits 152.00 ns/op 136.00 ns/op 1.12
enrSubnets - ssz BitVector 4 bits 351.00 ns/op 328.00 ns/op 1.07
prioritizePeers score -10:0 att 32-0.1 sync 2-0 317.28 us/op 249.60 us/op 1.27
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 339.55 us/op 270.74 us/op 1.25
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 600.01 us/op 388.66 us/op 1.54
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 956.68 us/op 718.56 us/op 1.33
prioritizePeers score 0:0 att 64-1 sync 4-1 1.2571 ms/op 872.52 us/op 1.44
array of 16000 items push then shift 1.7386 us/op 1.6612 us/op 1.05
LinkedList of 16000 items push then shift 8.4950 ns/op 7.3760 ns/op 1.15
array of 16000 items push then pop 85.133 ns/op 79.308 ns/op 1.07
LinkedList of 16000 items push then pop 8.7850 ns/op 7.3690 ns/op 1.19
array of 24000 items push then shift 2.8047 us/op 2.4706 us/op 1.14
LinkedList of 24000 items push then shift 8.1860 ns/op 7.3350 ns/op 1.12
array of 24000 items push then pop 114.02 ns/op 107.25 ns/op 1.06
LinkedList of 24000 items push then pop 7.4920 ns/op 7.2480 ns/op 1.03
intersect bitArray bitLen 8 6.5050 ns/op 6.5080 ns/op 1.00
intersect array and set length 8 39.707 ns/op 38.695 ns/op 1.03
intersect bitArray bitLen 128 30.196 ns/op 30.343 ns/op 1.00
intersect array and set length 128 639.20 ns/op 634.39 ns/op 1.01
bitArray.getTrueBitIndexes() bitLen 128 1.2250 us/op 1.0490 us/op 1.17
bitArray.getTrueBitIndexes() bitLen 248 2.1250 us/op 1.8350 us/op 1.16
bitArray.getTrueBitIndexes() bitLen 512 4.3500 us/op 3.7810 us/op 1.15
Buffer.concat 32 items 646.00 ns/op 628.00 ns/op 1.03
Uint8Array.set 32 items 1.2370 us/op 1.0800 us/op 1.15
Buffer.copy 2.1890 us/op 2.5610 us/op 0.85
Uint8Array.set - with subarray 1.7070 us/op 1.7360 us/op 0.98
Uint8Array.set - without subarray 1.0160 us/op 897.00 ns/op 1.13
getUint32 - dataview 232.00 ns/op 206.00 ns/op 1.13
getUint32 - manual 125.00 ns/op 125.00 ns/op 1.00
Set add up to 64 items then delete first 2.6851 us/op 2.0712 us/op 1.30
OrderedSet add up to 64 items then delete first 3.8928 us/op 3.3763 us/op 1.15
Set add up to 64 items then delete last 2.8225 us/op 2.4977 us/op 1.13
OrderedSet add up to 64 items then delete last 4.8233 us/op 3.7468 us/op 1.29
Set add up to 64 items then delete middle 3.1704 us/op 2.4010 us/op 1.32
OrderedSet add up to 64 items then delete middle 5.9550 us/op 5.2914 us/op 1.13
Set add up to 128 items then delete first 6.3053 us/op 5.1723 us/op 1.22
OrderedSet add up to 128 items then delete first 8.6173 us/op 8.0814 us/op 1.07
Set add up to 128 items then delete last 5.9625 us/op 5.0933 us/op 1.17
OrderedSet add up to 128 items then delete last 9.6983 us/op 7.4976 us/op 1.29
Set add up to 128 items then delete middle 5.2902 us/op 5.0701 us/op 1.04
OrderedSet add up to 128 items then delete middle 15.077 us/op 14.137 us/op 1.07
Set add up to 256 items then delete first 10.586 us/op 11.116 us/op 0.95
OrderedSet add up to 256 items then delete first 16.416 us/op 16.246 us/op 1.01
Set add up to 256 items then delete last 10.512 us/op 10.109 us/op 1.04
OrderedSet add up to 256 items then delete last 17.102 us/op 15.193 us/op 1.13
Set add up to 256 items then delete middle 10.576 us/op 9.9972 us/op 1.06
OrderedSet add up to 256 items then delete middle 45.215 us/op 43.028 us/op 1.05
transfer serialized Status (84 B) 2.3220 us/op 2.3500 us/op 0.99
copy serialized Status (84 B) 1.3590 us/op 1.1600 us/op 1.17
transfer serialized SignedVoluntaryExit (112 B) 2.4360 us/op 2.2800 us/op 1.07
copy serialized SignedVoluntaryExit (112 B) 1.3240 us/op 1.1730 us/op 1.13
transfer serialized ProposerSlashing (416 B) 2.7430 us/op 2.7270 us/op 1.01
copy serialized ProposerSlashing (416 B) 1.4910 us/op 1.2640 us/op 1.18
transfer serialized Attestation (485 B) 2.5560 us/op 2.3290 us/op 1.10
copy serialized Attestation (485 B) 2.0320 us/op 1.2460 us/op 1.63
transfer serialized AttesterSlashing (33232 B) 2.8830 us/op 2.4900 us/op 1.16
copy serialized AttesterSlashing (33232 B) 5.6160 us/op 3.4300 us/op 1.64
transfer serialized Small SignedBeaconBlock (128000 B) 3.4660 us/op 3.0080 us/op 1.15
copy serialized Small SignedBeaconBlock (128000 B) 14.110 us/op 8.7840 us/op 1.61
transfer serialized Avg SignedBeaconBlock (200000 B) 3.8340 us/op 3.3730 us/op 1.14
copy serialized Avg SignedBeaconBlock (200000 B) 20.005 us/op 18.061 us/op 1.11
transfer serialized BlobsSidecar (524380 B) 4.3040 us/op 3.2700 us/op 1.32
copy serialized BlobsSidecar (524380 B) 67.093 us/op 60.774 us/op 1.10
transfer serialized Big SignedBeaconBlock (1000000 B) 4.6100 us/op 3.3660 us/op 1.37
copy serialized Big SignedBeaconBlock (1000000 B) 154.12 us/op 120.31 us/op 1.28
pass gossip attestations to forkchoice per slot 2.9795 ms/op 2.8818 ms/op 1.03
forkChoice updateHead vc 100000 bc 64 eq 0 483.39 us/op 465.61 us/op 1.04
forkChoice updateHead vc 600000 bc 64 eq 0 4.0923 ms/op 2.8953 ms/op 1.41
forkChoice updateHead vc 1000000 bc 64 eq 0 5.3077 ms/op 4.9363 ms/op 1.08
forkChoice updateHead vc 600000 bc 320 eq 0 3.0363 ms/op 2.8665 ms/op 1.06
forkChoice updateHead vc 600000 bc 1200 eq 0 3.2834 ms/op 2.9085 ms/op 1.13
forkChoice updateHead vc 600000 bc 7200 eq 0 3.9379 ms/op 3.1086 ms/op 1.27
forkChoice updateHead vc 600000 bc 64 eq 1000 11.412 ms/op 10.610 ms/op 1.08
forkChoice updateHead vc 600000 bc 64 eq 10000 11.811 ms/op 10.543 ms/op 1.12
forkChoice updateHead vc 600000 bc 64 eq 300000 20.946 ms/op 14.191 ms/op 1.48
computeDeltas 500000 validators 300 proto nodes 4.4993 ms/op 4.0032 ms/op 1.12
computeDeltas 500000 validators 1200 proto nodes 4.6924 ms/op 4.0377 ms/op 1.16
computeDeltas 500000 validators 7200 proto nodes 4.6746 ms/op 4.0329 ms/op 1.16
computeDeltas 750000 validators 300 proto nodes 6.7159 ms/op 5.9911 ms/op 1.12
computeDeltas 750000 validators 1200 proto nodes 6.7024 ms/op 5.9510 ms/op 1.13
computeDeltas 750000 validators 7200 proto nodes 6.8486 ms/op 5.9983 ms/op 1.14
computeDeltas 1400000 validators 300 proto nodes 12.931 ms/op 11.357 ms/op 1.14
computeDeltas 1400000 validators 1200 proto nodes 13.165 ms/op 11.293 ms/op 1.17
computeDeltas 1400000 validators 7200 proto nodes 12.658 ms/op 11.230 ms/op 1.13
computeDeltas 2100000 validators 300 proto nodes 18.822 ms/op 16.996 ms/op 1.11
computeDeltas 2100000 validators 1200 proto nodes 18.982 ms/op 16.984 ms/op 1.12
computeDeltas 2100000 validators 7200 proto nodes 18.644 ms/op 16.911 ms/op 1.10
altair processAttestation - 250000 vs - 7PWei normalcase 3.2907 ms/op 2.0570 ms/op 1.60
altair processAttestation - 250000 vs - 7PWei worstcase 4.3804 ms/op 3.0652 ms/op 1.43
altair processAttestation - setStatus - 1/6 committees join 171.52 us/op 129.91 us/op 1.32
altair processAttestation - setStatus - 1/3 committees join 333.50 us/op 246.42 us/op 1.35
altair processAttestation - setStatus - 1/2 committees join 421.33 us/op 351.36 us/op 1.20
altair processAttestation - setStatus - 2/3 committees join 543.12 us/op 456.33 us/op 1.19
altair processAttestation - setStatus - 4/5 committees join 821.65 us/op 630.33 us/op 1.30
altair processAttestation - setStatus - 100% committees join 1.2502 ms/op 731.25 us/op 1.71
altair processBlock - 250000 vs - 7PWei normalcase 8.0613 ms/op 4.4503 ms/op 1.81
altair processBlock - 250000 vs - 7PWei normalcase hashState 50.967 ms/op 33.990 ms/op 1.50
altair processBlock - 250000 vs - 7PWei worstcase 56.469 ms/op 41.465 ms/op 1.36
altair processBlock - 250000 vs - 7PWei worstcase hashState 117.27 ms/op 87.142 ms/op 1.35
phase0 processBlock - 250000 vs - 7PWei normalcase 3.8917 ms/op 2.5004 ms/op 1.56
phase0 processBlock - 250000 vs - 7PWei worstcase 40.310 ms/op 24.714 ms/op 1.63
altair processEth1Data - 250000 vs - 7PWei normalcase 722.13 us/op 347.28 us/op 2.08
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 14.801 us/op 5.6250 us/op 2.63
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 67.878 us/op 35.285 us/op 1.92
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 23.511 us/op 12.647 us/op 1.86
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 14.378 us/op 10.065 us/op 1.43
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 257.66 us/op 143.92 us/op 1.79
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 2.5143 ms/op 1.8403 ms/op 1.37
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 4.2211 ms/op 2.4158 ms/op 1.75
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 4.3505 ms/op 2.3777 ms/op 1.83
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 7.3543 ms/op 4.6069 ms/op 1.60
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 5.1004 ms/op 2.4458 ms/op 2.09
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 7.8399 ms/op 4.7226 ms/op 1.66
Tree 40 250000 create 866.04 ms/op 434.17 ms/op 1.99
Tree 40 250000 get(125000) 166.91 ns/op 145.98 ns/op 1.14
Tree 40 250000 set(125000) 3.4944 us/op 1.5156 us/op 2.31
Tree 40 250000 toArray() 38.390 ms/op 17.959 ms/op 2.14
Tree 40 250000 iterate all - toArray() + loop 28.779 ms/op 15.655 ms/op 1.84
Tree 40 250000 iterate all - get(i) 71.363 ms/op 52.786 ms/op 1.35
Array 250000 create 4.9933 ms/op 3.1955 ms/op 1.56
Array 250000 clone - spread 5.4845 ms/op 1.6214 ms/op 3.38
Array 250000 get(125000) 0.57500 ns/op 0.42200 ns/op 1.36
Array 250000 set(125000) 0.48000 ns/op 0.43700 ns/op 1.10
Array 250000 iterate all - loop 93.884 us/op 106.26 us/op 0.88
phase0 afterProcessEpoch - 250000 vs - 7PWei 47.985 ms/op 42.644 ms/op 1.13
Array.fill - length 1000000 8.9895 ms/op 3.7047 ms/op 2.43
Array push - length 1000000 27.036 ms/op 13.406 ms/op 2.02
Array.get 0.31974 ns/op 0.28208 ns/op 1.13
Uint8Array.get 0.49920 ns/op 0.44912 ns/op 1.11
phase0 beforeProcessEpoch - 250000 vs - 7PWei 23.334 ms/op 16.713 ms/op 1.40
altair processEpoch - mainnet_e81889 332.50 ms/op 268.31 ms/op 1.24
mainnet_e81889 - altair beforeProcessEpoch 20.776 ms/op 16.873 ms/op 1.23
mainnet_e81889 - altair processJustificationAndFinalization 5.9230 us/op 8.4900 us/op 0.70
mainnet_e81889 - altair processInactivityUpdates 6.0022 ms/op 4.3143 ms/op 1.39
mainnet_e81889 - altair processRewardsAndPenalties 49.889 ms/op 36.453 ms/op 1.37
mainnet_e81889 - altair processRegistryUpdates 1.0840 us/op 719.00 ns/op 1.51
mainnet_e81889 - altair processSlashings 193.00 ns/op 189.00 ns/op 1.02
mainnet_e81889 - altair processEth1DataReset 188.00 ns/op 193.00 ns/op 0.97
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4464 ms/op 1.2079 ms/op 1.20
mainnet_e81889 - altair processSlashingsReset 1.0130 us/op 1.2160 us/op 0.83
mainnet_e81889 - altair processRandaoMixesReset 1.4030 us/op 1.1850 us/op 1.18
mainnet_e81889 - altair processHistoricalRootsUpdate 204.00 ns/op 180.00 ns/op 1.13
mainnet_e81889 - altair processParticipationFlagUpdates 587.00 ns/op 726.00 ns/op 0.81
mainnet_e81889 - altair processSyncCommitteeUpdates 152.00 ns/op 142.00 ns/op 1.07
mainnet_e81889 - altair afterProcessEpoch 50.090 ms/op 44.768 ms/op 1.12
capella processEpoch - mainnet_e217614 1.2467 s/op 987.68 ms/op 1.26
mainnet_e217614 - capella beforeProcessEpoch 73.542 ms/op 65.911 ms/op 1.12
mainnet_e217614 - capella processJustificationAndFinalization 8.1810 us/op 6.2210 us/op 1.32
mainnet_e217614 - capella processInactivityUpdates 20.746 ms/op 15.492 ms/op 1.34
mainnet_e217614 - capella processRewardsAndPenalties 223.27 ms/op 198.51 ms/op 1.12
mainnet_e217614 - capella processRegistryUpdates 9.3950 us/op 7.8060 us/op 1.20
mainnet_e217614 - capella processSlashings 241.00 ns/op 194.00 ns/op 1.24
mainnet_e217614 - capella processEth1DataReset 212.00 ns/op 197.00 ns/op 1.08
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.8644 ms/op 12.667 ms/op 0.38
mainnet_e217614 - capella processSlashingsReset 1.5410 us/op 1.1450 us/op 1.35
mainnet_e217614 - capella processRandaoMixesReset 2.5080 us/op 1.3290 us/op 1.89
mainnet_e217614 - capella processHistoricalRootsUpdate 328.00 ns/op 207.00 ns/op 1.58
mainnet_e217614 - capella processParticipationFlagUpdates 730.00 ns/op 597.00 ns/op 1.22
mainnet_e217614 - capella afterProcessEpoch 134.96 ms/op 123.15 ms/op 1.10
phase0 processEpoch - mainnet_e58758 408.56 ms/op 323.84 ms/op 1.26
mainnet_e58758 - phase0 beforeProcessEpoch 113.46 ms/op 87.743 ms/op 1.29
mainnet_e58758 - phase0 processJustificationAndFinalization 9.4250 us/op 6.0800 us/op 1.55
mainnet_e58758 - phase0 processRewardsAndPenalties 48.514 ms/op 47.432 ms/op 1.02
mainnet_e58758 - phase0 processRegistryUpdates 4.2070 us/op 3.4450 us/op 1.22
mainnet_e58758 - phase0 processSlashings 216.00 ns/op 191.00 ns/op 1.13
mainnet_e58758 - phase0 processEth1DataReset 208.00 ns/op 183.00 ns/op 1.14
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 4.5052 ms/op 1.2529 ms/op 3.60
mainnet_e58758 - phase0 processSlashingsReset 1.2140 us/op 994.00 ns/op 1.22
mainnet_e58758 - phase0 processRandaoMixesReset 1.6760 us/op 1.2900 us/op 1.30
mainnet_e58758 - phase0 processHistoricalRootsUpdate 195.00 ns/op 186.00 ns/op 1.05
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.0450 us/op 930.00 ns/op 1.12
mainnet_e58758 - phase0 afterProcessEpoch 40.280 ms/op 36.681 ms/op 1.10
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.4765 ms/op 2.0786 ms/op 0.71
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 3.7864 ms/op 1.9285 ms/op 1.96
altair processInactivityUpdates - 250000 normalcase 23.761 ms/op 23.207 ms/op 1.02
altair processInactivityUpdates - 250000 worstcase 24.687 ms/op 22.532 ms/op 1.10
phase0 processRegistryUpdates - 250000 normalcase 14.992 us/op 6.6840 us/op 2.24
phase0 processRegistryUpdates - 250000 badcase_full_deposits 449.25 us/op 442.83 us/op 1.01
phase0 processRegistryUpdates - 250000 worstcase 0.5 120.79 ms/op 115.31 ms/op 1.05
altair processRewardsAndPenalties - 250000 normalcase 32.230 ms/op 30.355 ms/op 1.06
altair processRewardsAndPenalties - 250000 worstcase 34.528 ms/op 35.201 ms/op 0.98
phase0 getAttestationDeltas - 250000 normalcase 6.9905 ms/op 6.2561 ms/op 1.12
phase0 getAttestationDeltas - 250000 worstcase 18.784 ms/op 6.2566 ms/op 3.00
phase0 processSlashings - 250000 worstcase 124.94 us/op 113.50 us/op 1.10
altair processSyncCommitteeUpdates - 250000 13.092 ms/op 11.605 ms/op 1.13
BeaconState.hashTreeRoot - No change 259.00 ns/op 282.00 ns/op 0.92
BeaconState.hashTreeRoot - 1 full validator 98.386 us/op 79.193 us/op 1.24
BeaconState.hashTreeRoot - 32 full validator 967.51 us/op 936.46 us/op 1.03
BeaconState.hashTreeRoot - 512 full validator 11.151 ms/op 15.390 ms/op 0.72
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 128.26 us/op 113.91 us/op 1.13
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8954 ms/op 1.6997 ms/op 1.12
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 40.451 ms/op 21.352 ms/op 1.89
BeaconState.hashTreeRoot - 1 balances 114.81 us/op 77.269 us/op 1.49
BeaconState.hashTreeRoot - 32 balances 1.0545 ms/op 919.36 us/op 1.15
BeaconState.hashTreeRoot - 512 balances 12.923 ms/op 7.9227 ms/op 1.63
BeaconState.hashTreeRoot - 250000 balances 246.95 ms/op 167.20 ms/op 1.48
aggregationBits - 2048 els - zipIndexesInBitList 30.139 us/op 23.758 us/op 1.27
byteArrayEquals 32 59.735 ns/op 57.849 ns/op 1.03
Buffer.compare 32 23.547 ns/op 19.084 ns/op 1.23
byteArrayEquals 1024 1.7688 us/op 1.7055 us/op 1.04
Buffer.compare 1024 29.199 ns/op 27.968 ns/op 1.04
byteArrayEquals 16384 27.756 us/op 26.990 us/op 1.03
Buffer.compare 16384 225.00 ns/op 228.74 ns/op 0.98
byteArrayEquals 123687377 210.24 ms/op 202.32 ms/op 1.04
Buffer.compare 123687377 10.615 ms/op 7.8139 ms/op 1.36
byteArrayEquals 32 - diff last byte 53.863 ns/op 55.648 ns/op 0.97
Buffer.compare 32 - diff last byte 17.892 ns/op 18.327 ns/op 0.98
byteArrayEquals 1024 - diff last byte 1.6845 us/op 1.6687 us/op 1.01
Buffer.compare 1024 - diff last byte 25.946 ns/op 27.580 ns/op 0.94
byteArrayEquals 16384 - diff last byte 26.960 us/op 26.533 us/op 1.02
Buffer.compare 16384 - diff last byte 210.79 ns/op 214.18 ns/op 0.98
byteArrayEquals 123687377 - diff last byte 205.44 ms/op 201.18 ms/op 1.02
Buffer.compare 123687377 - diff last byte 8.9976 ms/op 7.6169 ms/op 1.18
byteArrayEquals 32 - random bytes 5.4220 ns/op 5.4050 ns/op 1.00
Buffer.compare 32 - random bytes 17.756 ns/op 17.872 ns/op 0.99
byteArrayEquals 1024 - random bytes 5.3180 ns/op 5.3590 ns/op 0.99
Buffer.compare 1024 - random bytes 17.811 ns/op 17.855 ns/op 1.00
byteArrayEquals 16384 - random bytes 5.3530 ns/op 5.3740 ns/op 1.00
Buffer.compare 16384 - random bytes 18.056 ns/op 17.864 ns/op 1.01
byteArrayEquals 123687377 - random bytes 9.2200 ns/op 7.5700 ns/op 1.22
Buffer.compare 123687377 - random bytes 20.680 ns/op 20.710 ns/op 1.00
regular array get 100000 times 46.052 us/op 34.993 us/op 1.32
wrappedArray get 100000 times 46.266 us/op 34.917 us/op 1.33
arrayWithProxy get 100000 times 13.147 ms/op 12.669 ms/op 1.04
ssz.Root.equals 49.609 ns/op 48.650 ns/op 1.02
byteArrayEquals 48.358 ns/op 47.546 ns/op 1.02
Buffer.compare 11.121 ns/op 10.797 ns/op 1.03
processSlot - 1 slots 12.105 us/op 13.221 us/op 0.92
processSlot - 32 slots 2.5702 ms/op 2.5074 ms/op 1.03
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 3.6375 ms/op 3.5942 ms/op 1.01
getCommitteeAssignments - req 1 vs - 250000 vc 2.2405 ms/op 2.2277 ms/op 1.01
getCommitteeAssignments - req 100 vs - 250000 vc 4.4747 ms/op 4.3265 ms/op 1.03
getCommitteeAssignments - req 1000 vs - 250000 vc 4.7221 ms/op 4.6500 ms/op 1.02
findModifiedValidators - 10000 modified validators 790.69 ms/op 815.26 ms/op 0.97
findModifiedValidators - 1000 modified validators 797.32 ms/op 748.85 ms/op 1.06
findModifiedValidators - 100 modified validators 338.42 ms/op 292.12 ms/op 1.16
findModifiedValidators - 10 modified validators 195.59 ms/op 155.08 ms/op 1.26
findModifiedValidators - 1 modified validators 246.41 ms/op 166.88 ms/op 1.48
findModifiedValidators - no difference 307.91 ms/op 221.30 ms/op 1.39
compare ViewDUs 8.4765 s/op 7.0604 s/op 1.20
compare each validator Uint8Array 1.2100 s/op 1.7758 s/op 0.68
compare ViewDU to Uint8Array 1.2527 s/op 1.8616 s/op 0.67
migrate state 1000000 validators, 24 modified, 0 new 994.26 ms/op 1.3016 s/op 0.76
migrate state 1000000 validators, 1700 modified, 1000 new 1.2261 s/op 1.7404 s/op 0.70
migrate state 1000000 validators, 3400 modified, 2000 new 1.4648 s/op 1.7966 s/op 0.82
migrate state 1500000 validators, 24 modified, 0 new 1.0306 s/op 1.0733 s/op 0.96
migrate state 1500000 validators, 1700 modified, 1000 new 1.1965 s/op 1.1817 s/op 1.01
migrate state 1500000 validators, 3400 modified, 2000 new 1.4775 s/op 1.3137 s/op 1.12
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.4500 ns/op 5.3300 ns/op 0.83
state getBlockRootAtSlot - 250000 vs - 7PWei 943.37 ns/op 621.73 ns/op 1.52
naive computeProposerIndex 100000 validators 58.161 ms/op 65.965 ms/op 0.88
computeProposerIndex 100000 validators 1.5444 ms/op 1.6661 ms/op 0.93
naiveGetNextSyncCommitteeIndices 1000 validators 9.0333 s/op 8.1893 s/op 1.10
getNextSyncCommitteeIndices 1000 validators 122.14 ms/op 140.48 ms/op 0.87
naiveGetNextSyncCommitteeIndices 10000 validators 8.0840 s/op 9.7746 s/op 0.83
getNextSyncCommitteeIndices 10000 validators 121.90 ms/op 129.38 ms/op 0.94
naiveGetNextSyncCommitteeIndices 100000 validators 8.1392 s/op 7.6039 s/op 1.07
getNextSyncCommitteeIndices 100000 validators 111.79 ms/op 116.27 ms/op 0.96
naive computeShuffledIndex 100000 validators 21.648 s/op 22.097 s/op 0.98
cached computeShuffledIndex 100000 validators 534.43 ms/op 568.30 ms/op 0.94
naive computeShuffledIndex 2000000 validators 492.71 s/op 494.71 s/op 1.00
cached computeShuffledIndex 2000000 validators 46.424 s/op 31.878 s/op 1.46
computeProposers - vc 250000 637.29 us/op 630.04 us/op 1.01
computeEpochShuffling - vc 250000 43.838 ms/op 42.299 ms/op 1.04
getNextSyncCommittee - vc 250000 12.648 ms/op 10.599 ms/op 1.19
computeSigningRoot for AttestationData 34.959 us/op 19.173 us/op 1.82
hash AttestationData serialized data then Buffer.toString(base64) 1.6910 us/op 1.6002 us/op 1.06
toHexString serialized data 1.3555 us/op 1.1569 us/op 1.17
Buffer.toString(base64) 155.17 ns/op 157.12 ns/op 0.99
nodejs block root to RootHex using toHex 156.23 ns/op 151.10 ns/op 1.03
nodejs block root to RootHex using toRootHex 97.454 ns/op 99.563 ns/op 0.98
nodejs fromhex(blob) 128.35 ms/op 114.65 ms/op 1.12
nodejs fromHexInto(blob) 97.668 ms/op 97.271 ms/op 1.00
browser block root to RootHex using the deprecated toHexString 237.48 ns/op 213.77 ns/op 1.11
browser block root to RootHex using toHex 190.16 ns/op 173.27 ns/op 1.10
browser block root to RootHex using toRootHex 164.83 ns/op 162.15 ns/op 1.02
browser fromHexInto(blob) 867.93 us/op 830.16 us/op 1.05
browser fromHex(blob) 845.02 ms/op 795.25 ms/op 1.06

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 8689cc3 into unstable Sep 25, 2025
37 of 45 checks passed
@wemeetagain wemeetagain deleted the nh/include-src branch September 25, 2025 11:24
@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.

5 participants