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: do not bind a mainline DHT socket #2296

Merged
merged 1 commit into from
May 16, 2024
Merged

fix: do not bind a mainline DHT socket #2296

merged 1 commit into from
May 16, 2024

Conversation

Frando
Copy link
Member

@Frando Frando commented May 15, 2024

Description

By merging #2188 we unknowingly made iroh bind a socket for a mainline DHT.
Pkarr includes code for querying records from the bittorent mainline DHT behind a dht feature flag, which is disabled in iroh-net but with #2188 is enabled in iroh-dns-server, and due to feature unification in cargo workspaces this silently also enabled the feature in iroh-net.

The DHT is not used because we only use the relay_ methods of the pkarr client in iroh-net. It is binding a socket, but not doing anything else because it has no bootstrap node configured.

Still, this is unfortunate - we are shipping code and binding a socket for a feature we don't (yet) use.

From a cursory skim of the source code, this would still be the same with the recently released pkarr v2.

We should check the docs on feature unification if there is a clean way around that.

For now, this PR makes iroh not bind a socket for an unused mainline DHT client. Instead, we just use reqwest directly, which is the same as what PkarrClient::relay_put would do here.

Breaking Changes

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates if relevant.
  • Tests if relevant.
  • All breaking changes documented.

Copy link
Contributor

@flub flub left a comment

Choose a reason for hiding this comment

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

Please use the checklist :)

@Frando Frando added this pull request to the merge queue May 16, 2024
Merged via the queue into main with commit 491012c May 16, 2024
26 checks passed
@dignifiedquire dignifiedquire deleted the fix/no-mainline-yet branch May 16, 2024 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants