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

Support listening both IPv4 and IPv6 + NodeRecord extension #178

Merged
merged 14 commits into from
Jun 25, 2024

Conversation

StefanBratanov
Copy link
Contributor

@StefanBratanov StefanBratanov commented May 30, 2024

PR Description

  • Allow to pass multiple listen addresses and ports
  • Expose IPv6 methods in NodeRecord

Change CircleCI to use machine executor instead of docker as per https://circleci.com/docs/faq/#ipv6-in-tests

Fixed Issue(s)

fixes #176

@StefanBratanov StefanBratanov marked this pull request as ready for review June 11, 2024 07:54
Copy link
Contributor

@zilm13 zilm13 left a comment

Choose a reason for hiding this comment

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

LGTM

this.channel = channel;
final Publisher<NetworkParcel> outgoingStream, final List<NioDatagramChannel> channels) {
this.ip4Channel = channels.stream().filter(channel -> !isChannelIPv6(channel)).findFirst();
this.ip6Channel = channels.stream().filter(this::isChannelIPv6).findFirst();
Flux.from(outgoingStream)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we throw here if both are empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed the design a bit. You can have a look.

@Nashatyrev Nashatyrev self-requested a review June 13, 2024 13:36
Copy link
Contributor

@Nashatyrev Nashatyrev left a comment

Choose a reason for hiding this comment

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

LGTM

this.channel = channel;
final Publisher<NetworkParcel> outgoingStream,
final Map<InternetProtocolFamily, NioDatagramChannel> channels) {
this.channels = channels;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd add throw if channels is empty.

@StefanBratanov StefanBratanov merged commit 09182b6 into Consensys:master Jun 25, 2024
3 checks passed
@StefanBratanov StefanBratanov deleted the dual_stack_support branch June 25, 2024 10:50
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.

Support listening and advertising dual-stack (IPv4 and IPv6)
3 participants