Skip to content

Instantly share code, notes, and snippets.

[Unit]
Description=BandChain Node Daemon
After=network-online.target
[Service]
User=ubuntu
ExecStart=/home/ubuntu/go/bin/bandd start
Restart=always
RestartSec=3
LimitNOFILE=4096
[Install]
# Download genesis file from the repository.
wget https://raw.githubusercontent.com/bandprotocol/launch/master/band-guanyu-mainnet/genesis.json
# Check genesis hash
sudo apt-get install jq
jq -S -c -M '' genesis.json | shasum -a 256
# It should get this hash
9673376e8416d1e7fc87d271b8a9e5e3d3ce78a076b0d907d87c782bb0320e30 -
# Move the genesis file to the proper location
mv genesis.json $HOME/.bandd/config
# Add some persistent peers
# Create a new Band wallet. Do not lose your mnemonic!
bandcli keys add YOUR_WALLET
# Initialize a blockchain environment for generating genesis transaction.
bandd init --chain-id band-guanyu-mainnet YOUR_MONIKER
git clone https://github.com/bandprotocol/bandchain
cd bandchain/chain
git checkout v1.2.6
make install
# Check that the correction version of bandd and bandcli is installed
bandd version --long
bandcli version --long
# Both should show:
# name: bandchain
@taobun
taobun / setup.sh
Last active October 15, 2020 06:40
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y build-essential curl wget
wget https://golang.org/dl/go1.14.9.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.14.9.linux-amd64.tar.gz
rm go1.14.9.linux-amd64.tar.gz
echo "export PATH=\$PATH:/usr/local/go/bin:~/go/bin" >> $HOME/.profile
source ~/.profile
bandcli tx staking create-validator \
--amount 3000000uband \
--commission-max-change-rate 0.01 \
--commission-max-rate 0.2 \
--commission-rate 0.1 \
--from YOUR_WALLET \
--min-self-delegation 1 \
--moniker YOUR_MONIKER \
--pubkey $(bandd tendermint show-validator) \
--chain-id band-guanyu-testnet3
bandcli keys add YOUR_WALLET
curl --location --request POST 'https://guanyu-testnet3x.bandchain.org/faucet/request' \
--header 'Content-Type: application/json' \
--data-raw '{
"address": "YOUR_ADDRESS"
}'
bandd init --chain-id band-guanyu-testnet3 YOUR_MONIKER
wget https://raw.githubusercontent.com/bandprotocol/launch/master/band-guanyu-testnet3/genesis.json
mv genesis.json ~/.bandd/config
sed -E -i \
's/persistent_peers = \".*\"/persistent_peers = \"ceb2fe644d03a33b3c1ba4a384384433e7bb5b6b@guanyu-testnet3-alice.node.bandchain.org:26656,dd8397061f31a0b99c5742049e2ffc8e3956f9c7@guanyu-testnet3-bob.node.bandchain.org:26656\"/' \
$HOME/.bandd/config/config.toml
yoda keys add REPORTER_1
yoda keys add REPORTER_2
yoda keys add REPORTER_3
yoda keys add REPORTER_4
yoda keys add REPORTER_5
@taobun
taobun / make_bandd.sh
Last active September 18, 2020 04:20
make_bandd
git clone https://github.com/bandprotocol/bandchain
cd bandchain/chain
git checkout v1.2.6
make install