Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

Node connects to all others when maxpeers is unlimited #1094

Closed
frncmx opened this issue Jan 7, 2019 · 3 comments
Closed

Node connects to all others when maxpeers is unlimited #1094

frncmx opened this issue Jan 7, 2019 · 3 comments
Assignees
Labels

Comments

@frncmx
Copy link
Contributor

frncmx commented Jan 7, 2019

Example:
Node count: 200
Maxpeers set to: 2000
=> You are connected to all nodes. NOK

Expected: not radically different than what you need for healthy connectivity

Regression? We did not use to connect to all the nodes.

Idea: limit number of nodes/bin

The idea to limit the number of connections had been rejected in the past. #406
Also see this document on pruning: https://github.com/ethersphere/go-ethereum/wiki/Pruning,-planning-20180419
the hive bootstrap algorithm should take care of outgoing connections prioritising depth over breadth (of PO bins in the kademlia) thereby protecting rows from being overpopulated.
However, random peer dialing in the p2p package goes against this.

Restrictive maxpeers setting will prevent nodes from connecting and therefore may have unhealthy kademlia or even remain disjoint from their real neighbourhood which is critical for routing.
high maxpeers value on the other hand leads to full connectivity

We want to configure the p2p package to not connect to any random nodes, and handle connections to new peers from the Swarm Kademlia implementation and SuggestPeer functionality.

@frncmx
Copy link
Contributor Author

frncmx commented Jan 7, 2019

@zelig clarifies the card

@nonsense
Copy link
Contributor

This is currently expected behaviour of the p2p package and the dialstate runner. Once we have a Swarm bootnode, we can try to disable these, and take over node discovery and connections on Swarm side, rather than have the dialstate runner fill our peer slots.

@zelig
Copy link
Member

zelig commented Jan 17, 2019

will fix after #1111

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

No branches or pull requests

4 participants