Go-Ethereum – How to Connect Another Node to a Private Network

go-ethereummistprivate-blockchain

i have followed this guide and set up my own private blockchain. Now the only node that mines and sets smart contracts is my own computer, but I want to connect another computer to my network. How do I do that? And not just for mining, but to be seen in Mist, too (to participate in smart contracts).

Also a "bonus" simple question – the guide says to download the entire Ethereum blockchain and then set up a private network, but i don't understand why download the entire blockchain, when youre in the end setting up your private network anyway? Isn't the guide wrong?

Best Answer

By another computer, I'm assuming you mean a separate machine within your the same LAN? Did you assign it a unique IP or is just on a subnet?

Either way, try admin.addPeer("enode://address@ip:port")in console.

Another option is to set up a static-peers.json file. I answered a similar question a couple days ago you can refer to for more details.

I didn't read the guide you posted, but you definitely don't need to download the Ethereum main net in order to launch your own private network. You just need to init a customgenesis.json that specifies the networkid and then get to work. Be sure to indicate --networkid when launching your geth instance.

Related Topic