aleth icon indicating copy to clipboard operation
aleth copied to clipboard

Node discovery doesn't work in private chain

Open trungtt198x opened this issue 7 years ago • 9 comments

In the private chain, if we have the nodes addPeer then the nodes can only have peers with the explicitly-specified node. It is expected that all the nodes in private chain should find each other automatically via the explicitly-specified node.

For example, in the private chain, we start node A, node B and node C where node B and node C are added peer with the node A. The addPeer runs quite well and eventually node A has its peers of node B and node C. However, node B and node C don't know each other via node A

trungtt198x avatar Jan 12 '18 10:01 trungtt198x

May I ask when this problem will be fixed? In the meanwhile, how to work-around against this problem? In particular, how to have node discovery in the private chain?

trungtt198x avatar Jan 18 '18 07:01 trungtt198x

@chfast I think you've fixed this by untangling the commandline options?

axic avatar Jan 24 '18 12:01 axic

Can you test it again @trungtt1981. In private mode node discovery was auto-disabled.

chfast avatar Jan 24 '18 15:01 chfast

@chfast Please share how to enable node auto-discovery in private mode?? Or how to modify the source code for this purpose?? Many thanks

trungtt198x avatar Jan 25 '18 01:01 trungtt198x

I made the change already. Now --private does not imply --no-dicovery, so discovery should be on. Just build the recent version.

chfast avatar Jan 25 '18 08:01 chfast

@chfast Please inform your commit revision? Thanks

trungtt198x avatar Jan 25 '18 09:01 trungtt198x

Use develop branch.

chfast avatar Jan 25 '18 09:01 chfast

@chfast Please read my bug report: https://github.com/ethereum/cpp-ethereum/issues/4819

trungtt198x avatar Jan 30 '18 04:01 trungtt198x

@chfast :

w --private does not imply --no-dicovery, so discovery should be on. Just build the recent version.

--private still appears to imply --no-discovery:

https://github.com/ethereum/aleth/blob/ae042a32103e4c421f942952bd42afdbd1e6b96f/aleth/main.cpp#L758

I think that private should imply --no-bootstrap (leave discovery on but don't connect to the official Ethereum bootnodes)

halfalicious avatar Mar 24 '19 21:03 halfalicious