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

Relay Swarm #575

Closed
Stebalien opened this issue Apr 5, 2019 · 3 comments
Closed

Relay Swarm #575

Stebalien opened this issue Apr 5, 2019 · 3 comments
Assignees
Labels

Comments

@Stebalien
Copy link
Member

This morning, we noticed a bunch of peers swarming and overloading our relays. We initially thought this might be malicious but, on further inspection, it looks like there were just some popular nodes running behind relays (causing a bunch of peers to connect to them).

However, we're still concerned some peers may be routing traffic through relays when they shouldn't be. This issue exists so we can report our findings as we investigate this.

@Stebalien
Copy link
Member Author

Idea: Maybe we're somehow gossiping relay observed relay addresses.

So, this is what I originally thought was happening:

  1. Node P runs a DHT from behind a relay R.
  2. Node A connects to node P through R.
  3. Node P observes the relay address and stores it.
  4. Node B tries to find node A in the DHT and asks node P.
  5. Node P gives node B the observed relay address.

However, I no longer think this is happening. We only add the observed peer's address to our peerstore if the transports are consistent with an address they claim to be listening on. That means that, if they're listening on a relay, we may decide to advertise a different relay. However, that's not that big of an issue because we'll only do this if they're connected to us through that other relay (mostly).

@Stebalien
Copy link
Member Author

Stebalien commented Apr 5, 2019

Idea: Maybe we're storing observed relay addrs.

So, we are but we shouldn't ever be announcing them, at least in go-ipfs, because we filter out all relay addresses by default. The only ones we don't filter out are ones we explicitly choose in the autorelay host.

Observation: Whyrusleeping noticed that some nodes are advertising many relays. Some nodes are also advertising relays + public addresses which we should never do. *Note: Unfortunately, when we push new addresses to peers, we only add addresses and never remove them. This would explain why some peers are advertising both relay and non-relay addresses (I've tried dialing these nodes and can't).
Question: Are these go-ipfs nodes or some other kind of node (only go-ipfs nodes currently filter out relay addresses by default)?

@vyzo
Copy link
Contributor

vyzo commented Apr 6, 2019

I think we are definitely gossiping observed relay addresses, quickly causing our address set to expand to all relays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants