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

Conversation

@nflaig
Copy link
Member

@nflaig nflaig commented Sep 23, 2025

No description provided.

@nflaig nflaig requested a review from a team as a code owner September 23, 2025 11:20
@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 addresses two related issues concerning the handling of 'syncnets' within the beacon node's network metadata. It ensures that the correct Altair-specific serialization container is used for 'syncnets' when the Altair fork is active, preventing potential data interpretation issues. Additionally, it introduces an increment to the metadata's sequence number whenever 'syncnets' are updated, which is a critical step for proper ENR advertisement and discovery in the network.

Highlights

  • Correct Serialization Container: The pull request updates the serialization method for 'syncnets' from 'ssz.phase0.AttestationSubnets' to 'ssz.altair.SyncSubnets' when the Altair fork is active, ensuring the correct data structure is used for network communication.
  • Sequence Number Increment: When 'syncnets' are updated, the 'seqNumber' in the node's metadata is now incremented. This is crucial for signaling changes in the Ethereum Node Record (ENR) to other nodes in the network.
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

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 aims to fix two issues related to syncnets handling in the MetadataController. First, it correctly changes the SSZ container for serializing syncnets to altair.SyncSubnets. Second, it adds the missing seqNumber increment when syncnets are updated. My review identifies a critical issue with the seqNumber increment implementation that would cause a runtime error, and also suggests an improvement to prevent unnecessary updates when the syncnets value has not changed.

@codecov
Copy link

codecov bot commented Sep 23, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.28%. Comparing base (c0078a1) to head (ec488ac).
⚠️ Report is 6 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #8451      +/-   ##
============================================
+ Coverage     52.24%   52.28%   +0.03%     
============================================
  Files           853      853              
  Lines         64770    64816      +46     
  Branches       4764     4767       +3     
============================================
+ Hits          33841    33889      +48     
+ Misses        30859    30857       -2     
  Partials         70       70              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wemeetagain wemeetagain merged commit b8be78f into unstable Sep 23, 2025
20 checks passed
@wemeetagain wemeetagain deleted the nflaig/syncnets branch September 23, 2025 12:14
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: b9f6fe8 Previous: c0078a1 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 926.90 us/op 1.2437 ms/op 0.75
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 45.269 us/op 38.726 us/op 1.17
BLS verify - blst 819.90 us/op 1.0814 ms/op 0.76
BLS verifyMultipleSignatures 3 - blst 1.2431 ms/op 1.4463 ms/op 0.86
BLS verifyMultipleSignatures 8 - blst 1.6593 ms/op 2.1838 ms/op 0.76
BLS verifyMultipleSignatures 32 - blst 4.9259 ms/op 7.3518 ms/op 0.67
BLS verifyMultipleSignatures 64 - blst 10.419 ms/op 11.516 ms/op 0.90
BLS verifyMultipleSignatures 128 - blst 17.001 ms/op 18.774 ms/op 0.91
BLS deserializing 10000 signatures 683.31 ms/op 747.36 ms/op 0.91
BLS deserializing 100000 signatures 6.8007 s/op 7.4261 s/op 0.92
BLS verifyMultipleSignatures - same message - 3 - blst 867.96 us/op 1.1128 ms/op 0.78
BLS verifyMultipleSignatures - same message - 8 - blst 1.0132 ms/op 1.2361 ms/op 0.82
BLS verifyMultipleSignatures - same message - 32 - blst 1.6817 ms/op 1.9471 ms/op 0.86
BLS verifyMultipleSignatures - same message - 64 - blst 2.6374 ms/op 3.0423 ms/op 0.87
BLS verifyMultipleSignatures - same message - 128 - blst 4.4250 ms/op 4.8919 ms/op 0.90
BLS aggregatePubkeys 32 - blst 19.563 us/op 22.738 us/op 0.86
BLS aggregatePubkeys 128 - blst 69.738 us/op 74.896 us/op 0.93
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 49.063 ms/op 65.195 ms/op 0.75
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 47.407 ms/op 59.742 ms/op 0.79
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 35.234 ms/op 44.838 ms/op 0.79
getSlashingsAndExits - default max 71.277 us/op 109.31 us/op 0.65
getSlashingsAndExits - 2k 278.01 us/op 368.82 us/op 0.75
isKnown best case - 1 super set check 199.00 ns/op 229.00 ns/op 0.87
isKnown normal case - 2 super set checks 193.00 ns/op 227.00 ns/op 0.85
isKnown worse case - 16 super set checks 193.00 ns/op 230.00 ns/op 0.84
InMemoryCheckpointStateCache - add get delete 2.2400 us/op 2.4470 us/op 0.92
validate api signedAggregateAndProof - struct 1.3200 ms/op 1.4114 ms/op 0.94
validate gossip signedAggregateAndProof - struct 1.3156 ms/op 1.7525 ms/op 0.75
batch validate gossip attestation - vc 640000 - chunk 32 110.80 us/op 118.92 us/op 0.93
batch validate gossip attestation - vc 640000 - chunk 64 98.643 us/op 104.71 us/op 0.94
batch validate gossip attestation - vc 640000 - chunk 128 92.186 us/op 97.354 us/op 0.95
batch validate gossip attestation - vc 640000 - chunk 256 92.457 us/op 105.85 us/op 0.87
pickEth1Vote - no votes 923.69 us/op 1.0027 ms/op 0.92
pickEth1Vote - max votes 5.6174 ms/op 7.0464 ms/op 0.80
pickEth1Vote - Eth1Data hashTreeRoot value x2048 10.130 ms/op 13.434 ms/op 0.75
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 17.568 ms/op 19.825 ms/op 0.89
pickEth1Vote - Eth1Data fastSerialize value x2048 410.88 us/op 454.79 us/op 0.90
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.3663 ms/op 3.8498 ms/op 0.61
bytes32 toHexString 354.00 ns/op 433.00 ns/op 0.82
bytes32 Buffer.toString(hex) 218.00 ns/op 296.00 ns/op 0.74
bytes32 Buffer.toString(hex) from Uint8Array 313.00 ns/op 339.00 ns/op 0.92
bytes32 Buffer.toString(hex) + 0x 226.00 ns/op 318.00 ns/op 0.71
Object access 1 prop 0.11000 ns/op 0.12200 ns/op 0.90
Map access 1 prop 0.11700 ns/op 0.14800 ns/op 0.79
Object get x1000 5.6600 ns/op 6.0430 ns/op 0.94
Map get x1000 6.1870 ns/op 6.6800 ns/op 0.93
Object set x1000 26.800 ns/op 31.039 ns/op 0.86
Map set x1000 18.436 ns/op 21.433 ns/op 0.86
Return object 10000 times 0.27750 ns/op 0.32170 ns/op 0.86
Throw Error 10000 times 4.0829 us/op 4.6449 us/op 0.88
toHex 123.28 ns/op 135.23 ns/op 0.91
Buffer.from 112.78 ns/op 120.68 ns/op 0.93
shared Buffer 84.738 ns/op 81.890 ns/op 1.03
fastMsgIdFn sha256 / 200 bytes 2.0600 us/op 2.2850 us/op 0.90
fastMsgIdFn h32 xxhash / 200 bytes 197.00 ns/op 221.00 ns/op 0.89
fastMsgIdFn h64 xxhash / 200 bytes 244.00 ns/op 306.00 ns/op 0.80
fastMsgIdFn sha256 / 1000 bytes 7.1380 us/op 7.6080 us/op 0.94
fastMsgIdFn h32 xxhash / 1000 bytes 317.00 ns/op 343.00 ns/op 0.92
fastMsgIdFn h64 xxhash / 1000 bytes 323.00 ns/op 350.00 ns/op 0.92
fastMsgIdFn sha256 / 10000 bytes 61.886 us/op 67.022 us/op 0.92
fastMsgIdFn h32 xxhash / 10000 bytes 1.7180 us/op 1.8960 us/op 0.91
fastMsgIdFn h64 xxhash / 10000 bytes 1.1360 us/op 1.2530 us/op 0.91
send data - 1000 256B messages 14.889 ms/op 19.244 ms/op 0.77
send data - 1000 512B messages 17.628 ms/op 22.516 ms/op 0.78
send data - 1000 1024B messages 24.537 ms/op 31.150 ms/op 0.79
send data - 1000 1200B messages 21.826 ms/op 29.678 ms/op 0.74
send data - 1000 2048B messages 22.648 ms/op 28.723 ms/op 0.79
send data - 1000 4096B messages 28.628 ms/op 33.917 ms/op 0.84
send data - 1000 16384B messages 42.574 ms/op 50.215 ms/op 0.85
send data - 1000 65536B messages 116.32 ms/op 132.38 ms/op 0.88
enrSubnets - fastDeserialize 64 bits 849.00 ns/op 908.00 ns/op 0.94
enrSubnets - ssz BitVector 64 bits 301.00 ns/op 342.00 ns/op 0.88
enrSubnets - fastDeserialize 4 bits 126.00 ns/op 131.00 ns/op 0.96
enrSubnets - ssz BitVector 4 bits 303.00 ns/op 351.00 ns/op 0.86
prioritizePeers score -10:0 att 32-0.1 sync 2-0 226.44 us/op 253.95 us/op 0.89
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 250.68 us/op 280.71 us/op 0.89
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 355.59 us/op 417.80 us/op 0.85
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 668.75 us/op 759.33 us/op 0.88
prioritizePeers score 0:0 att 64-1 sync 4-1 814.76 us/op 913.47 us/op 0.89
array of 16000 items push then shift 1.5434 us/op 1.6975 us/op 0.91
LinkedList of 16000 items push then shift 6.8970 ns/op 7.9700 ns/op 0.87
array of 16000 items push then pop 73.817 ns/op 86.142 ns/op 0.86
LinkedList of 16000 items push then pop 6.8530 ns/op 7.6430 ns/op 0.90
array of 24000 items push then shift 2.3115 us/op 2.5380 us/op 0.91
LinkedList of 24000 items push then shift 6.8780 ns/op 7.8450 ns/op 0.88
array of 24000 items push then pop 98.569 ns/op 113.79 ns/op 0.87
LinkedList of 24000 items push then pop 6.8100 ns/op 7.5070 ns/op 0.91
intersect bitArray bitLen 8 6.0990 ns/op 6.7580 ns/op 0.90
intersect array and set length 8 36.181 ns/op 41.367 ns/op 0.87
intersect bitArray bitLen 128 28.526 ns/op 30.484 ns/op 0.94
intersect array and set length 128 594.47 ns/op 635.34 ns/op 0.94
bitArray.getTrueBitIndexes() bitLen 128 976.00 ns/op 1.1370 us/op 0.86
bitArray.getTrueBitIndexes() bitLen 248 1.7210 us/op 1.9030 us/op 0.90
bitArray.getTrueBitIndexes() bitLen 512 3.5300 us/op 3.9600 us/op 0.89
Buffer.concat 32 items 569.00 ns/op 625.00 ns/op 0.91
Uint8Array.set 32 items 877.00 ns/op 1.6630 us/op 0.53
Buffer.copy 1.9300 us/op 2.6510 us/op 0.73
Uint8Array.set - with subarray 1.4670 us/op 1.6570 us/op 0.89
Uint8Array.set - without subarray 1.5430 us/op 1.1000 us/op 1.40
getUint32 - dataview 187.00 ns/op 201.00 ns/op 0.93
getUint32 - manual 116.00 ns/op 121.00 ns/op 0.96
Set add up to 64 items then delete first 1.9776 us/op 2.3474 us/op 0.84
OrderedSet add up to 64 items then delete first 3.2372 us/op 3.5812 us/op 0.90
Set add up to 64 items then delete last 2.3856 us/op 2.7094 us/op 0.88
OrderedSet add up to 64 items then delete last 4.4953 us/op 3.9637 us/op 1.13
Set add up to 64 items then delete middle 2.4171 us/op 2.4344 us/op 0.99
OrderedSet add up to 64 items then delete middle 5.0090 us/op 5.8293 us/op 0.86
Set add up to 128 items then delete first 4.8928 us/op 5.7916 us/op 0.84
OrderedSet add up to 128 items then delete first 7.8414 us/op 10.155 us/op 0.77
Set add up to 128 items then delete last 4.8391 us/op 5.3782 us/op 0.90
OrderedSet add up to 128 items then delete last 7.0002 us/op 8.1215 us/op 0.86
Set add up to 128 items then delete middle 4.7120 us/op 5.5263 us/op 0.85
OrderedSet add up to 128 items then delete middle 23.313 us/op 17.224 us/op 1.35
Set add up to 256 items then delete first 10.772 us/op 12.799 us/op 0.84
OrderedSet add up to 256 items then delete first 15.125 us/op 18.746 us/op 0.81
Set add up to 256 items then delete last 9.2086 us/op 12.895 us/op 0.71
OrderedSet add up to 256 items then delete last 13.977 us/op 16.020 us/op 0.87
Set add up to 256 items then delete middle 9.1532 us/op 11.585 us/op 0.79
OrderedSet add up to 256 items then delete middle 39.165 us/op 48.885 us/op 0.80
transfer serialized Status (84 B) 2.0340 us/op 2.4060 us/op 0.85
copy serialized Status (84 B) 1.0380 us/op 1.3380 us/op 0.78
transfer serialized SignedVoluntaryExit (112 B) 2.0700 us/op 2.4330 us/op 0.85
copy serialized SignedVoluntaryExit (112 B) 1.0860 us/op 1.5550 us/op 0.70
transfer serialized ProposerSlashing (416 B) 2.2180 us/op 2.6000 us/op 0.85
copy serialized ProposerSlashing (416 B) 1.3660 us/op 2.0570 us/op 0.66
transfer serialized Attestation (485 B) 2.1160 us/op 3.6310 us/op 0.58
copy serialized Attestation (485 B) 1.3590 us/op 1.6020 us/op 0.85
transfer serialized AttesterSlashing (33232 B) 2.3830 us/op 2.9960 us/op 0.80
copy serialized AttesterSlashing (33232 B) 5.5640 us/op 5.0750 us/op 1.10
transfer serialized Small SignedBeaconBlock (128000 B) 2.8120 us/op 3.3940 us/op 0.83
copy serialized Small SignedBeaconBlock (128000 B) 18.915 us/op 10.466 us/op 1.81
transfer serialized Avg SignedBeaconBlock (200000 B) 3.6790 us/op 4.4140 us/op 0.83
copy serialized Avg SignedBeaconBlock (200000 B) 14.129 us/op 17.046 us/op 0.83
transfer serialized BlobsSidecar (524380 B) 3.1330 us/op 3.7650 us/op 0.83
copy serialized BlobsSidecar (524380 B) 96.950 us/op 68.485 us/op 1.42
transfer serialized Big SignedBeaconBlock (1000000 B) 3.5950 us/op 4.3290 us/op 0.83
copy serialized Big SignedBeaconBlock (1000000 B) 124.61 us/op 122.75 us/op 1.02
pass gossip attestations to forkchoice per slot 2.7070 ms/op 2.9792 ms/op 0.91
forkChoice updateHead vc 100000 bc 64 eq 0 441.83 us/op 474.00 us/op 0.93
forkChoice updateHead vc 600000 bc 64 eq 0 2.7409 ms/op 3.0227 ms/op 0.91
forkChoice updateHead vc 1000000 bc 64 eq 0 4.9140 ms/op 5.1763 ms/op 0.95
forkChoice updateHead vc 600000 bc 320 eq 0 3.3521 ms/op 3.0740 ms/op 1.09
forkChoice updateHead vc 600000 bc 1200 eq 0 2.9917 ms/op 3.7413 ms/op 0.80
forkChoice updateHead vc 600000 bc 7200 eq 0 3.5469 ms/op 4.6166 ms/op 0.77
forkChoice updateHead vc 600000 bc 64 eq 1000 10.241 ms/op 10.763 ms/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 10000 10.293 ms/op 10.714 ms/op 0.96
forkChoice updateHead vc 600000 bc 64 eq 300000 13.369 ms/op 16.044 ms/op 0.83
computeDeltas 500000 validators 300 proto nodes 3.8885 ms/op 4.1274 ms/op 0.94
computeDeltas 500000 validators 1200 proto nodes 3.9709 ms/op 4.3609 ms/op 0.91
computeDeltas 500000 validators 7200 proto nodes 3.9886 ms/op 4.0794 ms/op 0.98
computeDeltas 750000 validators 300 proto nodes 5.9045 ms/op 5.8772 ms/op 1.00
computeDeltas 750000 validators 1200 proto nodes 5.8844 ms/op 5.8235 ms/op 1.01
computeDeltas 750000 validators 7200 proto nodes 5.8619 ms/op 5.8386 ms/op 1.00
computeDeltas 1400000 validators 300 proto nodes 10.866 ms/op 10.942 ms/op 0.99
computeDeltas 1400000 validators 1200 proto nodes 10.865 ms/op 10.972 ms/op 0.99
computeDeltas 1400000 validators 7200 proto nodes 10.525 ms/op 11.226 ms/op 0.94
computeDeltas 2100000 validators 300 proto nodes 16.513 ms/op 17.722 ms/op 0.93
computeDeltas 2100000 validators 1200 proto nodes 16.801 ms/op 18.897 ms/op 0.89
computeDeltas 2100000 validators 7200 proto nodes 17.576 ms/op 22.095 ms/op 0.80
altair processAttestation - 250000 vs - 7PWei normalcase 2.3929 ms/op 2.2707 ms/op 1.05
altair processAttestation - 250000 vs - 7PWei worstcase 3.7533 ms/op 3.7610 ms/op 1.00
altair processAttestation - setStatus - 1/6 committees join 133.89 us/op 156.35 us/op 0.86
altair processAttestation - setStatus - 1/3 committees join 245.12 us/op 269.66 us/op 0.91
altair processAttestation - setStatus - 1/2 committees join 327.83 us/op 384.75 us/op 0.85
altair processAttestation - setStatus - 2/3 committees join 418.55 us/op 488.11 us/op 0.86
altair processAttestation - setStatus - 4/5 committees join 591.04 us/op 677.58 us/op 0.87
altair processAttestation - setStatus - 100% committees join 697.02 us/op 805.22 us/op 0.87
altair processBlock - 250000 vs - 7PWei normalcase 4.1568 ms/op 6.1598 ms/op 0.67
altair processBlock - 250000 vs - 7PWei normalcase hashState 31.176 ms/op 34.901 ms/op 0.89
altair processBlock - 250000 vs - 7PWei worstcase 34.207 ms/op 42.442 ms/op 0.81
altair processBlock - 250000 vs - 7PWei worstcase hashState 73.609 ms/op 92.145 ms/op 0.80
phase0 processBlock - 250000 vs - 7PWei normalcase 1.5886 ms/op 2.0377 ms/op 0.78
phase0 processBlock - 250000 vs - 7PWei worstcase 19.474 ms/op 29.786 ms/op 0.65
altair processEth1Data - 250000 vs - 7PWei normalcase 324.89 us/op 352.71 us/op 0.92
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.7240 us/op 7.2330 us/op 0.79
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 34.580 us/op 53.695 us/op 0.64
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 9.6340 us/op 14.337 us/op 0.67
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.0390 us/op 7.8000 us/op 0.77
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 134.48 us/op 220.75 us/op 0.61
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.7491 ms/op 1.9338 ms/op 0.90
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.3352 ms/op 2.4630 ms/op 0.95
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.3041 ms/op 2.4457 ms/op 0.94
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.6839 ms/op 4.8189 ms/op 0.97
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.3328 ms/op 2.4481 ms/op 0.95
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.4942 ms/op 4.8150 ms/op 0.93
Tree 40 250000 create 438.70 ms/op 469.92 ms/op 0.93
Tree 40 250000 get(125000) 140.59 ns/op 144.16 ns/op 0.98
Tree 40 250000 set(125000) 1.4468 us/op 1.6425 us/op 0.88
Tree 40 250000 toArray() 18.029 ms/op 19.462 ms/op 0.93
Tree 40 250000 iterate all - toArray() + loop 19.906 ms/op 19.618 ms/op 1.01
Tree 40 250000 iterate all - get(i) 54.530 ms/op 54.694 ms/op 1.00
Array 250000 create 3.7991 ms/op 2.5124 ms/op 1.51
Array 250000 clone - spread 1.4191 ms/op 822.62 us/op 1.73
Array 250000 get(125000) 0.40800 ns/op 0.42700 ns/op 0.96
Array 250000 set(125000) 0.42500 ns/op 0.43700 ns/op 0.97
Array 250000 iterate all - loop 91.780 us/op 84.903 us/op 1.08
phase0 afterProcessEpoch - 250000 vs - 7PWei 40.775 ms/op 42.898 ms/op 0.95
Array.fill - length 1000000 3.6793 ms/op 3.6272 ms/op 1.01
Array push - length 1000000 12.547 ms/op 15.947 ms/op 0.79
Array.get 0.28241 ns/op 0.29349 ns/op 0.96
Uint8Array.get 0.42581 ns/op 0.45025 ns/op 0.95
phase0 beforeProcessEpoch - 250000 vs - 7PWei 15.973 ms/op 18.191 ms/op 0.88
altair processEpoch - mainnet_e81889 245.15 ms/op 302.62 ms/op 0.81
mainnet_e81889 - altair beforeProcessEpoch 19.353 ms/op 22.290 ms/op 0.87
mainnet_e81889 - altair processJustificationAndFinalization 5.2120 us/op 5.4610 us/op 0.95
mainnet_e81889 - altair processInactivityUpdates 4.6217 ms/op 4.8164 ms/op 0.96
mainnet_e81889 - altair processRewardsAndPenalties 48.216 ms/op 42.621 ms/op 1.13
mainnet_e81889 - altair processRegistryUpdates 761.00 ns/op 693.00 ns/op 1.10
mainnet_e81889 - altair processSlashings 180.00 ns/op 213.00 ns/op 0.85
mainnet_e81889 - altair processEth1DataReset 173.00 ns/op 216.00 ns/op 0.80
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.1831 ms/op 1.2207 ms/op 0.97
mainnet_e81889 - altair processSlashingsReset 883.00 ns/op 1.0260 us/op 0.86
mainnet_e81889 - altair processRandaoMixesReset 1.0800 us/op 1.2720 us/op 0.85
mainnet_e81889 - altair processHistoricalRootsUpdate 177.00 ns/op 206.00 ns/op 0.86
mainnet_e81889 - altair processParticipationFlagUpdates 497.00 ns/op 555.00 ns/op 0.90
mainnet_e81889 - altair processSyncCommitteeUpdates 137.00 ns/op 161.00 ns/op 0.85
mainnet_e81889 - altair afterProcessEpoch 43.830 ms/op 45.221 ms/op 0.97
capella processEpoch - mainnet_e217614 835.23 ms/op 987.40 ms/op 0.85
mainnet_e217614 - capella beforeProcessEpoch 58.696 ms/op 69.796 ms/op 0.84
mainnet_e217614 - capella processJustificationAndFinalization 5.2070 us/op 5.4850 us/op 0.95
mainnet_e217614 - capella processInactivityUpdates 16.202 ms/op 14.807 ms/op 1.09
mainnet_e217614 - capella processRewardsAndPenalties 161.31 ms/op 191.89 ms/op 0.84
mainnet_e217614 - capella processRegistryUpdates 6.4480 us/op 7.6720 us/op 0.84
mainnet_e217614 - capella processSlashings 173.00 ns/op 210.00 ns/op 0.82
mainnet_e217614 - capella processEth1DataReset 170.00 ns/op 195.00 ns/op 0.87
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.0638 ms/op 15.166 ms/op 0.27
mainnet_e217614 - capella processSlashingsReset 880.00 ns/op 967.00 ns/op 0.91
mainnet_e217614 - capella processRandaoMixesReset 1.1310 us/op 1.3470 us/op 0.84
mainnet_e217614 - capella processHistoricalRootsUpdate 173.00 ns/op 203.00 ns/op 0.85
mainnet_e217614 - capella processParticipationFlagUpdates 508.00 ns/op 603.00 ns/op 0.84
mainnet_e217614 - capella afterProcessEpoch 115.77 ms/op 122.50 ms/op 0.95
phase0 processEpoch - mainnet_e58758 285.48 ms/op 316.93 ms/op 0.90
mainnet_e58758 - phase0 beforeProcessEpoch 79.405 ms/op 87.749 ms/op 0.90
mainnet_e58758 - phase0 processJustificationAndFinalization 5.3720 us/op 6.3270 us/op 0.85
mainnet_e58758 - phase0 processRewardsAndPenalties 36.558 ms/op 42.066 ms/op 0.87
mainnet_e58758 - phase0 processRegistryUpdates 3.0460 us/op 4.0340 us/op 0.76
mainnet_e58758 - phase0 processSlashings 172.00 ns/op 323.00 ns/op 0.53
mainnet_e58758 - phase0 processEth1DataReset 170.00 ns/op 227.00 ns/op 0.75
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1667 ms/op 1.3700 ms/op 0.85
mainnet_e58758 - phase0 processSlashingsReset 918.00 ns/op 976.00 ns/op 0.94
mainnet_e58758 - phase0 processRandaoMixesReset 1.1670 us/op 1.2870 us/op 0.91
mainnet_e58758 - phase0 processHistoricalRootsUpdate 173.00 ns/op 201.00 ns/op 0.86
mainnet_e58758 - phase0 processParticipationRecordUpdates 883.00 ns/op 990.00 ns/op 0.89
mainnet_e58758 - phase0 afterProcessEpoch 35.917 ms/op 36.623 ms/op 0.98
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3390 ms/op 1.3838 ms/op 0.97
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.1531 ms/op 3.3172 ms/op 0.65
altair processInactivityUpdates - 250000 normalcase 17.584 ms/op 20.320 ms/op 0.87
altair processInactivityUpdates - 250000 worstcase 18.407 ms/op 19.231 ms/op 0.96
phase0 processRegistryUpdates - 250000 normalcase 6.3740 us/op 6.5770 us/op 0.97
phase0 processRegistryUpdates - 250000 badcase_full_deposits 256.42 us/op 285.90 us/op 0.90
phase0 processRegistryUpdates - 250000 worstcase 0.5 99.860 ms/op 119.51 ms/op 0.84
altair processRewardsAndPenalties - 250000 normalcase 26.514 ms/op 37.875 ms/op 0.70
altair processRewardsAndPenalties - 250000 worstcase 25.458 ms/op 25.740 ms/op 0.99
phase0 getAttestationDeltas - 250000 normalcase 6.2393 ms/op 8.5499 ms/op 0.73
phase0 getAttestationDeltas - 250000 worstcase 6.1578 ms/op 6.1334 ms/op 1.00
phase0 processSlashings - 250000 worstcase 78.752 us/op 131.30 us/op 0.60
altair processSyncCommitteeUpdates - 250000 10.981 ms/op 11.299 ms/op 0.97
BeaconState.hashTreeRoot - No change 218.00 ns/op 289.00 ns/op 0.75
BeaconState.hashTreeRoot - 1 full validator 73.874 us/op 75.302 us/op 0.98
BeaconState.hashTreeRoot - 32 full validator 769.53 us/op 876.61 us/op 0.88
BeaconState.hashTreeRoot - 512 full validator 10.242 ms/op 9.5722 ms/op 1.07
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 90.524 us/op 91.228 us/op 0.99
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.2511 ms/op 1.6963 ms/op 0.74
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 27.189 ms/op 29.283 ms/op 0.93
BeaconState.hashTreeRoot - 1 balances 86.515 us/op 75.922 us/op 1.14
BeaconState.hashTreeRoot - 32 balances 794.49 us/op 674.10 us/op 1.18
BeaconState.hashTreeRoot - 512 balances 8.7961 ms/op 8.8320 ms/op 1.00
BeaconState.hashTreeRoot - 250000 balances 190.83 ms/op 166.76 ms/op 1.14
aggregationBits - 2048 els - zipIndexesInBitList 21.566 us/op 22.010 us/op 0.98
byteArrayEquals 32 53.105 ns/op 54.231 ns/op 0.98
Buffer.compare 32 17.087 ns/op 17.524 ns/op 0.98
byteArrayEquals 1024 1.5903 us/op 1.6104 us/op 0.99
Buffer.compare 1024 27.246 ns/op 25.066 ns/op 1.09
byteArrayEquals 16384 25.318 us/op 25.701 us/op 0.99
Buffer.compare 16384 207.97 ns/op 203.35 ns/op 1.02
byteArrayEquals 123687377 192.16 ms/op 193.24 ms/op 0.99
Buffer.compare 123687377 7.3993 ms/op 7.9755 ms/op 0.93
byteArrayEquals 32 - diff last byte 52.297 ns/op 53.195 ns/op 0.98
Buffer.compare 32 - diff last byte 17.026 ns/op 17.392 ns/op 0.98
byteArrayEquals 1024 - diff last byte 1.5803 us/op 1.6108 us/op 0.98
Buffer.compare 1024 - diff last byte 25.330 ns/op 25.594 ns/op 0.99
byteArrayEquals 16384 - diff last byte 25.310 us/op 26.138 us/op 0.97
Buffer.compare 16384 - diff last byte 192.49 ns/op 204.38 ns/op 0.94
byteArrayEquals 123687377 - diff last byte 201.43 ms/op 195.67 ms/op 1.03
Buffer.compare 123687377 - diff last byte 9.9641 ms/op 8.2003 ms/op 1.22
byteArrayEquals 32 - random bytes 5.1970 ns/op 5.1940 ns/op 1.00
Buffer.compare 32 - random bytes 17.528 ns/op 17.546 ns/op 1.00
byteArrayEquals 1024 - random bytes 5.1920 ns/op 5.2880 ns/op 0.98
Buffer.compare 1024 - random bytes 17.265 ns/op 17.449 ns/op 0.99
byteArrayEquals 16384 - random bytes 5.1670 ns/op 5.1500 ns/op 1.00
Buffer.compare 16384 - random bytes 17.212 ns/op 17.058 ns/op 1.01
byteArrayEquals 123687377 - random bytes 6.4500 ns/op 6.6000 ns/op 0.98
Buffer.compare 123687377 - random bytes 18.500 ns/op 19.050 ns/op 0.97
regular array get 100000 times 34.009 us/op 42.282 us/op 0.80
wrappedArray get 100000 times 33.519 us/op 45.439 us/op 0.74
arrayWithProxy get 100000 times 16.126 ms/op 12.482 ms/op 1.29
ssz.Root.equals 46.837 ns/op 47.935 ns/op 0.98
byteArrayEquals 45.810 ns/op 47.674 ns/op 0.96
Buffer.compare 10.510 ns/op 10.740 ns/op 0.98
processSlot - 1 slots 10.308 us/op 11.176 us/op 0.92
processSlot - 32 slots 2.3561 ms/op 2.7323 ms/op 0.86
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 3.4050 ms/op 3.5725 ms/op 0.95
getCommitteeAssignments - req 1 vs - 250000 vc 2.1197 ms/op 2.2179 ms/op 0.96
getCommitteeAssignments - req 100 vs - 250000 vc 4.1429 ms/op 4.2730 ms/op 0.97
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4127 ms/op 4.5137 ms/op 0.98
findModifiedValidators - 10000 modified validators 829.53 ms/op 783.36 ms/op 1.06
findModifiedValidators - 1000 modified validators 797.75 ms/op 744.93 ms/op 1.07
findModifiedValidators - 100 modified validators 272.83 ms/op 282.58 ms/op 0.97
findModifiedValidators - 10 modified validators 209.42 ms/op 147.12 ms/op 1.42
findModifiedValidators - 1 modified validators 189.44 ms/op 154.18 ms/op 1.23
findModifiedValidators - no difference 177.36 ms/op 154.66 ms/op 1.15
compare ViewDUs 6.2334 s/op 6.6787 s/op 0.93
compare each validator Uint8Array 988.31 ms/op 1.8794 s/op 0.53
compare ViewDU to Uint8Array 1.0460 s/op 1.2292 s/op 0.85
migrate state 1000000 validators, 24 modified, 0 new 859.50 ms/op 896.91 ms/op 0.96
migrate state 1000000 validators, 1700 modified, 1000 new 1.1196 s/op 1.2120 s/op 0.92
migrate state 1000000 validators, 3400 modified, 2000 new 1.2829 s/op 1.4699 s/op 0.87
migrate state 1500000 validators, 24 modified, 0 new 810.70 ms/op 971.57 ms/op 0.83
migrate state 1500000 validators, 1700 modified, 1000 new 985.25 ms/op 1.2424 s/op 0.79
migrate state 1500000 validators, 3400 modified, 2000 new 1.3036 s/op 1.3291 s/op 0.98
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.1100 ns/op 4.1800 ns/op 0.98
state getBlockRootAtSlot - 250000 vs - 7PWei 499.07 ns/op 692.33 ns/op 0.72
naive computeProposerIndex 100000 validators 44.985 ms/op 52.115 ms/op 0.86
computeProposerIndex 100000 validators 1.4916 ms/op 1.5562 ms/op 0.96
naiveGetNextSyncCommitteeIndices 1000 validators 7.9476 s/op 8.3022 s/op 0.96
getNextSyncCommitteeIndices 1000 validators 184.34 ms/op 116.92 ms/op 1.58
naiveGetNextSyncCommitteeIndices 10000 validators 9.3761 s/op 7.7506 s/op 1.21
getNextSyncCommitteeIndices 10000 validators 155.60 ms/op 132.62 ms/op 1.17
naiveGetNextSyncCommitteeIndices 100000 validators 10.368 s/op 8.8127 s/op 1.18
getNextSyncCommitteeIndices 100000 validators 132.17 ms/op 112.80 ms/op 1.17
naive computeShuffledIndex 100000 validators 30.009 s/op 26.645 s/op 1.13
cached computeShuffledIndex 100000 validators 661.85 ms/op 561.43 ms/op 1.18
naive computeShuffledIndex 2000000 validators 496.95 s/op 509.91 s/op 0.97
cached computeShuffledIndex 2000000 validators 43.998 s/op 39.765 s/op 1.11
computeProposers - vc 250000 590.02 us/op 620.00 us/op 0.95
computeEpochShuffling - vc 250000 42.209 ms/op 43.662 ms/op 0.97
getNextSyncCommittee - vc 250000 10.654 ms/op 10.859 ms/op 0.98
computeSigningRoot for AttestationData 23.054 us/op 23.505 us/op 0.98
hash AttestationData serialized data then Buffer.toString(base64) 1.6441 us/op 1.5771 us/op 1.04
toHexString serialized data 1.2269 us/op 1.2804 us/op 0.96
Buffer.toString(base64) 165.37 ns/op 155.38 ns/op 1.06
nodejs block root to RootHex using toHex 152.81 ns/op 142.53 ns/op 1.07
nodejs block root to RootHex using toRootHex 87.724 ns/op 86.528 ns/op 1.01
nodejs fromhex(blob) 114.47 ms/op 115.85 ms/op 0.99
nodejs fromHexInto(blob) 92.699 ms/op 94.326 ms/op 0.98
browser block root to RootHex using the deprecated toHexString 207.06 ns/op 214.50 ns/op 0.97
browser block root to RootHex using toHex 171.87 ns/op 172.22 ns/op 1.00
browser block root to RootHex using toRootHex 162.35 ns/op 165.65 ns/op 0.98
browser fromHexInto(blob) 808.22 us/op 828.66 us/op 0.98
browser fromHex(blob) 808.68 ms/op 790.68 ms/op 1.02

by benchmarkbot/action

@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