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

Conversation

@nflaig
Copy link
Member

@nflaig nflaig commented Sep 29, 2025

Motivation

Same as #7113

Description

Update error response for validator publish endpoints

  • throw IndexedError to return individual failures
  • move individual items error logs to verbose

@nflaig nflaig requested a review from a team as a code owner September 29, 2025 08:54
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @nflaig, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the error response mechanism for validator publish endpoints, specifically for publishAggregateAndProofs and publishContributionAndProofs. The primary goal is to enhance the clarity and detail of error messages returned to the caller by introducing a structured IndexedError that aggregates individual failures. This change also optimizes logging by demoting individual failure logs to a verbose level, ensuring that critical errors are still highlighted without overwhelming the logs with expected individual item processing issues.

Highlights

  • Improved Error Reporting: The pull request refactors error handling for validator publish endpoints to use a new IndexedError type, providing more detailed and structured information about individual failures.
  • Structured Failure Data: Individual errors are now captured as FailureList objects, which include the index and message of each specific failure, allowing for more granular error analysis.
  • Reduced Log Verbosity: The logging level for individual item failures has been demoted from error to verbose, preventing excessive logging while still retaining detailed information for debugging when needed.
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 refactors the error handling for publishAggregateAndProofsV2 and publishContributionAndProofs endpoints to provide more detailed, indexed error responses. The changes correctly replace the previous error aggregation logic with the IndexedError class, which will improve the client's ability to handle partial failures in batch requests. The logging level for individual errors has also been appropriately changed from error to verbose.

I've added a couple of suggestions to further improve the robustness of the error handling by safely accessing the error message. Overall, this is a solid improvement to the API's error reporting.

@codecov
Copy link

codecov bot commented Sep 29, 2025

Codecov Report

❌ Patch coverage is 9.09091% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.25%. Comparing base (47470aa) to head (960416c).
⚠️ Report is 1 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #8480   +/-   ##
=========================================
  Coverage     52.25%   52.25%           
=========================================
  Files           852      852           
  Lines         64983    64977    -6     
  Branches       4770     4769    -1     
=========================================
- Hits          33956    33953    -3     
+ Misses        30958    30955    -3     
  Partials         69       69           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 29, 2025

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: b2dd2ae Previous: 47470aa Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 749.95 us/op 989.30 us/op 0.76
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 29.276 us/op 35.674 us/op 0.82
BLS verify - blst 894.31 us/op 889.50 us/op 1.01
BLS verifyMultipleSignatures 3 - blst 1.3022 ms/op 1.2760 ms/op 1.02
BLS verifyMultipleSignatures 8 - blst 1.9651 ms/op 1.8514 ms/op 1.06
BLS verifyMultipleSignatures 32 - blst 4.3277 ms/op 4.9018 ms/op 0.88
BLS verifyMultipleSignatures 64 - blst 8.1463 ms/op 9.0262 ms/op 0.90
BLS verifyMultipleSignatures 128 - blst 15.673 ms/op 19.003 ms/op 0.82
BLS deserializing 10000 signatures 607.87 ms/op 684.06 ms/op 0.89
BLS deserializing 100000 signatures 5.9442 s/op 6.7915 s/op 0.88
BLS verifyMultipleSignatures - same message - 3 - blst 903.76 us/op 878.48 us/op 1.03
BLS verifyMultipleSignatures - same message - 8 - blst 1.0391 ms/op 1.0225 ms/op 1.02
BLS verifyMultipleSignatures - same message - 32 - blst 1.6331 ms/op 1.6797 ms/op 0.97
BLS verifyMultipleSignatures - same message - 64 - blst 2.4585 ms/op 2.5340 ms/op 0.97
BLS verifyMultipleSignatures - same message - 128 - blst 3.8904 ms/op 4.3400 ms/op 0.90
BLS aggregatePubkeys 32 - blst 16.571 us/op 18.902 us/op 0.88
BLS aggregatePubkeys 128 - blst 58.311 us/op 67.679 us/op 0.86
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 49.039 ms/op 43.424 ms/op 1.13
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 42.861 ms/op 43.143 ms/op 0.99
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 30.312 ms/op 35.338 ms/op 0.86
getSlashingsAndExits - default max 47.123 us/op 69.661 us/op 0.68
getSlashingsAndExits - 2k 287.17 us/op 279.52 us/op 1.03
isKnown best case - 1 super set check 412.00 ns/op 201.00 ns/op 2.05
isKnown normal case - 2 super set checks 409.00 ns/op 198.00 ns/op 2.07
isKnown worse case - 16 super set checks 409.00 ns/op 201.00 ns/op 2.03
InMemoryCheckpointStateCache - add get delete 2.4260 us/op 2.3190 us/op 1.05
validate api signedAggregateAndProof - struct 1.5168 ms/op 1.3457 ms/op 1.13
validate gossip signedAggregateAndProof - struct 1.6025 ms/op 1.3287 ms/op 1.21
batch validate gossip attestation - vc 640000 - chunk 32 107.67 us/op 111.36 us/op 0.97
batch validate gossip attestation - vc 640000 - chunk 64 90.306 us/op 98.089 us/op 0.92
batch validate gossip attestation - vc 640000 - chunk 128 85.470 us/op 91.835 us/op 0.93
batch validate gossip attestation - vc 640000 - chunk 256 79.079 us/op 92.062 us/op 0.86
pickEth1Vote - no votes 705.58 us/op 970.95 us/op 0.73
pickEth1Vote - max votes 5.3811 ms/op 5.2024 ms/op 1.03
pickEth1Vote - Eth1Data hashTreeRoot value x2048 7.8220 ms/op 10.781 ms/op 0.73
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 13.543 ms/op 14.475 ms/op 0.94
pickEth1Vote - Eth1Data fastSerialize value x2048 320.98 us/op 420.76 us/op 0.76
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.0151 ms/op 3.2827 ms/op 0.61
bytes32 toHexString 456.00 ns/op 352.00 ns/op 1.30
bytes32 Buffer.toString(hex) 405.00 ns/op 240.00 ns/op 1.69
bytes32 Buffer.toString(hex) from Uint8Array 470.00 ns/op 337.00 ns/op 1.39
bytes32 Buffer.toString(hex) + 0x 394.00 ns/op 245.00 ns/op 1.61
Object access 1 prop 0.26700 ns/op 0.11900 ns/op 2.24
Map access 1 prop 0.28700 ns/op 0.12000 ns/op 2.39
Object get x1000 4.7220 ns/op 5.5850 ns/op 0.85
Map get x1000 5.7770 ns/op 6.3060 ns/op 0.92
Object set x1000 18.469 ns/op 28.050 ns/op 0.66
Map set x1000 16.002 ns/op 18.784 ns/op 0.85
Return object 10000 times 0.27930 ns/op 0.28100 ns/op 0.99
Throw Error 10000 times 3.4568 us/op 4.1351 us/op 0.84
toHex 89.746 ns/op 133.51 ns/op 0.67
Buffer.from 81.997 ns/op 130.17 ns/op 0.63
shared Buffer 58.696 ns/op 80.605 ns/op 0.73
fastMsgIdFn sha256 / 200 bytes 1.7370 us/op 2.1240 us/op 0.82
fastMsgIdFn h32 xxhash / 200 bytes 337.00 ns/op 209.00 ns/op 1.61
fastMsgIdFn h64 xxhash / 200 bytes 403.00 ns/op 265.00 ns/op 1.52
fastMsgIdFn sha256 / 1000 bytes 5.3610 us/op 7.0100 us/op 0.76
fastMsgIdFn h32 xxhash / 1000 bytes 474.00 ns/op 338.00 ns/op 1.40
fastMsgIdFn h64 xxhash / 1000 bytes 479.00 ns/op 340.00 ns/op 1.41
fastMsgIdFn sha256 / 10000 bytes 45.504 us/op 62.822 us/op 0.72
fastMsgIdFn h32 xxhash / 10000 bytes 1.7810 us/op 1.7940 us/op 0.99
fastMsgIdFn h64 xxhash / 10000 bytes 1.2610 us/op 1.2010 us/op 1.05
send data - 1000 256B messages 12.206 ms/op 15.762 ms/op 0.77
send data - 1000 512B messages 17.188 ms/op 18.545 ms/op 0.93
send data - 1000 1024B messages 23.182 ms/op 25.415 ms/op 0.91
send data - 1000 1200B messages 15.524 ms/op 21.476 ms/op 0.72
send data - 1000 2048B messages 15.484 ms/op 23.807 ms/op 0.65
send data - 1000 4096B messages 18.981 ms/op 25.005 ms/op 0.76
send data - 1000 16384B messages 24.189 ms/op 41.088 ms/op 0.59
send data - 1000 65536B messages 68.259 ms/op 107.86 ms/op 0.63
enrSubnets - fastDeserialize 64 bits 895.00 ns/op 879.00 ns/op 1.02
enrSubnets - ssz BitVector 64 bits 476.00 ns/op 331.00 ns/op 1.44
enrSubnets - fastDeserialize 4 bits 310.00 ns/op 130.00 ns/op 2.38
enrSubnets - ssz BitVector 4 bits 492.00 ns/op 335.00 ns/op 1.47
prioritizePeers score -10:0 att 32-0.1 sync 2-0 188.54 us/op 226.68 us/op 0.83
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 220.22 us/op 253.27 us/op 0.87
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 358.59 us/op 362.52 us/op 0.99
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 624.38 us/op 681.48 us/op 0.92
prioritizePeers score 0:0 att 64-1 sync 4-1 717.40 us/op 816.29 us/op 0.88
array of 16000 items push then shift 1.3845 us/op 1.5654 us/op 0.88
LinkedList of 16000 items push then shift 6.8030 ns/op 6.9620 ns/op 0.98
array of 16000 items push then pop 63.940 ns/op 73.840 ns/op 0.87
LinkedList of 16000 items push then pop 6.0550 ns/op 6.9020 ns/op 0.88
array of 24000 items push then shift 1.7901 us/op 2.3093 us/op 0.78
LinkedList of 24000 items push then shift 6.3640 ns/op 6.9520 ns/op 0.92
array of 24000 items push then pop 88.468 ns/op 98.214 ns/op 0.90
LinkedList of 24000 items push then pop 5.9510 ns/op 6.8640 ns/op 0.87
intersect bitArray bitLen 8 5.0960 ns/op 6.1700 ns/op 0.83
intersect array and set length 8 30.209 ns/op 37.299 ns/op 0.81
intersect bitArray bitLen 128 24.795 ns/op 28.779 ns/op 0.86
intersect array and set length 128 511.31 ns/op 599.66 ns/op 0.85
bitArray.getTrueBitIndexes() bitLen 128 1.1000 us/op 970.00 ns/op 1.13
bitArray.getTrueBitIndexes() bitLen 248 1.8560 us/op 1.7240 us/op 1.08
bitArray.getTrueBitIndexes() bitLen 512 3.6450 us/op 3.5060 us/op 1.04
Buffer.concat 32 items 719.00 ns/op 596.00 ns/op 1.21
Uint8Array.set 32 items 1.1310 us/op 1.0170 us/op 1.11
Buffer.copy 2.0550 us/op 2.1090 us/op 0.97
Uint8Array.set - with subarray 1.6010 us/op 2.8750 us/op 0.56
Uint8Array.set - without subarray 998.00 ns/op 1.6580 us/op 0.60
getUint32 - dataview 376.00 ns/op 185.00 ns/op 2.03
getUint32 - manual 309.00 ns/op 116.00 ns/op 2.66
Set add up to 64 items then delete first 1.8131 us/op 2.0724 us/op 0.87
OrderedSet add up to 64 items then delete first 2.8104 us/op 3.1685 us/op 0.89
Set add up to 64 items then delete last 1.9388 us/op 2.1875 us/op 0.89
OrderedSet add up to 64 items then delete last 2.9579 us/op 3.7672 us/op 0.79
Set add up to 64 items then delete middle 2.0034 us/op 2.4200 us/op 0.83
OrderedSet add up to 64 items then delete middle 4.5539 us/op 5.1122 us/op 0.89
Set add up to 128 items then delete first 4.0555 us/op 4.9706 us/op 0.82
OrderedSet add up to 128 items then delete first 6.4595 us/op 8.0041 us/op 0.81
Set add up to 128 items then delete last 3.9713 us/op 4.8085 us/op 0.83
OrderedSet add up to 128 items then delete last 6.1104 us/op 7.2946 us/op 0.84
Set add up to 128 items then delete middle 3.6052 us/op 4.9159 us/op 0.73
OrderedSet add up to 128 items then delete middle 10.977 us/op 13.522 us/op 0.81
Set add up to 256 items then delete first 7.3370 us/op 10.188 us/op 0.72
OrderedSet add up to 256 items then delete first 11.804 us/op 15.484 us/op 0.76
Set add up to 256 items then delete last 7.3383 us/op 9.9926 us/op 0.73
OrderedSet add up to 256 items then delete last 11.619 us/op 14.557 us/op 0.80
Set add up to 256 items then delete middle 7.3239 us/op 9.4254 us/op 0.78
OrderedSet add up to 256 items then delete middle 32.638 us/op 40.657 us/op 0.80
transfer serialized Status (84 B) 1.8320 us/op 2.1890 us/op 0.84
copy serialized Status (84 B) 1.1180 us/op 1.1840 us/op 0.94
transfer serialized SignedVoluntaryExit (112 B) 1.9410 us/op 2.1980 us/op 0.88
copy serialized SignedVoluntaryExit (112 B) 1.1810 us/op 1.2350 us/op 0.96
transfer serialized ProposerSlashing (416 B) 1.9450 us/op 3.1440 us/op 0.62
copy serialized ProposerSlashing (416 B) 1.1960 us/op 1.3050 us/op 0.92
transfer serialized Attestation (485 B) 2.0490 us/op 2.2380 us/op 0.92
copy serialized Attestation (485 B) 1.5910 us/op 1.2710 us/op 1.25
transfer serialized AttesterSlashing (33232 B) 2.3130 us/op 2.6630 us/op 0.87
copy serialized AttesterSlashing (33232 B) 3.1580 us/op 3.9740 us/op 0.79
transfer serialized Small SignedBeaconBlock (128000 B) 2.0550 us/op 3.3760 us/op 0.61
copy serialized Small SignedBeaconBlock (128000 B) 8.8410 us/op 9.5250 us/op 0.93
transfer serialized Avg SignedBeaconBlock (200000 B) 2.2320 us/op 3.7080 us/op 0.60
copy serialized Avg SignedBeaconBlock (200000 B) 13.198 us/op 13.852 us/op 0.95
transfer serialized BlobsSidecar (524380 B) 2.6980 us/op 3.5840 us/op 0.75
copy serialized BlobsSidecar (524380 B) 58.423 us/op 146.54 us/op 0.40
transfer serialized Big SignedBeaconBlock (1000000 B) 2.9870 us/op 3.5930 us/op 0.83
copy serialized Big SignedBeaconBlock (1000000 B) 111.19 us/op 112.72 us/op 0.99
pass gossip attestations to forkchoice per slot 2.2191 ms/op 2.7338 ms/op 0.81
forkChoice updateHead vc 100000 bc 64 eq 0 380.37 us/op 443.08 us/op 0.86
forkChoice updateHead vc 600000 bc 64 eq 0 2.2632 ms/op 2.7200 ms/op 0.83
forkChoice updateHead vc 1000000 bc 64 eq 0 3.9547 ms/op 4.6279 ms/op 0.85
forkChoice updateHead vc 600000 bc 320 eq 0 2.3716 ms/op 2.7326 ms/op 0.87
forkChoice updateHead vc 600000 bc 1200 eq 0 2.3806 ms/op 2.7792 ms/op 0.86
forkChoice updateHead vc 600000 bc 7200 eq 0 2.6701 ms/op 2.9929 ms/op 0.89
forkChoice updateHead vc 600000 bc 64 eq 1000 9.1368 ms/op 10.107 ms/op 0.90
forkChoice updateHead vc 600000 bc 64 eq 10000 9.0722 ms/op 10.071 ms/op 0.90
forkChoice updateHead vc 600000 bc 64 eq 300000 11.084 ms/op 13.546 ms/op 0.82
computeDeltas 500000 validators 300 proto nodes 3.0912 ms/op 3.9247 ms/op 0.79
computeDeltas 500000 validators 1200 proto nodes 3.1806 ms/op 3.8282 ms/op 0.83
computeDeltas 500000 validators 7200 proto nodes 3.1250 ms/op 3.8158 ms/op 0.82
computeDeltas 750000 validators 300 proto nodes 4.5758 ms/op 5.6291 ms/op 0.81
computeDeltas 750000 validators 1200 proto nodes 5.0660 ms/op 5.6277 ms/op 0.90
computeDeltas 750000 validators 7200 proto nodes 4.7718 ms/op 5.6492 ms/op 0.84
computeDeltas 1400000 validators 300 proto nodes 9.3635 ms/op 10.581 ms/op 0.88
computeDeltas 1400000 validators 1200 proto nodes 9.9024 ms/op 10.687 ms/op 0.93
computeDeltas 1400000 validators 7200 proto nodes 11.535 ms/op 10.559 ms/op 1.09
computeDeltas 2100000 validators 300 proto nodes 16.295 ms/op 15.918 ms/op 1.02
computeDeltas 2100000 validators 1200 proto nodes 14.529 ms/op 15.889 ms/op 0.91
computeDeltas 2100000 validators 7200 proto nodes 17.225 ms/op 15.896 ms/op 1.08
altair processAttestation - 250000 vs - 7PWei normalcase 3.4278 ms/op 1.9070 ms/op 1.80
altair processAttestation - 250000 vs - 7PWei worstcase 4.0846 ms/op 2.8460 ms/op 1.44
altair processAttestation - setStatus - 1/6 committees join 145.63 us/op 118.71 us/op 1.23
altair processAttestation - setStatus - 1/3 committees join 287.73 us/op 225.04 us/op 1.28
altair processAttestation - setStatus - 1/2 committees join 400.02 us/op 314.97 us/op 1.27
altair processAttestation - setStatus - 2/3 committees join 399.27 us/op 412.83 us/op 0.97
altair processAttestation - setStatus - 4/5 committees join 656.10 us/op 557.09 us/op 1.18
altair processAttestation - setStatus - 100% committees join 778.02 us/op 658.15 us/op 1.18
altair processBlock - 250000 vs - 7PWei normalcase 7.1447 ms/op 4.1395 ms/op 1.73
altair processBlock - 250000 vs - 7PWei normalcase hashState 40.209 ms/op 30.392 ms/op 1.32
altair processBlock - 250000 vs - 7PWei worstcase 46.381 ms/op 36.352 ms/op 1.28
altair processBlock - 250000 vs - 7PWei worstcase hashState 84.549 ms/op 73.000 ms/op 1.16
phase0 processBlock - 250000 vs - 7PWei normalcase 1.9072 ms/op 1.5829 ms/op 1.20
phase0 processBlock - 250000 vs - 7PWei worstcase 26.072 ms/op 19.097 ms/op 1.37
altair processEth1Data - 250000 vs - 7PWei normalcase 369.51 us/op 330.42 us/op 1.12
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.9620 us/op 5.7400 us/op 1.74
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 39.566 us/op 34.256 us/op 1.16
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 17.572 us/op 9.6430 us/op 1.82
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 9.0660 us/op 6.1070 us/op 1.48
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 161.08 us/op 133.50 us/op 1.21
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.7236 ms/op 1.6792 ms/op 1.03
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.5934 ms/op 2.1606 ms/op 1.20
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.5466 ms/op 2.0950 ms/op 1.22
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 5.4585 ms/op 4.3306 ms/op 1.26
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.1510 ms/op 2.1582 ms/op 1.00
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.9922 ms/op 4.6230 ms/op 1.08
Tree 40 250000 create 769.40 ms/op 418.68 ms/op 1.84
Tree 40 250000 get(125000) 114.95 ns/op 139.51 ns/op 0.82
Tree 40 250000 set(125000) 2.9857 us/op 1.4984 us/op 1.99
Tree 40 250000 toArray() 39.808 ms/op 14.662 ms/op 2.72
Tree 40 250000 iterate all - toArray() + loop 30.189 ms/op 14.725 ms/op 2.05
Tree 40 250000 iterate all - get(i) 64.678 ms/op 47.834 ms/op 1.35
Array 250000 create 2.5217 ms/op 3.0161 ms/op 0.84
Array 250000 clone - spread 769.67 us/op 799.62 us/op 0.96
Array 250000 get(125000) 0.88500 ns/op 0.38800 ns/op 2.28
Array 250000 set(125000) 0.97500 ns/op 0.40700 ns/op 2.40
Array 250000 iterate all - loop 104.56 us/op 78.453 us/op 1.33
phase0 afterProcessEpoch - 250000 vs - 7PWei 39.646 ms/op 40.115 ms/op 0.99
Array.fill - length 1000000 7.9622 ms/op 3.3229 ms/op 2.40
Array push - length 1000000 20.856 ms/op 12.137 ms/op 1.72
Array.get 0.26039 ns/op 0.34453 ns/op 0.76
Uint8Array.get 0.42973 ns/op 0.41986 ns/op 1.02
phase0 beforeProcessEpoch - 250000 vs - 7PWei 27.799 ms/op 14.450 ms/op 1.92
altair processEpoch - mainnet_e81889 331.45 ms/op 264.18 ms/op 1.25
mainnet_e81889 - altair beforeProcessEpoch 23.403 ms/op 15.594 ms/op 1.50
mainnet_e81889 - altair processJustificationAndFinalization 7.1720 us/op 5.1590 us/op 1.39
mainnet_e81889 - altair processInactivityUpdates 4.2727 ms/op 3.9800 ms/op 1.07
mainnet_e81889 - altair processRewardsAndPenalties 46.371 ms/op 37.626 ms/op 1.23
mainnet_e81889 - altair processRegistryUpdates 1.0190 us/op 676.00 ns/op 1.51
mainnet_e81889 - altair processSlashings 407.00 ns/op 170.00 ns/op 2.39
mainnet_e81889 - altair processEth1DataReset 405.00 ns/op 168.00 ns/op 2.41
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.1262 ms/op 1.1598 ms/op 0.97
mainnet_e81889 - altair processSlashingsReset 1.1890 us/op 853.00 ns/op 1.39
mainnet_e81889 - altair processRandaoMixesReset 1.4520 us/op 1.1180 us/op 1.30
mainnet_e81889 - altair processHistoricalRootsUpdate 472.00 ns/op 171.00 ns/op 2.76
mainnet_e81889 - altair processParticipationFlagUpdates 949.00 ns/op 497.00 ns/op 1.91
mainnet_e81889 - altair processSyncCommitteeUpdates 376.00 ns/op 131.00 ns/op 2.87
mainnet_e81889 - altair afterProcessEpoch 44.208 ms/op 42.617 ms/op 1.04
capella processEpoch - mainnet_e217614 1.1660 s/op 906.65 ms/op 1.29
mainnet_e217614 - capella beforeProcessEpoch 81.069 ms/op 59.055 ms/op 1.37
mainnet_e217614 - capella processJustificationAndFinalization 6.1560 us/op 5.1300 us/op 1.20
mainnet_e217614 - capella processInactivityUpdates 13.828 ms/op 13.639 ms/op 1.01
mainnet_e217614 - capella processRewardsAndPenalties 201.00 ms/op 182.10 ms/op 1.10
mainnet_e217614 - capella processRegistryUpdates 7.5490 us/op 6.2610 us/op 1.21
mainnet_e217614 - capella processSlashings 493.00 ns/op 171.00 ns/op 2.88
mainnet_e217614 - capella processEth1DataReset 492.00 ns/op 164.00 ns/op 3.00
mainnet_e217614 - capella processEffectiveBalanceUpdates 7.9129 ms/op 10.960 ms/op 0.72
mainnet_e217614 - capella processSlashingsReset 1.3770 us/op 862.00 ns/op 1.60
mainnet_e217614 - capella processRandaoMixesReset 1.5920 us/op 1.1370 us/op 1.40
mainnet_e217614 - capella processHistoricalRootsUpdate 499.00 ns/op 173.00 ns/op 2.88
mainnet_e217614 - capella processParticipationFlagUpdates 902.00 ns/op 522.00 ns/op 1.73
mainnet_e217614 - capella afterProcessEpoch 111.15 ms/op 113.51 ms/op 0.98
phase0 processEpoch - mainnet_e58758 335.73 ms/op 257.20 ms/op 1.31
mainnet_e58758 - phase0 beforeProcessEpoch 108.39 ms/op 69.564 ms/op 1.56
mainnet_e58758 - phase0 processJustificationAndFinalization 6.3700 us/op 5.3690 us/op 1.19
mainnet_e58758 - phase0 processRewardsAndPenalties 42.638 ms/op 36.070 ms/op 1.18
mainnet_e58758 - phase0 processRegistryUpdates 2.8970 us/op 3.0430 us/op 0.95
mainnet_e58758 - phase0 processSlashings 403.00 ns/op 170.00 ns/op 2.37
mainnet_e58758 - phase0 processEth1DataReset 401.00 ns/op 219.00 ns/op 1.83
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 4.6222 ms/op 1.1432 ms/op 4.04
mainnet_e58758 - phase0 processSlashingsReset 1.2790 us/op 899.00 ns/op 1.42
mainnet_e58758 - phase0 processRandaoMixesReset 1.6210 us/op 1.1690 us/op 1.39
mainnet_e58758 - phase0 processHistoricalRootsUpdate 521.00 ns/op 174.00 ns/op 2.99
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.7050 us/op 860.00 ns/op 1.98
mainnet_e58758 - phase0 afterProcessEpoch 35.666 ms/op 34.984 ms/op 1.02
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.4356 ms/op 1.2653 ms/op 1.13
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.7360 ms/op 1.9312 ms/op 1.42
altair processInactivityUpdates - 250000 normalcase 18.254 ms/op 17.176 ms/op 1.06
altair processInactivityUpdates - 250000 worstcase 21.457 ms/op 16.755 ms/op 1.28
phase0 processRegistryUpdates - 250000 normalcase 10.575 us/op 6.6850 us/op 1.58
phase0 processRegistryUpdates - 250000 badcase_full_deposits 297.25 us/op 268.59 us/op 1.11
phase0 processRegistryUpdates - 250000 worstcase 0.5 119.56 ms/op 98.343 ms/op 1.22
altair processRewardsAndPenalties - 250000 normalcase 26.618 ms/op 25.263 ms/op 1.05
altair processRewardsAndPenalties - 250000 worstcase 29.504 ms/op 25.717 ms/op 1.15
phase0 getAttestationDeltas - 250000 normalcase 13.723 ms/op 7.0027 ms/op 1.96
phase0 getAttestationDeltas - 250000 worstcase 5.5539 ms/op 6.7258 ms/op 0.83
phase0 processSlashings - 250000 worstcase 99.828 us/op 81.900 us/op 1.22
altair processSyncCommitteeUpdates - 250000 12.182 ms/op 10.802 ms/op 1.13
BeaconState.hashTreeRoot - No change 444.00 ns/op 209.00 ns/op 2.12
BeaconState.hashTreeRoot - 1 full validator 92.282 us/op 88.643 us/op 1.04
BeaconState.hashTreeRoot - 32 full validator 1.6174 ms/op 1.0184 ms/op 1.59
BeaconState.hashTreeRoot - 512 full validator 16.376 ms/op 10.665 ms/op 1.54
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 187.08 us/op 100.67 us/op 1.86
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8623 ms/op 1.4794 ms/op 1.26
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 32.331 ms/op 24.835 ms/op 1.30
BeaconState.hashTreeRoot - 1 balances 87.044 us/op 73.393 us/op 1.19
BeaconState.hashTreeRoot - 32 balances 783.53 us/op 880.34 us/op 0.89
BeaconState.hashTreeRoot - 512 balances 10.558 ms/op 7.8371 ms/op 1.35
BeaconState.hashTreeRoot - 250000 balances 173.57 ms/op 154.93 ms/op 1.12
aggregationBits - 2048 els - zipIndexesInBitList 27.275 us/op 21.840 us/op 1.25
byteArrayEquals 32 60.626 ns/op 52.987 ns/op 1.14
Buffer.compare 32 15.795 ns/op 16.797 ns/op 0.94
byteArrayEquals 1024 1.3191 us/op 1.5717 us/op 0.84
Buffer.compare 1024 24.275 ns/op 25.599 ns/op 0.95
byteArrayEquals 16384 20.422 us/op 25.285 us/op 0.81
Buffer.compare 16384 200.81 ns/op 200.12 ns/op 1.00
byteArrayEquals 123687377 164.53 ms/op 191.26 ms/op 0.86
Buffer.compare 123687377 8.6937 ms/op 8.5621 ms/op 1.02
byteArrayEquals 32 - diff last byte 43.523 ns/op 52.710 ns/op 0.83
Buffer.compare 32 - diff last byte 16.181 ns/op 16.977 ns/op 0.95
byteArrayEquals 1024 - diff last byte 1.3129 us/op 1.5942 us/op 0.82
Buffer.compare 1024 - diff last byte 28.583 ns/op 26.469 ns/op 1.08
byteArrayEquals 16384 - diff last byte 19.881 us/op 25.528 us/op 0.78
Buffer.compare 16384 - diff last byte 192.47 ns/op 185.91 ns/op 1.04
byteArrayEquals 123687377 - diff last byte 155.81 ms/op 185.26 ms/op 0.84
Buffer.compare 123687377 - diff last byte 8.1429 ms/op 7.1956 ms/op 1.13
byteArrayEquals 32 - random bytes 4.9140 ns/op 5.0430 ns/op 0.97
Buffer.compare 32 - random bytes 15.620 ns/op 16.505 ns/op 0.95
byteArrayEquals 1024 - random bytes 4.9090 ns/op 4.9420 ns/op 0.99
Buffer.compare 1024 - random bytes 15.496 ns/op 16.610 ns/op 0.93
byteArrayEquals 16384 - random bytes 4.9200 ns/op 5.0090 ns/op 0.98
Buffer.compare 16384 - random bytes 15.383 ns/op 16.587 ns/op 0.93
byteArrayEquals 123687377 - random bytes 9.1800 ns/op 6.2700 ns/op 1.46
Buffer.compare 123687377 - random bytes 18.760 ns/op 18.200 ns/op 1.03
regular array get 100000 times 40.996 us/op 39.651 us/op 1.03
wrappedArray get 100000 times 40.838 us/op 31.686 us/op 1.29
arrayWithProxy get 100000 times 8.9225 ms/op 12.823 ms/op 0.70
ssz.Root.equals 39.605 ns/op 44.354 ns/op 0.89
byteArrayEquals 39.050 ns/op 43.479 ns/op 0.90
Buffer.compare 10.918 ns/op 9.9540 ns/op 1.10
processSlot - 1 slots 11.118 us/op 9.9680 us/op 1.12
processSlot - 32 slots 3.5005 ms/op 2.3423 ms/op 1.49
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 2.8392 ms/op 2.8596 ms/op 0.99
getCommitteeAssignments - req 1 vs - 250000 vc 1.8564 ms/op 2.0814 ms/op 0.89
getCommitteeAssignments - req 100 vs - 250000 vc 3.6410 ms/op 4.0098 ms/op 0.91
getCommitteeAssignments - req 1000 vs - 250000 vc 3.8820 ms/op 4.2927 ms/op 0.90
findModifiedValidators - 10000 modified validators 856.44 ms/op 727.37 ms/op 1.18
findModifiedValidators - 1000 modified validators 802.52 ms/op 736.54 ms/op 1.09
findModifiedValidators - 100 modified validators 282.47 ms/op 172.40 ms/op 1.64
findModifiedValidators - 10 modified validators 161.26 ms/op 136.68 ms/op 1.18
findModifiedValidators - 1 modified validators 162.31 ms/op 136.52 ms/op 1.19
findModifiedValidators - no difference 192.52 ms/op 143.67 ms/op 1.34
compare ViewDUs 7.6207 s/op 6.0838 s/op 1.25
compare each validator Uint8Array 1.3462 s/op 1.7886 s/op 0.75
compare ViewDU to Uint8Array 1.4012 s/op 1.0673 s/op 1.31
migrate state 1000000 validators, 24 modified, 0 new 922.91 ms/op 734.84 ms/op 1.26
migrate state 1000000 validators, 1700 modified, 1000 new 1.1879 s/op 1.1033 s/op 1.08
migrate state 1000000 validators, 3400 modified, 2000 new 1.4407 s/op 1.1361 s/op 1.27
migrate state 1500000 validators, 24 modified, 0 new 955.98 ms/op 870.97 ms/op 1.10
migrate state 1500000 validators, 1700 modified, 1000 new 1.2508 s/op 969.41 ms/op 1.29
migrate state 1500000 validators, 3400 modified, 2000 new 1.2562 s/op 1.1605 s/op 1.08
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.2500 ns/op 4.0800 ns/op 1.53
state getBlockRootAtSlot - 250000 vs - 7PWei 381.61 ns/op 856.48 ns/op 0.45
naive computeProposerIndex 100000 validators 40.227 ms/op 51.497 ms/op 0.78
computeProposerIndex 100000 validators 1.2877 ms/op 1.4621 ms/op 0.88
naiveGetNextSyncCommitteeIndices 1000 validators 6.3364 s/op 6.5996 s/op 0.96
getNextSyncCommitteeIndices 1000 validators 94.300 ms/op 107.79 ms/op 0.87
naiveGetNextSyncCommitteeIndices 10000 validators 5.9941 s/op 7.1547 s/op 0.84
getNextSyncCommitteeIndices 10000 validators 89.230 ms/op 107.43 ms/op 0.83
naiveGetNextSyncCommitteeIndices 100000 validators 6.0629 s/op 7.3721 s/op 0.82
getNextSyncCommitteeIndices 100000 validators 88.818 ms/op 105.14 ms/op 0.84
naive computeShuffledIndex 100000 validators 19.957 s/op 23.809 s/op 0.84
cached computeShuffledIndex 100000 validators 479.55 ms/op 535.46 ms/op 0.90
naive computeShuffledIndex 2000000 validators 411.73 s/op 486.43 s/op 0.85
cached computeShuffledIndex 2000000 validators 27.247 s/op 43.503 s/op 0.63
computeProposers - vc 250000 548.17 us/op 614.39 us/op 0.89
computeEpochShuffling - vc 250000 38.644 ms/op 41.633 ms/op 0.93
getNextSyncCommittee - vc 250000 9.4385 ms/op 11.498 ms/op 0.82
computeSigningRoot for AttestationData 18.029 us/op 21.741 us/op 0.83
hash AttestationData serialized data then Buffer.toString(base64) 1.1828 us/op 1.7469 us/op 0.68
toHexString serialized data 972.66 ns/op 1.7336 us/op 0.56
Buffer.toString(base64) 110.43 ns/op 161.22 ns/op 0.68
nodejs block root to RootHex using toHex 108.58 ns/op 150.17 ns/op 0.72
nodejs block root to RootHex using toRootHex 71.148 ns/op 94.157 ns/op 0.76
nodejs fromhex(blob) 94.659 ms/op 134.00 ms/op 0.71
nodejs fromHexInto(blob) 80.889 ms/op 98.661 ms/op 0.82
browser block root to RootHex using the deprecated toHexString 186.36 ns/op 269.43 ns/op 0.69
browser block root to RootHex using toHex 151.00 ns/op 179.45 ns/op 0.84
browser block root to RootHex using toRootHex 138.84 ns/op 164.53 ns/op 0.84
browser fromHexInto(blob) 631.81 us/op 882.33 us/op 0.72
browser fromHex(blob) 608.50 ms/op 833.07 ms/op 0.73

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 248b252 into unstable Sep 29, 2025
26 of 28 checks passed
@wemeetagain wemeetagain deleted the nflaig/multi-errors branch September 29, 2025 13:33
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.35.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants