Adding Another Node to Private Ethereum Network

By | 18. August 2020

This article is a continuation of the article Private Proof-of-Authority Ethereum Network on Synology NAS

Here we describe how to add another node to our private Ethereum development blockchain. Keep in mind that it is private and development platform, so for public node all security requirements may not be met.

In previous article we already did set up private network and got genesis.json as strating point of any new geth node.

The procedure is very similar like for first node.

1. Install Ethereum and geth

2. Make directory for geth.

3. Create a geth account.

Be sure to keep track of the password used to create each account!

4. Initialize geth Ethereum new node instance with genesis settings

5. Start geth console.

We will plan to start more nodes later and have set up address patterns like

node1: –port 3001  –rpcport 8541

node2: –port 3002  –rpcport 8542

and so on.

Depending on you needs you may not to start rpc or mining at all.

Now the node is up, but it has no knowledge of other node(s) neither does it contain data and is not synchronized.

First we have to turn back to initial primary node and find out enode info. Enter next command in geth console:

Take note of the response and on second node geth console add new peer with command:

But before that second node must have access to port 3000 on fist nodes computer at ip 192.168.1.32

On command prompt of first computer add firewall rule (for fist node we used Ubuntu server )

In this example 192.168.1.54 is the ip address of second node.

if all port numbers are correct, firewall has access and correct genesis file was used then you should see something like this:

 

Synchronization has been started and new blocks have been imported. To verify the sync status you can execute few times command eth.blockNumber and see if block number grows. Keep the rerun period longer than the Ethereum block time though.

Next time we will have a look how to add new authority to blockchain, we will turn this new node2 to authority node and finally will switch initial node completely off.

 

 

 

 

One thought on “Adding Another Node to Private Ethereum Network

  1. Pingback: Adding Signer Node to Private Ethereum Network - Software Blog

Leave a Reply