-
Notifications
You must be signed in to change notification settings - Fork 20k
-
Notifications
You must be signed in to change notification settings - Fork 20k
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
Documentation needed on network.inbound
and network.outbound
#21920
Comments
Your explanation is correct. The flag means whether the connection with the peer is inbound (dialed remotely) or outbound (dialed locally). I don't think there's much more we can do. |
Is this not the correct repo to file an issue aginst documentation? The title said what is actionable - add mentioning of what you just said - "The flag means whether the connection with the peer is inbound (dialed remotely) or outbound (dialed locally). " - into the document. |
@colourful-land @karalabe Thanks for your explain. Thus, can we make a conclusion that peer with I am going to make a script to remove those kind of peer. |
No, that's not true. That's just the direction of the connection. Every peer is P2P and communication and information sharing goes both ways. |
@karalabe Thanks! Is this a good criterion? Do you have any suggestion about this script? Btw, I notice some peer does not provide |
Question answered, closing |
The documents such as web3py and web3js didn't explain what
network.inbound
andnetwork.outbound
means.There are two plausible explanation.
network.inbound
means that the peer accepts inbound connection.network.inbound
means that peer is connected to the current node through a inbound connection.I'm not sure about you but I feel that two intuitions have equal chance of being true, so we can't pass it as a case of "self-explanatory - no document needed".
I experimented† with both cases and found that 2 is the correct answer. But for someone who look at peers and wonders how many of them are 'selfish' (not accepting incoming connections or behind NAT firewall), looking at how many have
nework.inbound == true
seem to be the most intuitive way to go - they would be in for a surprise.†How I experimented
Example of both true and false are found in the following screen transcript:
Given my node listens to "192.168.47.109:30303", the first peer should be connected through an inbound tcp connection and the second should be connected through an outbound tcp connection. Then we have the first with
network.inboud: true
and the secondfalse
, hence I concludenetwork.inboud
is a property of the connection to the peer, not a property of the peer.The text was updated successfully, but these errors were encountered: