💾Node Installation

Band Mainnet guide

  • Minimum hardware requirements:

1) Auto_install script

wget -O bandm https://raw.githubusercontent.com/111STAVR111/props/main/Band/bandm && chmod +x bandm && ./bandm

2) Manual installation

Preparing the server

sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y

GO 1.21.6

ver="1.21.6"
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

Build 14.09.23

cd $HOME && mkdir -p $HOME/go/bin/
git clone https://github.com/bandprotocol/chain band
cd band
git checkout v2.5.4
make install

bandd version --long | head

  • version: 2.5.4

  • commit: e6548bbf4793829bb8e711e5ed89ba4afc710ded

Initiation

bandd init STAVR_guide --chain-id laozi-mainnet
bandd config chain-id laozi-mainnet

Create/recover wallet

bandd keys add <walletname>
           OR
bandd keys add <walletname> --recover

Download Genesis

wget -O genesis.json https://snapshots.polkachu.com/genesis/band/genesis.json --inet4-only
mv genesis.json ~/.band/config

sha256sum $HOME/.band/config/genesis.json

  • c776e2a5fac6ce3214845db52da6beef95fada49717eac55b0b81ad3767db7de

Set up the minimum gas price and Peers/Seeds/Filter peers/MaxPeers

sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0uband\"/;" ~/.band/config/app.toml
external_address=$(wget -qO- eth0.me) 
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:26656\"/" $HOME/.band/config/config.toml
peers=""
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.band/config/config.toml
seeds="ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@seeds.polkachu.com:22956"
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" $HOME/.band/config/config.toml
sed -i 's/max_num_inbound_peers =.*/max_num_inbound_peers = 50/g' $HOME/.band/config/config.toml
sed -i 's/max_num_outbound_peers =.*/max_num_outbound_peers = 50/g' $HOME/.band/config/config.toml

Pruning (optional)

pruning="custom"
pruning_keep_recent="1000"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.band/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.band/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.band/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.band/config/app.toml

Indexer (optional)

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

Download addrbook

wget -O $HOME/.band/config/addrbook.json "https://raw.githubusercontent.com/111STAVR111/props/main/Band/addrbook.json"

Create a service file

sudo tee /etc/systemd/system/bandd.service > /dev/null <<EOF
[Unit]
Description=band
After=network-online.target

[Service]
User=$USER
ExecStart=$(which bandd) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

StateSync Band Mainnet (Temporarily stopped)

RPC=https://band.rpc.m.stavr.tech:443
peers=0bfd5d7355ebf38e35af619ae0cab70aa21675a5@band-m.peer.stavr.tech:11026
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.band/config/config.toml
LATEST_HEIGHT=$(curl -s $RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1500)); \
TRUST_HASH=$(curl -s "$RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$RPC,$RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.band/config/config.toml
sudo systemctl stop bandd && bandd tendermint unsafe-reset-all --keep-addr-book
curl -o - -L http://band.files.stavr.tech:1103/files-band.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.band --strip-components 2
sudo systemctl restart bandd && journalctl -fu bandd -o cat

SnapShot Mainnet every 5 hours (Temporarily stopped)

cd $HOME
apt install lz4
sudo systemctl stop bandd
cp $HOME/.band/data/priv_validator_state.json $HOME/.band/priv_validator_state.json.backup
rm -rf $HOME/.band/data
curl -o - -L http://band.snapshot.stavr.tech:1022/band/band-snap.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.band --strip-components 2
curl -o - -L http://band.files.stavr.tech:1103/files-band.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.band --strip-components 2
mv $HOME/.band/priv_validator_state.json.backup $HOME/.band/data/priv_validator_state.json
wget -O $HOME/.band/config/addrbook.json "https://raw.githubusercontent.com/111STAVR111/props/main/Band/addrbook.json"
sudo systemctl restart bandd && journalctl -fu bandd -o cat

Start

sudo systemctl daemon-reload
sudo systemctl enable bandd
sudo systemctl restart bandd && journalctl -fu bandd -o cat

Create validator

bandd tx staking create-validator \
  --amount=1000000uband \
  --pubkey=$(bandd tendermint show-validator) \
  --moniker="STAVR_Guide" \
  --identity="" \
  --details="" \
  --website="" \
  --chain-id="laozi-mainnet" \
  --commission-rate="0.10" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.2" \
  --min-self-delegation="1" \
  --from=YourWallet -y

Monitoring

You can set up your node status alarm here - Monitoring

Security

You can create secure management of your wallet and your node by following this links.

TMKMS Wallet Security

Delete node

sudo systemctl stop bandd
sudo systemctl disable bandd
rm /etc/systemd/system/bandd.service
sudo systemctl daemon-reload
cd $HOME
rm -rf band
rm -rf .band
rm -rf $(which bandd)

Last updated