Binary

This guide shows how to run a Viction Masternode in testnet and mainnet without the need of using Docker and tmn.

Install Golang

  • Reference: https://golang.org/doc/install

  • Set environment variables

  • Supports Go 1.19+

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

Prepare tomo client software

Build from source code

Create new directory for the project

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

git clone https://github.com/BuildOnViction/tomochain.git Viction
cd Viction
  • Checkout the latest version (e.g v2.2.4)

git pull origin --tags
git checkout v2.2.4
  • Build the project

  • Binary file should be generated in build folder $GOPATH/src/github.com/Viction/Viction/build/bin

Download Viction binary from Github release page

Download tomo binary from our releases page

Download genesis block

$GENESIS_PATH : location of genesis file you would like to put

  • Testnet

  • Mainnet

Create datadir

  • create a folder to store Viction data on your machine

Initialize the chain from genesis

Initialize / Import accounts for the nodes's keystore

If you already had an existing account, import it. Otherwise, please initialize new accounts

Initialize new accounts

Import accounts

List all available accounts in keystore folder

Start a node

Environment variables

  • $IDENTITY: the name of your node

  • $PASSWORD: the password file to unlock your account

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

  • $NETWORK_ID: the networkId. Mainnet: 88. Testnet: 89

  • $BOOTNODES: The comma separated list of bootnodes. Find them here

  • $WS_SECRET: The password to send data to the stats website. Find them here

  • $NETSTATS_HOST: The stats website to report to, regarding to your environment. Find them here

  • $NETSTATS_PORT: The port used by the stats website (usually 443)

Let's start a node

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

If you want to run an archive node to be able to access historical data, you must add two more parameters to the command line --gcmode archive --store-reward , so the final command line will be:

Some explanations on the flags

To see all flags usage

See your node on stats page

Troubleshooting

If your node seems run smooth with no error logs but still get slash frequently. You need to check system time on your node, your system time have to be synced from NTP server

E.g:

NTP synchronized: no means your node does not use NTP, you have to enable it.

Last updated