Mainnet
Bitbadges

Installation Guide
Node CLI
Public Endpoint
State Sync
Snapshot
Custom Explorers
Decentralization Maps
Installation Guide
Installation Guide
Node CLI
Public Endpoint
State Sync
Snapshot
Custom Explorers
Decentralization Maps
How To Install Full Node Bitbadges Mainnet
Setting up vars
Your Nodename (validator) that will shows in explorer
NODENAME=<Your_Nodename_Moniker>
Save variables to system
echo "export NODENAME=$NODENAME" >> $HOME/.bash_profile
if [ ! $WALLET ]; then
echo "export WALLET=wallet" >> $HOME/.bash_profile
fi
echo "export BITBADGES_CHAIN_ID=bitbadges-1" >> $HOME/.bash_profile
source $HOME/.bash_profile
Update packages
sudo apt update && sudo apt upgrade -y
Install dependencies
sudo apt install curl build-essential git wget jq make gcc tmux net-tools ccze -y
Install go
if ! [ -x "$(command -v go)" ]; then
ver="1.21.2"
cd $HOME
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" >> ~/.bash_profile
source ~/.bash_profile
fi
Download and build binaries
cd $HOME
mkdir -p $HOME/.bitbadgeschain
wget https://github.com/BitBadges/bitbadgeschain/releases/download/v14/bitbadgeschain-linux-amd64
chmod +x bitbadgeschain-linux-amd64
mv bitbadgeschain-linux-amd64 ~/go/bin/bitbadgeschaind
Init app
bitbadgesd init $NODENAME --chain-id $BITBADGES_CHAIN_ID
Download configuration
wget https://snapshot.konsortech.xyz/mainnet/bitbadges/genesis.json -O ~/.bitbadgeschain/config/genesis.json
wget https://snapshot.konsortech.xyz/mainnet/bitbadges/addrbook.json -O ~/.bitbadgeschain/config/addrbook.json
Set the minimum gas price and Peers, Filter peers/ MaxPeers
SEEDS="10f2016ec436bee02d0cf3e5499f3c99d5a93d26@mainnet-seed.konsortech.xyz:18265"
PEERS="19ad7e97b3dc65a3aa4c1c33b7457c7f9a267916@mainnet-bitbadges.konsortech.xyz:18656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" ~/.bitbadgeschain/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.025ubadge\"/" $HOME/.bitbadgeschain/config/app.toml
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" ~/.bitbadgeschain/config/config.toml
Disable indexing
indexer="null"
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" ~/.bitbadgeschain/config/config.toml
Config pruning
pruning="custom" && \
pruning_keep_recent="100" && \
pruning_keep_every="0" && \
pruning_interval="10" && \
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" ~/.bitbadgeschain/config/app.toml && \
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" ~/.bitbadgeschain/config/app.toml && \
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" ~/.bitbadgeschain/config/app.toml && \
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" ~/.bitbadgeschain/config/app.toml
Create service
sudo tee /etc/systemd/system/bitbadgesd.service > /dev/null <<EOF
[Unit]
Description=Bitbadges Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which bitbadgesd) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Register and start service
sudo systemctl daemon-reload
sudo systemctl enable bitbadgesd
sudo systemctl restart bitbadgesd && sudo journalctl -u bitbadgesd -f -o cat
Guidence for create validator
Create wallet
To create new wallet you can use command below. Don’t forget to save the mnemonic
bitbadgeschaind keys add $WALLET
To recover your wallet using seed phrase
bitbadgeschaind keys add $WALLET --recover
Show your wallet list
bitbadgeschaind keys list
Save wallet info
Add wallet and validator address into variables
BITBADGES_WALLET_ADDRESS=$(bitbadgeschaind keys show $WALLET -a)
BITBADGES_VALOPER_ADDRESS=$(bitbadgeschaind keys show $WALLET --bech val -a)
echo 'export BITBADGES_WALLET_ADDRESS='${BITBADGES_WALLET_ADDRESS} >> $HOME/.bash_profile
echo 'export BITBADGES_VALOPER_ADDRESS='${BITBADGES_VALOPER_ADDRESS} >> $HOME/.bash_profile
source $HOME/.bash_profile
Create validator
check your wallet balance:
bitbadgeschaind query bank balances $BITBADGES_WALLET_ADDRESS
To create your validator run command below
bitbadgeschaind tx staking create-validator \
--amount 1000000ubadge \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(bitbadgeschaind tendermint show-validator) \
--moniker "$NODENAME" \
--identity "" \
--details "your_detail" \
--chain-id bitbadges-1 \
--gas=auto \
--gas-adjustment=1.2 \
--gas-prices=0.0025ubadge \
-y
bitbadgeschaind tx staking create-validator ~/.bitbadgeschain/config/validator.json \
--from wallet \
--chain-id bitbadges-1 \
--gas=auto \
--gas-adjustment=1.2 \
--gas-prices=0.0025ubadge
Check your validator key
[[ $(bitbadgeschaind q staking validator $BITBADGES_VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(bitbadgeschaind status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "\n\e[1m\e[32mTrue\e[0m\n" || echo -e "\n\e[1m\e[31mFalse\e[0m\n"
Get list of validators
bitbadgeschaind q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
Usefull commands
Service management
Check logs
journalctl -fu bitbadgeschaind -o cat
Start service
sudo systemctl start bitbadgeschaind
Stop service
sudo systemctl stop bitbadgeschaind
Restart service
sudo systemctl restart bitbadgeschaind
Node info
Synchronization info
bitbadgeschaind status 2>&1 | jq .SyncInfo
Validator info
bitbadgeschaind status 2>&1 | jq .ValidatorInfo
Node info
bitbadgeschaind status 2>&1 | jq .NodeInfo
Show node id
bitbadgeschaind tendermint show-node-id
Wallet operations
List of wallets
bitbadgeschaind keys list
Recover wallet
bitbadgeschaind keys add $WALLET --recover
Delete wallet
bitbadgeschaind keys delete $WALLET
Get wallet balance
bitbadgeschaind query bank balances $BITBADGES_WALLET_ADDRESS
Transfer funds
bitbadgeschaind tx bank send $BITBADGES_WALLET_ADDRESS <TO_BITBADGES_WALLET_ADDRESS> 1000000ubadge
Voting
bitbadgeschaind tx gov vote 1 yes --from $WALLET --chain-id=$BITBADGES_CHAIN_ID
Staking, Delegation and Rewards
Delegate stake
bitbadgeschaind tx staking delegate $BITBADGES_VALOPER_ADDRESS 1000000ubadge --from=$WALLET --chain-id=$BITBADGES_CHAIN_ID --fees 1000ubtw
Redelegate stake from validator to another validator
bitbadgeschaind tx staking redelegate <srcValidatorAddress> <destValidatorAddress> 1000000ubadge --from=$WALLET --chain-id=$BITBADGES_CHAIN_ID --fees 1000ubtw
Withdraw all rewards
bitbadgeschaind tx distribution withdraw-all-rewards --from=$WALLET --chain-id=$BITBADGES_CHAIN_ID --fees 1000ubtw
Withdraw rewards with commision
bitbadgeschaind tx distribution withdraw-rewards $BITBADGES_VALOPER_ADDRESS --from=$WALLET --commission --chain-id=$BITBADGES_CHAIN_ID
Validator management
Edit validator
bitbadgeschaind tx staking edit-validator \
--moniker=$NODENAME \
--identity=<your_keybase_id> \
--website="<your_website>" \
--details="<your_validator_description>" \
--chain-id=$BITBADGES_CHAIN_ID \
--from=$WALLET
Unjail validator
bitbadgeschaind tx slashing unjail \
--broadcast-mode=block \
--from=$WALLET \
--chain-id=$BITBADGES_CHAIN_ID
Public Endpoint
RPC
https://mainnet-bitbadges-rpc.konsortech.xyz
API
https://mainnet-bitbadges-api.konsortech.xyz
gRPC
mainnet-bitbadges.konsortech.xyz:18090
Peers and Seeds
Peers
19ad7e97b3dc65a3aa4c1c33b7457c7f9a267916@mainnet-bitbadges.konsortech.xyz:18656
Seeds
10f2016ec436bee02d0cf3e5499f3c99d5a93d26@mainnet-seed.konsortech.xyz:18265
Genesis & Address Book
Address Book
https://snapshot.konsortech.xyz/mainnet/bitbadges/addrbook.json
Genesis
https://snapshot.konsortech.xyz/mainnet/bitbadges/genesis.json
State Sync
sudo systemctl stop bitbadgeschaind
cp ~/.bitbadgeschain/data/priv_validator_state.json ~/.bitbadgeschain/priv_validator_state.json.backup
bitbadgeschaind tendermint unsafe-reset-all --home ~/.bitbadgeschain --keep-addr-book
SNAP_RPC="https://mainnet-bitbadges-rpc.konsortech.xyz:443"
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
peers="19ad7e97b3dc65a3aa4c1c33b7457c7f9a267916@mainnet-bitbadges.konsortech.xyz:18656"
sed -i 's|^persistent_peers *=.*|persistent_peers = "'$peers'"|' ~/.bitbadgeschain/config/config.toml
sed -i -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" ~/.bitbadgeschain/config/config.toml
mv ~/.bitbadgeschain/priv_validator_state.json.backup ~/.bitbadgeschain/data/priv_validator_state.json
sudo systemctl restart bitbadgeschaind
sudo journalctl -u bitbadgeschaind -f --no-hostname -o cat
Snapshot
sudo systemctl stop bitbadgeschaind
cp ~/.bitbadgeschain/data/priv_validator_state.json ~/.bitbadgeschain/priv_validator_state.json.backup
rm -rf ~/.bitbadgeschain/data
SNAP_NAME=$(curl -s https://snapshot.konsortech.xyz/mainnet/bitbadges/ | egrep -o ">bitbadges-snapshot.*\.tar.lz4" | tr -d ">")
curl https://snapshot.konsortech.xyz/mainnet/bitbadges/${SNAP_NAME} | lz4 -dc - | tar -xf - -C ~/.bitbadgeschain
mv ~/.bitbadgeschain/priv_validator_state.json.backup ~/.bitbadgeschain/data/priv_validator_state.json
sudo systemctl restart bitbadgeschaind && journalctl -u bitbadgeschaind -f --no-hostname -o cat