-
Notifications
You must be signed in to change notification settings - Fork 904
Ipv6 #3971
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
Ipv6 #3971
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a preliminary review, looks good.
There is a lot more conditional handling of CLI args. It might be worth adding some tests here to try and check some of these: https://github.com/sigp/lighthouse/blob/stable/lighthouse/tests/beacon_node.rs
(I can help out with these tests when this PR is ready for final review)
.or_else(|| config.listen_addresses.v4().map(|v4_addr| v4_addr.tcp_port)); | ||
if let Some(tcp_port) = tcp4_port { | ||
builder.tcp4(tcp_port); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 - Is there a case where this can be None
? Should we error in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when it's an only ipv6 node, which wouldn't be an error
beacon_node/network/src/nat.rs
Outdated
udp_port: config.discovery_port, | ||
impl UPnPConfig { | ||
pub fn from_config(config: &NetworkConfig) -> Option<Self> { | ||
// TODO: need to read more on UPnP over ipv6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah me too. I think the UPnP library is pretty opaque and we just send it IPs and the router tries to open them for us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for completeness I add it here: the lib we use accepts exclusively ipv4 addresses so this is basically left as work for the future
lcli/src/generate_bootnode_enr.rs
Outdated
@@ -25,10 +25,21 @@ pub fn run<T: EthSpec>(matches: &ArgMatches) -> Result<(), String> { | |||
)); | |||
} | |||
|
|||
// TODO: allow using dual stack. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Libp2p supports this right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the generate_bootnode_enr
so I think this is not relevant here. I'm disallowing dual stack in this cases for now, but to answer the question yes of course
closed in favor of #4046 |
Issue Addressed
Add support for ipv6 and dual stack in lighthouse.
Proposed Changes
From an user perspective, now setting an ipv6 address, optionally configuring the ports should feel exactly the same as using an ipv4 address. If listening over both ipv4 and ipv6 then the user needs to:
--listen-address
two times (ipv4 and ipv6 addresses)--port6
becomes then required--discovery-port6
can now be used to additionally configure the ipv6 udp portRough list of code changes
unused_port
functions to specify that they are over ipv4.Additional Info
TODOs: