Run a Full Ignite Node

Tutorial to run a full node on IgniteChain network

Recommended Hardware

IgniteChain nodes are tested with several systems and come up with below listed recommendation to host a masternode.

Testnet

  • At least 2 cores

  • 8GB of RAM

  • IaaS Provider

  • SSD for Storage

Mainnet

  • 16 Core CPU Minimum

  • RAM 32GB or More

  • IaaS Provider

  • SSD for Storage

The full node will serve on port 30303 UDP and TCP for p2p communication with other nodes, 8000 TCP for RPC API and 8546 TCP for websocket API. It may require to edit firewall configurations.

Run a Full Node on Ignite Chain

Follow this guide to run a IgniteChain Masternode in testnet or mainnet:

1. Install Golang

export GOROOT=$HOME/usr/local/go
export GOPATH=$HOME/go

2. Prepare Ignite Client Software

  • Create new directory for project

mkdir -p $GOPATH/src/github.com/ignitechain/
cd $GOPATH/src/github.com/ignitechain/
  • Download source code and build

git clone https://github.com/ignitechain/ignitechain.git ignitechain
cd ignitechain
  • Build project

make all
  • Binary file should be generated in build folder

$GOPATH/src/github.com/ignitechain/ignitechain/build/bin
alias geth=$GOPATH/src/github.com/ignitechain/ignitechain/build/bin/geth

3. Download Ignite Chain binary from Github

alias geth=path/to/geth/binary

4. Set up Genesis Block

// $GENESIS_PATH : location of genesis file you would like to put
export GENESIS_PATH=path/to/genesis.json

5. Create Data Directory

  • Create a folder to store IgniteChain data on your system storage

export DATA_DIR=/path/to/your/data/folder
mkdir -p $DATA_DIR/geth

6. Initialize IgniteChain from Genesis

geth init $GENESIS_PATH --datadir $DATA_DIR

7. Create Accounts for Nodes's Keystore

  • Import account if you already have one otherwise, create new accounts:

export KEYSTORE_DIR=path/to/keystore

create new accounts:

geth account new \
    --password [YOUR_PASSWORD_FILE_TO_LOCK_YOUR_ACCOUNT] \
    --keystore $KEYSTORE_DIR

Import accounts:

geth account import [PRIVATE_KEY_FILE_OF_YOUR_ACCOUNT] \    
    --keystore $KEYSTORE_DIR \
    --password [YOUR_PASSWORD_FILE_TO_LOCK_YOUR_ACCOUNT]

List all available accounts in keystore folder:

geth account list --datadir $DATA_DIR  --keystore $KEYSTORE_DIR

8. Start a node

Environment variables

  • $IDENTITY: is the name of your node

  • $PASSWORD: is password file to unlock your account

  • $YOUR_COINBASE_ADDRESS: is the address of your account which generated in the previous step

  • $NETWORK_ID: the networkId: for Mainnet: 1991; for Testnet: 8898

  • $BOOTNODES: The comma separated list of bootnodes.

Now let's start the node

geth --datadir $DATA_DIR \
     --keystore $KEYSTORE_DIR \
     --unlock "your_address" \
     --password $PASSWORD \
     --allow-insecure-unlock 
     --nodiscover \
     --http.port 8000 \
     console \
     --port 30304 \
     --ipcdisable \
     --miner.etherbase "your_addres"

If you are a dapp developer, you should open RPC and WS apis:

geth --datadir $DATA_DIR \
     --keystore $KEYSTORE_DIR \
     --unlock "your_address" \
     --password $PASSWORD \
     --allow-insecure-unlock 
     --nodiscover \
     --http.port 8000 \
     console \
     --port 30304 \
     --ipcdisable \
     --miner.etherbase "your_addres" \
     --http \
     --http.addr "your_ip_address" or "localhost" \
     --http.api personal, eth, web3, net, yantra \
     --ws \
     --ws.address "your_ip_address" or "localhost" \
     --ws.api eth, web3, net, yantra \
     --ws.port 8546

To see all flags usage:

geth --help

Last updated