Skip to content

chore: remove getComputeShuffledIndexFn()#9011

Draft
twoeths wants to merge 2 commits intounstablefrom
te/remove_get_compute_shuffled_index_fn
Draft

chore: remove getComputeShuffledIndexFn()#9011
twoeths wants to merge 2 commits intounstablefrom
te/remove_get_compute_shuffled_index_fn

Conversation

@twoeths
Copy link
Contributor

@twoeths twoeths commented Mar 10, 2026

Motivation

getComputeShuffledIndexFn() is no longer used anywhere in production code. Production paths use the native implementation from @chainsafe/swap-or-not-shuffle instead.

Description

  • Removes getComputeShuffledIndexFn() and its associated ComputeShuffledIndexFn type from packages/state-transition/src/util/seed.ts
  • Removes the unit test that only existed to verify parity with computeShuffledIndex
  • Removes the already-skipped perf bench

AI Assistance Disclosure

Implemented with Claude Code (claude-sonnet-4-6).

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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 focuses on technical debt reduction by removing an unused function, getComputeShuffledIndexFn(), and its related components. This function was previously an optimized version of a shuffling index computation but has since been superseded by a native implementation. The removal cleans up the codebase, improves maintainability, and removes unnecessary testing overhead.

Highlights

  • Code Removal: The getComputeShuffledIndexFn() function and its associated type have been removed as they are no longer utilized in production code, which now uses a native implementation.
  • Test Cleanup: Unit tests and performance benchmarks specifically designed for the removed getComputeShuffledIndexFn() have been eliminated, streamlining the test suite.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • packages/state-transition/src/util/seed.ts
    • Removed comments referencing getComputeShuffledIndexFn as the optimized production version.
    • Deleted the ComputeShuffledIndexFn type definition.
    • Removed the getComputeShuffledIndexFn function implementation.
  • packages/state-transition/test/perf/util/seed.test.ts
    • Removed the import statement for getComputeShuffledIndexFn.
    • Eliminated the skipped performance benchmark for cached computeShuffledIndex.
  • packages/state-transition/test/unit/util/seed.test.ts
    • Removed import statements for computeShuffledIndex and getComputeShuffledIndexFn.
    • Deleted the unit test suite for computeShuffledIndex that compared it to the removed optimized function.
Activity
  • The pull request was implemented with the assistance of Claude Code (claude-sonnet-4-6).
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 removes the unused getComputeShuffledIndexFn() function and its associated tests. The removal is justified as production paths now use a native implementation. The changes are a straightforward deletion of dead code across the function's implementation and test files. My review of these changes found no issues.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 10, 2026

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: f733ab9 Previous: bb27317 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.0648 ms/op 1.0494 ms/op 1.01
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 37.593 us/op 37.590 us/op 1.00
BLS verify - blst 862.20 us/op 886.29 us/op 0.97
BLS verifyMultipleSignatures 3 - blst 1.3398 ms/op 2.2391 ms/op 0.60
BLS verifyMultipleSignatures 8 - blst 2.7041 ms/op 2.2726 ms/op 1.19
BLS verifyMultipleSignatures 32 - blst 6.8082 ms/op 6.8281 ms/op 1.00
BLS verifyMultipleSignatures 64 - blst 10.503 ms/op 11.272 ms/op 0.93
BLS verifyMultipleSignatures 128 - blst 17.875 ms/op 17.019 ms/op 1.05
BLS deserializing 10000 signatures 685.84 ms/op 655.87 ms/op 1.05
BLS deserializing 100000 signatures 6.8266 s/op 6.5495 s/op 1.04
BLS verifyMultipleSignatures - same message - 3 - blst 1.0102 ms/op 1.3390 ms/op 0.75
BLS verifyMultipleSignatures - same message - 8 - blst 1.2258 ms/op 1.6215 ms/op 0.76
BLS verifyMultipleSignatures - same message - 32 - blst 1.7688 ms/op 1.8546 ms/op 0.95
BLS verifyMultipleSignatures - same message - 64 - blst 2.5538 ms/op 2.7301 ms/op 0.94
BLS verifyMultipleSignatures - same message - 128 - blst 4.4280 ms/op 4.4847 ms/op 0.99
BLS aggregatePubkeys 32 - blst 18.766 us/op 19.172 us/op 0.98
BLS aggregatePubkeys 128 - blst 67.158 us/op 68.534 us/op 0.98
getSlashingsAndExits - default max 66.065 us/op 69.291 us/op 0.95
getSlashingsAndExits - 2k 306.03 us/op 323.30 us/op 0.95
isKnown best case - 1 super set check 193.00 ns/op 204.00 ns/op 0.95
isKnown normal case - 2 super set checks 190.00 ns/op 199.00 ns/op 0.95
isKnown worse case - 16 super set checks 190.00 ns/op 202.00 ns/op 0.94
validate api signedAggregateAndProof - struct 2.5981 ms/op 1.5490 ms/op 1.68
validate gossip signedAggregateAndProof - struct 2.5866 ms/op 2.5825 ms/op 1.00
batch validate gossip attestation - vc 640000 - chunk 32 115.62 us/op 154.06 us/op 0.75
batch validate gossip attestation - vc 640000 - chunk 64 133.73 us/op 102.51 us/op 1.30
batch validate gossip attestation - vc 640000 - chunk 128 103.64 us/op 94.695 us/op 1.09
batch validate gossip attestation - vc 640000 - chunk 256 90.866 us/op 88.914 us/op 1.02
bytes32 toHexString 342.00 ns/op 364.00 ns/op 0.94
bytes32 Buffer.toString(hex) 223.00 ns/op 248.00 ns/op 0.90
bytes32 Buffer.toString(hex) from Uint8Array 308.00 ns/op 326.00 ns/op 0.94
bytes32 Buffer.toString(hex) + 0x 279.00 ns/op 245.00 ns/op 1.14
Return object 10000 times 0.22520 ns/op 0.22870 ns/op 0.98
Throw Error 10000 times 4.1255 us/op 4.2105 us/op 0.98
toHex 134.00 ns/op 132.93 ns/op 1.01
Buffer.from 118.24 ns/op 135.42 ns/op 0.87
shared Buffer 78.318 ns/op 84.700 ns/op 0.92
fastMsgIdFn sha256 / 200 bytes 1.8510 us/op 1.8310 us/op 1.01
fastMsgIdFn h32 xxhash / 200 bytes 187.00 ns/op 246.00 ns/op 0.76
fastMsgIdFn h64 xxhash / 200 bytes 368.00 ns/op 254.00 ns/op 1.45
fastMsgIdFn sha256 / 1000 bytes 5.9340 us/op 5.8490 us/op 1.01
fastMsgIdFn h32 xxhash / 1000 bytes 359.00 ns/op 352.00 ns/op 1.02
fastMsgIdFn h64 xxhash / 1000 bytes 400.00 ns/op 290.00 ns/op 1.38
fastMsgIdFn sha256 / 10000 bytes 50.331 us/op 49.235 us/op 1.02
fastMsgIdFn h32 xxhash / 10000 bytes 1.3180 us/op 1.3250 us/op 0.99
fastMsgIdFn h64 xxhash / 10000 bytes 872.00 ns/op 1.3870 us/op 0.63
send data - 1000 256B messages 5.2116 ms/op 4.5429 ms/op 1.15
send data - 1000 512B messages 5.0316 ms/op 4.2621 ms/op 1.18
send data - 1000 1024B messages 4.8602 ms/op 4.5418 ms/op 1.07
send data - 1000 1200B messages 6.2330 ms/op 5.9245 ms/op 1.05
send data - 1000 2048B messages 5.4052 ms/op 5.8836 ms/op 0.92
send data - 1000 4096B messages 6.6758 ms/op 7.5792 ms/op 0.88
send data - 1000 16384B messages 30.486 ms/op 30.810 ms/op 0.99
send data - 1000 65536B messages 108.22 ms/op 88.008 ms/op 1.23
enrSubnets - fastDeserialize 64 bits 1.1060 us/op 900.00 ns/op 1.23
enrSubnets - ssz BitVector 64 bits 326.00 ns/op 328.00 ns/op 0.99
enrSubnets - fastDeserialize 4 bits 177.00 ns/op 130.00 ns/op 1.36
enrSubnets - ssz BitVector 4 bits 411.00 ns/op 322.00 ns/op 1.28
prioritizePeers score -10:0 att 32-0.1 sync 2-0 289.25 us/op 313.47 us/op 0.92
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 342.43 us/op 262.41 us/op 1.30
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 521.98 us/op 574.43 us/op 0.91
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 712.38 us/op 864.68 us/op 0.82
prioritizePeers score 0:0 att 64-1 sync 4-1 844.32 us/op 860.76 us/op 0.98
array of 16000 items push then shift 1.5709 us/op 1.5857 us/op 0.99
LinkedList of 16000 items push then shift 7.1920 ns/op 7.1950 ns/op 1.00
array of 16000 items push then pop 74.814 ns/op 74.283 ns/op 1.01
LinkedList of 16000 items push then pop 7.0360 ns/op 7.0080 ns/op 1.00
array of 24000 items push then shift 2.3386 us/op 2.3714 us/op 0.99
LinkedList of 24000 items push then shift 7.2920 ns/op 7.3110 ns/op 1.00
array of 24000 items push then pop 103.67 ns/op 105.13 ns/op 0.99
LinkedList of 24000 items push then pop 7.0670 ns/op 7.0390 ns/op 1.00
intersect bitArray bitLen 8 5.6300 ns/op 5.5980 ns/op 1.01
intersect array and set length 8 32.750 ns/op 32.787 ns/op 1.00
intersect bitArray bitLen 128 28.145 ns/op 28.047 ns/op 1.00
intersect array and set length 128 538.12 ns/op 538.47 ns/op 1.00
bitArray.getTrueBitIndexes() bitLen 128 1.0170 us/op 1.2910 us/op 0.79
bitArray.getTrueBitIndexes() bitLen 248 1.7710 us/op 1.8630 us/op 0.95
bitArray.getTrueBitIndexes() bitLen 512 5.3200 us/op 3.5960 us/op 1.48
Full columns - reconstruct all 6 blobs 269.01 us/op 225.70 us/op 1.19
Full columns - reconstruct half of the blobs out of 6 101.98 us/op 93.201 us/op 1.09
Full columns - reconstruct single blob out of 6 40.590 us/op 30.721 us/op 1.32
Half columns - reconstruct all 6 blobs 257.14 ms/op 258.21 ms/op 1.00
Half columns - reconstruct half of the blobs out of 6 131.28 ms/op 130.34 ms/op 1.01
Half columns - reconstruct single blob out of 6 47.960 ms/op 47.935 ms/op 1.00
Full columns - reconstruct all 10 blobs 304.23 us/op 291.15 us/op 1.04
Full columns - reconstruct half of the blobs out of 10 138.10 us/op 153.49 us/op 0.90
Full columns - reconstruct single blob out of 10 29.726 us/op 30.648 us/op 0.97
Half columns - reconstruct all 10 blobs 430.75 ms/op 429.18 ms/op 1.00
Half columns - reconstruct half of the blobs out of 10 216.84 ms/op 217.91 ms/op 1.00
Half columns - reconstruct single blob out of 10 47.997 ms/op 48.375 ms/op 0.99
Full columns - reconstruct all 20 blobs 559.16 us/op 469.93 us/op 1.19
Full columns - reconstruct half of the blobs out of 20 282.90 us/op 262.37 us/op 1.08
Full columns - reconstruct single blob out of 20 29.470 us/op 31.091 us/op 0.95
Half columns - reconstruct all 20 blobs 850.28 ms/op 856.12 ms/op 0.99
Half columns - reconstruct half of the blobs out of 20 429.02 ms/op 431.11 ms/op 1.00
Half columns - reconstruct single blob out of 20 48.352 ms/op 48.879 ms/op 0.99
Set add up to 64 items then delete first 2.0285 us/op 1.9732 us/op 1.03
OrderedSet add up to 64 items then delete first 2.9985 us/op 2.9162 us/op 1.03
Set add up to 64 items then delete last 2.2702 us/op 2.2797 us/op 1.00
OrderedSet add up to 64 items then delete last 3.1931 us/op 3.4608 us/op 0.92
Set add up to 64 items then delete middle 2.2602 us/op 2.3071 us/op 0.98
OrderedSet add up to 64 items then delete middle 4.9106 us/op 5.0338 us/op 0.98
Set add up to 128 items then delete first 4.7356 us/op 4.6639 us/op 1.02
OrderedSet add up to 128 items then delete first 7.2628 us/op 6.8959 us/op 1.05
Set add up to 128 items then delete last 4.5480 us/op 4.7076 us/op 0.97
OrderedSet add up to 128 items then delete last 6.6045 us/op 7.0704 us/op 0.93
Set add up to 128 items then delete middle 4.4916 us/op 4.5615 us/op 0.98
OrderedSet add up to 128 items then delete middle 12.957 us/op 13.391 us/op 0.97
Set add up to 256 items then delete first 10.000 us/op 9.9849 us/op 1.00
OrderedSet add up to 256 items then delete first 15.117 us/op 14.846 us/op 1.02
Set add up to 256 items then delete last 9.2296 us/op 9.3386 us/op 0.99
OrderedSet add up to 256 items then delete last 13.781 us/op 14.304 us/op 0.96
Set add up to 256 items then delete middle 9.2327 us/op 9.1153 us/op 1.01
OrderedSet add up to 256 items then delete middle 40.272 us/op 41.142 us/op 0.98
pass gossip attestations to forkchoice per slot 483.65 us/op 480.48 us/op 1.01
computeDeltas 1400000 validators 0% inactive 14.049 ms/op 14.068 ms/op 1.00
computeDeltas 1400000 validators 10% inactive 12.878 ms/op 13.148 ms/op 0.98
computeDeltas 1400000 validators 20% inactive 11.995 ms/op 12.232 ms/op 0.98
computeDeltas 1400000 validators 50% inactive 9.3109 ms/op 9.4831 ms/op 0.98
computeDeltas 2100000 validators 0% inactive 26.451 ms/op 21.069 ms/op 1.26
computeDeltas 2100000 validators 10% inactive 19.377 ms/op 19.733 ms/op 0.98
computeDeltas 2100000 validators 20% inactive 17.963 ms/op 18.345 ms/op 0.98
computeDeltas 2100000 validators 50% inactive 13.942 ms/op 14.224 ms/op 0.98
altair processAttestation - 250000 vs - 7PWei normalcase 1.7854 ms/op 1.9004 ms/op 0.94
altair processAttestation - 250000 vs - 7PWei worstcase 2.7044 ms/op 2.6799 ms/op 1.01
altair processAttestation - setStatus - 1/6 committees join 115.38 us/op 114.56 us/op 1.01
altair processAttestation - setStatus - 1/3 committees join 227.59 us/op 223.75 us/op 1.02
altair processAttestation - setStatus - 1/2 committees join 316.70 us/op 312.45 us/op 1.01
altair processAttestation - setStatus - 2/3 committees join 407.60 us/op 403.15 us/op 1.01
altair processAttestation - setStatus - 4/5 committees join 567.55 us/op 557.26 us/op 1.02
altair processAttestation - setStatus - 100% committees join 663.25 us/op 658.38 us/op 1.01
altair processBlock - 250000 vs - 7PWei normalcase 3.4649 ms/op 3.3717 ms/op 1.03
altair processBlock - 250000 vs - 7PWei normalcase hashState 15.341 ms/op 16.964 ms/op 0.90
altair processBlock - 250000 vs - 7PWei worstcase 30.611 ms/op 24.031 ms/op 1.27
altair processBlock - 250000 vs - 7PWei worstcase hashState 55.859 ms/op 65.117 ms/op 0.86
phase0 processBlock - 250000 vs - 7PWei normalcase 1.5165 ms/op 1.7994 ms/op 0.84
phase0 processBlock - 250000 vs - 7PWei worstcase 22.465 ms/op 21.344 ms/op 1.05
altair processEth1Data - 250000 vs - 7PWei normalcase 366.10 us/op 367.94 us/op 0.99
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 14.667 us/op 5.7320 us/op 2.56
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 35.475 us/op 54.294 us/op 0.65
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 10.756 us/op 16.065 us/op 0.67
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 12.473 us/op 11.197 us/op 1.11
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 254.04 us/op 238.55 us/op 1.06
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.7947 ms/op 2.5312 ms/op 0.71
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.2788 ms/op 2.1198 ms/op 1.08
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.2545 ms/op 2.1207 ms/op 1.06
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.5605 ms/op 4.4411 ms/op 1.03
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.5741 ms/op 2.4907 ms/op 1.03
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.8597 ms/op 4.7161 ms/op 1.03
Tree 40 250000 create 392.34 ms/op 385.04 ms/op 1.02
Tree 40 250000 get(125000) 127.46 ns/op 127.44 ns/op 1.00
Tree 40 250000 set(125000) 1.2112 us/op 1.2068 us/op 1.00
Tree 40 250000 toArray() 13.185 ms/op 12.138 ms/op 1.09
Tree 40 250000 iterate all - toArray() + loop 12.861 ms/op 12.230 ms/op 1.05
Tree 40 250000 iterate all - get(i) 44.586 ms/op 41.835 ms/op 1.07
Array 250000 create 2.3338 ms/op 2.4017 ms/op 0.97
Array 250000 clone - spread 787.48 us/op 786.84 us/op 1.00
Array 250000 get(125000) 0.39500 ns/op 0.33300 ns/op 1.19
Array 250000 set(125000) 0.35600 ns/op 0.47100 ns/op 0.76
Array 250000 iterate all - loop 61.593 us/op 57.852 us/op 1.06
phase0 afterProcessEpoch - 250000 vs - 7PWei 41.811 ms/op 39.000 ms/op 1.07
Array.fill - length 1000000 2.8988 ms/op 3.1375 ms/op 0.92
Array push - length 1000000 9.3703 ms/op 9.5786 ms/op 0.98
Array.get 0.20342 ns/op 0.21772 ns/op 0.93
Uint8Array.get 0.21697 ns/op 0.27366 ns/op 0.79
phase0 beforeProcessEpoch - 250000 vs - 7PWei 13.943 ms/op 14.429 ms/op 0.97
altair processEpoch - mainnet_e81889 240.78 ms/op 268.57 ms/op 0.90
mainnet_e81889 - altair beforeProcessEpoch 18.229 ms/op 19.756 ms/op 0.92
mainnet_e81889 - altair processJustificationAndFinalization 7.5090 us/op 6.9500 us/op 1.08
mainnet_e81889 - altair processInactivityUpdates 3.7647 ms/op 3.7240 ms/op 1.01
mainnet_e81889 - altair processRewardsAndPenalties 23.436 ms/op 17.884 ms/op 1.31
mainnet_e81889 - altair processRegistryUpdates 864.00 ns/op 751.00 ns/op 1.15
mainnet_e81889 - altair processSlashings 207.00 ns/op 258.00 ns/op 0.80
mainnet_e81889 - altair processEth1DataReset 167.00 ns/op 159.00 ns/op 1.05
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.8444 ms/op 2.1738 ms/op 0.85
mainnet_e81889 - altair processSlashingsReset 988.00 ns/op 798.00 ns/op 1.24
mainnet_e81889 - altair processRandaoMixesReset 1.2040 us/op 1.2790 us/op 0.94
mainnet_e81889 - altair processHistoricalRootsUpdate 166.00 ns/op 162.00 ns/op 1.02
mainnet_e81889 - altair processParticipationFlagUpdates 583.00 ns/op 509.00 ns/op 1.15
mainnet_e81889 - altair processSyncCommitteeUpdates 137.00 ns/op 126.00 ns/op 1.09
mainnet_e81889 - altair afterProcessEpoch 42.307 ms/op 40.959 ms/op 1.03
capella processEpoch - mainnet_e217614 809.01 ms/op 839.13 ms/op 0.96
mainnet_e217614 - capella beforeProcessEpoch 58.889 ms/op 58.774 ms/op 1.00
mainnet_e217614 - capella processJustificationAndFinalization 5.4720 us/op 5.5230 us/op 0.99
mainnet_e217614 - capella processInactivityUpdates 15.246 ms/op 18.177 ms/op 0.84
mainnet_e217614 - capella processRewardsAndPenalties 100.66 ms/op 108.77 ms/op 0.93
mainnet_e217614 - capella processRegistryUpdates 5.7670 us/op 5.7900 us/op 1.00
mainnet_e217614 - capella processSlashings 152.00 ns/op 154.00 ns/op 0.99
mainnet_e217614 - capella processEth1DataReset 174.00 ns/op 178.00 ns/op 0.98
mainnet_e217614 - capella processEffectiveBalanceUpdates 10.846 ms/op 11.399 ms/op 0.95
mainnet_e217614 - capella processSlashingsReset 835.00 ns/op 983.00 ns/op 0.85
mainnet_e217614 - capella processRandaoMixesReset 1.1800 us/op 1.2940 us/op 0.91
mainnet_e217614 - capella processHistoricalRootsUpdate 170.00 ns/op 167.00 ns/op 1.02
mainnet_e217614 - capella processParticipationFlagUpdates 619.00 ns/op 509.00 ns/op 1.22
mainnet_e217614 - capella afterProcessEpoch 111.59 ms/op 113.81 ms/op 0.98
phase0 processEpoch - mainnet_e58758 238.30 ms/op 278.12 ms/op 0.86
mainnet_e58758 - phase0 beforeProcessEpoch 48.981 ms/op 59.170 ms/op 0.83
mainnet_e58758 - phase0 processJustificationAndFinalization 5.2350 us/op 5.5190 us/op 0.95
mainnet_e58758 - phase0 processRewardsAndPenalties 25.096 ms/op 25.187 ms/op 1.00
mainnet_e58758 - phase0 processRegistryUpdates 2.7790 us/op 3.4760 us/op 0.80
mainnet_e58758 - phase0 processSlashings 255.00 ns/op 164.00 ns/op 1.55
mainnet_e58758 - phase0 processEth1DataReset 165.00 ns/op 183.00 ns/op 0.90
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 870.22 us/op 930.19 us/op 0.94
mainnet_e58758 - phase0 processSlashingsReset 908.00 ns/op 887.00 ns/op 1.02
mainnet_e58758 - phase0 processRandaoMixesReset 1.6200 us/op 1.3310 us/op 1.22
mainnet_e58758 - phase0 processHistoricalRootsUpdate 167.00 ns/op 203.00 ns/op 0.82
mainnet_e58758 - phase0 processParticipationRecordUpdates 827.00 ns/op 1.2860 us/op 0.64
mainnet_e58758 - phase0 afterProcessEpoch 34.888 ms/op 34.571 ms/op 1.01
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2441 ms/op 1.8071 ms/op 0.69
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.9379 ms/op 1.6442 ms/op 1.18
altair processInactivityUpdates - 250000 normalcase 12.891 ms/op 12.696 ms/op 1.02
altair processInactivityUpdates - 250000 worstcase 12.833 ms/op 12.201 ms/op 1.05
phase0 processRegistryUpdates - 250000 normalcase 4.4540 us/op 4.4480 us/op 1.00
phase0 processRegistryUpdates - 250000 badcase_full_deposits 366.26 us/op 371.28 us/op 0.99
phase0 processRegistryUpdates - 250000 worstcase 0.5 66.778 ms/op 75.733 ms/op 0.88
altair processRewardsAndPenalties - 250000 normalcase 16.952 ms/op 16.023 ms/op 1.06
altair processRewardsAndPenalties - 250000 worstcase 16.485 ms/op 15.476 ms/op 1.07
phase0 getAttestationDeltas - 250000 normalcase 6.1320 ms/op 6.7041 ms/op 0.91
phase0 getAttestationDeltas - 250000 worstcase 5.6877 ms/op 6.7065 ms/op 0.85
phase0 processSlashings - 250000 worstcase 119.92 us/op 119.92 us/op 1.00
altair processSyncCommitteeUpdates - 250000 10.543 ms/op 10.334 ms/op 1.02
BeaconState.hashTreeRoot - No change 193.00 ns/op 228.00 ns/op 0.85
BeaconState.hashTreeRoot - 1 full validator 88.639 us/op 86.230 us/op 1.03
BeaconState.hashTreeRoot - 32 full validator 1.5109 ms/op 1.0438 ms/op 1.45
BeaconState.hashTreeRoot - 512 full validator 9.2661 ms/op 7.2997 ms/op 1.27
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 128.72 us/op 111.66 us/op 1.15
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.5859 ms/op 2.3996 ms/op 0.66
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 16.895 ms/op 17.652 ms/op 0.96
BeaconState.hashTreeRoot - 1 balances 81.881 us/op 106.64 us/op 0.77
BeaconState.hashTreeRoot - 32 balances 1.3617 ms/op 1.3363 ms/op 1.02
BeaconState.hashTreeRoot - 512 balances 6.3392 ms/op 5.6906 ms/op 1.11
BeaconState.hashTreeRoot - 250000 balances 154.94 ms/op 161.99 ms/op 0.96
aggregationBits - 2048 els - zipIndexesInBitList 20.120 us/op 20.874 us/op 0.96
regular array get 100000 times 23.544 us/op 24.605 us/op 0.96
wrappedArray get 100000 times 23.720 us/op 24.548 us/op 0.97
arrayWithProxy get 100000 times 14.307 ms/op 17.620 ms/op 0.81
ssz.Root.equals 23.529 ns/op 23.873 ns/op 0.99
byteArrayEquals 23.120 ns/op 23.421 ns/op 0.99
Buffer.compare 9.8270 ns/op 10.169 ns/op 0.97
processSlot - 1 slots 9.5060 us/op 9.7410 us/op 0.98
processSlot - 32 slots 3.1507 ms/op 2.5681 ms/op 1.23
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 5.1585 ms/op 4.6417 ms/op 1.11
getCommitteeAssignments - req 1 vs - 250000 vc 1.8607 ms/op 1.8681 ms/op 1.00
getCommitteeAssignments - req 100 vs - 250000 vc 3.6885 ms/op 3.6479 ms/op 1.01
getCommitteeAssignments - req 1000 vs - 250000 vc 3.9263 ms/op 3.9317 ms/op 1.00
findModifiedValidators - 10000 modified validators 548.93 ms/op 645.23 ms/op 0.85
findModifiedValidators - 1000 modified validators 570.40 ms/op 501.08 ms/op 1.14
findModifiedValidators - 100 modified validators 233.30 ms/op 301.86 ms/op 0.77
findModifiedValidators - 10 modified validators 232.39 ms/op 153.22 ms/op 1.52
findModifiedValidators - 1 modified validators 166.89 ms/op 158.66 ms/op 1.05
findModifiedValidators - no difference 167.73 ms/op 157.07 ms/op 1.07
migrate state 1500000 validators, 3400 modified, 2000 new 1.0512 s/op 910.89 ms/op 1.15
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.1500 ns/op 4.2700 ns/op 0.97
state getBlockRootAtSlot - 250000 vs - 7PWei 440.19 ns/op 533.27 ns/op 0.83
computeProposerIndex 100000 validators 1.5470 ms/op 1.6570 ms/op 0.93
getNextSyncCommitteeIndices 1000 validators 117.27 ms/op 121.89 ms/op 0.96
getNextSyncCommitteeIndices 10000 validators 117.35 ms/op 123.33 ms/op 0.95
getNextSyncCommitteeIndices 100000 validators 117.13 ms/op 122.46 ms/op 0.96
computeProposers - vc 250000 610.39 us/op 632.49 us/op 0.97
computeEpochShuffling - vc 250000 41.169 ms/op 42.403 ms/op 0.97
getNextSyncCommittee - vc 250000 10.175 ms/op 10.838 ms/op 0.94
nodejs block root to RootHex using toHex 139.39 ns/op 146.73 ns/op 0.95
nodejs block root to RootHex using toRootHex 82.471 ns/op 85.770 ns/op 0.96
nodejs fromHex(blob) 427.83 us/op 447.29 us/op 0.96
nodejs fromHexInto(blob) 708.22 us/op 703.64 us/op 1.01
nodejs block root to RootHex using the deprecated toHexString 599.92 ns/op 401.67 ns/op 1.49
nodejs byteArrayEquals 32 bytes (block root) 29.574 ns/op 28.330 ns/op 1.04
nodejs byteArrayEquals 48 bytes (pubkey) 42.339 ns/op 40.563 ns/op 1.04
nodejs byteArrayEquals 96 bytes (signature) 42.240 ns/op 39.669 ns/op 1.06
nodejs byteArrayEquals 1024 bytes 48.167 ns/op 45.404 ns/op 1.06
nodejs byteArrayEquals 131072 bytes (blob) 1.9589 us/op 1.8589 us/op 1.05
browser block root to RootHex using toHex 171.91 ns/op 161.48 ns/op 1.06
browser block root to RootHex using toRootHex 156.86 ns/op 153.49 ns/op 1.02
browser fromHex(blob) 1.3317 ms/op 1.1672 ms/op 1.14
browser fromHexInto(blob) 717.54 us/op 691.14 us/op 1.04
browser block root to RootHex using the deprecated toHexString 560.74 ns/op 361.55 ns/op 1.55
browser byteArrayEquals 32 bytes (block root) 31.165 ns/op 30.677 ns/op 1.02
browser byteArrayEquals 48 bytes (pubkey) 41.974 ns/op 42.741 ns/op 0.98
browser byteArrayEquals 96 bytes (signature) 83.210 ns/op 83.749 ns/op 0.99
browser byteArrayEquals 1024 bytes 800.43 ns/op 789.89 ns/op 1.01
browser byteArrayEquals 131072 bytes (blob) 101.95 us/op 99.564 us/op 1.02

by benchmarkbot/action

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.

1 participant