BITCANNA NODE INSTALL

Install pre-requisites

sudo apt update
sudo apt install git build-essential ufw curl jq lz4 --yes

Install Go

wget https://go.dev/dl/go1.20.2.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz
rm go1.20.2.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
cat <> ~/.profile
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source ~/.profile
go version

You will receive this response:
go version go1.20.2 linux/amd64

Install bcnad
git clone https://github.com/BitCannaGlobal/bcna.git
cd bcna
git checkout v3.1.0
make install
bcnad version


You will receive this response:
3.1.0
Init bcnad
# CHANGE $NODE_NAME with your “node name”
bcnad config chain-id bitcanna-1
bcnad init "$NODE_NAME" --chain-id bitcanna-1
Pruning Setting

sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0.0026ubcna"|g' $HOME/.bcna/config/app.toml
sed -i 's|^pruning *=.*|pruning = "custom"|g' $HOME/.bcna/config/app.toml
sed -i 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|g' $HOME/.bcna/config/app.toml
sed -i 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|g' $HOME/.bcna/config/app.toml
sed -i 's|^pruning-interval *=.*|pruning-interval = "10"|g' $HOME/.bcna/config/app.toml
sed -i 's|^indexer *=.*|indexer = "null"|g' $HOME/.bcna/config/config.toml

Download Genesis, Addrbook and Snapshot
rm $HOME/.bcna/config/genesis.json
wget https://snapshot.safeblock.space/bitcanna/genesis.json -P $HOME/.bcna/config
wget https://snapshot.safeblock.space/bitcanna/addrbook.json -P $HOME/.bcna/config
wget https://snapshot.safeblock.space/bitcanna/bitcanna-snapshot_26-05-2024.tar.lz4
lz4 -c -d bitcanna-snapshot_26-05-2024.tar.lz4 | tar -x -C /.bcna
rm bitcanna-snapshot_26-05-2024.tar.lz4
Create Bitcanna Service

# CHANGE $USER with your “username”
sudo tee /etc/systemd/system/bcnad.service > /dev/null << EOF

[Unit] Description=Bitcanna
After=network-online.target
[Service] User=$USER
ExecStart=/home/$USER/go/bin/bcnad start
Restart=always
RestartSec=3
LimitNOFILE=4096

[Install] WantedBy=multi-user.target
EOF

Start Bitcanna Service

Enable bitcanna in background:
sudo systemctl enable bcnad

Start bitcanna in background:
sudo systemctl start bcnad

Check Bitcanna Service

sudo journalctl -fu bcnad -o cat
# Ctrl+C to exit

sudo journalctl -fu bcnad -o cat | grep index
# Ctrl+C to exit

curl -s http://0.0.0.0:26657/status | jq -r .result.sync_info.catching_up

If response is “true”, you not are synched, wait….
When response is “false”, your node are synched to Bitcanna Network