-
Notifications
You must be signed in to change notification settings - Fork 285
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
P2P Circuit Advertisements #33
Comments
@Stebalien can you clarify what you mean by
Do you mean, the relay advertising which connections/peers/addrs it can relay or the peer itself advertising the desired relay it wants to be reached over? Both have been discussed during the circuit spec review rounds. Glad this issues is being brought back. |
The former. Could you point me to that discussion? I couldn't find it. |
#22 and #18 capture most of the discussion around the circuit spec. There is also ipfs/notes#237 that talks about connections that the relay knows about - which I think is what we need, rather than advertising addresses, because in passive mode the relay will only make the circuit to peers it has connections to. I don't think that the later has been discussed outside a few IRC exchanges and would like to see it captured somewhere - should probably open an issue around it. |
Ah, forgot the main PR that had the most info captured - #15 |
BTW - I'm not saying that I think a consistent way of announcing capabilities and other useful info is important for circuit and other parts of libp2p/IPFS. |
I think we also need to figure out the when -- when should we advertise a relay address? For the case of NAT, I would like the node to automatically detect its behind an impenetrable NAT, and then proceed to advertise (specific) relay addresses. Unfortunately this is not an easy determination to make without the help of other nodes. The presence of NAT can be detected by local-observed address mismatch, but determining whether it's penetrable would require another node to actively open a connection to the peer. Perhaps we could maintain a service to facilitate this. |
Just to clarify, from my perspective there are two distinct things that happen regarding relay addresses/connections.
Relay is a fallback mechanism in case all else failed and as long as there is a correctly configured relay around, NAT shouldn't be a problem? Thats why I like the idea of advertising relay addresses just as any other address and its also the reason I like the priorities mechanism you and I proposed at different times - because it allows us to treat circuit just a any other transport and reuse the same semantics both at the implementation and UX level. One more thing that comes to mind - what if a relay is wrongly configured and its itself behind a NAT or worst it's malicious and it advertises as relay but doesn't actually relay anything? I think there should be a mechanism to black list malicious/misbehaving peers in general and relays in particular - is there something like that in libp2p/IPFS already? |
I think there should a mechanism to rate/blacklist peers/nodes and it should live on the DHT? This should be probably a built in mechanism that allows the network to self heal/manage. If a massive attack with hundreds or thousands/millions of malicious relays is deployed, it could be a pretty bad day if there is no clear way for the network to avoid those relays? Just a few ideas on rating categories:
|
The next step to getting relays working is to figure out how to advertise addresses proxied through a relay.
Random thoughts:
/p2p-circuit/ipfs/QmId
(no relay specified). These are pretty much useless and could be used to trick nodes into doing a lot of work.The text was updated successfully, but these errors were encountered: