UniChain nodes are distributed to anywhere in the world and play an important role to maintain the UniChain’s ledger.
There are there types of node that UniChain is currently provided
- Normal node (or full node): Maintain the UniChain ledger. Everyone can run this node
- Witness node: validate transactions, produce blocks, approve network change
- Relay node: provide the finalized transactions. This node will be merged to full node soon.
Minimum requirement to run a normal node: 4 CPU, 8 GB Memory (8 CPU and 16 GB Memory is recommended)), 250 GB Disk storage, high speed network connection, Linux based OS such as Ubuntu (version > 16), Centos, Redhat …
Minimum requirements to run a witness node: 8 CPU, 16 GB Memory (16 CPU and 16 GB Memory is recommended), 250 GB Disk storage, high speed network connection, Linux based OS such as Ubuntu (version > 16), Centos, Redhat …
To run a UniChain node, We need to get the binary file from https://github.com/uniworld-io/unichain-core/releases first (please choose the latest version), or build the software from source code:
> git clone https://github.com/uniworld-io/unichain-core.git
> cd unichain-core
> ./gradlew build
Please note that the command line above is on Linux environment (Ubuntu). The prerequisite is that Oracle JDK 8 must be installed on the machine.
After building, binary file will be located in the build/libs folder.
To run a normal node with default configuration, run the following command
> java -jar unichain-core.jar
> Output: _ _ _ __ (_) ___| |__ __ _(_)_ __
| | | | '_ \| |/ __| '_ \ / _` | | '_ \
| |_| | | | | | (__| | | | (_| | | | | |
\__,_|_| |_|_|\___|_| |_|\__,_|_|_| |_|
To run node as a witness node, specify the witness flag and the private key
> java -jar unichain-core.jar --witness -p <your-private-key>
Running logs can be found in logs/ folder