OshVanK Node ServiceOshVanK Node Service
BitBadges
Mainnet Live

Installation

Comprehensive guide to set up a BitBadges node, configure Cosmovisor, and manage validators.

💢 System Update and Required Tools Installation

sudo apt update && sudo apt upgrade -y
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y

💢 Go Version Check and Installation

IMPORTANT: First, check your current Go version:

go version

💢 Option 1: Existing Go Version is Suitable (1.21 or higher)

If you have Go 1.21 or higher installed on your system, you can skip the Go installation. Proceed directly to the Node Installation section.

💢 Option 2: Go Version Needs Update

⚠️ WARNING: The following commands will delete the current Go installation and ALL files in the $HOME/go directory!

Before proceeding:

  1. If there are files belonging to other projects in the $HOME/go directory, BACK THEM UP
  2. Copy the binary files of other projects to another location
  3. Do not delete files you are unsure about
# Backup example (adjust according to your needs)
mkdir -p $HOME/go_backup
cp -r $HOME/go/bin $HOME/go_backup/

# Clean up old Go
rm -rf $HOME/go
sudo rm -rf /usr/local/go

# Install new Go
cd $HOME
curl https://dl.google.com/go/go1.24.5.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -

# Set environment variables (do not add again if already in .profile)
cat <<'EOF' >>$HOME/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF

source $HOME/.profile
go version

💢 Option 3: Alternative - Using Go Version Manager (GVM)

If you need to use multiple Go versions, GVM is recommended:

# GVM installation
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
source ~/.gvm/scripts/gvm

# Go 1.24.5 installation
gvm install go1.24.5 -B
gvm use go1.24.5 --default

💢 Node Installation

Note: If your binary files for other Cosmos SDK-based projects are in the $HOME/go/bin directory, these steps will not affect them. However, it is still recommended to back up your important binary files.

cd $HOME
rm -rf bitbadgeschain
git clone https://github.com/BitBadges/bitbadgeschain.git
cd bitbadgeschain
git checkout v33
make build-linux/amd64

# Copy binary file
mv build/bitbadgeschain-linux-amd64 $HOME/go/bin/bitbadgeschaind
chmod +x $HOME/go/bin/bitbadgeschaind
bitbadgeschaind version

💢 Cosmovisor Installation

go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest

# Create Cosmovisor directories
mkdir -p $HOME/.bitbadgeschain/cosmovisor/genesis/bin
mkdir -p $HOME/.bitbadgeschain/cosmovisor/upgrades

# Copy binary file
cp $HOME/go/bin/bitbadgeschaind $HOME/.bitbadgeschain/cosmovisor/genesis/bin/

💢 Node Initialization

Set your moniker name (replace NodeName with your own validator name):

bitbadgeschaind init NodeName --chain-id=bitbadges-1

💢 Download Genesis and Addrbook

curl -Ls https://ss.bitbadges.nodestake.org/genesis.json > $HOME/.bitbadgeschain/config/genesis.json
curl -Ls https://ss.bitbadges.nodestake.org/addrbook.json > $HOME/.bitbadgeschain/config/addrbook.json

💢 Port Settings (Custom Port Usage)

Run the following commands to use custom ports instead of default ports. In this example, 56 is used instead of 26, you can choose your own port number:

# Define port variable (write any two-digit number you want instead of 26)
PORT=56

# Port settings in app.toml file
sed -i.bak -e "s%:1317%:${PORT}317%g;
s%:8080%:${PORT}080%g;
s%:9090%:${PORT}090%g;
s%:9091%:${PORT}091%g;
s%:8545%:${PORT}545%g;
s%:8546%:${PORT}546%g;
s%:6065%:${PORT}065%g" $HOME/.bitbadgeschain/config/app.toml

# Port settings in config.toml file
sed -i.bak -e "s%:26658%:${PORT}658%g;
s%:26657%:${PORT}657%g;
s%:6060%:${PORT}060%g;
s%:26656%:${PORT}656%g;
s%:26660%:${PORT}660%g" $HOME/.bitbadgeschain/config/config.toml

💢 Pruning Settings (Optional)

sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.bitbadgeschain/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.bitbadgeschain/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/.bitbadgeschain/config/app.toml

💢 Set Minimum Gas Price

sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.025ubadge"|g' $HOME/.bitbadgeschain/config/app.toml

💢 Enable Prometheus

sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.bitbadgeschain/config/config.toml

💢 Disable Indexer (Optional - Save Disk Space)

sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.bitbadgeschain/config/config.toml

💢 Create Service File (With Cosmovisor)

sudo tee /etc/systemd/system/bitbadgeschaind.service > /dev/null <<EOF
[Unit]
Description=BitBadges Node with Cosmovisor
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=always
RestartSec=3
LimitNOFILE=65535
Environment="DAEMON_NAME=bitbadgeschaind"
Environment="DAEMON_HOME=$HOME/.bitbadgeschain"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="UNSAFE_SKIP_BACKUP=true"

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable bitbadgeschaind

💢 Download Snapshot (Optional - Fast Sync)

bitbadgeschaind tendermint unsafe-reset-all --home $HOME/.bitbadgeschain --keep-addr-book

SNAP_NAME=$(curl -s https://ss.bitbadges.nodestake.org/ | egrep -o ">20.*\.tar.lz4" | tr -d ">")
curl -o - -L https://ss.bitbadges.nodestake.org/${SNAP_NAME} | lz4 -c -d - | tar -x -C $HOME/.bitbadgeschain

💢 Start Node

sudo systemctl restart bitbadgeschaind

💢 View Logs

journalctl -u bitbadgeschaind -f

💢 Check Sync Status

bitbadgeschaind status 2>&1 | jq .SyncInfo.catching_up

If you receive false, the node is synchronized.


Wallet Operations

💢 Create New Wallet

bitbadgeschaind keys add wallet-name

💢 Import Existing Wallet (with Mnemonic)

bitbadgeschaind keys add wallet-name --recover

💢 List Wallets

bitbadgeschaind keys list

💢 Check Wallet Balance

bitbadgeschaind query bank balances $(bitbadgeschaind keys show wallet-name -a)

💢 View Wallet Address

bitbadgeschaind keys show wallet-name -a

Validator Operations

💢 Create Validator

Make sure your node is fully synced and verify that you have enough tokens in your wallet.

💢 Step 1: Get your PubKey

bitbadgeschaind tendermint show-validator

This command will output your pubkey. Example: {"@type":"/cosmos.crypto.ed25519.PubKey","key":"oWg2ISpLF405Jcm2vXV+2v4fnjodh6aafuIdeoW+rUw="}

💢 Step 2: Create Validator JSON File

Run the following command to create a validator.json file. Paste the output you got from the previous command into the PUBKEY_HERE section:

cat << EOF > $HOME/validator.json
{
  "pubkey": PUBKEY_HERE,
  "amount": "1000000ubadge",
  "moniker": "YOUR-VALIDATOR",
  "identity": "KEYBASE-ID",
  "website": "https://yourwebsite.com",
  "security": "email@yourdomain.com",
  "details": "Your validator description",
  "commission-rate": "0.05",
  "commission-max-rate": "0.20",
  "commission-max-change-rate": "0.05",
  "min-self-delegation": "1"
}
EOF

Example validator.json:

{
  "pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"oWg2ISpLF405Jcm2vXV+2v4fnjodh6aafuIdeoW+rUw="},
  "amount": "1000000ubadge",
  "moniker": "OshVanK",
  "identity": "17E09C4xxxxxxx2",
  "website": "https://oshvank.xyz",
  "security": "xxxxx@xxxx.com",
  "details": "Professional validator service",
  "commission-rate": "0.05",
  "commission-max-rate": "0.20",
  "commission-max-change-rate": "0.05",
  "min-self-delegation": "1"
}

💢 Step 3: Create Validator Command

If using Standard Port (26657):

bitbadgeschaind tx staking create-validator $HOME/validator.json \
  --from wallet-name \
  --chain-id bitbadges-1 \
  --gas auto \
  --gas-adjustment 1.5 \
  --fees 5000ubadge \
  -y

If using Custom Port (e.g., 56657):

bitbadgeschaind tx staking create-validator $HOME/validator.json \
  --from wallet-name \
  --chain-id bitbadges-1 \
  --gas auto \
  --gas-adjustment 1.5 \
  --fees 5000ubadge \
  --node http://localhost:56657 \
  -y

Notes:

  • moniker: Your validator name (you can use emojis)
  • website: Your website (optional)
  • identity: Your Keybase ID (optional, you can get it from keybase.io)
  • details: Description about your validator
  • security: Contact email address
  • amount: Amount you will stake (1000000ubadge = 1 BADGE)
  • commission-rate: Your commission rate (0.05 = 5%)
  • --from: Enter your wallet name

💢 Edit Validator

bitbadgeschaind tx staking edit-validator \
  --new-moniker "NEW-VALIDATOR-NAME" \
  --website "https://newwebsite.com" \
  --identity "NEW-KEYBASE-ID" \
  --details "New description" \
  --chain-id bitbadges-1 \
  --from wallet-name \
  --gas auto \
  --gas-adjustment 1.5 \
  --fees 5000ubadge \
  -y

💢 View Validator Information

bitbadgeschaind query staking validator $(bitbadgeschaind keys show wallet-name --bech val -a)

💢 Unjail

bitbadgeschaind tx slashing unjail \
  --chain-id bitbadges-1 \
  --from wallet-name \
  --gas auto \
  --gas-adjustment 1.5 \
  --fees 5000ubadge \
  -y

Useful Commands

💢 Send Tokens

bitbadgeschaind tx bank send wallet-name RECEIVER-ADDRESS 1000000ubadge \
  --chain-id bitbadges-1 \
  --from wallet-name \
  --gas auto \
  --gas-adjustment 1.5 \
  --fees 5000ubadge \
  -y

💢 Delegate (Stake)

bitbadgeschaind tx staking delegate $(bitbadgeschaind keys show wallet-name --bech val -a) 1000000ubadge \
  --chain-id bitbadges-1 \
  --from wallet-name \
  --gas auto \
  --gas-adjustment 1.5 \
  --fees 5000ubadge \
  -y

💢 Redelegate (Move Stake to Another Validator)

bitbadgeschaind tx staking redelegate $(bitbadgeschaind keys show wallet-name --bech val -a) TARGET-VALIDATOR-ADDRESS 1000000ubadge \
  --chain-id bitbadges-1 \
  --from wallet-name \
  --gas auto \
  --gas-adjustment 1.5 \
  --fees 5000ubadge \
  -y

💢 Unstake (Withdraw Stake)

bitbadgeschaind tx staking unbond $(bitbadgeschaind keys show wallet-name --bech val -a) 1000000ubadge \
  --chain-id bitbadges-1 \
  --from wallet-name \
  --gas auto \
  --gas-adjustment 1.5 \
  --fees 5000ubadge \
  -y

💢 Withdraw Rewards (Including Commission)

bitbadgeschaind tx distribution withdraw-rewards $(bitbadgeschaind keys show wallet-name --bech val -a) \
  --commission \
  --chain-id bitbadges-1 \
  --from wallet-name \
  --gas auto \
  --gas-adjustment 1.5 \
  --fees 5000ubadge \
  -y

💢 Withdraw Rewards from All Validators

bitbadgeschaind tx distribution withdraw-all-rewards \
  --chain-id bitbadges-1 \
  --from wallet-name \
  --gas auto \
  --gas-adjustment 1.5 \
  --fees 5000ubadge \
  -y

Governance Operations

💢 View Proposal List

bitbadgeschaind query gov proposals

💢 View Proposal Details

bitbadgeschaind query gov proposal PROPOSAL-NUMBER

💢 Vote on Proposal

Options: yes, no, no_with_veto, abstain

bitbadgeschaind tx gov vote PROPOSAL-NUMBER yes \
  --chain-id bitbadges-1 \
  --from wallet-name \
  --gas auto \
  --gas-adjustment 1.5 \
  --fees 5000ubadge \
  -y

Node Management

💢 Stop Service

sudo systemctl stop bitbadgeschaind

💢 Start Service

sudo systemctl start bitbadgeschaind

💢 Restart Service

sudo systemctl restart bitbadgeschaind

💢 View Logs

journalctl -u bitbadgeschaind -f

💢 Delete Node

sudo systemctl stop bitbadgeschaind
sudo systemctl disable bitbadgeschaind
sudo rm /etc/systemd/system/bitbadgeschaind.service
sudo systemctl daemon-reload
rm -rf $HOME/.bitbadgeschain
rm -rf $HOME/bitbadgeschain


Note: Don't forget to replace wallet-name in the commands with your actual wallet name.

On this page