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

fix(discovery): makes pong send only IP without hostname #2279

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

jurajpiar
Copy link
Member

As RSK user I want IP addresses (instead of DNS names) to be sent to other peers in response to FIND_NODE peer discovery message

Description

Instead of DNS hostnames a node always sends IP addresses in response to the FIND_NODE peer discovery message

Motivation and Context

As of now, in the peer discovery protocol, when a peer asks for neighbours by sending FIND_NODE message in response it gets a sub list of other discovered peers in a network. Sometimes, instead of IP addresses of remote peers that list might include DNS names resolved via reverse DNS lookup in a context of the peer that returns that response. In some cases this might lead to issues when the reverse DNS resolution happens in different network contexts, for instance, when inside AWS VPC an IP can be resolved to ip-10-10-133-54.us-west-2.compute.internal, but outside that host name would make no sense.

How Has This Been Tested?

Unit test included.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • Tests for the changes have been added (for bug fixes / features)
  • Requires Activation Code (Hard Fork)
  • Other information:

@jurajpiar jurajpiar requested a review from a team April 1, 2024 08:54
@jurajpiar jurajpiar force-pushed the jurajpiar/no_dns_for_find_node branch 3 times, most recently from c7b58f0 to bec94de Compare April 1, 2024 09:03
asoto-iov
asoto-iov previously approved these changes Apr 1, 2024
@jurajpiar jurajpiar force-pushed the jurajpiar/no_dns_for_find_node branch 3 times, most recently from ffac707 to 875b454 Compare April 1, 2024 09:50
@jurajpiar jurajpiar requested a review from asoto-iov April 1, 2024 09:55
fmacleal
fmacleal previously approved these changes Apr 1, 2024
Copy link
Contributor

@fmacleal fmacleal left a comment

Choose a reason for hiding this comment

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

Good job. I don't have any specific remark and I think that what @asoto-iov commented already cover an important part.

I am just wondering if makes sense some more small tests on the places I have commented below. Let me know your opinion, it doesn't prevent the approval.

@jurajpiar
Copy link
Member Author

pipeline:run

fmacleal
fmacleal previously approved these changes Apr 3, 2024
asoto-iov
asoto-iov previously approved these changes Apr 9, 2024
@jurajpiar jurajpiar dismissed stale reviews from asoto-iov and fmacleal via a985e90 April 11, 2024 10:01
@jurajpiar jurajpiar force-pushed the jurajpiar/no_dns_for_find_node branch from 4fb6f63 to a985e90 Compare April 11, 2024 10:01
squashme: makes safer test
@jurajpiar jurajpiar force-pushed the jurajpiar/no_dns_for_find_node branch from a985e90 to 2bd1e0d Compare April 17, 2024 15:21
Copy link

@Vovchyk
Copy link
Contributor

Vovchyk commented Apr 17, 2024

pipeline:run

1 similar comment
@Vovchyk
Copy link
Contributor

Vovchyk commented Apr 18, 2024

pipeline:run

@Vovchyk Vovchyk merged commit 6fab6d4 into master Apr 18, 2024
10 checks passed
@Vovchyk Vovchyk deleted the jurajpiar/no_dns_for_find_node branch April 18, 2024 08:36
@jurajpiar jurajpiar restored the jurajpiar/no_dns_for_find_node branch May 27, 2024 09:27
@jurajpiar jurajpiar deleted the jurajpiar/no_dns_for_find_node branch May 27, 2024 09:47
@aeidelman aeidelman added this to the Arrowhead 6.2.0 milestone May 27, 2024
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.

5 participants