[GUIDE][ENG] How to participate in bitsong-testnet-3 (incentivized)

How to participate in bitsong-testnet-3 (incentivized)

This article is intended for those who plan to participate in the third BitSong testnet. This guide replaces the previous ones and it is not to be confused with other versions of the blockchain.


First of all, you need to make some preparations on your server (dedicated or cloud). Using a dedicated server ensures high performance (even in high load situations). The network uses Tendermint’s consensus, which elects a leader for each block. If your validator is offline, the consensus will delay the inclusion of the block and you may be slashed!

For this guide we used the following specifications:

  • Ubuntu 18.04 OS
  • 2 vCPU
  • 4GB RAM
  • 24GB SSD
  • Unlock input connections on gate 26656
  • Static IP address (Elastic IP for AWS, floating IP for DigitalOcean)

You can find these features at any cloud provider (AWS, DigitalOcean, Google Cloud, Hetzner, Linode, etc.)

Installazione software necessario

  1. First you need to access via ssh inside the server and install the security updates
sudo apt update && sudo apt upgrade -y
  1. Install the necessary packages for Golang to work
sudo apt install build-essential libleveldb1v5 git unzip -y
  1. Install Golang (1.13.x)
wget https://dl.google.com/go/go1.13.6.linux-amd64.tar.gz
sudo tar -xvzf go1.13.6.linux-amd64.tar.gz
sudo mv go /usr/local
  1. Update system variables
cat <<EOF >> ~/.profile  
export GOPATH=$HOME/go  
export GO111MODULE=on  
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin  

source ~/.profile
  1. Check that golang is working properly
go version

If all went well, we should have this type of output

go version go1.13.6 linux/amd64

Install Go-BitSong

After installing go-lang and the necessary packages, we can proceed with the installation of go-bitsong (BitSong’s Blockchain)

  1. Let’s clone the BitSong repository
git clone https://github.com/bitsongofficial/go-bitsong.git
  1. Select the correct tag
cd go-bitsong
git checkout v0.3.0
  1. Fill in the binaries
make install
  1. Check go-bitsong version
bitsongd version --long

If all went well, we should have an output like this

name: go-bitsong
server_name: bitsongd
client_name: bitsongcli
version: 0.3.0
commit: 1dc65dbb84309435ab9e87c67202c071e0f0745c
build_tags: netgo,ledger
go: go version go1.13.6 linux/amd64

Setup Go-BitSong

Proceed with the configuration of go-bitsong, replace<your-moniker> with the public name you intend to assign to your validator, bitsong-testnet-3 is the name of the testnet that we will use

  1. Initialize go-bitsong indicating the name of your validator and the chain you want to connect to
bitsongd init --chain-id bitsong-testnet-3 <your-moniker>

Note: bitsongd init set the node-id of your validator. You can get this data by typing the command bitsongd tendermint show-node-id. The value of node-id will be part of the transaction we will create for the genesis, so if you plan to send the genesis-transaction, do not reset your node-id using the bitsong unsafe-reset-all command or by changing your IP address

  1. Create a wallet for your node

<your-wallet-name> must be replaced with the name you intend to give to the wallet. The name may differ from your moniker.

bitsongcli keys add <your-wallet-name>


Genesis transaction

If you plan to activate your validator from the first block, you need to execute these simple instructions and open a pull request. Make sure that the steps have been completed correctly and that your validator is active before the network is started.
If, on the other hand, you do not intend to start your node from the first block, you can skip this guide.

  1. Create a genesis account with 1000000000ubtsg (1000btsg)
bitsongd add-genesis-account $(bitsongcli keys show <your-wallet-name> -a) 1000000000ubtsg

Do not change the amount, in this way we will all have a correct distribution of btsg. We remind you that 1btsg is equivalent to 1000000ubtsg or 10^6

  1. Sign the gentx that will be included in genesis, if you want, you can add the --ip flag to indicate your public ip address
bitsongd gentx --name <your-wallet-name> --amount 1000000000ubtsg --ip <your-public-ip>

By running the command, a genesis transaction will be created and saved to the path $HOME/.bitsongd/config/gentx/gentx-<gen-tx-hash>.json. This should also be the only file in the gentx directory. If instead you find other files inside, we suggest you delete them and re-run the command for the gentx (as described above).

  1. Fork the repository dedicated to networks

Make sure to fork the correct repository (https://github.com/bitsongofficial/networks) under your username.

cd $HOME && git clone https://github.com/<YOUR-USERNAME>/networks.git && cd $HOME/networks
  1. Create the branch dedicated to sending the TX
git checkout -b genesis-<your-moniker>
  1. Check that there are no other TX inside
ls $HOME/.bitsongd/config/gentx
  1. Copy the gentx
cp $HOME/.bitsongd/config/gentx/* $HOME/networks/bitsong-testnet-3/
  1. If it’s your first time using git, you need to do some configuration (optional)
    Remember to change the data with your github account data
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
  1. Add the files and commit the changes
git add bitsong-testnet-3/*
git commit -m 'feat: gentx for <your-moniker>'
  1. Push the local branch to the remote repository
git push -u origin genesis-<your-moniker>

Great! If you have performed all the steps listed above, you only have to open a Pull Request

Create a Pull Request

  1. Click on the link https://github.com/bitsongofficial/networks/pulls

  2. Click on New Pull Requst

  3. Click on compare across forks

  4. Change the following parameters

base repository: bitsongofficial/networks
base: master

head repository: <YOUR-USERNAME>/networks
compare: genesis-<your-moniker>

  1. Continue by clicking on "Create pull request"

  2. Confirm by clicking on "Create pull request"

Make sure to check the previous steps before opening a PR.

Note: all gentx must be sent no later than Saturday January 25th at 15:00 UTC.

In case you do not have time to send the gentx, don’t worry, you can launch your validator after the network has been started.

Launching the testnet :rocket:

Follow the instructions below:


The genesis file was released. The configuration parameters are listed in the repository

Validators can download the genesis file and start their node. The network will be launched on January 27th, 2020 at 15:00 UTC

The last necessary steps are the following:

Make sure your node is updated

rm -rf ~/go-bitsong
git clone https://github.com/bitsongofficial/go-bitsong
cd go-bitsong
git checkout v0.3.0
make install
bitsongd version --long

you should have an output similar to this

$ bitsongd version --long
name: go-bitsong
server_name: bitsongd
client_name: bitsongcli
version: 0.3.0
commit: 1dc65dbb84309435ab9e87c67202c071e0f0745c
build_tags: netgo,ledger
go: go version go1.13.6 linux/amd64

1. Delete the old genesis

rm -f ~/.bitsongd/config/genesis.json

2. Download the new genesis, and copy it to the correct directory

wget https://raw.githubusercontent.com/bitsongofficial/networks/master/bitsong-testnet-3/genesis.json -P ~/.bitsongd/config

3. Run the node

bitsongd start

Optional, if you wish, you can create a systemd file (edit <your_user> where necessary)

sudo tee /etc/systemd/system/bitsongd.service > /dev/null <<EOF  
Description=BitSong Network Daemon  

ExecStart=/home/<your_user>/go/bin/bitsongd start  


Now we have to wait for the launch of the network which will take place on January 27th, 2020 at 15:00 UTC

sudo systemctl enable bitsongd  
sudo systemctl start bitsongd

To check the status of the node, you can use the following commands

bitsongcli status  
sudo journalctl -u bitsongd -f

After the network has reached the quorum, the testnet will start automatically!

If the quorum is not reached, we will give further communications in the validator’s chat