Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced IPv6 support (libp2p) #8332

Merged
merged 17 commits into from
May 29, 2024

Conversation

StefanBratanov
Copy link
Contributor

@StefanBratanov StefanBratanov commented May 23, 2024

PR Description

Add new options (hidden for now until discovery is adapted for dual stack as well):

  • --Xp2p-port-ipv6
  • --Xp2p-advertised-port-ipv6

Also enhanced --p2p-interface and --p2p-advertised-ip to accept multiple entries to support dual-stack (IPv4 and IPv6), but for the moment didn't add changes to description until we unhide the ipv6 feature entirely.

Testing (dual stack)

13:49:11.601 INFO  - Listening for connections on: /ip4/127.0.0.1/tcp/9000/p2p/16Uiu2HAm8vhQ3odDV2YkNFH5ZE2HmCEFX1Q83nSX3fLRroinQdtS,/ip6/2a01:4b00:875c:9500:d55c:71df:3af7:9f1f/tcp/9090/p2p/16Uiu2HAm8vhQ3odDV2YkNFH5ZE2HmCEFX1Q83nSX3fLRroinQdtS

Response from eth/v1/node/identity

{
  "data": {
    "peer_id": "16Uiu2HAm8vhQ3odDV2YkNFH5ZE2HmCEFX1Q83nSX3fLRroinQdtS",
    "enr": "enr:-LK4QL4QeqrRSLtOvXSW4n1IstncRls_CPhhrBzPiOG4yAXlWtXq2GqAFXk2kC_Cxne7QH7F-mkjxvcnhI6zt8ySdHUEh2F0dG5ldHOIBgAAAAAAAACEZXRoMpBqlaGpBAAAAP__________gmlkgnY0gmlwhH8AAAGJc2VjcDI1NmsxoQLIl2CHsAAMhZN_Jmh_Tr3dM9huh4cYFN0_ItPq9XBwv4N0Y3CCIyiDdWRwgiMo",
    "p2p_addresses": [
      "/ip4/127.0.0.1/tcp/9000/p2p/16Uiu2HAm8vhQ3odDV2YkNFH5ZE2HmCEFX1Q83nSX3fLRroinQdtS",
      "/ip6/2a01:4b00:875c:9500:d55c:71df:3af7:9f1f/tcp/9090/p2p/16Uiu2HAm8vhQ3odDV2YkNFH5ZE2HmCEFX1Q83nSX3fLRroinQdtS"
    ],
    "discovery_addresses": [
      "/ip4/127.0.0.1/udp/9000/p2p/16Uiu2HAm8vhQ3odDV2YkNFH5ZE2HmCEFX1Q83nSX3fLRroinQdtS"
    ],
    "metadata": {
      "seq_number": "1",
      "attnets": "0x0600000000000000",
      "syncnets": "0x00"
    }
  }
}

Fixed Issue(s)

related to #8069

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

@StefanBratanov StefanBratanov marked this pull request as draft May 23, 2024 19:21
@StefanBratanov StefanBratanov added the doc-change-required Indicates an issue or PR that requires doc to be updated label May 24, 2024
@StefanBratanov StefanBratanov changed the title Enhanced IPv6 support Enhanced IPv6 support (libp2p) May 24, 2024
@StefanBratanov StefanBratanov removed the doc-change-required Indicates an issue or PR that requires doc to be updated label May 24, 2024
@StefanBratanov StefanBratanov marked this pull request as ready for review May 24, 2024 11:33
@tbenr
Copy link
Contributor

tbenr commented May 24, 2024

have you tried single stack ipV6 ? Discovery won't work but we should be able to run over outbound connections only.

@StefanBratanov
Copy link
Contributor Author

have you tried single stack ipV6 ? Discovery won't work but we should be able to run over outbound connections only.

Yes. Discovery still works though. It doesn't support dual-stack but works with single stack IPv6.

tbenr
tbenr previously requested changes May 27, 2024
Copy link
Contributor

@tbenr tbenr left a comment

Choose a reason for hiding this comment

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

One thing that does not convince me is that we are leaking the feature via --p2p-advertised-ips and --p2p-interfaces aliases but then we hide the v6 options via --X. Maybe you're right but i'd like to discuss it

@tbenr
Copy link
Contributor

tbenr commented May 27, 2024

Sorry I didn't mean to "request changes", I pressed the wrong button on intelliJ :)

@StefanBratanov StefanBratanov force-pushed the enhanced_ipv6_support branch from a3896ad to 34ed694 Compare May 28, 2024 09:03
@StefanBratanov StefanBratanov dismissed tbenr’s stale review May 28, 2024 19:50

Pressed wrong button

Copy link
Contributor

@tbenr tbenr left a comment

Choose a reason for hiding this comment

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

LGTM. with a doubt

@StefanBratanov StefanBratanov force-pushed the enhanced_ipv6_support branch from 03c1ef8 to b572dcf Compare May 29, 2024 09:04
@StefanBratanov StefanBratanov enabled auto-merge (squash) May 29, 2024 09:11
@StefanBratanov StefanBratanov merged commit 45b612d into Consensys:master May 29, 2024
15 of 16 checks passed
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