-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Can't connect /p2p-circuit/ peers #7433
Comments
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
Finally, remember to use https://discuss.ipfs.io if you just need general support. |
This feature was intentionally removed as it was useless outside of demos. It would try connecting to a specific peer over random relays until it found a relay already connected to that peer. If you want to use relays, either:
Also, please do not enable |
I take great offence to it being called a 'useless' feature. However thanks for pointing out a method for fixing the situation. |
Please keep this discussion technical. The circuit-relay feature still works just fine. Instead of specifying Unfortunately,
It was designed for demoing the relay feature. In your case:
|
Even after enabling auto relay and restarting the daemon this is still broken. relevant config is as follows:
So I rescind my thanks, as the problem is by no means solved |
With regards to step one in the browser, this is these are the problems: 2). I think it's bad design to hard code a list of static ip addresses. I'm sure you've heard this argument before so I won't rehash it. The upshot is it's just not viable, there needs to be a functioning, automatic discovery system with no hard coded relays |
If |
Hey @phillmac, I understand your frustration, but the functionality you relied on wasn't really supposed to be used this way. You actually relied on a "fixed subset of relay nodes" before, and that's why it's not working anymore now. Let's try to move on and find a solution that works for you. Your browser client should connect to the network and use a random relay (if it detects that it needs one) and announce the peer address. Once connected to the network you should be able to do this on other clients to find the remotes:
And then connect to a remote which is published for this public key. This doesn't require any static relay, a relay per se. If you want to avoid this findpeer step, just use |
@RubenKelevra Ok I'm willing to try to work through this as it's major pain point having to continually try to solve this downstream when issues are posted about techniques that work in the past that keep breaking.
what I'm really interested in is this bit
I'm going to make some assumptions here, rightly or wrongly. 1). I haven't seen a working example of how to get rendezvous working esp. since the most recent refactor to 2). With the old |
I'm not altogether against relying on "fixed subset of relay nodes". I'm against having to hard code that specifically in my app, because over time it will almost certainly become outdated and incorrect if it's not constantly updated; which incurs a heavy maintenance cost let alone if the app is no longer receiving updates. The point is any configuration of relay nodes should be handled in ipfs to ensure reliability and compatibility between various apps |
Unfortunately, this isn't something you can just "fix" through a config tweak. In my first response, I assumed you were using go-ipfs everywhere (no mention of js-ipfs). My second response presented the only available solution for js-ipfs. To be clear, addresses of the form In your case, the main issue is that js-ipfs doesn't support the DHT when run in the the browser. Usually, a (go) IPFS node will find another IPFS node by looking up the other IPFS node's peer ID ( Go-ipfs will use relays as follows (when
Unfortunately, that's clearly no going to work in this case because node A can't advertise itself in the DHT without DHT support.
You're absolutely right that this should "just work". However, the fact of the matter is that it doesn't "just work". Now, putting my moderator hat on, I understand that you're frustrated but your behavior is unacceptable. We've done our best to answer your every question and have been met with nothing but hostility.
Me calling the feature "useless" has nothing to do with you.
What about a thanks for trying to help? For responding promptly? For maintaining a hellishly complex project you depend on? This kind of comment really hurts.
This is the first issue you've filed in this repo and the first issue you've commented on. Have we been missing something? |
I'm going to try to avoid link spam here so please bear with me. I've inserted an The majority of issues here are browser based My apologies for coming off like an asshat, and yes I do appreciate the work put into this, especially the help given with issues. I guess I'm just a bit raw over the fact that everything keeps breaking and I have no ability to flash forward 10 years to when ipfs is a stable mature technology with a well defined feature set; and no ability to contribute to improvements (working with go as a language is even more frustrating imho) |
Ah, yeah, I'd be frustrated as well. And I'd love to fast forward 10 years. In terms of short-term solutions, I can't think of anything simpler than hard coding a few relays. A medium term solution would be to bring the DHT to browsers. Unfortunately, proper DHT support generally requires creating too many connections to be usable in the browser. However, it should be possible to partially implement DHT support through delegated routing (partially implemented already but not fully usable).
The browser node would then be findable in the DHT. Unfortunately, these browser nodes would still need a hard-coded list of delegated routers. In terms of long term solutions, there has been grumblings of proper WebRTC support in go and js, but I haven't seen anything significant land yet. That would let us skip the relays entirely (but we'd still need some way to find browser nodes, either through a DHT or some other system). |
@Stebalien Just a final follow up on this, I know there's no hope this misstep will ever be rectified, but It's been a massive pain point to me to the extent that I'm having to roll back all my nodes to v0.4.23, which has been a horrible experience 😞 |
Unfortunately, neither downgrading to 0.4.23 nor re-adding the "try every relay till one works" feature are viable, long-term solutions. Thinking through this a bit, I think the right solution for now is to have js-libp2p nodes use "delegated routing" (like https://github.com/libp2p/js-libp2p-delegated-peer-routing). However, that library is focused on finding peers. In this case, we need js-libp2p nodes to advertise themselves.
If you do this, any peer on the network should be able to find your js-libp2p node via the DHT. cc @jacobheun are there any plans related to this? |
Yes, although I think we will need to prioritize AutoRelay to help with this.
This is a good, tangible use case we can work on resolving on the JS side. I'll create a tracking issues in js-libp2p for this, I think we can get some mitigations in place relatively soon to improve this. I've stubbed out an issue for this in js-libp2p, I will flush out the details today, libp2p/js-libp2p#699. |
Version information:
Broken versions:
Working versions:
Description:
Trying to connect to peers using
/p2p-circuit/ipfs/Qm...etc
notation fails with an error:In the broken versions this happens regardless if
Swarm.EnableRelayHop
is set totrue
orfalse
In versions 0.4.23 and before this works perfectly fine:
The text was updated successfully, but these errors were encountered: