Setup your node
Install pre requis
sudo apt-get update && sudo apt upgrade -y
sudo apt-get install make build-essential gcc git jq chrony -y
Install go
sudo rm -rf /usr/local/go
wget https://golang.org/dl/go1.19.1.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.19.1.linux-amd64.tar.gz
rm go1.19.1.linux-amd64.tar.gz
Setting up go
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
Install Node
Install the Band node
binary by running the following commands
#from $HOME dir
git clone https://github.com/bandprotocol/chain
cd band
git fetch
git checkout v2.5.3
make install
To confirm that the node is well installed
bandd version
#v2.5.3
Setting up the Node
Initialization node
Please choose your MONIKER name and replace it in the next command, it will represent your node
bandd init MONIKER_NAME --chain-id laozi-mainnet
This will generate severals files in ~/.band/config/
- node_key.json
- genesis.json
- priv_validator_key.json
Download and replace the genesis file
rm ~/.band/config/genesis.json
wget https://raw.githubusercontent.com/bandprotocol/launch/master/laozi-mainnet/genesis.json -O ~/.band/config/genesis.json
Set minimum gas prices
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0025uband\"/" ~/.band/config/app.toml
Node connexion
In order to connect the node you can either use seeds
, lives peers
or address book
.
- Seeds
- Peers
- Addrbook
Set Seeds
SEEDS = 8d42bdcb6cced03e0b67fa3957e4e9c8fd89015a@34.87.86.195:26656,543e0cab9c3016a0e99775443a17bcf163038912@34.150.156.78:26656
sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/" $HOME/.band/config/config.toml
Set Peers
PEERS = 98823087b61d442a4ab86998709c77b2e517ee78@35.240.152.216:26656,3ea84babead3d6bc488810a0f2cf0744cf5c68fe@34.86.22.251:26656,570787c6484fb5aef9182f032dbd54042d93b93c@35.82.85.220:26656,cb777d12ec515884f9f8153e2bbe1844079323a4@44.234.200.116:26656,39d45dae55f36db42ef3997376efbbf725666f75@51.38.53.4:30656,70c542ec2e1aebb385f7e93d1c55f1a4073cdcb7@54.38.46.124:30656
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.band/config/config.toml
Set Addrbook
wget -O addrbook.json https://snapshots.polkachu.com/addrbook/band/addrbook.json --inet4-only
mv addrbook.json ~/.band/config
Setup service file
[Unit]
Description="band node"
[Service]
User=USER
ExecStart=$(which bandd) start
Restart=always
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
If you'd like to synchronise a node from a snapshot check the snapshot part
Start service file
systemctl daemon-reload
systemctl start band.service | journalctl -u band.service -f