Closed johng closed 3 years ago
The issue I was facing is that two instances starting at the same time on the same machine (different trackers) would generate the same nodeId which would break the p2p communication.
yes, you are right. Currently the tracker network is not fully decentralized, so that if two nodes connect to different trackers, it may cause conflicts.
But if your nodes connect to a same tracker, it will be ok. We are updating this part of work ( since several days gao). Node id is generated independent of trackers, and nodes located in one machine will definitly have different ids.
I reopened this PR. After we finish this part of work, i will re-assess this again.
lightclient/p2p_util.go
The private key is only for generating a constant node peer id, not for wallet. We/Users don't want to get variant node id each time their nodes get online. So the logic of this peice of code is to get a constant node id.