Validator Node

Ozone Chain is a private blockchain network. Participation in the network as a node is restricted to select nodes that is agreed to by Ozone Chain DAO (Decentralized Autonomous Organization).
A Validator Node is a peer node in the Ozone Chain network that receives transactions from clients, produces blocks and broadcasts the blocks to other peers.

How to add a Validator Node to Ozone Chain network?

The code for running a Validator Node is hosted at https://github.com/Ozone-chain/ozonechain_quantum

The newly proposed Validator Node as well as existing Validator Nodes must perform the below steps to add a new Validator Node to the network.

Steps to do if you are the newly proposed Validator Node:

1. System requirements:

CPU and Memory:

Ozone Chain is very light on system requirements. It can run on a server with just 2 CPU and 4 GB RAM.

For optimal performance, we recommend a server with 8 CPU and 16 GB RAM.

Storage:

1 TB SSD harddisk.

Operating System:

Ozone Chain supports a variety of OS like Linux (many distros like Debian, Ubuntu, Fedora, RHEL etc), Windows and Mac.

The recommended OS is any recent version of Ubuntu or Debian, These have been tested to work well with the officially provided scripts.

Caution: If you want to run Ozone Chain on a different OS, you may need to modify the scripts. Go this route only if you are an expert in blockchain. Official support may not be available.

Location of Server:

It can be an on-premise server or from a cloud provider like AWS, Azure, Digital ocean etc.

IP address:

The IP address of the node must be public and static.

Public, meaning it is reachable from the Internet.

Static, meaning it must be a permanent IP address and not a dynamically changing one.

If you are using AWS, you need to attach an Elastic IP to the EC2 Instance.

Firewall Ports: The Following ports are to be open

Compulsary:

TCP 30303

UDP 30303

Optional:

TCP 8545 (if you want to open RPC port to public)

2. Clone the Github repo

2.1 Open the terminal and go to /root
$ cd /root

2.2 Become the root user
$ sudo su
or
$ su root

2.3 Clone the github repo

# git clone https://github.com/Ozone-chain/ozonechain_quantum.git

Verify that the folder /root/ozonechain_quantum is present and the code is inside.

3. Running the scripts

The scripts run-1.sh and run-2.sh are used to setup quantum security as a systemd service. The script run-3.sh is used to setup the blockchain node as a systemd service.

3.1 Create a partition (preferably ext4 filesystem) in the 1 TB SSD storage. Mount the partition to the path /root/blockchain. Caution: If you mount this partition to any other path, you may need to modify the scripts. Go this route only if you are an expert in system administration. Official support may not be available.

3.2 Start setting up quantum security.
# bash run-1.sh

3.3 You will be asked to place a .env file in
/root/ozonechain_quantum/quantum

Get the .env file by contacting contact@ozonechain.io . The .env file contains credentials to receive QRNs from the laser-based quantum source.

3.4 Complete setting up quantum security.
# bash run-2.sh

3.5 To setup ozonechain node, create the file /root/ozonechain_quantum/ozonechain/.env which must contain the public ip address of the node.
"NODE_PUBLIC_IP="aaa.bbb.ccc.ddd"

3.6 To install the required softwares (java, besu), configure them and start the node as a systemd service, run the command:
# bash run-3.sh

3.7 Find the enode url of your node using the command.
# journalctl -u ozonechain_node --grep"enode" | head

3.8 Share the enode url with ozonechain.io. It will be updated to the github repo, in the file
https://github.com/Ozonechain/ozonechain_quantum/blob/main/ozonechain/config/permissions_config.toml

3.9 Find the node address with the command,
# echo `cat /root/blockchain/data/keys/node_address

3.10 Share the node address from the above step with ozonechain.io. It will be displayed in the official website https://ozonechain.io/nodes/list

3.11 You can check if quantum security and ozonechain node are functioning properly using the commands,
# systemctl status quantum
#systemctl status ozonechain_node

If you see “active (running)” in the output, your quantum-secure node is operational.To see the peer count and imported blocks in real-time, run,
# journalctl -u ozonechain_node -f

4. Setup quantum tunnels between your node and other nodes

Contact ozonechain developers in its official discord channel for node admins.

Steps to do if you are an existing Validator Node:

5. Get an updated list of Validator enodes:

# cd /root/ozonechain
# bash run-1.sh

This script does a “git pull” and updates the local git repo. Importantly, this file
https://github.com/ozone-ozoneChain/ozonechain_quantum/blob/main/ozonechain/config/permissions_config.toml

6. Restart ozonechain Node:

# bash run-3.sh

ozonechain restarts and uses the updated permissions_config.toml file.

7. Vote for the new validator to be added:

Propose to add a validator with the specified address.

# curl -X POST --data
'{"jsonrpc":"2.0","method":"qbft_propose
ValidatorVote","params":["new_validator_node_address",true],
"id":1}' http://127.0.0.1:8545

Note: Replace new_validator_node_address with the address provided by the new validator from Step 3.10.

8. Check if the new validator is accepted

The new validator will be accepted by the network after a period of 6 hours mentioned by epochlength in the genesis file is passed and if it received the votes from a majority (above 50%) of existing validators within the 6 hours period.
To check if the new validator is accepted, run the command,

# curl -X POST --data
'{"jsonrpc":"2.0","method":"qbft_getValidators
ByBlockNumber","params":["latest"], "id":1}'
http://127.0.0.1:8545

In the output, you will see the address of the newly added validator.

9. Setup quantum tunnels between your node and the newly created nodes

Contact ozonechain developers in its official discord channel for node admins.

Scroll