-
Notifications
You must be signed in to change notification settings - Fork 299
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 (discovery) #8410
Enhanced IPv6 support (discovery) #8410
Conversation
2d0cc3d
to
6dc55fe
Compare
networking/p2p/src/main/java/tech/pegasys/teku/networking/p2p/network/config/NetworkConfig.java
Outdated
Show resolved
Hide resolved
@@ -36,8 +36,10 @@ public class NodeRecordConverter { | |||
|
|||
public Optional<DiscoveryPeer> convertToDiscoveryPeer( | |||
final NodeRecord nodeRecord, final SchemaDefinitions schemaDefinitions) { | |||
// TODO: https://github.com/Consensys/teku/issues/8069 |
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.
Not clear why it's needed here
We get tcp6 in or
here, isn't it not enough? We need list here too?
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.
to be fair, probably or
is enough. It's just that in this case, if we are dual-stack, we would always try to connect to IPv4 when ideally we would prefer 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.
Will tackle in future PR
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.
So my message was in case if someone other will take it in future, I want it to be clear for anyone else, what do we want there ideally
final boolean userExplicitlySetAdvertisedIpOrPort, final int advertisedTcpPort) { | ||
if (userExplicitlySetAdvertisedIpOrPort) { | ||
private NewAddressHandler maybeUpdateNodeRecord(final NetworkConfig p2pConfig) { | ||
if (p2pConfig.hasUserExplicitlySetAdvertisedIps()) { |
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.
I don't understand this, shouldn't it be inversed?
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.
Same behaviour as before. If user explicitly sets advertised IPs, they are added in the ENR. Otherwise, NewAddressHandler is communicated between nodes who don't have explicit advertised ips, in that case, we want to have a handler configured in discovery
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.
Needed to look into discovery to understand. So it fires when user address is changed and when advertised is configured it means that we should prefer advertised over anything changed, clear now
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.
LGTM
PR Description
--Xp2p-udp-port-ipv6
and--Xp2p-advertised-udp-port-ipv6
24.6.0
Optional<List<String>>
inDiscV5Service.getDiscoveryAddress
This PR doesn't break any current functionality and everything else is hidden.
Fixed Issue(s)
related to #8069
Documentation
doc-change-required
label to this PR if updates are required.Changelog