Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Localhost/RFC 1918 addresses not filtered from node announced addresses #673

Open
AJolly opened this issue Jan 16, 2021 · 1 comment
Open

Comments

@AJolly
Copy link

AJolly commented Jan 16, 2021

Nodes announce RFC1918/localhost addresses to the rest of the network by default.

This causes ecdsa-client to attempt to connect to addresses it can never reach.
There are use cases, esp for testing where we want to be able to reach those addresses, but by default for production we should not be advertising those addresses for connection.

This slows down connection attempts to nodes, and a fix would likely speed up the initial node sync process.

2021-01-15T22:35:22.302Z �[35mDEBUG�[0m swarm2 [limiter] adding a dial job through limiter: /ip4/127.0.0.1/tcp/3920
2021-01-15T22:35:22.302Z �[35mDEBUG�[0m swarm2 [limiter] taking FD token: peer: 16Uiu2HAm8TJ33rA6rH8iq6Jiocms9M51sQsHgnfp8hduaWpFKxn6; addr: /ip4/127.0.0.1/tcp/3920; prev consuming: 1
2021-01-15T22:35:22.302Z �[35mDEBUG�[0m swarm2 [limiter] executing dial; peer: 16Uiu2HAm8TJ33rA6rH8iq6Jiocms9M51sQsHgnfp8hduaWpFKxn6; addr: /ip4/127.0.0.1/tcp/3920; FD consuming: 2; waiting: 0

@Shadowfiend
Copy link
Contributor

I don't know that we'll see a significant performance boost during peer resolution, but regardless this seems like a good idea. We should likely introduce this as an optional config flag initially. We can either filter auto-discovered announced addresses or filter connection attempts, if libp2p allows. That said, the team may not be able to pick this up in the immediate future so an outside contribution would be welcome.

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

No branches or pull requests

2 participants