Fakenet is a private network optimized for your private testing. It’ll generate a genesis containing N validators with equal stakes. To launch a validator in this network, all you need to do is specify a validator ID you’re willing to launch.
Pay attention that validator’s private keys are deterministically generated in this network, so you must use it only for private testing.
Maintaining your own private network is more involved as a lot of configurations taken for granted in the official networks need to be manually set up.
Install Required Tools #
Now we are going to install Go.
First, install the required build tools:
# Update package lists and upgrade installed packages
(validator)$ apt upgrade -y
# Install software-properties-common
(validator)$ apt install -y software-properties-common
# Add the Go programming language repository
(validator)$ add-apt-repository -y ppa:longsleep/golang-backports
# Update package lists after adding the repository
(validator)$ apt update
Install Go #
# Install go
(validator)$ apt install -y golang-go
EVM-compatible chain secured by the Forest consensus algorithm. With NCOG Earth Chain, you can experience the fastest blockchain transactions.
Building the source #
Building ncogearthchain requires both a Go (version 1.14 or later) and a C compiler. You can install them using your favourite package manager. Once the dependencies are installed, run
make ncogearthchain
The build output is build/ncogearthchain executable.
Operating a private network (fakenet) #
To run the fakenet with just one validator (which will work practically as a PoA blockchain), use:
$ ncogearthchain --fakenet 1/1
To run the fakenet with 5 validators, run the command for each validator:
$ ncogearthchain --fakenet 1/5 # first node, use 2/5 for second node
If you have to launch a non-validator node in fakenet, use 0 as ID:
$ ncogearthchain --fakenet 0/5
After that, you have to connect your nodes. Either connect them statically or specify a bootnode:
$ ncogearthchain --fakenet 1/5 --bootnodes "enode://[email protected]:5050"