Non-validating node is a full node of the blockchain with full history. It connects to the blockchain network using p2p networking. The non-validating node can be used by exchange or wallet website to broadcast transactions, to query balances, to fetch transaction data using RPC interfaces.
Harmony blockchain uses a node type called explorer node to satisfy the above requirements. Since Harmony is a sharding blockchain, it is currently required to setup one node per shard.
Please follow the readme file on the harmony repo to build the latest software release from master branch. The stable release is on s3 branch for mainnet.
Or you may download the prebuilt node binary.
To setup node on public cloud, please try to follow this document for setup.
By default, the host needs to open up ports 6000, 9000, 9500, and 9800 for all the RPC and syncing functions. The default base port is 9000, all other ports are setup based on the base port.
6000 port is used for blockchain state syncing.
9000 port is used for blockchain consensus messages.
9500 port is used for SDK RPC service
9800 port is used for Websocket service
The 9500, 9800 ports are only listened by localhost 127.0.0.1 by default. If it is required for the host to accept external links, the
-public_rpc command line option can be specified to listen to public IP.
There is no need to have a valid BLS key for non-validating node as it won't join the consensus.
Non-validating node is a full node of the blockchain except for not joining consensus. It is expected to have the node software running on an AWS m5.large equivalent host. The spec of m5.large can be found in this document.
A node needs to sync both beacon chain and the shard chain data. It is expected to have 200Gb disk for 6-9 months data storage.
The following steps assume the non-validating node connected to mainnet shard 1. The syncing of the mainnet blockchain DB will take quite some time. So, it is recommended to follow this guide to use DB snapshot for initial syncing.
curl -LO https://harmony.one/node.sh
chmod +x node.sh
To download the binary.
mv -f staging/* .
./node.sh -1 -S -k BLSKEY -p blspass -T explorer
The expected output is like:
./node.sh -1 -S -k BLSKEY -p blspass -T explorer -i <shardid>
[Unit]Description=harmony serviceAfter=network.targetStartLimitIntervalSec=0[Service]Type=simpleRestart=alwaysRestartSec=1User=ec2-userWorkingDirectory=/home/ec2-userExecStart=/home/ec2-user/node.sh -1 -S -p /home/ec2-user/blspass -k /home/ec2-user/BLSKEY -T explorer[Install]WantedBy=multi-user.target