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.
Running Testnet #
The network is specified only by its genesis file, so running a testnet node is equivalent to using a testnet genesis file instead of a mainnet genesis file:
$ ncogearthchain --genesis /path/to/testnet.g # launch node
It may be convenient to use a separate datadir for your testnet node to avoid collisions with other networks:
$ ncogearthchain --genesis /path/to/testnet.g --datadir /path/to/datadir # launch node
$ ncogearthchain --datadir /path/to/datadir account new # create new account
$ ncogearthchain --datadir /path/to/datadir attach # attach to IPC
Testing
Forest has extensive unit-testing. Use the Go tool to run tests:
go test ./...
If everything goes well, it should output something along these lines:
ok github.com/Ncog-Earth-Chain/go-ncogearthchain/app 0.033s
? github.com/Ncog-Earth-Chain/go-ncogearthchain/cmd/cmdtest [no test files]
ok github.com/Ncog-Earth-Chain/go-ncogearthchain/cmd/ncogearthchain 13.890s
? github.com/Ncog-Earth-Chain/go-ncogearthchain/cmd/ncogearthchain/metrics [no test files]
? github.com/Ncog-Earth-Chain/go-ncogearthchain/cmd/ncogearthchain/tracing [no test files]
? github.com/Ncog-Earth-Chain/go-ncogearthchain/crypto [no test files]
? github.com/Ncog-Earth-Chain/go-ncogearthchain/debug [no test files]
? github.com/Ncog-Earth-Chain/go-ncogearthchain/ethapi [no test files]
? github.com/Ncog-Earth-Chain/go-ncogearthchain/eventcheck [no test files]
? github.com/Ncog-Earth-Chain/go-ncogearthchain/eventcheck/basiccheck [no test files]
? github.com/Ncog-Earth-Chain/go-ncogearthchain/eventcheck/gaspowercheck [no test files]
? github.com/Ncog-Earth-Chain/go-ncogearthchain/eventcheck/heavycheck [no test files]
? github.com/Ncog-Earth-Chain/go-ncogearthchain/eventcheck/parentscheck [no test files]
ok github.com/Ncog-Earth-Chain/go-ncogearthchain/evmcore 6.322s
? github.com/Ncog-Earth-Chain/go-ncogearthchain/gossip [no test files]
? github.com/Ncog-Earth-Chain/go-ncogearthchain/gossip/emitter [no test files]
ok github.com/Ncog-Earth-Chain/go-ncogearthchain/gossip/filters 1.250s
? github.com/Ncog-Earth-Chain/go-ncogearthchain/gossip/gasprice [no test files]
? github.com/Ncog-Earth-Chain/go-ncogearthchain/gossip/occuredtxs [no test files]
? github.com/Ncog-Earth-Chain/go-ncogearthchain/gossip/piecefunc [no test files]
ok github.com/Ncog-Earth-Chain/go-ncogearthchain/integration 21.640s
Also it is tested with fuzzing.