XinFin Private (QuorumFork)

Prerequisite

Operating System: Ubuntu 16.04 64-bit or higher
Tools: Docker, Docker Compose
Hardware:
Hardware
Minimum
Desired
CPU's:
2
4
Memory:
4 GB
8 GB
Storage:
100 GB
500 GB

Network Ports

Following network ports need to be open for the nodes to communicate
Port
Type
Definition
21001-2100*
TCP/UDP
GETH
22001-2200*
TCP
RPC
23001-2300*
TCP
RAFT
9001-900*
TCP
Constellation
*-auto-increment depending on number of nodes

Clone repository

1
git clone https://github.com/XinFinorg/XDC01-docker-Nnodes.git
Copied!

Step: 1 Install docker & docker-compose

1
sudo ./install_docker.sh
Copied!

Step: 2 Pull image from Docker Hub

1
sudo docker pull xinfinorg/quorum:v2.1.0
Copied!

Step: 3 Launch the setup script

1
cd static-nodes
2
sudo ./setup.sh
Copied!
Enter number of nodes, private IP of host machine & unique docker subnet. You can view private IP of your machine using ifconfig.

To Check private IP address(internal (network) IP address) on Ubuntu GUI:

  • Open the Activities overview and start typing Network.
  • Click on Network to open the panel.
  • Choose which connection, Wi-Fi or Wired, from the left pane.
  • The IP address for a wired connection will be displayed on the right.
  • Click the settings button to see the IP address for the wireless network in the Details panel.
sudo docker-compose -p <PROJECT_NAME_STATIC_NODE> up -d
Replace with your project name.

Accessing console

1
sudo docker exec -it PROJECT_NAME_STATIC_NODES_node_1_1 geth attach /qdata/dd/geth.ipc
Copied!

Stopping the network

1
sudo docker-compose -p <PROJECT_NAME_STATIC_NODE> down
Copied!

Adding a new node to the existing network

Install docker & pull image on the new host machine as done earlier in Step 1 & 2

1
cd dynamic-node
2
sudo ./setup.sh
Copied!
Enter the public IP of the new host machine (private IP in case of local setup, assigned by router) Enter the node number (e.g. if you have 3 nodes up with the initial setup then node number here would be 4)

Copy enodeID from enode-url.json then attach to geth console of any running node & execute

1
raft.addPeer(enodeID)
Copied!

Start the new node

1
cd dynamic-node
2
sudo docker-compose -p <PROJECT_NAME_DYNAMIC_NODE> up -d
Copied!

Upgrade Network

Pull newer version of image from docker hub

1
sudo docker pull xinfinorg/quorum:v2.x.x
Copied!

Stop containers running old version

1
sudo docker-compose -p <PROJECT_NAME_STATIC/DYNAMIC_NODE> down
Copied!

Update docker-compose.yml to use new image (specify quorum:TAG_NAME as argument)

1
sudo ./update_quorum.sh quorum:v2.x.x
Copied!

Run new version

1
sudo docker-compose -p <PROJECT_NAME_STATIC/DYNAMIC_NODE> up -d
Copied!

Contacting Us

Join our Telegram Developer Group and put up your queries or raise issue in Github to get answer. We would love to answer your questions.
Last modified 2yr ago