Minimum hardware requirements:
1) Auto_install script
wget -O bandt https://raw.githubusercontent.com/111STAVR111/props/main/Band/Testnet/bandt && chmod +x bandt && ./bandt
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
commit: e6548bbf4793829bb8e711e5ed89ba4afc710ded
Initiation
bandd init STAVR_guide --chain-id band-laozi-testnet6
bandd config chain-id band-laozi-testnet6
Create/recover wallet
bandd keys add <walletname>
OR
bandd keys add <walletname> --recover
Download Genesis
curl https://config-t.noders.services/band/genesis.json -o ~/.band/config/genesis.json
sha256sum $HOME/.band/config/genesis.json
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=""
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
curl https://config-t.noders.services/band/addrbook.json -o ~/.band/config/addrbook.json
Create a service file
sudo tee /etc/systemd/system/bandd.service > /dev/null <<EOF
[Unit]
Description=band test
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 Testnet Mainnet
RPC=https://band.rpc.t.stavr.tech:443
peers=7f03c7f4a41300348afce4b51774ab3fab8ae3c2@band-t.peer.stavr.tech:11016
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 - 100)); \
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-t.files.stavr.tech:1103/files-bandt.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.band --strip-components 2
sudo systemctl restart bandd && journalctl -u bandd -f -o cat
SnapShot Testnet updated every 5 hours
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-t.snapshot.stavr.tech:1025/bandt/bandt-snap.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.band --strip-components 2
curl -o - -L http://band-t.files.stavr.tech:1103/files-bandt.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
curl https://config-t.noders.services/band/addrbook.json -o ~/.band/config/addrbook.json
sudo systemctl restart bandd && journalctl -u bandd -f -o cat
Start
sudo systemctl daemon-reload
sudo systemctl enable bandd
sudo systemctl restart bandd && sudo journalctl -u bandd -f -o cat
Create validator
bandd tx staking create-validator \
--amount=1000000uband \
--pubkey=$(bandd tendermint show-validator) \
--moniker="STAVR_Guide" \
--identity="" \
--details="" \
--website="" \
--chain-id="band-laozi-testnet6" \
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.2" \
--min-self-delegation="1" \
--fees 500uband \
--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