-
Notifications
You must be signed in to change notification settings - Fork 459
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
[circuit-relay] Circuit features/functionality discussion #425
Comments
Modes of operationA peer can:
By default, a peer:
Relay protocolThe relay protocol must consist of a message with two options:
Other notes
|
Thanks @diasdavid! A few more questions around dialing/connecting over a relay. From my notes above:
Are this correct assumptions? |
@dryajov correct 👍 |
A few more clarifications:
The above, as I understand it means, putting the relay address in the peers swarm config and being reachable only over that relay. A few questions around that:
Edit: moving flow into it's own comment. |
A peer that mounts the relay protocol is accessible through any relay node.
No, listening on a relay address means that the peer will try to dial to that relay on the start of the node. This is like hole punching out, so that future connections can come in.
Yes
I don't see anything that would cause this. |
more questions:
How do you know if a peer is able to relay connections as opposed to simply accepting them? The spec is pretty vague on it as it is:
Sinse a peer can both relay connections and listen for relayed connections and both use the same multistream proto header, it makes it a bit cumbersome to figure out if the peer is a relay or simply listening for relayed connections. It would be nice to be able to query the node for its capabilities, specially since we now also have an additional command |
Once you establish a stream-muxer (see inside swarm) you attempt to dial on the relay protocol, if it succeeds, then it supports relay, if not, no biggie :). Opening muxed streams is very cheap. |
Yeah that makes sense. Still I think its valuable to be able to ask the relay i.e.
I think this is useful for passive relay discovery. For example, you can listen for the |
@diasdavid @lgierth @dignifiedquire Documenting flow/requirements. Feedback/corrections/questions appreciated 😄 https://hackmd.io/EYQw7ALMCmDMDGBaAnAM1bREAmAmXiwAHBEVhKvDrhttiEA=?view |
@dryajov as we chatted through IRC, please open a PR with it, giving reviews and feedback without version control and threads is a nightmare. That being said, let me know if you have any question, the document looks like it translates all our notes and discussions, good work :) |
here it is - libp2p/js-libp2p-circuit#5 I think this can be merged so that we can keep creating PR's against it? |
Merged the doc to master. |
With this point (requirements are hard™) Edit: rephrasing
|
Closing as stale, circuit relay has been implemented and we have version 2 on the wall #1029 |
Here are some notes after my conversation with @diasdavid.
ls
for available connections on relay nodes (see above ^^ @diasdavid)Peer A
toPeer B
, if there are more than one hop in the multiaddr (chaining/nesting), then its the dialer that initiates the connection to the next relay pair in the chain. This is needed so that we disclose the least possible amount of information to the network.Here is an example of a possible circuit/relay config:
@lgierth @diasdavid @dignifiedquire
I'm going to start implementing some of this, in particular points 3, 4, 5, point 1 and 2 might need some discussion/clarification.
Also, lets use this issue for further discussion. :)
The text was updated successfully, but these errors were encountered: