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

Requirements

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

First you need to access via ssh inside the server and install the security updates

sudo apt update && sudo apt upgrade -y

Install the necessary packages for Golang to work

sudo apt install build-essential libleveldb1v5 git unzip -y

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

Update system variables

cat <<EOF >> ~/.profile export GOPATH=$HOME/go export GO111MODULE=on export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin EOF source ~/.profile

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)

Let’s clone the BitSong repository

git clone https://github.com/bitsongofficial/go-bitsong.git

Select the correct tag

cd go-bitsong git checkout v0.3.0

Fill in the binaries

make install

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

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

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>

BEFORE CONTINUING, DO NOT FORGET TO SAVE AND KEEP SAFE THE MNEMONIC PHRASE!

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.

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

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).

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

Create the branch dedicated to sending the TX

git checkout -b genesis-<your-moniker>

Check that there are no other TX inside

ls $HOME/.bitsongd/config/gentx

Copy the gentx

cp $HOME/.bitsongd/config/gentx/* $HOME/networks/bitsong-testnet-3/

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"

Add the files and commit the changes

git add bitsong-testnet-3/* git commit -m 'feat: gentx for <your-moniker>'

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

Click on the link https://github.com/bitsongofficial/networks/pulls Click on New Pull Requst

Click on compare across forks

Change the following parameters

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

Continue by clicking on "Create pull request"

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

Follow the instructions below: