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

maxpeers reached and trusted-nodes.json ignored #14472

Closed
MysticRyuujin opened this issue May 14, 2017 · 2 comments
Closed

maxpeers reached and trusted-nodes.json ignored #14472

MysticRyuujin opened this issue May 14, 2017 · 2 comments

Comments

@MysticRyuujin
Copy link
Contributor

MysticRyuujin commented May 14, 2017

System information

Geth version: v1.6.1-stable-021c3c28 and v1.6.0-stable-facc47cb
OS & Version: Linux (Ubuntu 16.04) and Windows 10

Details

I have two computers running Geth

On both computers I have a static-nodes.json and a trusted-nodes.json file in the datadir and they contain one entry: the other node...

I am under the impression that placing a node into trusted-nodes.json would not count against the maxpeers? However, running Geth with default maxpeers (not specifying --maxpeers, which defaults to 25) results in the systems not connecting to each other when net.peerCount = 25 on one of the nodes.

If I were to restart the node with a peer count of 25 they'll connect to each other just fine. So it appears to me that the trusted-nodes.json is being ignored when default maxpeers is reached?

One node is v1.6.1-stable-021c3c28 and the other is v1.6.0-stable-facc47cb

I can reproduce at any time as one of my nodes is pretty much "public" over 30303 and always has 25 nodes, while the other does not...

This might be related to #3326

Expected behaviour

Nodes configured in trusted-nodes.json connect to each other regardless of the number of peers connected

Actual behaviour

Nodes configured in trusted-nodes.json only connect if current peer count is less than maxpeers

Steps to reproduce the behaviour

configure trusted-nodes.json on two systems
start one system and let it reach maxpeers (without the --maxpeers setting this is 25)
start the other system, they will not connect

@paulvi
Copy link

paulvi commented May 2, 2018

Where is documentation about trusted-nodes.json ?

  • Commits like 62fc96620d864291dc56bae5568cbaa44714c19f should go with documentation updates.

Both resources do not mention about trusted-nodes:

@holiman
Copy link
Contributor

holiman commented Feb 4, 2021

Where is documentation about trusted-nodes.json ?

Here, it seems:
https://geth.ethereum.org/docs/interface/peer-to-peer#trusted-nodes

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

No branches or pull requests

4 participants