0

I have created a private blockchain network and added peers to that network using the admin.addPeers() command. But the problem is, in that method I have to give the local IP address of the system which can be changed at any moment and results in peer disconnection.
Can anyone suggest some other method that can be used so the I can have a stable connection between the peers of the network?

  • you need ip address in any cost , whether you connect locally or not. – Gopal ojha Jul 3 '18 at 6:11
2

It means that you need one static ip so that you connect with the node having same ip all the time.
You can do this by port forwarding or own static ip.

Enode is in the form of

"enode://e089f89a518c739b7e63198cc62c7619544dd2daf0d531188ad9a46130d12a84fa78b2b4172a3c59ebe0fc1738cc47725655f553eaa70dfbbe8cb2a5fdcacd4e@[::]:30303?discport=0"

[::] is for the ip. if you are connecting locally then it doesnot matter because your router will maintain this. In case of public, there should be public ip. ok now how it looks like :

"enode://e089f89a518c739b7e63198cc62c7619544dd2daf0d531188ad9a46130d12a84fa78b2b4172a3c59ebe0fc1738cc47725655f553eaa70dfbbe8cb2a5fdcacd4e@172.31.40.193:30303"

This may help you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.