-
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
How does bootnode peering work in geth? #30122
Comments
Hi Yasir, It sounds like you're encountering some common challenges with bootnode configuration and peer discovery in a private Ethereum network. Here are suggestions that might help you resolve the issue: Understanding Bootnodes and Peer Discovery
Suggestions for Improving Peer Discovery
Addressing the IssueYou should ensure that all nodes have the --bootnodes parameter configured correctly and that static peers are added where necessary. By following these practices, you should see improved connectivity and peer discovery across your network. If problems persist, consider reaching out to the Geth community or consulting additional documentation for more detailed troubleshooting steps. Best regards, chan This response provides a clear explanation of the bootnode and peer discovery process in Geth, along with actionable steps to address the issues Yasir is facing. It also encourages ongoing monitoring and adjustment to optimize network connectivity. |
The eth wire protocol doesn't share any info about peers it's connected to. The discovery protocol can share info about peers it has included in it's table. Geth is not optimized for discovery on small networks. You can see further discussion here: #30243 |
I am quite unsure about the peering tendency of the geth peers
My question is about geth bootnodes not peering properly - however, instead of leaving the question as it is here, i would like to provide some elaboration.
i have set up a private ethereum PoS network with geth + lighthouse,
and i am now struggling with setting up a bootnode
I started a geth node (lets call it Node A), assigned to it its OWN enode address (using the --bootnode parameter)
I then added a static peer (lets call it SPeer ) to Node A
this worked, so Node A who is supposed to be a bootnode, is now synced with the PoS private testnet
NOW, i start another geth node (Node B), it is fresh and has no peers
Node B is given the enode of Node A, so basically Node B, in its --bootnode parameter, has the enode address of
Node A
here is what happens
Node B only discovers Node A as a peer
but Node B does NOT discover SPeer (the static peer of Node A), as an additional peer for itself
why is that?
am i missing something in how geth peering works?
or what the bootnode is supposed to do?
Aren't geth nodes supposed to also discover OTHER nodes connected to their peers, so that they can have a healthy collection of peers? ( the analogy of 'knowing a friend of a friend' applies here)
This is exactly the problem i am facing with my PoS test network, i cannot set up auto peering through bootnodes and every time, i have to add peers through the geth js console
at best, if the node, whose enode address is provided to others, is healthy, then those other nodes will peer with it and start working normal
but thats about it,
how can i make my geth nodes find other peer nodes in the private testnetwork seamlessly and thorugh a bootnode (or a collection of bootnodes atleast)
I am looking forward to some help, as i have asked this in geth discord among other places but i did not get any helpful answers (S1na was willing to help me on discord, but he's busy i believe, as he hasn't replied in a while)
Best,
Yasir
The text was updated successfully, but these errors were encountered: