Skip to content

fix: libp2p v3 unknown peers - #8960

Merged
wemeetagain merged 4 commits into
unstablefrom
nflaig/libp2p3-unknown-peers
Feb 25, 2026
Merged

fix: libp2p v3 unknown peers#8960
wemeetagain merged 4 commits into
unstablefrom
nflaig/libp2p3-unknown-peers

Conversation

@nflaig

@nflaig nflaig commented Feb 25, 2026

Copy link
Copy Markdown
Member

Squash merged #8958 and reverted #8955.

Deployed to feat1

@gemini-code-assist

Copy link
Copy Markdown
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 issues with unknown peers in Libp2p v3 by refining the peer identification and metrics handling within the beacon node. It introduces a specific workaround to prevent an 'identify EOF race' condition during metrics collection and significantly simplifies the internal logic for tracking and identifying peers, leading to a more robust and efficient network layer.

Highlights

  • Libp2p Metrics Workaround: Implemented a workaround for an 'identify EOF race' condition in Libp2p metrics by preventing '/ipfs/id/1.0.0' protocol streams from being tracked, ensuring correct metric collection.
  • Simplified Peer Identification: Streamlined the peer identification process by removing the 'identifyInProgress' map and associated logic, simplifying how peer agent versions are determined and reducing complexity.
  • Test Suite Refinement: Removed obsolete test cases related to the previous complex peer identification and deduplication mechanisms, aligning tests with the simplified implementation.

🧠 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/beacon-node/src/network/libp2p/index.ts
    • Introduced a 'libp2pMetrics' constant with a custom 'trackProtocolStream' function to bypass '/ipfs/id/1.0.0' streams, mitigating an 'identify EOF race'.
    • Updated the 'createLibp2p' configuration to use the newly defined 'libp2pMetrics'.
  • packages/beacon-node/src/network/peers/peerManager.ts
    • Removed the 'IdentifyResult' type import.
    • Eliminated the 'identifyInProgress' map and all related logic for tracking in-flight identify calls.
    • Removed event listeners for 'Libp2pEvent.peerIdentify' and the 'onPeerIdentify' method.
    • Simplified the 'identifyPeer' method signature and its invocation, removing the 'identifyKey' parameter.
  • packages/beacon-node/test/e2e/network/peers/peerManager.test.ts
    • Deleted test cases that validated the deduplication of in-flight identify requests, handling of stale results, and agent version updates via 'peer:identify' events.
Activity
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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 addresses an issue with identifying peers in libp2p v3. The main change introduces a workaround for a race condition between the metrics collection and the identify protocol by preventing the metrics system from tracking the identify protocol's stream. Additionally, a previous implementation for handling peer identification has been reverted. This simplifies the logic in PeerManager by removing the mechanism for tracking in-flight identify requests and its associated event handlers and tests. The new approach triggers an explicit identify call once a peer is confirmed to be relevant. The changes appear to be consistent and address the described issue.

@github-actions

Copy link
Copy Markdown
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: d4f637b Previous: 96f78af Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.0853 ms/op 1.0780 ms/op 1.01
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 41.472 us/op 37.055 us/op 1.12
BLS verify - blst 1.5286 ms/op 1.4334 ms/op 1.07
BLS verifyMultipleSignatures 3 - blst 1.6871 ms/op 2.2422 ms/op 0.75
BLS verifyMultipleSignatures 8 - blst 2.4986 ms/op 2.5275 ms/op 0.99
BLS verifyMultipleSignatures 32 - blst 7.3867 ms/op 7.4002 ms/op 1.00
BLS verifyMultipleSignatures 64 - blst 11.095 ms/op 10.709 ms/op 1.04
BLS verifyMultipleSignatures 128 - blst 18.254 ms/op 17.008 ms/op 1.07
BLS deserializing 10000 signatures 692.76 ms/op 675.54 ms/op 1.03
BLS deserializing 100000 signatures 6.8750 s/op 6.7732 s/op 1.02
BLS verifyMultipleSignatures - same message - 3 - blst 1.3175 ms/op 863.34 us/op 1.53
BLS verifyMultipleSignatures - same message - 8 - blst 1.0187 ms/op 1.1328 ms/op 0.90
BLS verifyMultipleSignatures - same message - 32 - blst 1.8641 ms/op 1.8409 ms/op 1.01
BLS verifyMultipleSignatures - same message - 64 - blst 2.7727 ms/op 2.6820 ms/op 1.03
BLS verifyMultipleSignatures - same message - 128 - blst 4.5642 ms/op 4.4462 ms/op 1.03
BLS aggregatePubkeys 32 - blst 20.404 us/op 18.866 us/op 1.08
BLS aggregatePubkeys 128 - blst 72.515 us/op 67.549 us/op 1.07
getSlashingsAndExits - default max 67.762 us/op 64.833 us/op 1.05
getSlashingsAndExits - 2k 307.14 us/op 336.03 us/op 0.91
isKnown best case - 1 super set check 196.00 ns/op 192.00 ns/op 1.02
isKnown normal case - 2 super set checks 195.00 ns/op 190.00 ns/op 1.03
isKnown worse case - 16 super set checks 258.00 ns/op 190.00 ns/op 1.36
validate api signedAggregateAndProof - struct 1.5323 ms/op 1.7098 ms/op 0.90
validate gossip signedAggregateAndProof - struct 2.5721 ms/op 1.9837 ms/op 1.30
batch validate gossip attestation - vc 640000 - chunk 32 115.39 us/op 118.97 us/op 0.97
batch validate gossip attestation - vc 640000 - chunk 64 102.10 us/op 100.30 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 128 95.391 us/op 92.439 us/op 1.03
batch validate gossip attestation - vc 640000 - chunk 256 91.496 us/op 89.794 us/op 1.02
bytes32 toHexString 352.00 ns/op 349.00 ns/op 1.01
bytes32 Buffer.toString(hex) 233.00 ns/op 219.00 ns/op 1.06
bytes32 Buffer.toString(hex) from Uint8Array 321.00 ns/op 305.00 ns/op 1.05
bytes32 Buffer.toString(hex) + 0x 328.00 ns/op 228.00 ns/op 1.44
Return object 10000 times 0.22750 ns/op 0.22480 ns/op 1.01
Throw Error 10000 times 4.1932 us/op 3.9659 us/op 1.06
toHex 134.69 ns/op 143.96 ns/op 0.94
Buffer.from 124.69 ns/op 122.81 ns/op 1.02
shared Buffer 78.306 ns/op 74.684 ns/op 1.05
fastMsgIdFn sha256 / 200 bytes 1.8180 us/op 1.8310 us/op 0.99
fastMsgIdFn h32 xxhash / 200 bytes 193.00 ns/op 204.00 ns/op 0.95
fastMsgIdFn h64 xxhash / 200 bytes 261.00 ns/op 354.00 ns/op 0.74
fastMsgIdFn sha256 / 1000 bytes 5.9200 us/op 5.9360 us/op 1.00
fastMsgIdFn h32 xxhash / 1000 bytes 351.00 ns/op 282.00 ns/op 1.24
fastMsgIdFn h64 xxhash / 1000 bytes 398.00 ns/op 384.00 ns/op 1.04
fastMsgIdFn sha256 / 10000 bytes 52.013 us/op 51.614 us/op 1.01
fastMsgIdFn h32 xxhash / 10000 bytes 1.3650 us/op 1.3410 us/op 1.02
fastMsgIdFn h64 xxhash / 10000 bytes 895.00 ns/op 1.0540 us/op 0.85
send data - 1000 256B messages 6.0006 ms/op 6.8218 ms/op 0.88
send data - 1000 512B messages 4.7713 ms/op 5.3659 ms/op 0.89
send data - 1000 1024B messages 5.6400 ms/op 5.4504 ms/op 1.03
send data - 1000 1200B messages 5.0792 ms/op 5.5223 ms/op 0.92
send data - 1000 2048B messages 5.4813 ms/op 6.7791 ms/op 0.81
send data - 1000 4096B messages 6.6257 ms/op 6.9201 ms/op 0.96
send data - 1000 16384B messages 34.912 ms/op 52.848 ms/op 0.66
send data - 1000 65536B messages 122.42 ms/op 125.86 ms/op 0.97
enrSubnets - fastDeserialize 64 bits 2.2520 us/op 878.00 ns/op 2.56
enrSubnets - ssz BitVector 64 bits 357.00 ns/op 329.00 ns/op 1.09
enrSubnets - fastDeserialize 4 bits 126.00 ns/op 130.00 ns/op 0.97
enrSubnets - ssz BitVector 4 bits 435.00 ns/op 332.00 ns/op 1.31
prioritizePeers score -10:0 att 32-0.1 sync 2-0 232.06 us/op 314.92 us/op 0.74
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 350.74 us/op 376.73 us/op 0.93
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 486.13 us/op 494.44 us/op 0.98
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 859.64 us/op 988.18 us/op 0.87
prioritizePeers score 0:0 att 64-1 sync 4-1 863.21 us/op 1.0541 ms/op 0.82
array of 16000 items push then shift 1.5866 us/op 1.5548 us/op 1.02
LinkedList of 16000 items push then shift 7.2460 ns/op 7.1120 ns/op 1.02
array of 16000 items push then pop 76.593 ns/op 74.817 ns/op 1.02
LinkedList of 16000 items push then pop 7.1480 ns/op 6.8430 ns/op 1.04
array of 24000 items push then shift 2.3737 us/op 2.3038 us/op 1.03
LinkedList of 24000 items push then shift 7.8860 ns/op 7.2290 ns/op 1.09
array of 24000 items push then pop 109.84 ns/op 104.73 ns/op 1.05
LinkedList of 24000 items push then pop 7.7630 ns/op 6.8630 ns/op 1.13
intersect bitArray bitLen 8 6.1730 ns/op 5.5550 ns/op 1.11
intersect array and set length 8 36.328 ns/op 32.414 ns/op 1.12
intersect bitArray bitLen 128 30.062 ns/op 26.490 ns/op 1.13
intersect array and set length 128 582.12 ns/op 533.91 ns/op 1.09
bitArray.getTrueBitIndexes() bitLen 128 1.1810 us/op 1.0280 us/op 1.15
bitArray.getTrueBitIndexes() bitLen 248 1.9080 us/op 1.9160 us/op 1.00
bitArray.getTrueBitIndexes() bitLen 512 3.7050 us/op 4.9870 us/op 0.74
Full columns - reconstruct all 6 blobs 279.34 us/op 240.03 us/op 1.16
Full columns - reconstruct half of the blobs out of 6 113.16 us/op 106.53 us/op 1.06
Full columns - reconstruct single blob out of 6 47.187 us/op 30.242 us/op 1.56
Half columns - reconstruct all 6 blobs 270.73 ms/op 257.20 ms/op 1.05
Half columns - reconstruct half of the blobs out of 6 135.35 ms/op 129.08 ms/op 1.05
Half columns - reconstruct single blob out of 6 51.761 ms/op 47.799 ms/op 1.08
Full columns - reconstruct all 10 blobs 300.84 us/op 365.23 us/op 0.82
Full columns - reconstruct half of the blobs out of 10 153.52 us/op 173.36 us/op 0.89
Full columns - reconstruct single blob out of 10 30.835 us/op 29.693 us/op 1.04
Half columns - reconstruct all 10 blobs 449.80 ms/op 428.88 ms/op 1.05
Half columns - reconstruct half of the blobs out of 10 230.72 ms/op 216.07 ms/op 1.07
Half columns - reconstruct single blob out of 10 50.376 ms/op 47.037 ms/op 1.07
Full columns - reconstruct all 20 blobs 859.64 us/op 741.02 us/op 1.16
Full columns - reconstruct half of the blobs out of 20 265.48 us/op 270.23 us/op 0.98
Full columns - reconstruct single blob out of 20 30.692 us/op 36.407 us/op 0.84
Half columns - reconstruct all 20 blobs 898.76 ms/op 844.96 ms/op 1.06
Half columns - reconstruct half of the blobs out of 20 449.23 ms/op 428.54 ms/op 1.05
Half columns - reconstruct single blob out of 20 49.323 ms/op 47.345 ms/op 1.04
Set add up to 64 items then delete first 2.0316 us/op 1.9949 us/op 1.02
OrderedSet add up to 64 items then delete first 3.0061 us/op 2.9761 us/op 1.01
Set add up to 64 items then delete last 2.2911 us/op 2.2488 us/op 1.02
OrderedSet add up to 64 items then delete last 3.4659 us/op 3.2574 us/op 1.06
Set add up to 64 items then delete middle 2.3272 us/op 2.2652 us/op 1.03
OrderedSet add up to 64 items then delete middle 5.1575 us/op 4.7921 us/op 1.08
Set add up to 128 items then delete first 4.6926 us/op 4.6940 us/op 1.00
OrderedSet add up to 128 items then delete first 6.7447 us/op 7.1492 us/op 0.94
Set add up to 128 items then delete last 4.8907 us/op 4.6138 us/op 1.06
OrderedSet add up to 128 items then delete last 7.2790 us/op 6.5657 us/op 1.11
Set add up to 128 items then delete middle 4.7665 us/op 4.4815 us/op 1.06
OrderedSet add up to 128 items then delete middle 14.389 us/op 12.872 us/op 1.12
Set add up to 256 items then delete first 10.253 us/op 9.8693 us/op 1.04
OrderedSet add up to 256 items then delete first 14.877 us/op 14.348 us/op 1.04
Set add up to 256 items then delete last 10.099 us/op 9.1929 us/op 1.10
OrderedSet add up to 256 items then delete last 15.014 us/op 13.452 us/op 1.12
Set add up to 256 items then delete middle 9.6521 us/op 8.9692 us/op 1.08
OrderedSet add up to 256 items then delete middle 42.506 us/op 39.473 us/op 1.08
pass gossip attestations to forkchoice per slot 2.5149 ms/op 2.4663 ms/op 1.02
forkChoice updateHead vc 100000 bc 64 eq 0 505.06 us/op 484.80 us/op 1.04
forkChoice updateHead vc 600000 bc 64 eq 0 3.0829 ms/op 2.8843 ms/op 1.07
forkChoice updateHead vc 1000000 bc 64 eq 0 5.1163 ms/op 4.8060 ms/op 1.06
forkChoice updateHead vc 600000 bc 320 eq 0 3.0683 ms/op 2.8949 ms/op 1.06
forkChoice updateHead vc 600000 bc 1200 eq 0 3.1224 ms/op 2.9300 ms/op 1.07
forkChoice updateHead vc 600000 bc 7200 eq 0 3.4605 ms/op 3.2414 ms/op 1.07
forkChoice updateHead vc 600000 bc 64 eq 1000 3.5489 ms/op 3.3088 ms/op 1.07
forkChoice updateHead vc 600000 bc 64 eq 10000 3.7162 ms/op 3.4325 ms/op 1.08
forkChoice updateHead vc 600000 bc 64 eq 300000 9.3873 ms/op 8.5581 ms/op 1.10
computeDeltas 1400000 validators 0% inactive 14.866 ms/op 14.140 ms/op 1.05
computeDeltas 1400000 validators 10% inactive 14.121 ms/op 13.226 ms/op 1.07
computeDeltas 1400000 validators 20% inactive 13.061 ms/op 12.329 ms/op 1.06
computeDeltas 1400000 validators 50% inactive 10.281 ms/op 9.6370 ms/op 1.07
computeDeltas 2100000 validators 0% inactive 23.023 ms/op 21.164 ms/op 1.09
computeDeltas 2100000 validators 10% inactive 21.165 ms/op 19.784 ms/op 1.07
computeDeltas 2100000 validators 20% inactive 19.152 ms/op 18.428 ms/op 1.04
computeDeltas 2100000 validators 50% inactive 15.277 ms/op 14.437 ms/op 1.06
altair processAttestation - 250000 vs - 7PWei normalcase 2.1658 ms/op 1.8340 ms/op 1.18
altair processAttestation - 250000 vs - 7PWei worstcase 3.0074 ms/op 2.7259 ms/op 1.10
altair processAttestation - setStatus - 1/6 committees join 129.60 us/op 115.87 us/op 1.12
altair processAttestation - setStatus - 1/3 committees join 235.58 us/op 229.03 us/op 1.03
altair processAttestation - setStatus - 1/2 committees join 342.88 us/op 323.47 us/op 1.06
altair processAttestation - setStatus - 2/3 committees join 430.45 us/op 417.64 us/op 1.03
altair processAttestation - setStatus - 4/5 committees join 589.59 us/op 589.89 us/op 1.00
altair processAttestation - setStatus - 100% committees join 698.28 us/op 682.68 us/op 1.02
altair processBlock - 250000 vs - 7PWei normalcase 3.5511 ms/op 3.4927 ms/op 1.02
altair processBlock - 250000 vs - 7PWei normalcase hashState 17.758 ms/op 15.394 ms/op 1.15
altair processBlock - 250000 vs - 7PWei worstcase 25.763 ms/op 30.171 ms/op 0.85
altair processBlock - 250000 vs - 7PWei worstcase hashState 54.004 ms/op 60.145 ms/op 0.90
phase0 processBlock - 250000 vs - 7PWei normalcase 1.5683 ms/op 1.6645 ms/op 0.94
phase0 processBlock - 250000 vs - 7PWei worstcase 26.899 ms/op 30.370 ms/op 0.89
altair processEth1Data - 250000 vs - 7PWei normalcase 369.58 us/op 364.19 us/op 1.01
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 5.8720 us/op 9.1470 us/op 0.64
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 54.209 us/op 54.170 us/op 1.00
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 16.573 us/op 16.182 us/op 1.02
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 11.048 us/op 10.629 us/op 1.04
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 236.97 us/op 236.94 us/op 1.00
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.6985 ms/op 1.6472 ms/op 1.03
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.0733 ms/op 2.0882 ms/op 0.99
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.2376 ms/op 2.0836 ms/op 1.07
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.6662 ms/op 4.2732 ms/op 1.09
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.5559 ms/op 2.4314 ms/op 1.05
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.9394 ms/op 4.7278 ms/op 1.04
Tree 40 250000 create 380.40 ms/op 383.98 ms/op 0.99
Tree 40 250000 get(125000) 129.91 ns/op 127.60 ns/op 1.02
Tree 40 250000 set(125000) 1.2802 us/op 1.1858 us/op 1.08
Tree 40 250000 toArray() 12.607 ms/op 12.449 ms/op 1.01
Tree 40 250000 iterate all - toArray() + loop 12.589 ms/op 12.227 ms/op 1.03
Tree 40 250000 iterate all - get(i) 43.455 ms/op 42.590 ms/op 1.02
Array 250000 create 2.4317 ms/op 2.4240 ms/op 1.00
Array 250000 clone - spread 799.26 us/op 797.85 us/op 1.00
Array 250000 get(125000) 0.42300 ns/op 0.34300 ns/op 1.23
Array 250000 set(125000) 0.34600 ns/op 0.34500 ns/op 1.00
Array 250000 iterate all - loop 61.244 us/op 60.161 us/op 1.02
phase0 afterProcessEpoch - 250000 vs - 7PWei 40.571 ms/op 41.232 ms/op 0.98
Array.fill - length 1000000 2.9957 ms/op 2.9636 ms/op 1.01
Array push - length 1000000 9.2606 ms/op 10.649 ms/op 0.87
Array.get 0.21265 ns/op 0.21357 ns/op 1.00
Uint8Array.get 0.22076 ns/op 0.23231 ns/op 0.95
phase0 beforeProcessEpoch - 250000 vs - 7PWei 14.483 ms/op 13.941 ms/op 1.04
altair processEpoch - mainnet_e81889 278.60 ms/op 291.31 ms/op 0.96
mainnet_e81889 - altair beforeProcessEpoch 21.215 ms/op 18.351 ms/op 1.16
mainnet_e81889 - altair processJustificationAndFinalization 7.0900 us/op 6.1470 us/op 1.15
mainnet_e81889 - altair processInactivityUpdates 3.9874 ms/op 3.7358 ms/op 1.07
mainnet_e81889 - altair processRewardsAndPenalties 18.178 ms/op 17.747 ms/op 1.02
mainnet_e81889 - altair processRegistryUpdates 744.00 ns/op 634.00 ns/op 1.17
mainnet_e81889 - altair processSlashings 249.00 ns/op 164.00 ns/op 1.52
mainnet_e81889 - altair processEth1DataReset 178.00 ns/op 209.00 ns/op 0.85
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.1498 ms/op 2.2148 ms/op 0.97
mainnet_e81889 - altair processSlashingsReset 797.00 ns/op 815.00 ns/op 0.98
mainnet_e81889 - altair processRandaoMixesReset 1.6280 us/op 1.6300 us/op 1.00
mainnet_e81889 - altair processHistoricalRootsUpdate 172.00 ns/op 164.00 ns/op 1.05
mainnet_e81889 - altair processParticipationFlagUpdates 568.00 ns/op 486.00 ns/op 1.17
mainnet_e81889 - altair processSyncCommitteeUpdates 141.00 ns/op 129.00 ns/op 1.09
mainnet_e81889 - altair afterProcessEpoch 45.162 ms/op 43.189 ms/op 1.05
capella processEpoch - mainnet_e217614 840.69 ms/op 809.57 ms/op 1.04
mainnet_e217614 - capella beforeProcessEpoch 74.989 ms/op 67.336 ms/op 1.11
mainnet_e217614 - capella processJustificationAndFinalization 6.0820 us/op 6.0500 us/op 1.01
mainnet_e217614 - capella processInactivityUpdates 14.872 ms/op 14.875 ms/op 1.00
mainnet_e217614 - capella processRewardsAndPenalties 106.80 ms/op 109.75 ms/op 0.97
mainnet_e217614 - capella processRegistryUpdates 5.7950 us/op 5.7170 us/op 1.01
mainnet_e217614 - capella processSlashings 167.00 ns/op 224.00 ns/op 0.75
mainnet_e217614 - capella processEth1DataReset 164.00 ns/op 259.00 ns/op 0.63
mainnet_e217614 - capella processEffectiveBalanceUpdates 11.460 ms/op 11.727 ms/op 0.98
mainnet_e217614 - capella processSlashingsReset 813.00 ns/op 798.00 ns/op 1.02
mainnet_e217614 - capella processRandaoMixesReset 1.3800 us/op 1.5400 us/op 0.90
mainnet_e217614 - capella processHistoricalRootsUpdate 167.00 ns/op 212.00 ns/op 0.79
mainnet_e217614 - capella processParticipationFlagUpdates 507.00 ns/op 499.00 ns/op 1.02
mainnet_e217614 - capella afterProcessEpoch 116.28 ms/op 127.17 ms/op 0.91
phase0 processEpoch - mainnet_e58758 251.63 ms/op 259.94 ms/op 0.97
mainnet_e58758 - phase0 beforeProcessEpoch 56.585 ms/op 45.192 ms/op 1.25
mainnet_e58758 - phase0 processJustificationAndFinalization 7.4040 us/op 5.5070 us/op 1.34
mainnet_e58758 - phase0 processRewardsAndPenalties 18.174 ms/op 18.423 ms/op 0.99
mainnet_e58758 - phase0 processRegistryUpdates 2.9000 us/op 3.3820 us/op 0.86
mainnet_e58758 - phase0 processSlashings 257.00 ns/op 205.00 ns/op 1.25
mainnet_e58758 - phase0 processEth1DataReset 223.00 ns/op 153.00 ns/op 1.46
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1406 ms/op 1.2568 ms/op 0.91
mainnet_e58758 - phase0 processSlashingsReset 827.00 ns/op 945.00 ns/op 0.88
mainnet_e58758 - phase0 processRandaoMixesReset 1.1090 us/op 1.1170 us/op 0.99
mainnet_e58758 - phase0 processHistoricalRootsUpdate 163.00 ns/op 166.00 ns/op 0.98
mainnet_e58758 - phase0 processParticipationRecordUpdates 883.00 ns/op 796.00 ns/op 1.11
mainnet_e58758 - phase0 afterProcessEpoch 34.983 ms/op 34.164 ms/op 1.02
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.4748 ms/op 1.3099 ms/op 1.89
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.1722 ms/op 1.9369 ms/op 1.12
altair processInactivityUpdates - 250000 normalcase 12.747 ms/op 12.249 ms/op 1.04
altair processInactivityUpdates - 250000 worstcase 13.701 ms/op 12.259 ms/op 1.12
phase0 processRegistryUpdates - 250000 normalcase 7.3020 us/op 7.5800 us/op 0.96
phase0 processRegistryUpdates - 250000 badcase_full_deposits 305.07 us/op 180.94 us/op 1.69
phase0 processRegistryUpdates - 250000 worstcase 0.5 68.157 ms/op 65.223 ms/op 1.04
altair processRewardsAndPenalties - 250000 normalcase 22.409 ms/op 16.767 ms/op 1.34
altair processRewardsAndPenalties - 250000 worstcase 21.016 ms/op 25.319 ms/op 0.83
phase0 getAttestationDeltas - 250000 normalcase 6.9930 ms/op 6.3313 ms/op 1.10
phase0 getAttestationDeltas - 250000 worstcase 7.1155 ms/op 6.5781 ms/op 1.08
phase0 processSlashings - 250000 worstcase 120.09 us/op 120.84 us/op 0.99
altair processSyncCommitteeUpdates - 250000 11.461 ms/op 10.912 ms/op 1.05
BeaconState.hashTreeRoot - No change 204.00 ns/op 224.00 ns/op 0.91
BeaconState.hashTreeRoot - 1 full validator 82.484 us/op 85.811 us/op 0.96
BeaconState.hashTreeRoot - 32 full validator 879.70 us/op 1.1578 ms/op 0.76
BeaconState.hashTreeRoot - 512 full validator 9.4959 ms/op 7.9844 ms/op 1.19
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 105.44 us/op 112.25 us/op 0.94
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.5788 ms/op 1.4110 ms/op 1.12
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 17.362 ms/op 15.429 ms/op 1.13
BeaconState.hashTreeRoot - 1 balances 90.741 us/op 85.013 us/op 1.07
BeaconState.hashTreeRoot - 32 balances 1.0287 ms/op 1.3332 ms/op 0.77
BeaconState.hashTreeRoot - 512 balances 6.5178 ms/op 7.5129 ms/op 0.87
BeaconState.hashTreeRoot - 250000 balances 164.85 ms/op 210.50 ms/op 0.78
aggregationBits - 2048 els - zipIndexesInBitList 22.494 us/op 20.124 us/op 1.12
regular array get 100000 times 26.950 us/op 23.786 us/op 1.13
wrappedArray get 100000 times 27.000 us/op 23.782 us/op 1.14
arrayWithProxy get 100000 times 15.986 ms/op 13.700 ms/op 1.17
ssz.Root.equals 24.962 ns/op 23.392 ns/op 1.07
byteArrayEquals 24.775 ns/op 23.016 ns/op 1.08
Buffer.compare 10.645 ns/op 9.7570 ns/op 1.09
processSlot - 1 slots 13.103 us/op 9.3010 us/op 1.41
processSlot - 32 slots 2.7563 ms/op 2.0625 ms/op 1.34
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 4.1942 ms/op 3.4568 ms/op 1.21
getCommitteeAssignments - req 1 vs - 250000 vc 1.9900 ms/op 1.8590 ms/op 1.07
getCommitteeAssignments - req 100 vs - 250000 vc 3.9126 ms/op 3.6381 ms/op 1.08
getCommitteeAssignments - req 1000 vs - 250000 vc 4.2199 ms/op 3.8904 ms/op 1.08
findModifiedValidators - 10000 modified validators 576.38 ms/op 575.29 ms/op 1.00
findModifiedValidators - 1000 modified validators 324.03 ms/op 579.09 ms/op 0.56
findModifiedValidators - 100 modified validators 315.18 ms/op 222.93 ms/op 1.41
findModifiedValidators - 10 modified validators 152.43 ms/op 206.37 ms/op 0.74
findModifiedValidators - 1 modified validators 156.33 ms/op 135.24 ms/op 1.16
findModifiedValidators - no difference 164.20 ms/op 130.67 ms/op 1.26
migrate state 1500000 validators, 3400 modified, 2000 new 1.0146 s/op 970.59 ms/op 1.05
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.9600 ns/op 5.0300 ns/op 0.99
state getBlockRootAtSlot - 250000 vs - 7PWei 450.70 ns/op 584.79 ns/op 0.77
computeProposerIndex 100000 validators 1.7940 ms/op 1.5136 ms/op 1.19
getNextSyncCommitteeIndices 1000 validators 131.91 ms/op 117.87 ms/op 1.12
getNextSyncCommitteeIndices 10000 validators 131.21 ms/op 117.89 ms/op 1.11
getNextSyncCommitteeIndices 100000 validators 129.68 ms/op 117.98 ms/op 1.10
computeProposers - vc 250000 672.73 us/op 613.64 us/op 1.10
computeEpochShuffling - vc 250000 47.681 ms/op 41.210 ms/op 1.16
getNextSyncCommittee - vc 250000 11.891 ms/op 10.236 ms/op 1.16
nodejs block root to RootHex using toHex 191.46 ns/op 149.22 ns/op 1.28
nodejs block root to RootHex using toRootHex 103.06 ns/op 87.956 ns/op 1.17
nodejs fromHex(blob) 259.31 us/op 165.71 us/op 1.56
nodejs fromHexInto(blob) 836.91 us/op 707.88 us/op 1.18
nodejs block root to RootHex using the deprecated toHexString 586.45 ns/op 545.97 ns/op 1.07
nodejs byteArrayEquals 32 bytes (block root) 30.161 ns/op 28.200 ns/op 1.07
nodejs byteArrayEquals 48 bytes (pubkey) 42.127 ns/op 40.422 ns/op 1.04
nodejs byteArrayEquals 96 bytes (signature) 42.625 ns/op 39.342 ns/op 1.08
nodejs byteArrayEquals 1024 bytes 48.744 ns/op 45.413 ns/op 1.07
nodejs byteArrayEquals 131072 bytes (blob) 1.9626 us/op 1.8643 us/op 1.05
browser block root to RootHex using toHex 278.10 ns/op 162.19 ns/op 1.71
browser block root to RootHex using toRootHex 172.70 ns/op 153.44 ns/op 1.13
browser fromHex(blob) 1.3379 ms/op 1.1459 ms/op 1.17
browser fromHexInto(blob) 806.63 us/op 707.83 us/op 1.14
browser block root to RootHex using the deprecated toHexString 582.76 ns/op 402.93 ns/op 1.45
browser byteArrayEquals 32 bytes (block root) 35.508 ns/op 31.007 ns/op 1.15
browser byteArrayEquals 48 bytes (pubkey) 48.680 ns/op 43.267 ns/op 1.13
browser byteArrayEquals 96 bytes (signature) 90.805 ns/op 85.192 ns/op 1.07
browser byteArrayEquals 1024 bytes 817.41 ns/op 886.23 ns/op 0.92
browser byteArrayEquals 131072 bytes (blob) 110.81 us/op 101.12 us/op 1.10

by benchmarkbot/action

@nflaig

nflaig commented Feb 25, 2026

Copy link
Copy Markdown
Member Author
image image

@nflaig
nflaig marked this pull request as ready for review February 25, 2026 10:55
@nflaig
nflaig requested a review from a team as a code owner February 25, 2026 10:55

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 32930e33a2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/beacon-node/src/network/peers/peerManager.ts
Comment thread packages/beacon-node/src/network/peers/peerManager.ts
@wemeetagain
wemeetagain merged commit 6eb5502 into unstable Feb 25, 2026
19 checks passed
@wemeetagain
wemeetagain deleted the nflaig/libp2p3-unknown-peers branch February 25, 2026 19:49
@codecov

codecov Bot commented Feb 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.26%. Comparing base (96f78af) to head (32930e3).
⚠️ Report is 2 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #8960   +/-   ##
=========================================
  Coverage     52.25%   52.26%           
=========================================
  Files           848      848           
  Lines         62949    62942    -7     
  Branches       4643     4643           
=========================================
  Hits          32897    32897           
+ Misses        29985    29978    -7     
  Partials         67       67           
🚀 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.

lodekeeper pushed a commit to lodekeeper/lodestar that referenced this pull request Mar 13, 2026
Squash merged ChainSafe#8958 and
reverted ChainSafe#8955.

Deployed to `feat1`
@wemeetagain

Copy link
Copy Markdown
Member

🎉 This PR is included in v1.41.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.

2 participants