Running Network1 Node

Node stores the full blockchain history on disk and can answer the data request from the network. It also receives and validates the new blocks and transactions while also verifies the states of every account.

To run a Network1 Node, follow the simple guide below;

Supported Platforms: Mac OS X and Linux.

Steps to Run a Full node

  • Go to the Network1 repository and download pre-build binaries or follow the instructions below:

# Linux
wget   $(curl -s https://api.github.com/repos/network1/net1/releases/latest |grep browser_ |grep geth_linux |cut -d\" -f4)
mv geth_linux geth
chmod -v u+x geth

# MacOS
wget   $(curl -s https://api.github.com/repos/network1/net1/releases/latest |grep browser_ |grep geth_mac |cut -d\" -f4)
mv geth_mac geth
chmod -v u+x geth
  • Download genesis.json and config.toml by:

# mainnet
wget   $(curl -s https://api.github.com/repos/network1/net1/releases/latest |grep browser_ |grep mainnet |cut -d\" -f4)
unzip mainnet.zip

# testnet
wget   $(curl -s https://api.github.com/repos/network1/net1/releases/latest |grep browser_ |grep testnet |cut -d\" -f4)
unzip testnet.zip
  • Download snapshot

Download latest chaindata snapshot and follow the guide to structure your files.

circle-info

NOTE: Your –datadir flag should point to the folder where the extracted snapshot data is. In our case, we created a new folder named node, and we moved the extracted snapshot data to other folder.

  • Start a node

Make sure you use the version of geth you downloaded with wget above, and not your local installation of geth, which might be the wrong version.

It will run with Hash-Base Storage Scheme by default.

It will run with Path-Base Storage Scheme and enable inline state prune, keeping the latest 90000 blocks’ history state by default.

  • Monitor node status

You can monitor the log from ./node/network1.log by default. When your node has started syncing, you should be able to see the following output:

Sync From Genesis Block (Not Recommended)arrow-up-right

It is recommended to use HBSS with level DB for archive node, PBSS for archive node is not supported yet. To sync from genesis block, you would need a more powerful hardware. Server should at least have 40k IOPS and be at least an i3/i3en series server.

If you can not download the chaindata snapshot and want to sync from genesis, then you have to generate the genesis block first, for which you have already downloaded the genesis.json in the Step - 2 above where you have downloaded config files.

  • Write genesis state locally

You will see the following output:

  • Start fullnode

That's it, your full node is now live.

Last updated