nimbus-eth2 icon indicating copy to clipboard operation
nimbus-eth2 copied to clipboard

Feature: IPv6 support

Open yorickdowne opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe.

With CGNAT becoming more prevalent, peering is hard for users when IPv4 incoming connections are not available.

Describe the solution you'd like

Support IPv6 for P2P. This could be done by doing dual-stack by default, and as well by allowing one v4 and one v6 --listen-address. Lighthouse for example does --listen-address 0.0.0.0 --listen-address :: for dual-stack, and specifying only either gets you a v4 or v6 solo stack.

Context

P2P support is the driver, here. Metrics, REST, key manager, all can stay v4, at least initially. If it's trivial to make them dual-stack as well, by all means do, but for the bulk of users where this is an issue - home users with CGNAT - they'll have v4 available and they won't need to reach REST via v6 from "the Internet"

yorickdowne avatar Apr 18 '23 17:04 yorickdowne

Depends on https://github.com/status-im/nim-eth/issues/243

See also discussion in https://github.com/status-im/nim-eth/pull/367

tersec avatar Apr 18 '23 17:04 tersec

More IPv6 discussion: https://github.com/status-im/nimbus-eth2/issues/2210

tersec avatar Apr 23 '23 18:04 tersec

Looked into how other server software deals with config (apache and nginx in this case), here's a UX plan at least:

  • when launching the client without any particular options, we should create a single dual stack socket listening on [::], ie any address/any IP version
  • if --listen-address= is given, same as above (ie empty string)
  • if --listen-address=0.0.0.0 is given, we create a single-stack ipv4 socket (disabling ipv6 if available)
  • if --listen-address=:: is given, we create a single-stack ipv6 socket (disabling ipv4)

In the future, we can support multiple --listen-address to bind to several specific protocols and interfaces.

arnetheduck avatar Mar 08 '24 13:03 arnetheduck

Depends on https://github.com/status-im/nimbus-eth2/issues/6060 / https://github.com/status-im/nimbus-eth2/pull/6154 for full functionality

tersec avatar May 24 '24 06:05 tersec