Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This enables ipv4 and ipv6 by default in Lighthouse.
However, after finishing this PR, I think maybe this isn't a good idea.
Motivation
IPv6 has been around for quite a few years now and most parts of the internet are supporting it. It is strange that a cutting-edge blockchain such as Ethereum doesn't support it natively. I've tested Lighthouse quite a bit and our recent upgrades should have no problem supporting IPv6. The problem is that we need a few more nodes on our DHT to also support IPv6 for some of the discovery mechanisms to function. So we need to bootstrap the network with a few IPv6 nodes and our original plan was to make lighthouse do this by default if the host system supports a globally routable IPV6 address.
What this PR does
If a user has specified a listening address of
0.0.0.0
and their node also has a globally routable IPv6 address (i.e their ISP and router is configured for IPv6, then we also listen on::
and go to dual stack mode. This also adds a CLI to disable this default behaviour--disable-ipv6
.Why I no longer like this approach
0.0.0.0
they may not expect us to secretly also open::
and expose those ports when they have not specifically set it. I think if users are exposing ports on their computers they need to do it explicitly rather than us trying to force ipv6 on them.--ip-address ::
also to enable dual stack.After some thought I think the best approach is just via education rather than code. We should make announcements and encourage users to support dual stack, rather than set it by default.
I'll leave this PR around in case others feel differently.
Also, this should not be merged until: sigp/discv5#275