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

RoutedHost.NewStream should ensure we have the means to connect to the peer #207

Closed
vyzo opened this issue Jul 21, 2017 · 5 comments
Closed
Assignees

Comments

@vyzo
Copy link
Contributor

vyzo commented Jul 21, 2017

Currently, RoutedHost.NewStream directly delegates the call to the underlying (basic) host.
The idea is that if we don't currently have any open connections to the peer, the basic host will automatically open a connection using Dial and the addresses in the Peerstore.

And that's exactly the problem: if we have not previously had a connection to the peer, then we are likely not to have any address for the peer either. So when the dial is attempted, it will not find any addresses and fail.

This issue directly hinders the usage of relay addresses in the form /ipfs/QmRelay/p2p-circuit/ipfs/QmPeer and instead forces us to explicitly specify the address of the the relay (or have previously connected to it somehow).

@vyzo
Copy link
Contributor Author

vyzo commented Jul 21, 2017

summoning @Stebalien @whyrusleeping @lgierth

@vyzo
Copy link
Contributor Author

vyzo commented Jul 21, 2017

Note that this also hinders the utility of active relays, as they won't be able to dial peers without any prior connection to them.

@vyzo
Copy link
Contributor Author

vyzo commented Jul 21, 2017

cc @dryajov

@Stebalien
Copy link
Member

Good catch!


Note that this also hinders the utility of active relays, as they won't be able to dial peers without any prior connection to them.

Does #208 also fix this issue?

@vyzo
Copy link
Contributor Author

vyzo commented Jul 22, 2017

Note that this also hinders the utility of active relays, as they won't be able to dial peers without any prior connection to them.

Does #208 also fix this issue?

Yes, provided the relay is added to a RoutedHost.

@vyzo vyzo closed this as completed in #208 Jul 23, 2017
@daviddias daviddias removed the status/in-progress In progress label Jul 23, 2017
marten-seemann pushed a commit that referenced this issue Apr 21, 2022
fix: avoid calling AddChild after the process may shutdown.
marten-seemann added a commit that referenced this issue Apr 22, 2022
update quic-go, enable QUIC v1 (RFC 9000)
marten-seemann pushed a commit that referenced this issue Aug 17, 2022
There's really no reason to expire these after 10 minutes as opposed to
30. Given that our default DHT refresh interval is 10 minutes, setting
this to 30 reduces the chances that we'll "forget" peers.
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

No branches or pull requests

3 participants