1

I need help in how we can create multi-node private network on ethereum blockchain preferably on windows platform. My Approach (please suggest if I can follow some better one): First I want to try to create multi-node network on same machine using different geth instances. Then I want to move forward with different machines are separate nodes as part of that network.

Please suggest me how to achieve above.

2

firstly, all node must share the same genesis block.

assume there are node A and node B

when testing nodes in the same IP address, they must have the different port number

node A geth option example:

--ipcdisable --port 30303 -- rpc --rpcport 8545

node B geth option example:

--ipcdisable --port 30304 -- rpc --rpcport 8546

The following is the process of making a connection between node A and node B.

node A javascript console:

admin.nodeInfo.enode

output is like:

"enode://5bb8cc6ca2520ce27ea8b3940a5d04bd5893039d1737bf14913240a8bcbcf07fadabd87271f1a03f5647c7475f63b66177dc9544c8efe1079098a4eedfb42b16@[::]:30300?discport=0"

Node B javascript console:

admin.addPeer("enode://5bb8cc6ca2520ce27ea8b3940a5d04bd5893039d1737bf14913240a8bcbcf07fadabd87271f1a03f5647c7475f63b66177dc9544c8efe1079098a4eedfb42b16@[::]:30300?discport=0")
  • Thanks @TLHBM. admin.addPeer() returns me 'true' but when I run admin.peers() to see the added peers it returns null. I am creating two nodes on the same system and trying to establish ethereum private network locally. Both the nodes have different directory where its data get stored. OS is Windows 10 and using windows powershell to run geth. – Saumitra Dec 5 '18 at 8:19
  • I added geth option example. – TLHBM Dec 6 '18 at 5:05

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.