• NEC Website
  • GitHub
  • Discord Community

Quick Start

  • Get Started

Staking

  • Quick Start
  • Overview
  • Stake on NCOG
  • Run NCOGEarthChain
  • Run Validator Node
  • Running Testnet
  • Operating a private network (fakenet)
  • Running the demo
  • Run a Read-only node
  • Testnet Faucet
  • Run a Full node
  • Run a Testnet read node

API

  • Public API End Points
  • Getting Started
  • Installation
  • GraphQL Schema Basics
  • Schema Structure
  • Implementation Details and Notes

Tutorials

  • Create a ERC721 Contract
  • Deploy a Smart Contract
  • Verify a Deployed Smart Contract
  • Setup MetaMask Wallet
  • Import NFT
  • Create a Local Test Network

Technology

  • Overview
  • Forest Protocal
  • Tolerance to Byzantine Fault (BFT)
  • Proof of Stake
  • Transaction Fees
  • FAQ

Best Practices

  • MANAGE NEC ASSETS WITH LEDGER NANO S
  • How to Navigate NCOG NEC
  • How to Check Your Account Balance
  • How to Receive NCOG Assets
  • How to Send NCOG Assets
  • Leager FAQ
  • Home
  • Docs
  • Staking
  • Running Testnet

Running Testnet

Table of Contents
  • Install Required Tools
  • Install Go
  • Building the source
  • Running Testnet

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.

What are your Feelings
Share This Article :
  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
Still stuck? How can we help?

How can we help?

Updated on December 12, 2023
Run Validator NodeOperating a private network (fakenet)

Powered by BetterDocs

Table of Contents
  • Install Required Tools
  • Install Go
  • Building the source
  • Running Testnet
© 2023. NCOG Earth Chain. All Rights Reserved.