Last updated
Last updated
Version | Chain-id | Wasm |
---|---|---|
# Update Packages
sudo apt update && apt upgrade -y
sudo apt install curl git jq lz4 build-essential unzip fail2ban ufw -y
# Set Firewall
sudo apt install -y ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw allow 9100
# Enable Firewall
sudo ufw enable
# Install Go
ver="1.20.8"
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version
# Install Cosmovisor (OPTIONAL If you are using Cosmovisor)
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
This Installer has Cosmovisor or Straight Binary Installation, with Custom port, and Snapshot Included
curl -o install.sh https://snapshots.indonode.net/bitcanna/install.sh && chmod +x install.sh && ./install.sh
There is 2 ways to install node , using Cosmovisor or Run the binary directly, you can choose whats you prefer
# Download and install binary
cd $HOME
rm -rf bcna
git clone https://github.com/BitCannaGlobal/bcna.git
cd bcna
git checkout v2.0.3
make build
# Setup Cosmovisor Symlinks
mkdir -p $HOME/.bcna/cosmovisor/genesis/bin
mv build/bcnad $HOME/.bcna/cosmovisor/genesis/bin/
rm -rf build
sudo ln -s $HOME/.bcna/cosmovisor/genesis $HOME/.bcna/cosmovisor/current
sudo ln -s $HOME/.bcna/cosmovisor/current/bin/bcnad /usr/local/bin/bcnad
# Set Configuration for your node
bcnad config chain-id bitcanna-1
bcnad config keyring-backend file
# Init your node
# You can change "MyNode" to anything you like
bcnad init MyNode --chain-id bitcanna-1
# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/bitcanna/genesis.json > $HOME/.bcna/config/genesis.json
curl -Ls https://snapshots.indonode.net/bitcanna/addrbook.json > $HOME/.bcna/config/addrbook.json
#Configure Seeds and Peers
PEERS="$(curl -sS https://rpc.bitcanna.indonode.net/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}' | sed -z 's|\n|,|g;s|.$||')"
sed -i -e "s|^persistent_peers *=.*|persistent_peers = \"$PEERS\"|" $HOME/.bcna/config/config.toml
# Set Pruning, Enable Prometheus, Gas Price, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"
sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.bcna/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.bcna/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.bcna/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.bcna/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.bcna/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0ubcna\"/" $HOME/.bcna/config/app.toml
# Set Service file
sudo tee /etc/systemd/system/bcnad.service > /dev/null << EOF
[Unit]
Description=bcnad testnet node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.bcna"
Environment="DAEMON_NAME=bcnad"
Environment="UNSAFE_SKIP_BACKUP=true"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable bcnad
# Download Latest Snapshot
curl -L https://snapshots.indonode.net/bitcanna/bitcanna-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.bcna
[[ -f $HOME/.bcna/data/upgrade-info.json ]] && cp $HOME/.bcna/data/upgrade-info.json $HOME/.bcna/cosmovisor/genesis/upgrade-info.json
# Start the Node
sudo systemctl restart bcnad
sudo journalctl -fu bcnad -o cat
# Download and install binary
cd $HOME
rm -rf bcna
git clone https://github.com/BitCannaGlobal/bcna.git
cd bcna
git checkout v2.0.3
make install
# Set Configuration for your node
bcnad config chain-id bitcanna-1
bcnad config keyring-backend file
# Init your node
# You can change "MyNode" to anything you like
bcnad init MyNode --chain-in bitcanna-1
# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/bitcanna/genesis.json > $HOME/.bcna/config/genesis.json
curl -Ls https://snapshots.indonode.net/bitcanna/addrbook.json > $HOME/.bcna/config/addrbook.json
#Configure Seeds and Peers
PEERS="$(curl -sS https://rpc.bitcanna.indonode.net/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}' | sed -z 's|\n|,|g;s|.$||')"
sed -i -e "s|^persistent_peers *=.*|persistent_peers = \"$PEERS\"|" $HOME/.bcna/config/config.toml
# Set Pruning, Enable Prometheus, Gas Prices, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"
sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.bcna/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.bcna/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.bcna/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.bcna/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.bcna/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0ubcna\"/" $HOME/.bcna/config/app.toml
# Set Service file
sudo tee /etc/systemd/system/bcnad.service > /dev/null <<EOF
[Unit]
Description=bitcanna testnet node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which bcnad) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable bcnad
# Download Latest Snapshot
curl -L https://snapshots.indonode.net/bitcanna/bitcanna-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.bcna
[[ -f $HOME/.bcna/data/upgrade-info.json ]] && cp $HOME/.bcna/data/upgrade-info.json $HOME/.bcna/cosmovisor/genesis/upgrade-info.json
# Start the Node
sudo systemctl restart bcnad
sudo journalctl -fu bcnad -o cat
v2.0.3
bitcanna-1
DISABLED