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

identify: only store _reported_ multiaddrs #574

Closed
wants to merge 2 commits into from

Conversation

Stebalien
Copy link
Member

We still tell the remote host about the observed addr but we don't store it. That way, we give them a chance to decide if they want to actually use and advertise it.

Ideally, we'd distinguish between local information and signed routing information but we don't do that yet.

Hopefully this will prevent nodes behind relays from telling everyone else to connect to their peers through these relays.

We still tell the remote host about the observed addr but we don't store it.
That way, we give them a chance to decide if they want to actually use and
advertise it.

Ideally, we'd distinguish between local information and signed routing
information but we don't do that yet.

Hopefully this will prevent nodes behind relays from telling everyone else to
connect to their peers through these relays.
@ghost ghost assigned Stebalien Apr 5, 2019
@ghost ghost added the status/in-progress In progress label Apr 5, 2019
@Stebalien
Copy link
Member Author

Actually, this is a bit interesting... We only add this remote address if it has the same protocol sequence as an address advertised by the peer. That means we shouldn't add the address here unless the peer adds the relay to their observed address set.

So, this may still may prevent the address explosion issue however, it won't fix the actual problem. To do that, we just need to remove observed relay addresses.

This is should prevent us from, e.g., announcing relay addresses _just_ because
a peer tells us we're reachable through a relay.
if !HasConsistentTransport(c.RemoteMultiaddr(), ids.Host.Addrs()) {
log.Debugf("ignoring observed multiaddr that doesn't match the transports of any addresses we're announcing", c.RemoteMultiaddr())
return
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so what happens if we are behind a NAT and advertise a relay addr, and connect to a peer through a different relay (one which we don't advertise)? It seems that we might pollute our advertised set to include this relay too.

@Stebalien
Copy link
Member Author

Let's discuss in #575. I'm not sure if this is right.

@Stebalien Stebalien closed this Apr 5, 2019
@ghost ghost removed the status/in-progress In progress label Apr 5, 2019
@Stebalien
Copy link
Member Author

Re-opened in #577 but not as a fix for #575.

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

Successfully merging this pull request may close these issues.

2 participants