Guide
Here is a node installation guide (Simplified and manual)
Preparing the server for installation
apt update && apt upgrade -y
apt install curl iptables build-essential git wget jq make gcc nano tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev -y
Installing Go
ver="1.21.3" && \
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
cd $HOME
git clone https://github.com/bandprotocol/chain band
cd band
git checkout v2.5.4
make install
Init your node
bandd init <YOUR_MONIKER> --chain-id laozi-mainnet
Create or recover your wallet
#NEW WALLET
bandd keys add <WALLET_NAME>
#RECOVER OLD WALLET
bandd keys add <WALLET_NAME> --recover
Download Genesis
wget -O genesis.json https://snapshots.polkachu.com/genesis/band/genesis.json --inet4-only
mv genesis.json ~/.band/config
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
Download addrbook
wget -O $HOME/.band/config/addrbook.json "https://raw.githubusercontent.com/obajay/nodes-Guides/main/Projects/BandProtocol/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
Use our StateSync
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.archway/config/config.toml
RPC=http://37.27.61.49:33657
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 && sudo journalctl -u bandd -f -o cat
Start your node
systemctl daemon-reload
systemctl enable bandd
systemctl restart bandd && journalctl -u bandd -f -o cat
Wait for full synchronization and create a validator
bandd tx staking create-validator \
--amount=1000000uband \
--pubkey=$(bandd tendermint show-validator) \
--moniker="<YOUR MONIKER>" \
--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=<WALLET_NAME> -y
If you want to delete a node
systemctl stop bandd
systemctl disable bandd
rm /etc/systemd/system/bandd.service
systemctl daemon-reload
cd $HOME
rm -rf .band band
rm -rf $(which bandd)
Last updated