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

Unhide IPv6/dual-stack options #8451

Merged
merged 6 commits into from
Aug 1, 2024

Conversation

StefanBratanov
Copy link
Contributor

@StefanBratanov StefanBratanov commented Jul 17, 2024

PR Description

Unhide IPv6/dual-stack CLI options

Fixed Issue(s)

fixes #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.

rolfyone
rolfyone previously approved these changes Jul 18, 2024
Copy link
Contributor

@rolfyone rolfyone left a comment

Choose a reason for hiding this comment

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

one note, this does kind of indicate there's no tests around any of these flags that were dev flags, as not one test broke... Maybe we should at least have a test that sets all the flags and checks values, and also maybe one that checks defaults?

@StefanBratanov
Copy link
Contributor Author

one note, this does kind of indicate there's no tests around any of these flags that were dev flags, as not one test broke... Maybe we should at least have a test that sets all the flags and checks values, and also maybe one that checks defaults?

Good point. I will add couple of tests.

@StefanBratanov
Copy link
Contributor Author

Dual-stack testing on Azure VMs

{
  "data": {
    "peer_id": "16Uiu2HAmS2wbEc4uWrG4wgt9Q9M6CqpbkrjjZVLQNqZ166dqG4Eq",
    "enr": "enr:-Ne4QF5D0VupPdhSKWZ3f2BlS6hiyu6Gcz1n588EcIFhXJbuPGJaj5KxsG7YNCElJWL8Y0Ir38-GKJnRt-c5jst79HISh2F0dG5ldHOIYAAAAAAAAACEZXRoMpBprg6ZBQFwAP__________gmlkgnY0gmlwhDSTE9aDaXA2kCYDEBAAAgACAAAAAAAAAMiJc2VjcDI1NmsxoQPGx5ZsyWMK75P7njAVf5DetfkkfyPA4USwmJI0nn18JoN0Y3CCIyiEdGNwNoIjgoN1ZHCCIyiEdWRwNoIjgg",
    "p2p_addresses": [
      "/ip4/52.147.19.214/tcp/9000/p2p/16Uiu2HAmS2wbEc4uWrG4wgt9Q9M6CqpbkrjjZVLQNqZ166dqG4Eq",
      "/ip6/2603:1010:2:2::c8/tcp/9090/p2p/16Uiu2HAmS2wbEc4uWrG4wgt9Q9M6CqpbkrjjZVLQNqZ166dqG4Eq"
    ],
    "discovery_addresses": [
      "/ip4/52.147.19.214/udp/9000/p2p/16Uiu2HAmS2wbEc4uWrG4wgt9Q9M6CqpbkrjjZVLQNqZ166dqG4Eq",
      "/ip6/2603:1010:2:2::c8/udp/9090/p2p/16Uiu2HAmS2wbEc4uWrG4wgt9Q9M6CqpbkrjjZVLQNqZ166dqG4Eq"
    ],
    "metadata": {
      "seq_number": "1",
      "attnets": "0x6000000000000000",
      "syncnets": "0x00"
    }
  }
}

Getting inbound/outbound connections

{
  "direction": "inbound",
  "count": 19
}
{
  "direction": "outbound",
  "count": 51
}

@StefanBratanov
Copy link
Contributor Author

Tested locally with two nodes (IPv6 only)

image

@StefanBratanov StefanBratanov marked this pull request as ready for review August 1, 2024 09:05
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Unhid IPv6/dual-stack CLI options to enhance configurability for environments requiring both IPv4 and IPv6 support.

  • Updated DiscoveryConfig.java to use --p2p-udp-port-ipv6 and --p2p-advertised-udp-port-ipv6 instead of hidden options.
  • Modified NetworkConfig.java to remove the 'X' prefix from IPv6-related options, making them visible.
  • Adjusted P2POptions.java to unhide IPv6 ports and advertised addresses, updating descriptions for clarity.
  • Added tests in P2POptionsTest.java to verify default ports for IPv6 and dual-stack configurations.

4 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

@StefanBratanov
Copy link
Contributor Author

Tested on Azure VMs:

First VM with second VM as a static peer (outbound):
image

Second VM has first VM as a peer (inbound)
image

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

@StefanBratanov StefanBratanov merged commit 59e78d4 into Consensys:master Aug 1, 2024
16 checks passed
@StefanBratanov StefanBratanov deleted the unhide_ipv6_options branch August 1, 2024 10:08
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.

Enhanced IPv6 support
3 participants