BitCanna
Search…
Validator Setup Guide

MAINNET: Setup up your validator and join bitcanna-1

IMPORTANT NOTE: If you participated in the previous BitCanna Testnets, you must go to the end of the document to find specific instructions to join.
bcnad is a blockchain application built using Cosmos SDK v.0.44.2 and Tendermint v.0.34.13.
You can run the validator software using the binary or compiling it by yourself, you can choose between Step 0a or Step 0b and continue at Step 1.
  • Before you start, you might want to ensure your system is up to date. Besides, you can install a utility named jq to read and navigate in JSON files and outputs.
    1
    sudo apt-get update
    2
    sudo apt-get upgrade -y
    3
    sudo apt-get install -y build-essential curl wget jq
    Copied!
  • Increasing the default open files limit. If we don't raise this value, nodes will crash once the network grows large enough.
    1
    sudo su -c "echo 'fs.file-max = 65536' >> /etc/sysctl.conf"
    2
    sudo sysctl -p
    Copied!

Step 0A - Run a fullnode / validator using the binaries.

By downloading the binary we avoid compiling the source code.
  • Download the latest version (v1.2) from Github:
    1
    cd $HOME
    2
    wget https://github.com/BitCannaGlobal/bcna/releases/download/v1.2/bcnad
    3
    chmod +x bcnad
    4
    sudo mv bcnad /usr/local/bin/
    Copied!
  • Check for the right version (1.2):
    1
    bcnad version
    2
    >>> response: 1.2
    Copied!
NOTE: If you have downloaded the binary avoid Step 0B and go to Step 1
The updated instructions are always in our GitHub Readme page, click on this link to go there.

Step 1 - Setting up the connection.

Instructions for setting up the connection with the BitCanna MainNet Blockchain
  1. 1.
    Set the chain-id parameter
1
bcnad config chain-id bitcanna-1
Copied!
2. Create a wallet: You may create a wallet with one or more keys (addresses) using bcnad; you can choose a name of your own liking (we strongly advice you use one word)
1
bcnad keys add MyFirstAddress
2
​
3
name: MyFirstAddress
4
type: local
5
address: bcna14shzreglay98us0hep44hhhuy7dm43snv38plr
6
pubkey: bcnapub1addwnpepqvtpzyugupvcu773rzdcvhele6e22txy2zr235dn7uf8t2mlqcarcyx2gg9
7
mnemonic: ""
8
threshold: 0
9
pubkeys: []
10
​
11
​
12
Important write this mnemonic phrase in a safe place.
13
It is the only way to recover your account if you ever forget your password.
14
​
15
deposit daring slim glide spend dolphin expire shadow cluster vivid orphan work pond section client friend yellow west hamster torch settle island opinion gloom
Copied!
Your address will look something similar like this: bcna14shzreglay98us0hep44hhhuy7dm43snv38plr
3. Initialize the folders: change Moniker by your validator name (use quotes for two or more separated words "Royal Queen Seeds")
1
bcnad init Moniker --chain-id bitcanna-1
Copied!
This will create a $HOME/.bcna folder
4. Download the Genesis genesis.json file
1
cd $HOME
2
curl -s https://raw.githubusercontent.com/BitCannaGlobal/bcna/main/genesis.json > ~/.bcna/config/genesis.json
Copied!
Ensure you have the correct file. Run the SHA256SUM test:
1
sha256sum $HOME/.bcna/config/genesis.json
2
<output> cd7449a199e71c400778f894abb00874badda572ac5443b7ec48bb0aad052f29
Copied!
5. Add to config.toml file: server SEEDs:
1
sed -E -i 's/seeds = \".*\"/seeds = \"[email protected]:26656,[email protected]:26656\"/' $HOME/.bcna/config/config.toml
Copied!
6. You can set the minimum gas prices for transactions to be accepted into your node’s mempool. This sets a lower bound on gas prices, preventing spam.
1
sed -E -i 's/minimum-gas-prices = \".*\"/minimum-gas-prices = \"0.001ubcna\"/' $HOME/.bcna/config/app.toml
Copied!
7. Open the P2P port (26656 by default)
sudo ufw allow 26656
8. Test the connection (CTRL + C to stop)
bcnad start --log_level info
1
3:31PM INF Committed state appHash=77D16BED3F109A4A05A971C92602029569E049DFC1DC128CFF5CCAE3158F4B1B height=3886 module=state txs=0
2
3:31PM INF Indexed block height=3886 module=txindex
3
3:31PM INF minted coins from module account amount=1034628bcna from=mint module=x/bank
4
3:31PM INF Executed block height=3887 invalidTxs=0 module=state validTxs=0
5
3:31PM INF commit synced commit=436F6D6D697449447B5B38332031333820373720313731203135362032333220313431203435203137332037372031352031363020373120393720393520352031393020313836203733203131342034322031313620313230203536203338203230203337203437203231392032353220343920385D3A4632467D
6
3:31PM INF Committed state appHash=538A4DAB9CE88D2DAD4D0FA047615F05BEBA49722A7478382614252FDBFC3108 height=3887 module=state txs=0
Copied!
9. Service creation. Ensure that you stopped the previous test with CTRL+C. With all configurations ready, you can start your blockchain node with a single command (bcnad start). In this tutorial, however, you will find a simple way to set up systemd to run the node daemon with auto-restart.
Setup bcnad systemd service (copy and paste all to create the file service):
1
cd $HOME
2
echo "[Unit]
3
Description=BitCanna Node
4
After=network-online.target
5
[Service]
6
User=${USER}
7
ExecStart=$(which bcnad) start
8
Restart=always
9
RestartSec=3
10
LimitNOFILE=4096
11
[Install]
12
WantedBy=multi-user.target
13
" >bcnad.service
Copied!
Enable and activate the BCNAD service.
1
sudo mv bcnad.service /lib/systemd/system/
2
sudo systemctl enable bcnad.service && sudo systemctl start bcnad.service
Copied!
Check the logs to see if it is working: sudo journalctl -u bcnad -f
10. Check the synchronisation: If catching_up = true the node is syncing. Also you can compare your current block with the last synced block of another node, or at our Explorer:
1
curl -s localhost:26657/status | jq .result.sync_info.catching_up
2
#true output is syncing - false is synced
3
​
4
curl -s localhost:26657/status | jq .result.sync_info.latest_block_height
5
#this output is your last block synced
6
​
7
curl -s "http://seed1.bitcanna.io:26657/status?" | jq .result.sync_info.latest_block_height
8
#this output the public node last block synced
Copied!

Step 2 - Become a validator.

To become a validator you need to perform additional steps. Your node must be fully synced in order to send the TX of validator creation and start to validate the network. You can check if your node has fully synced by comparing your logs and the latest block in the explorer (https://cosmos-explorer.bitcanna.io/)
  1. 1.
    You will need coins: Send coins to your new address, you will need roughly 2 BCNA to run the validator (1 BCNA for self-delegation and a bit more for transactions). You can acquire these in Osmosis, Coinmerce or Coindeal.
  2. 2.
    Send the Create validator TX:
We recommend to read the FAQ manual to understand all parameters: https://hackmd.io/_R2KtQzAS02QXdwpJdqmnw?view​
When you have your node synced and your wallet funded with coins, send the TX to become validator (change wallet_name and moniker):
You can use quotes to include spaces and more than two words --from "Royal Queen Seeds"
1
bcnad tx staking create-validator \
2
--amount 1000000ubcna \
3
--commission-max-change-rate 0.10 \
4
--commission-max-rate 0.2 \
5
--commission-rate 0.1 \
6
--from WALLET_NAME \
7
--min-self-delegation 1 \
8
--moniker YOUR_MONIKER \
9
--pubkey $(bcnad tendermint show-validator) \
10
--chain-id bitcanna-1 \
11
--gas auto \
12
--gas-adjustment 1.5 \
13
--gas-prices 0.001ubcna
Copied!
You can check the list of validators (also in Explorer):
1
bcnad query staking validators --output json| jq
Copied!
3. Another IMPORTANT but optional action is backup your Validator_priv_key:
1
tar -czvf validator_key.tar.gz .bcna/config/*_key.json
2
gpg -o validator_key.tar.gz.gpg -ca validator_key.tar.gz
3
rm validator_key.tar.gz
Copied!
This will create a GPG encrypted file with both key files.

Instructions for users who participated in previous BitCanna testnets.

1. Stop your validator (in case its running).

  1. 1.
    If you are running cosmovisor service:
1
sudo service cosmovisor stop
Copied!
2. If you are running bcnad service without cosmovisor:
1
sudo service bcnad stop
Copied!

2. Update the software.

New versions (bcnad & cosmovisor) for the MainNet are here (you can check the sha256sum there): https://github.com/BitCannaGlobal/bcna/releases/tag/v1.2​
Perform only A or B of step 1 depending on your service type (cosmovisor or bcnad directly)
  1. 1.
    A Update for Cosmovisor users
1
cd $HOME
2
rm -f bcnad #deletes if exist
3
wget -nc https://github.com/BitCannaGlobal/bcna/releases/download/v1.2/bcnad
4
chmod +x bcnad
5
​
6
sha256sum bcnad
7
<output> 1a06f246aa398eba89bb72d9a11a91b3a3c990892e9ce0d4f2c1601cf6d4c820 bcnad
8
​
9
rm -rf .bcna/cosmovisor/upgrades/indica/
10
ln -s -f -T ${HOME}/.bcna/cosmovisor/genesis ${HOME}/.bcna/cosmovisor/current
11
mv ./bcnad $HOME/.bcna/cosmovisor/current/bin/
12
​
13
rm -f cosmovisor #deletes if exist
14
wget -nc https://github.com/BitCannaGlobal/bcna/releases/download/v1.2/cosmovisor
15
chmod +x cosmovisor
16
​
17
sha256sum cosmovisor
18
<output> 12926c85156056d033a8bb94aa4359afd9c7009ba337e98f8c472d34c3556aac cosmovisor
19
​
20
sudo mv ./cosmovisor $(which cosmovisor) #overwrite the current
Copied!
  1. 1.
    B Update for BCNAD service (not Cosmovisor) If you are running the validator without Cosmovisor:
1
cd $HOME
2
rm -f bcnad #deletes if exist
3
wget -nc https://github.com/BitCannaGlobal/bcna/releases/download/v1.2/bcnad
4
chmod +x bcnad
5
sudo mv ./bcnad $(which bcnad)
6
bcnad version
7
<output> 1.2
8
​
9
sha256sum bcnad
10
<output> 1a06f246aa398eba89bb72d9a11a91b3a3c990892e9ce0d4f2c1601cf6d4c820 bcnad
Copied!
Anyway Review your config.toml file and ensure that persistent_peers is empty by now, and seeds have the following value:
1
Copied!

3. Fetch new genesis.json into bcna’s config directory, it will automatically overwrite the previous if it exists.

1
cd $HOME
2
curl -s https://raw.githubusercontent.com/BitCannaGlobal/bcna/main/genesis.json > ~/.bcna/config/genesis.json
Copied!
Ensure you have the correct file. Run the SHA256SUM test:
1
sha256sum $HOME/.bcna/config/genesis.json
2
<output> cd7449a199e71c400778f894abb00874badda572ac5443b7ec48bb0aad052f29
Copied!

4. Reset the state and sync the new chain.

1
bcnad unsafe-reset-all
2
bcnad config chain-id bitcanna-1
Copied!
Start the service, you must run cosmovisor or bcnad service:
1
sudo service cosmovisor start
Copied!
or
1
sudo service bcnad start
Copied!

5. Create your validator.

Back above to Step 2: Become a validator!
Last modified 27d ago