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

Cannot find any peers in table when host not previously connected #308

Open
hsanjuan opened this issue Mar 21, 2019 · 2 comments
Open

Cannot find any peers in table when host not previously connected #308

hsanjuan opened this issue Mar 21, 2019 · 2 comments
Labels
exp/wizard Extensive knowledge (implications, ramifications) required kind/bug A bug in existing code (including security flaws) kind/enhancement A net-new feature or improvement to an existing feature

Comments

@hsanjuan
Copy link
Contributor

hsanjuan commented Mar 21, 2019

I have an rather annoying issue:

If I create an IpfsDHT on an empty Host, then I create a second Host and connect them, Bootstrapping the DHT does not seem to work (get things like `failed to find any peer in table).

Bootstrapping only works if the Host was already connected to some other peer at the moment the DHT is created, and not at the moment it is asked to bootstrap (or runs a bootstrap round).

I would expect that running BootstrapOnce (or letting the default bootstrap ticker happen) would take into account the newly added peer connections after the DHT itself was created.

Let me know if I haven't explained myself clearly. Is there a workaround for this perhaps?

@Stebalien
Copy link
Member

This may be a race. When you ask the DHT to bootstrap, it may not yet have finished probing those new peers. If you've already added those peers, we've probably finished running the identify protocol. In this case, we may need to try "bootstrapping" with our current peer list.

@Stebalien Stebalien added the kind/bug A bug in existing code (including security flaws) label Mar 21, 2019
@anacrolix
Copy link
Contributor

This is strongly related to #283 and #295.

@anacrolix anacrolix added kind/enhancement A net-new feature or improvement to an existing feature exp/wizard Extensive knowledge (implications, ramifications) required labels Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/wizard Extensive knowledge (implications, ramifications) required kind/bug A bug in existing code (including security flaws) kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants