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

Remove fqdn() function from libp2p-dns #2027

Merged
merged 3 commits into from
Apr 1, 2021
Merged

Conversation

tomaka
Copy link
Member

@tomaka tomaka commented Apr 1, 2021

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Do I understand correctly that without fqdn(), i.e. without (falsely) making all domains fully-qualified domains, we do two queries for each domain, even though one might suffice for fully-qualified domains? Put differently, this change has a performance impact only, while restoring correctness across all cases?

@tomaka
Copy link
Member Author

tomaka commented Apr 1, 2021

As far as I understand, yes

@mxinden
Copy link
Member

mxinden commented Apr 1, 2021

@tomaka have you had the chance to test both the fully qualified and the not fully qualified case?

@tomaka
Copy link
Member Author

tomaka commented Apr 1, 2021

I did not test this, as the fix seems obvious to me.
The trust-dns library expects a domain name. We do some pre-transformation on the domain name passed by the user. This PR removes this transformation so that trust-dns gets passed the exact value that the user requested.
If this introduces a bug, it can only either be in trust-dns or was already present before this PR.

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Just tested this with a non fully qualified domain locally with DnsConfig::system() which works as expected.

I can cut a new patch release of libp2p-dns. Is that good enough for you @montekki?

@montekki
Copy link
Contributor

montekki commented Apr 1, 2021

Yeah as soon as we can propagate it into the polkadot codebase

@mxinden mxinden merged commit 2017c5c into libp2p:master Apr 1, 2021
@tomaka tomaka deleted the rm-fqdn branch April 1, 2021 14:13
@mxinden
Copy link
Member

mxinden commented Apr 1, 2021

libp2p-dns v0.28.1 is published and tagged. Thanks for the patch @tomaka.

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.

/dns/ is no longer resolving records that are actually resolvable
3 participants