chore: use index2pubkey of BeaconChain
Motivation
- once we have
state-transition-z, we're not able to getindex2pubkeyfrom a light view of BeaconState in beacon-node
Description
- in
beacon-node, useindex2pubkeyof BeaconChain instead as a preparation for working withstate-transition-z - it's ok to use
state.epochCtx.index2pubkeyinstate-transitionsince it can access the full state there
part of #8652
Summary of Changes
Hello @twoeths, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request introduces a significant refactoring in how validator public keys (index2pubkey) are accessed throughout the beacon node. The change moves away from retrieving these keys from BeaconStateView instances, which will become incompatible with future native state-transition implementations. Instead, the index2pubkey cache is now passed explicitly as a parameter to many functions responsible for signature verification and other validator-related computations, ensuring forward compatibility and a more robust architecture.
Highlights
-
Motivation for Change: The primary motivation for this change is to prepare for native state-transition, which will prevent direct access to
index2pubkeyfrom aBeaconStateViewwithin the beacon node. -
Refactored Public Key Access: The pull request refactors numerous functions to now directly utilize the
index2pubkeyproperty of theBeaconChaininstance, ensuring consistent access to validator public keys. -
Impact on Signature Verification: This change affects various signature verification processes, including those for blocks, attestations, slashings, and sync committee messages, by passing the
Index2PubkeyCacheexplicitly.
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 :thumbsup: and :thumbsdown: 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.
[^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.
Performance Report
✔️ no performance regression detected
Full benchmark results
| Benchmark suite | Current: f51e1c5ddb2e79859b5ff1f6f00e206967571632 | Previous: 868300d7ae9254ba38324ceab82c7e4ef473185b | Ratio |
|---|---|---|---|
| getPubkeys - index2pubkey - req 1000 vs - 250000 vc | 868.61 us/op | 974.07 us/op | 0.89 |
| getPubkeys - validatorsArr - req 1000 vs - 250000 vc | 34.695 us/op | 40.804 us/op | 0.85 |
| BLS verify - blst | 879.32 us/op | 896.79 us/op | 0.98 |
| BLS verifyMultipleSignatures 3 - blst | 1.2911 ms/op | 1.2306 ms/op | 1.05 |
| BLS verifyMultipleSignatures 8 - blst | 2.2088 ms/op | 2.0514 ms/op | 1.08 |
| BLS verifyMultipleSignatures 32 - blst | 4.4743 ms/op | 4.9825 ms/op | 0.90 |
| BLS verifyMultipleSignatures 64 - blst | 8.3167 ms/op | 10.410 ms/op | 0.80 |
| BLS verifyMultipleSignatures 128 - blst | 15.792 ms/op | 18.627 ms/op | 0.85 |
| BLS deserializing 10000 signatures | 589.88 ms/op | 719.78 ms/op | 0.82 |
| BLS deserializing 100000 signatures | 6.1295 s/op | 7.5437 s/op | 0.81 |
| BLS verifyMultipleSignatures - same message - 3 - blst | 895.36 us/op | 990.26 us/op | 0.90 |
| BLS verifyMultipleSignatures - same message - 8 - blst | 991.19 us/op | 1.1810 ms/op | 0.84 |
| BLS verifyMultipleSignatures - same message - 32 - blst | 1.6735 ms/op | 1.9749 ms/op | 0.85 |
| BLS verifyMultipleSignatures - same message - 64 - blst | 2.5673 ms/op | 3.1756 ms/op | 0.81 |
| BLS verifyMultipleSignatures - same message - 128 - blst | 4.2038 ms/op | 4.8839 ms/op | 0.86 |
| BLS aggregatePubkeys 32 - blst | 17.812 us/op | 20.832 us/op | 0.86 |
| BLS aggregatePubkeys 128 - blst | 63.170 us/op | 75.934 us/op | 0.83 |
| notSeenSlots=1 numMissedVotes=1 numBadVotes=10 | 38.371 ms/op | 52.024 ms/op | 0.74 |
| notSeenSlots=1 numMissedVotes=0 numBadVotes=4 | 34.725 ms/op | 41.879 ms/op | 0.83 |
| notSeenSlots=2 numMissedVotes=1 numBadVotes=10 | 30.216 ms/op | 33.907 ms/op | 0.89 |
| getSlashingsAndExits - default max | 47.847 us/op | 73.744 us/op | 0.65 |
| getSlashingsAndExits - 2k | 344.89 us/op | 387.32 us/op | 0.89 |
| isKnown best case - 1 super set check | 405.00 ns/op | 208.00 ns/op | 1.95 |
| isKnown normal case - 2 super set checks | 400.00 ns/op | 199.00 ns/op | 2.01 |
| isKnown worse case - 16 super set checks | 404.00 ns/op | 205.00 ns/op | 1.97 |
| InMemoryCheckpointStateCache - add get delete | 2.4730 us/op | 2.5290 us/op | 0.98 |
| validate api signedAggregateAndProof - struct | 1.4638 ms/op | 1.8961 ms/op | 0.77 |
| validate gossip signedAggregateAndProof - struct | 1.4517 ms/op | 1.8538 ms/op | 0.78 |
| batch validate gossip attestation - vc 640000 - chunk 32 | 109.39 us/op | 176.84 us/op | 0.62 |
| batch validate gossip attestation - vc 640000 - chunk 64 | 106.78 us/op | 141.96 us/op | 0.75 |
| batch validate gossip attestation - vc 640000 - chunk 128 | 83.503 us/op | 114.10 us/op | 0.73 |
| batch validate gossip attestation - vc 640000 - chunk 256 | 78.492 us/op | 112.19 us/op | 0.70 |
| pickEth1Vote - no votes | 735.51 us/op | 1.0903 ms/op | 0.67 |
| pickEth1Vote - max votes | 5.3243 ms/op | 7.5165 ms/op | 0.71 |
| pickEth1Vote - Eth1Data hashTreeRoot value x2048 | 7.8030 ms/op | 14.901 ms/op | 0.52 |
| pickEth1Vote - Eth1Data hashTreeRoot tree x2048 | 10.652 ms/op | 20.856 ms/op | 0.51 |
| pickEth1Vote - Eth1Data fastSerialize value x2048 | 326.17 us/op | 443.40 us/op | 0.74 |
| pickEth1Vote - Eth1Data fastSerialize tree x2048 | 2.6514 ms/op | 4.1569 ms/op | 0.64 |
| bytes32 toHexString | 557.00 ns/op | 392.00 ns/op | 1.42 |
| bytes32 Buffer.toString(hex) | 390.00 ns/op | 301.00 ns/op | 1.30 |
| bytes32 Buffer.toString(hex) from Uint8Array | 476.00 ns/op | 423.00 ns/op | 1.13 |
| bytes32 Buffer.toString(hex) + 0x | 400.00 ns/op | 245.00 ns/op | 1.63 |
| Object access 1 prop | 0.29200 ns/op | 0.12400 ns/op | 2.35 |
| Map access 1 prop | 0.30000 ns/op | 0.12600 ns/op | 2.38 |
| Object get x1000 | 4.8660 ns/op | 5.7450 ns/op | 0.85 |
| Map get x1000 | 0.51900 ns/op | 0.38200 ns/op | 1.36 |
| Object set x1000 | 19.639 ns/op | 31.164 ns/op | 0.63 |
| Map set x1000 | 16.300 ns/op | 23.029 ns/op | 0.71 |
| Return object 10000 times | 0.22270 ns/op | 0.30380 ns/op | 0.73 |
| Throw Error 10000 times | 3.0858 us/op | 4.3522 us/op | 0.71 |
| toHex | 90.350 ns/op | 151.54 ns/op | 0.60 |
| Buffer.from | 94.983 ns/op | 134.67 ns/op | 0.71 |
| shared Buffer | 66.685 ns/op | 83.862 ns/op | 0.80 |
| fastMsgIdFn sha256 / 200 bytes | 1.7390 us/op | 2.0230 us/op | 0.86 |
| fastMsgIdFn h32 xxhash / 200 bytes | 359.00 ns/op | 199.00 ns/op | 1.80 |
| fastMsgIdFn h64 xxhash / 200 bytes | 419.00 ns/op | 268.00 ns/op | 1.56 |
| fastMsgIdFn sha256 / 1000 bytes | 5.0180 us/op | 6.4370 us/op | 0.78 |
| fastMsgIdFn h32 xxhash / 1000 bytes | 451.00 ns/op | 302.00 ns/op | 1.49 |
| fastMsgIdFn h64 xxhash / 1000 bytes | 467.00 ns/op | 328.00 ns/op | 1.42 |
| fastMsgIdFn sha256 / 10000 bytes | 39.693 us/op | 59.614 us/op | 0.67 |
| fastMsgIdFn h32 xxhash / 10000 bytes | 1.4260 us/op | 1.5070 us/op | 0.95 |
| fastMsgIdFn h64 xxhash / 10000 bytes | 1.0160 us/op | 982.00 ns/op | 1.03 |
| 100 bytes - compress - snappyjs | 1.6399 us/op | 1.5222 us/op | 1.08 |
| 100 bytes - compress - snappy | 952.05 ns/op | 1.3071 us/op | 0.73 |
| 100 bytes - compress - snappy-wasm | 547.33 ns/op | ||
| 100 bytes - compress - snappy-wasm - prealloc | 1.3378 us/op | ||
| 200 bytes - compress - snappyjs | 1.9181 us/op | 1.6695 us/op | 1.15 |
| 200 bytes - compress - snappy | 1.5529 us/op | 1.6909 us/op | 0.92 |
| 200 bytes - compress - snappy-wasm | 749.76 ns/op | ||
| 200 bytes - compress - snappy-wasm - prealloc | 1.8044 us/op | ||
| 300 bytes - compress - snappyjs | 1.9872 us/op | 2.9379 us/op | 0.68 |
| 300 bytes - compress - snappy | 2.1617 us/op | 1.9799 us/op | 1.09 |
| 300 bytes - compress - snappy-wasm | 766.40 ns/op | ||
| 300 bytes - compress - snappy-wasm - prealloc | 1.8652 us/op | ||
| 400 bytes - compress - snappyjs | 2.6249 us/op | 2.3396 us/op | 1.12 |
| 400 bytes - compress - snappy | 1.1256 us/op | 2.1813 us/op | 0.52 |
| 400 bytes - compress - snappy-wasm | 706.09 ns/op | ||
| 400 bytes - compress - snappy-wasm - prealloc | 1.8392 us/op | ||
| 500 bytes - compress - snappyjs | 2.1660 us/op | 3.0889 us/op | 0.70 |
| 500 bytes - compress - snappy | 1.1643 us/op | 2.3588 us/op | 0.49 |
| 500 bytes - compress - snappy-wasm | 728.60 ns/op | ||
| 500 bytes - compress - snappy-wasm - prealloc | 1.1830 us/op | ||
| 1000 bytes - compress - snappyjs | 4.3454 us/op | 4.5526 us/op | 0.95 |
| 1000 bytes - compress - snappy | 1.4767 us/op | 3.0277 us/op | 0.49 |
| 1000 bytes - compress - snappy-wasm | 1.5773 us/op | ||
| 1000 bytes - compress - snappy-wasm - prealloc | 1.8880 us/op | ||
| 10000 bytes - compress - snappyjs | 24.291 us/op | 29.231 us/op | 0.83 |
| 10000 bytes - compress - snappy | 27.887 us/op | 16.910 us/op | 1.65 |
| 10000 bytes - compress - snappy-wasm | 16.573 us/op | ||
| 10000 bytes - compress - snappy-wasm - prealloc | 23.833 us/op | ||
| 100 bytes - uncompress - snappyjs | 593.54 ns/op | 801.89 ns/op | 0.74 |
| 100 bytes - uncompress - snappy | 888.57 ns/op | 1.5166 us/op | 0.59 |
| 100 bytes - uncompress - snappy-wasm | 579.68 ns/op | ||
| 100 bytes - uncompress - snappy-wasm - prealloc | 713.00 ns/op | ||
| 200 bytes - uncompress - snappyjs | 750.91 ns/op | 1.3935 us/op | 0.54 |
| 200 bytes - uncompress - snappy | 989.47 ns/op | 1.8058 us/op | 0.55 |
| 200 bytes - uncompress - snappy-wasm | 1.1291 us/op | ||
| 200 bytes - uncompress - snappy-wasm - prealloc | 1.5648 us/op | ||
| 300 bytes - uncompress - snappyjs | 825.02 ns/op | 1.2181 us/op | 0.68 |
| 300 bytes - uncompress - snappy | 1.1875 us/op | 1.5073 us/op | 0.79 |
| 300 bytes - uncompress - snappy-wasm | 926.10 ns/op | ||
| 300 bytes - uncompress - snappy-wasm - prealloc | 1.1978 us/op | ||
| 400 bytes - uncompress - snappyjs | 1.0190 us/op | 1.6135 us/op | 0.63 |
| 400 bytes - uncompress - snappy | 2.7887 us/op | 1.5895 us/op | 1.75 |
| 400 bytes - uncompress - snappy-wasm | 1.0278 us/op | ||
| 400 bytes - uncompress - snappy-wasm - prealloc | 1.3008 us/op | ||
| 500 bytes - uncompress - snappyjs | 2.3842 us/op | 1.8898 us/op | 1.26 |
| 500 bytes - uncompress - snappy | 1.0656 us/op | 2.1996 us/op | 0.48 |
| 500 bytes - uncompress - snappy-wasm | 720.63 ns/op | ||
| 500 bytes - uncompress - snappy-wasm - prealloc | 1.5244 us/op | ||
| 1000 bytes - uncompress - snappyjs | 2.3578 us/op | 2.4049 us/op | 0.98 |
| 1000 bytes - uncompress - snappy | 1.4289 us/op | 1.8319 us/op | 0.78 |
| 1000 bytes - uncompress - snappy-wasm | 874.35 ns/op | ||
| 1000 bytes - uncompress - snappy-wasm - prealloc | 1.3981 us/op | ||
| 10000 bytes - uncompress - snappyjs | 24.983 us/op | 24.660 us/op | 1.01 |
| 10000 bytes - uncompress - snappy | 30.598 us/op | 24.359 us/op | 1.26 |
| 10000 bytes - uncompress - snappy-wasm | 27.489 us/op | ||
| 10000 bytes - uncompress - snappy-wasm - prealloc | 26.785 us/op | ||
| send data - 1000 256B messages | 11.088 ms/op | 23.406 ms/op | 0.47 |
| send data - 1000 512B messages | 13.636 ms/op | 24.129 ms/op | 0.57 |
| send data - 1000 1024B messages | 19.196 ms/op | 29.586 ms/op | 0.65 |
| send data - 1000 1200B messages | 18.838 ms/op | 36.139 ms/op | 0.52 |
| send data - 1000 2048B messages | 20.085 ms/op | 33.882 ms/op | 0.59 |
| send data - 1000 4096B messages | 22.528 ms/op | 41.431 ms/op | 0.54 |
| send data - 1000 16384B messages | 125.91 ms/op | 161.10 ms/op | 0.78 |
| send data - 1000 65536B messages | 243.95 ms/op | 663.87 ms/op | 0.37 |
| enrSubnets - fastDeserialize 64 bits | 961.00 ns/op | 960.00 ns/op | 1.00 |
| enrSubnets - ssz BitVector 64 bits | 504.00 ns/op | 364.00 ns/op | 1.38 |
| enrSubnets - fastDeserialize 4 bits | 316.00 ns/op | 142.00 ns/op | 2.23 |
| enrSubnets - ssz BitVector 4 bits | 697.00 ns/op | 367.00 ns/op | 1.90 |
| prioritizePeers score -10:0 att 32-0.1 sync 2-0 | 215.72 us/op | 262.09 us/op | 0.82 |
| prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 | 244.99 us/op | 303.57 us/op | 0.81 |
| prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 | 342.24 us/op | 420.48 us/op | 0.81 |
| prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 | 663.03 us/op | 900.93 us/op | 0.74 |
| prioritizePeers score 0:0 att 64-1 sync 4-1 | 749.56 us/op | 894.17 us/op | 0.84 |
| array of 16000 items push then shift | 1.2799 us/op | 1.7795 us/op | 0.72 |
| LinkedList of 16000 items push then shift | 7.2430 ns/op | 8.1070 ns/op | 0.89 |
| array of 16000 items push then pop | 64.773 ns/op | 84.752 ns/op | 0.76 |
| LinkedList of 16000 items push then pop | 6.2510 ns/op | 7.8070 ns/op | 0.80 |
| array of 24000 items push then shift | 1.8919 us/op | 2.5672 us/op | 0.74 |
| LinkedList of 24000 items push then shift | 6.9980 ns/op | 8.6200 ns/op | 0.81 |
| array of 24000 items push then pop | 90.228 ns/op | 115.58 ns/op | 0.78 |
| LinkedList of 24000 items push then pop | 6.2950 ns/op | 7.8020 ns/op | 0.81 |
| intersect bitArray bitLen 8 | 4.8720 ns/op | 6.1720 ns/op | 0.79 |
| intersect array and set length 8 | 29.671 ns/op | 38.820 ns/op | 0.76 |
| intersect bitArray bitLen 128 | 26.072 ns/op | 30.329 ns/op | 0.86 |
| intersect array and set length 128 | 492.71 ns/op | 618.77 ns/op | 0.80 |
| bitArray.getTrueBitIndexes() bitLen 128 | 1.1930 us/op | 1.2580 us/op | 0.95 |
| bitArray.getTrueBitIndexes() bitLen 248 | 1.9460 us/op | 2.0640 us/op | 0.94 |
| bitArray.getTrueBitIndexes() bitLen 512 | 3.6460 us/op | 4.1470 us/op | 0.88 |
| Full columns - reconstruct all 6 blobs | 307.10 us/op | 392.04 us/op | 0.78 |
| Full columns - reconstruct half of the blobs out of 6 | 96.686 us/op | 158.43 us/op | 0.61 |
| Full columns - reconstruct single blob out of 6 | 37.319 us/op | 50.643 us/op | 0.74 |
| Half columns - reconstruct all 6 blobs | 234.11 ms/op | 300.98 ms/op | 0.78 |
| Half columns - reconstruct half of the blobs out of 6 | 118.15 ms/op | 167.97 ms/op | 0.70 |
| Half columns - reconstruct single blob out of 6 | 44.814 ms/op | 55.349 ms/op | 0.81 |
| Full columns - reconstruct all 10 blobs | 246.33 us/op | 419.81 us/op | 0.59 |
| Full columns - reconstruct half of the blobs out of 10 | 145.12 us/op | 194.04 us/op | 0.75 |
| Full columns - reconstruct single blob out of 10 | 28.728 us/op | 53.704 us/op | 0.53 |
| Half columns - reconstruct all 10 blobs | 388.64 ms/op | 506.52 ms/op | 0.77 |
| Half columns - reconstruct half of the blobs out of 10 | 198.99 ms/op | 274.00 ms/op | 0.73 |
| Half columns - reconstruct single blob out of 10 | 44.852 ms/op | 54.769 ms/op | 0.82 |
| Full columns - reconstruct all 20 blobs | 774.99 us/op | 1.4152 ms/op | 0.55 |
| Full columns - reconstruct half of the blobs out of 20 | 290.41 us/op | 527.24 us/op | 0.55 |
| Full columns - reconstruct single blob out of 20 | 28.655 us/op | 33.405 us/op | 0.86 |
| Half columns - reconstruct all 20 blobs | 780.32 ms/op | 971.51 ms/op | 0.80 |
| Half columns - reconstruct half of the blobs out of 20 | 389.24 ms/op | 512.16 ms/op | 0.76 |
| Half columns - reconstruct single blob out of 20 | 43.958 ms/op | 61.888 ms/op | 0.71 |
| Set add up to 64 items then delete first | 1.5108 us/op | 3.2494 us/op | 0.46 |
| OrderedSet add up to 64 items then delete first | 2.5062 us/op | 4.2914 us/op | 0.58 |
| Set add up to 64 items then delete last | 1.8980 us/op | 3.0497 us/op | 0.62 |
| OrderedSet add up to 64 items then delete last | 2.8311 us/op | 4.3118 us/op | 0.66 |
| Set add up to 64 items then delete middle | 1.8087 us/op | 3.0645 us/op | 0.59 |
| OrderedSet add up to 64 items then delete middle | 4.3302 us/op | 6.1575 us/op | 0.70 |
| Set add up to 128 items then delete first | 3.7123 us/op | 6.1276 us/op | 0.61 |
| OrderedSet add up to 128 items then delete first | 5.6118 us/op | 8.0762 us/op | 0.69 |
| Set add up to 128 items then delete last | 4.0114 us/op | 5.3681 us/op | 0.75 |
| OrderedSet add up to 128 items then delete last | 5.6958 us/op | 8.5711 us/op | 0.66 |
| Set add up to 128 items then delete middle | 3.6643 us/op | 6.4321 us/op | 0.57 |
| OrderedSet add up to 128 items then delete middle | 12.088 us/op | 16.912 us/op | 0.71 |
| Set add up to 256 items then delete first | 7.0135 us/op | 12.634 us/op | 0.56 |
| OrderedSet add up to 256 items then delete first | 11.256 us/op | 16.798 us/op | 0.67 |
| Set add up to 256 items then delete last | 6.9369 us/op | 13.512 us/op | 0.51 |
| OrderedSet add up to 256 items then delete last | 11.528 us/op | 19.982 us/op | 0.58 |
| Set add up to 256 items then delete middle | 7.4317 us/op | 12.480 us/op | 0.60 |
| OrderedSet add up to 256 items then delete middle | 35.099 us/op | 50.877 us/op | 0.69 |
| pass gossip attestations to forkchoice per slot | 2.0911 ms/op | 3.0687 ms/op | 0.68 |
| forkChoice updateHead vc 100000 bc 64 eq 0 | 368.89 us/op | 565.46 us/op | 0.65 |
| forkChoice updateHead vc 600000 bc 64 eq 0 | 2.5880 ms/op | 2.9686 ms/op | 0.87 |
| forkChoice updateHead vc 1000000 bc 64 eq 0 | 3.7175 ms/op | 5.2358 ms/op | 0.71 |
| forkChoice updateHead vc 600000 bc 320 eq 0 | 2.2439 ms/op | 3.2169 ms/op | 0.70 |
| forkChoice updateHead vc 600000 bc 1200 eq 0 | 2.2240 ms/op | 3.3019 ms/op | 0.67 |
| forkChoice updateHead vc 600000 bc 7200 eq 0 | 2.4537 ms/op | 4.4906 ms/op | 0.55 |
| forkChoice updateHead vc 600000 bc 64 eq 1000 | 2.6871 ms/op | 3.7414 ms/op | 0.72 |
| forkChoice updateHead vc 600000 bc 64 eq 10000 | 2.8167 ms/op | 3.8391 ms/op | 0.73 |
| forkChoice updateHead vc 600000 bc 64 eq 300000 | 7.3448 ms/op | 10.375 ms/op | 0.71 |
| computeDeltas 1400000 validators 0% inactive | 11.868 ms/op | 15.644 ms/op | 0.76 |
| computeDeltas 1400000 validators 10% inactive | 11.028 ms/op | 15.077 ms/op | 0.73 |
| computeDeltas 1400000 validators 20% inactive | 10.246 ms/op | 13.367 ms/op | 0.77 |
| computeDeltas 1400000 validators 50% inactive | 7.6513 ms/op | 10.514 ms/op | 0.73 |
| computeDeltas 2100000 validators 0% inactive | 18.356 ms/op | 23.128 ms/op | 0.79 |
| computeDeltas 2100000 validators 10% inactive | 17.051 ms/op | 22.432 ms/op | 0.76 |
| computeDeltas 2100000 validators 20% inactive | 15.420 ms/op | 19.812 ms/op | 0.78 |
| computeDeltas 2100000 validators 50% inactive | 11.778 ms/op | 15.963 ms/op | 0.74 |
| altair processAttestation - 250000 vs - 7PWei normalcase | 1.7215 ms/op | 2.7661 ms/op | 0.62 |
| altair processAttestation - 250000 vs - 7PWei worstcase | 2.5113 ms/op | 3.7183 ms/op | 0.68 |
| altair processAttestation - setStatus - 1/6 committees join | 100.69 us/op | 128.56 us/op | 0.78 |
| altair processAttestation - setStatus - 1/3 committees join | 174.50 us/op | 251.30 us/op | 0.69 |
| altair processAttestation - setStatus - 1/2 committees join | 250.97 us/op | 349.64 us/op | 0.72 |
| altair processAttestation - setStatus - 2/3 committees join | 341.70 us/op | 449.57 us/op | 0.76 |
| altair processAttestation - setStatus - 4/5 committees join | 482.37 us/op | 619.46 us/op | 0.78 |
| altair processAttestation - setStatus - 100% committees join | 550.62 us/op | 736.90 us/op | 0.75 |
| altair processBlock - 250000 vs - 7PWei normalcase | 7.2276 ms/op | 5.1418 ms/op | 1.41 |
| altair processBlock - 250000 vs - 7PWei normalcase hashState | 39.179 ms/op | 28.248 ms/op | 1.39 |
| altair processBlock - 250000 vs - 7PWei worstcase | 32.605 ms/op | 28.960 ms/op | 1.13 |
| altair processBlock - 250000 vs - 7PWei worstcase hashState | 68.239 ms/op | 66.063 ms/op | 1.03 |
| phase0 processBlock - 250000 vs - 7PWei normalcase | 1.7077 ms/op | 1.7601 ms/op | 0.97 |
| phase0 processBlock - 250000 vs - 7PWei worstcase | 23.232 ms/op | 25.750 ms/op | 0.90 |
| altair processEth1Data - 250000 vs - 7PWei normalcase | 284.75 us/op | 414.07 us/op | 0.69 |
| getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 | 9.7400 us/op | 12.284 us/op | 0.79 |
| getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 | 39.953 us/op | 62.391 us/op | 0.64 |
| getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 | 9.9580 us/op | 20.392 us/op | 0.49 |
| getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 | 9.4200 us/op | 11.833 us/op | 0.80 |
| getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 | 164.68 us/op | 245.13 us/op | 0.67 |
| getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 | 1.4771 ms/op | 2.1417 ms/op | 0.69 |
| getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 | 1.9251 ms/op | 3.2349 ms/op | 0.60 |
| getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 | 1.8942 ms/op | 2.7196 ms/op | 0.70 |
| getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 | 4.0514 ms/op | 6.1572 ms/op | 0.66 |
| getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 | 1.9925 ms/op | 2.8645 ms/op | 0.70 |
| getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 | 3.9265 ms/op | 6.2035 ms/op | 0.63 |
| Tree 40 250000 create | 313.12 ms/op | 407.60 ms/op | 0.77 |
| Tree 40 250000 get(125000) | 87.917 ns/op | 131.18 ns/op | 0.67 |
| Tree 40 250000 set(125000) | 979.24 ns/op | 1.3287 us/op | 0.74 |
| Tree 40 250000 toArray() | 15.826 ms/op | 19.267 ms/op | 0.82 |
| Tree 40 250000 iterate all - toArray() + loop | 13.031 ms/op | 20.027 ms/op | 0.65 |
| Tree 40 250000 iterate all - get(i) | 36.545 ms/op | 49.797 ms/op | 0.73 |
| Array 250000 create | 2.1851 ms/op | 2.7338 ms/op | 0.80 |
| Array 250000 clone - spread | 663.70 us/op | 917.19 us/op | 0.72 |
| Array 250000 get(125000) | 0.50100 ns/op | 0.36500 ns/op | 1.37 |
| Array 250000 set(125000) | 0.50500 ns/op | 0.36800 ns/op | 1.37 |
| Array 250000 iterate all - loop | 55.290 us/op | 63.585 us/op | 0.87 |
| phase0 afterProcessEpoch - 250000 vs - 7PWei | 37.085 ms/op | 43.951 ms/op | 0.84 |
| Array.fill - length 1000000 | 2.0243 ms/op | 3.3421 ms/op | 0.61 |
| Array push - length 1000000 | 8.4909 ms/op | 13.843 ms/op | 0.61 |
| Array.get | 0.20093 ns/op | 0.23491 ns/op | 0.86 |
| Uint8Array.get | 0.20003 ns/op | 0.24768 ns/op | 0.81 |
| phase0 beforeProcessEpoch - 250000 vs - 7PWei | 17.158 ms/op | 21.080 ms/op | 0.81 |
| altair processEpoch - mainnet_e81889 | 203.36 ms/op | 295.45 ms/op | 0.69 |
| mainnet_e81889 - altair beforeProcessEpoch | 15.050 ms/op | 24.144 ms/op | 0.62 |
| mainnet_e81889 - altair processJustificationAndFinalization | 5.0900 us/op | 5.9870 us/op | 0.85 |
| mainnet_e81889 - altair processInactivityUpdates | 3.1418 ms/op | 4.1913 ms/op | 0.75 |
| mainnet_e81889 - altair processRewardsAndPenalties | 16.876 ms/op | 20.894 ms/op | 0.81 |
| mainnet_e81889 - altair processRegistryUpdates | 978.00 ns/op | 703.00 ns/op | 1.39 |
| mainnet_e81889 - altair processSlashings | 378.00 ns/op | 188.00 ns/op | 2.01 |
| mainnet_e81889 - altair processEth1DataReset | 376.00 ns/op | 181.00 ns/op | 2.08 |
| mainnet_e81889 - altair processEffectiveBalanceUpdates | 1.6934 ms/op | 7.2064 ms/op | 0.23 |
| mainnet_e81889 - altair processSlashingsReset | 938.00 ns/op | 874.00 ns/op | 1.07 |
| mainnet_e81889 - altair processRandaoMixesReset | 1.3790 us/op | 1.1440 us/op | 1.21 |
| mainnet_e81889 - altair processHistoricalRootsUpdate | 369.00 ns/op | 189.00 ns/op | 1.95 |
| mainnet_e81889 - altair processParticipationFlagUpdates | 667.00 ns/op | 641.00 ns/op | 1.04 |
| mainnet_e81889 - altair processSyncCommitteeUpdates | 338.00 ns/op | 153.00 ns/op | 2.21 |
| mainnet_e81889 - altair afterProcessEpoch | 40.233 ms/op | 47.667 ms/op | 0.84 |
| capella processEpoch - mainnet_e217614 | 810.72 ms/op | 850.21 ms/op | 0.95 |
| mainnet_e217614 - capella beforeProcessEpoch | 54.366 ms/op | 95.289 ms/op | 0.57 |
| mainnet_e217614 - capella processJustificationAndFinalization | 5.3900 us/op | 5.8580 us/op | 0.92 |
| mainnet_e217614 - capella processInactivityUpdates | 11.107 ms/op | 22.729 ms/op | 0.49 |
| mainnet_e217614 - capella processRewardsAndPenalties | 105.38 ms/op | 118.55 ms/op | 0.89 |
| mainnet_e217614 - capella processRegistryUpdates | 5.0070 us/op | 8.2340 us/op | 0.61 |
| mainnet_e217614 - capella processSlashings | 379.00 ns/op | 171.00 ns/op | 2.22 |
| mainnet_e217614 - capella processEth1DataReset | 359.00 ns/op | 174.00 ns/op | 2.06 |
| mainnet_e217614 - capella processEffectiveBalanceUpdates | 25.947 ms/op | 16.721 ms/op | 1.55 |
| mainnet_e217614 - capella processSlashingsReset | 1.0370 us/op | 843.00 ns/op | 1.23 |
| mainnet_e217614 - capella processRandaoMixesReset | 1.5020 us/op | 1.1950 us/op | 1.26 |
| mainnet_e217614 - capella processHistoricalRootsUpdate | 375.00 ns/op | 176.00 ns/op | 2.13 |
| mainnet_e217614 - capella processParticipationFlagUpdates | 807.00 ns/op | 536.00 ns/op | 1.51 |
| mainnet_e217614 - capella afterProcessEpoch | 105.35 ms/op | 119.99 ms/op | 0.88 |
| phase0 processEpoch - mainnet_e58758 | 241.91 ms/op | 254.53 ms/op | 0.95 |
| mainnet_e58758 - phase0 beforeProcessEpoch | 67.168 ms/op | 59.868 ms/op | 1.12 |
| mainnet_e58758 - phase0 processJustificationAndFinalization | 6.3860 us/op | 5.7140 us/op | 1.12 |
| mainnet_e58758 - phase0 processRewardsAndPenalties | 19.119 ms/op | 19.684 ms/op | 0.97 |
| mainnet_e58758 - phase0 processRegistryUpdates | 2.7580 us/op | 3.1610 us/op | 0.87 |
| mainnet_e58758 - phase0 processSlashings | 395.00 ns/op | 212.00 ns/op | 1.86 |
| mainnet_e58758 - phase0 processEth1DataReset | 384.00 ns/op | 167.00 ns/op | 2.30 |
| mainnet_e58758 - phase0 processEffectiveBalanceUpdates | 5.7413 ms/op | 1.0085 ms/op | 5.69 |
| mainnet_e58758 - phase0 processSlashingsReset | 1.2380 us/op | 935.00 ns/op | 1.32 |
| mainnet_e58758 - phase0 processRandaoMixesReset | 1.2810 us/op | 1.0940 us/op | 1.17 |
| mainnet_e58758 - phase0 processHistoricalRootsUpdate | 378.00 ns/op | 185.00 ns/op | 2.04 |
| mainnet_e58758 - phase0 processParticipationRecordUpdates | 1.4930 us/op | 850.00 ns/op | 1.76 |
| mainnet_e58758 - phase0 afterProcessEpoch | 33.563 ms/op | 37.110 ms/op | 0.90 |
| phase0 processEffectiveBalanceUpdates - 250000 normalcase | 1.3850 ms/op | 1.7434 ms/op | 0.79 |
| phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 | 5.7690 ms/op | 2.1424 ms/op | 2.69 |
| altair processInactivityUpdates - 250000 normalcase | 15.716 ms/op | 15.723 ms/op | 1.00 |
| altair processInactivityUpdates - 250000 worstcase | 15.453 ms/op | 16.077 ms/op | 0.96 |
| phase0 processRegistryUpdates - 250000 normalcase | 15.890 us/op | 7.3490 us/op | 2.16 |
| phase0 processRegistryUpdates - 250000 badcase_full_deposits | 333.35 us/op | 323.01 us/op | 1.03 |
| phase0 processRegistryUpdates - 250000 worstcase 0.5 | 71.472 ms/op | 93.059 ms/op | 0.77 |
| altair processRewardsAndPenalties - 250000 normalcase | 16.131 ms/op | 17.419 ms/op | 0.93 |
| altair processRewardsAndPenalties - 250000 worstcase | 20.538 ms/op | 17.195 ms/op | 1.19 |
| phase0 getAttestationDeltas - 250000 normalcase | 5.7503 ms/op | 7.2499 ms/op | 0.79 |
| phase0 getAttestationDeltas - 250000 worstcase | 5.7585 ms/op | 7.2913 ms/op | 0.79 |
| phase0 processSlashings - 250000 worstcase | 66.381 us/op | 111.78 us/op | 0.59 |
| altair processSyncCommitteeUpdates - 250000 | 10.927 ms/op | 12.567 ms/op | 0.87 |
| BeaconState.hashTreeRoot - No change | 423.00 ns/op | 248.00 ns/op | 1.71 |
| BeaconState.hashTreeRoot - 1 full validator | 112.61 us/op | 95.719 us/op | 1.18 |
| BeaconState.hashTreeRoot - 32 full validator | 810.23 us/op | 1.1086 ms/op | 0.73 |
| BeaconState.hashTreeRoot - 512 full validator | 11.681 ms/op | 9.5847 ms/op | 1.22 |
| BeaconState.hashTreeRoot - 1 validator.effectiveBalance | 106.28 us/op | 128.42 us/op | 0.83 |
| BeaconState.hashTreeRoot - 32 validator.effectiveBalance | 2.2806 ms/op | 1.8834 ms/op | 1.21 |
| BeaconState.hashTreeRoot - 512 validator.effectiveBalance | 20.729 ms/op | 22.232 ms/op | 0.93 |
| BeaconState.hashTreeRoot - 1 balances | 127.40 us/op | 98.458 us/op | 1.29 |
| BeaconState.hashTreeRoot - 32 balances | 1.0537 ms/op | 947.46 us/op | 1.11 |
| BeaconState.hashTreeRoot - 512 balances | 6.1693 ms/op | 7.2094 ms/op | 0.86 |
| BeaconState.hashTreeRoot - 250000 balances | 137.16 ms/op | 154.81 ms/op | 0.89 |
| aggregationBits - 2048 els - zipIndexesInBitList | 31.242 us/op | 25.218 us/op | 1.24 |
| regular array get 100000 times | 24.333 us/op | 27.868 us/op | 0.87 |
| wrappedArray get 100000 times | 23.131 us/op | 27.895 us/op | 0.83 |
| arrayWithProxy get 100000 times | 9.8113 ms/op | 16.648 ms/op | 0.59 |
| ssz.Root.equals | 21.743 ns/op | 27.734 ns/op | 0.78 |
| byteArrayEquals | 23.322 ns/op | 26.712 ns/op | 0.87 |
| Buffer.compare | 9.0600 ns/op | 11.322 ns/op | 0.80 |
| processSlot - 1 slots | 11.253 us/op | 13.215 us/op | 0.85 |
| processSlot - 32 slots | 2.2193 ms/op | 2.8100 ms/op | 0.79 |
| getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei | 7.9934 ms/op | 4.3326 ms/op | 1.84 |
| getCommitteeAssignments - req 1 vs - 250000 vc | 1.7973 ms/op | 1.9251 ms/op | 0.93 |
| getCommitteeAssignments - req 100 vs - 250000 vc | 3.4342 ms/op | 3.7767 ms/op | 0.91 |
| getCommitteeAssignments - req 1000 vs - 250000 vc | 3.9634 ms/op | 4.0307 ms/op | 0.98 |
| findModifiedValidators - 10000 modified validators | 639.24 ms/op | 633.30 ms/op | 1.01 |
| findModifiedValidators - 1000 modified validators | 444.21 ms/op | 465.17 ms/op | 0.95 |
| findModifiedValidators - 100 modified validators | 357.47 ms/op | 282.04 ms/op | 1.27 |
| findModifiedValidators - 10 modified validators | 246.42 ms/op | 256.62 ms/op | 0.96 |
| findModifiedValidators - 1 modified validators | 205.00 ms/op | 231.94 ms/op | 0.88 |
| findModifiedValidators - no difference | 185.57 ms/op | 207.87 ms/op | 0.89 |
| migrate state 1500000 validators, 3400 modified, 2000 new | 1.2211 s/op | 1.1532 s/op | 1.06 |
| RootCache.getBlockRootAtSlot - 250000 vs - 7PWei | 6.0500 ns/op | 4.2600 ns/op | 1.42 |
| state getBlockRootAtSlot - 250000 vs - 7PWei | 553.63 ns/op | 535.65 ns/op | 1.03 |
| computeProposerIndex 100000 validators | 1.4808 ms/op | 1.5973 ms/op | 0.93 |
| getNextSyncCommitteeIndices 1000 validators | 147.39 ms/op | 121.64 ms/op | 1.21 |
| getNextSyncCommitteeIndices 10000 validators | 134.27 ms/op | 121.65 ms/op | 1.10 |
| getNextSyncCommitteeIndices 100000 validators | 139.32 ms/op | 124.47 ms/op | 1.12 |
| computeProposers - vc 250000 | 620.98 us/op | 657.39 us/op | 0.94 |
| computeEpochShuffling - vc 250000 | 63.833 ms/op | 46.962 ms/op | 1.36 |
| getNextSyncCommittee - vc 250000 | 10.295 ms/op | 10.896 ms/op | 0.94 |
| nodejs block root to RootHex using toHex | 113.09 ns/op | 158.21 ns/op | 0.71 |
| nodejs block root to RootHex using toRootHex | 73.609 ns/op | 98.660 ns/op | 0.75 |
| nodejs fromHex(blob) | 450.58 us/op | 226.43 us/op | 1.99 |
| nodejs fromHexInto(blob) | 622.49 us/op | 769.54 us/op | 0.81 |
| nodejs block root to RootHex using the deprecated toHexString | 388.77 ns/op | 598.23 ns/op | 0.65 |
| browser block root to RootHex using toHex | 256.28 ns/op | 404.88 ns/op | 0.63 |
| browser block root to RootHex using toRootHex | 134.24 ns/op | 162.71 ns/op | 0.83 |
| browser fromHex(blob) | 1.0112 ms/op | 1.5696 ms/op | 0.64 |
| browser fromHexInto(blob) | 676.04 us/op | 731.74 us/op | 0.92 |
| browser block root to RootHex using the deprecated toHexString | 363.58 ns/op | 601.83 ns/op | 0.60 |
by benchmarkbot/action
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 52.05%. Comparing base (688d558) to head (b077f26).
:warning: Report is 6 commits behind head on unstable.
Additional details and impacted files
@@ Coverage Diff @@
## unstable #8674 +/- ##
=========================================
Coverage 52.04% 52.05%
=========================================
Files 848 848
Lines 65734 65669 -65
Branches 4807 4805 -2
=========================================
- Hits 34214 34184 -30
+ Misses 31451 31416 -35
Partials 69 69
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.