Viction Private Testnet Setup
This tutorial shows how to set up a private Viction Testnet on a local machine. The purpose is to help developers to familiarise themselves with Viction's source code and initial setup.
The following will walk you step-by-step to setup a Viction private net with four Masternodes.
Setup environment
Install Golang
Follow instruction here for your operating system: https://go.dev/doc/install
Set environment variables
set GOROOT=$HOME/usr/local/go
set GOPATH=$HOME/goBuild Tomo from source
Create Tomo folder
mkdir $HOME/tomo
cd $HOME/tomoDownload source code and build:
git init
git remote add [email protected]:Viction/Viction.git
git pull origin master
make allDownload source code Tomo and install library:
Create alias for Tomo (this will only be effective in current session)
Setup Nodes and Accounts
Create a file to store password to encrypt/decrypt private key in plain text:
You can either create new keypair or import private key for your node:
Repeat the process for node2, node3 and node4.
Customize genesis block using the puppeth tool
puppeth toolRun puppeth command and answer questions about your private chain as follows:
Set chain name:
TomoConfigure new genesis:
2Select
POSVconsensus:3Set block time (default 2 seconds):
EnterSet reward of each epoch:
250Set addresses to be first masternode: Any address
Set account to seal: Address of Node 1, Node 2, Node 3, Node 4
Set the number of blocks of each epoch (default 900):
EnterSet gap (How many blocks before checkpoint need to prepare new masternodes set ?):
5Set foundation wallet address:
EnterAccount confirm Foundation MultiSignWallet: 2 or more addresses
Require for confirm tx in Foundation MultiSignWallet:
1Account confirm Team MultiSignWallet: 2 or more addresses
Require for confirm tx in Team MultiSignWallet:
1Enter swap wallet address for fund 55 million VIC: Any address
Enter account be pre-funded: Any address, should be at least 1
Enter Network ID: Any number
Export genesis file
Select
2. Manage existing genesisSelect
2. Export genesis configurationEnter genesis filename (example):
$HOME/tomo/genesis.json
Control + Cto exit
Initialize Your Private Chain with Above Genesis Block
Setup Bootnode
Initialize bootnode key
Start bootnode and copy bootnode information
enode://7e59324b1e54f8c282719465eb96786fb3a04a0265deee2cdb0f62e912337ca6f118d0c91f7ebfae6f5c17825205279249cf7ff65ae54d0a1a8908ef16f80f63@[::]:30301

Start Masternode
Start Masternode 1
Start Masternode 2
Start Masternode 3
Start Masternode 4
Some explanations on the flags
To see all flags usage
Connect to other node manually
We'll try to let node2 to connect to node1.
Get node info
Connect to node1 ipc
In the newly open prompt, run the following command:

As in the example, we can see enode information of node1. Copy this information for later use.
For example enode://89a5e91d30461641c4ede519c065b2f1e6d23a36d45e2d953e0ec9fa75e516517a0d4964489e07b73a7fa48e67d42fb2498ba46fe1a814c42ec0ad3257ced47a@[::]:10303
Exit node1 ipc prompt by this command:
Add peer for your node
Connect to node2 ipc
In the newly open prompt, connect to other node by their enode (which we get from the previous step) using the following command:
Now check if we added peer sucessfully:

Exit node2 ipc prompt by this command:
Repeat this step for other nodes.
Check Your Private Chain
Connect ipc
Connect rpc
Verify Checkpoints

Troubleshooting
Reset your chain
Note: we use the Gnosis Multisig Wallet: https://github.com/gnosis/MultiSigWallet
Last updated