• 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
  • Operating a private network (fakenet)

Operating a private network (fakenet)

Table of Contents
  • Install Required Tools
  • Install Go
  • Building the source
  • Operating a private network (fakenet)

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"
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
Running TestnetRunning the demo

Powered by BetterDocs

Table of Contents
  • Install Required Tools
  • Install Go
  • Building the source
  • Operating a private network (fakenet)
© 2023. NCOG Earth Chain. All Rights Reserved.