BandChain GuanYu Testnet #3: Successful Upgrade, How to Join as a Validator

Sorawit Suriyakarn
Band Protocol
Published in
5 min readSep 22, 2020

Dear Band Community,

Last Thursday, we announced our test upgrade from Wenchang to GuanYu in preparation for the official launch of BandChain Phase 1 on the Mainnet. We are proud to say that most validators successfully participated in the upgrade process and will work closely with the Band Protocol team to perform stress tests before the public Mainnet launch of GuanYu.

In this article, we have provided the steps for the remaining validator set to join Testnet #3 if they have missed the test upgrade process. We will be communicating all updates on this document on the guanyu-testnet Discord channel.

Step 1: Setting Up Validator Node

For this guide, we will be assuming that you will be running your node on a Ubuntu 18.04 LTS machine that is allowing connections to port 26656.

To start, you’ll need to install the various utility tools and Golang on the machine.

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y build-essential curl wget
wget https://dl.google.com/go/go1.13.9.linux-amd64.tar.gz
tar xf go1.13.9.linux-amd64.tar.gz
sudo mv go /usr/local/go
echo "export PATH=\$PATH:/usr/local/go/bin:~/go/bin" >> $HOME/.profile
source ~/.profile

Next, you will need to clone and build BandChain. The canonical version for this GuanYu testnet3 is v1.2.6.

git clone https://github.com/bandprotocol/bandchain
cd bandchain/chain
git checkout v1.2.6
make install

Initialize the chain environment, download the official testnet genesis file, and add the initial peers to your node.

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 = \"07fb7e870634e6af27ea33b694f1b42091e763d0@35.247.156.120:26656,e94fc1c34fc52c16f8410f94c86d811a7950994a@35.245.4.247:26656\"/' \
$HOME/.bandd/config/config.toml

With the configurations ready, you can now start your node. In this tutorial, however, we will show you a simple way to set up systemd to run the node daemon with auto-restart.

[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]
WantedBy=multi-user.target

Install the service and start the node.

sudo systemctl enable bandd
sudo systemctl start bandd

You can tail the log output with journalctl -u bandd.service -f. If all goes well, you should see that the node daemon has started syncing. Now you should wait until your node caught up with the most recent block.

... bandd: I[..] Executed block  ... module=state height=20000 ...
... bandd: I[..] Committed state ... module=state height=20000 ...
... bandd: I[..] Executed block ... module=state height=20001 ...
... bandd: I[..] Committed state ... module=state height=20002 ...

See the explorer for the height of the latest block. Syncing should take a few hours depending on your internet connection.

⚠️ NOTE: You should not proceed to the next step until your node caught up to the latest block.

Step 2: Becoming a Validator

Create your account using bandcli and request 10 testnet BAND tokens with curl. Feel free to change YOUR_WALLET to whatever wallet name you want.

bandcli keys add YOUR_WALLETcurl --location --request POST 'https://guanyu-testnet3.bandchain.org/faucet/request' \
--header 'Content-Type: application/json' \
--data-raw '{
"address": "YOUR_ADDRESS"
}'

Send a transaction to apply as a validator. You can change YOUR_MONIKER to any name you want reflected on the block explorer.

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

Once the transaction is mined, you should see yourself on the validators page.

Congratulations — you are now a working BandChain GuanYu testnet3 validator! Don’t worry if you have low voting power, we will delegate more testnet tokens to your validator node within a few days.

Step 3: Setting Up Yoda — The Oracle Daemon

For phase 1, BandChain validators are also responsible for responding to oracle data requests. Whenever someone submits a request message to BandChain, the chain will autonomously choose a subset of active oracle validators to perform the data query.

The validators chosen submit a report message to BandChain within a given timeframe as specified by a chain parameter (100 blocks in this testnet). We provide a program called yoda to do this task for you. For more information on the data request process, please see here

Yoda uses an external executor to resolve requests to data sources. Currently, it supports AWS Lambda (through REST interface).

In future releases, yoda will support more executors and allow you to specify multiple executors to add redundancy. Please follow to setup lambda function

You also need to set up yodaand activate oracle status (guide)

That’s it! You can verify that your validator is now an oracle provider on the block explorer. Your yoda process must be responding to oracle requests assigned to your node. If the process misses a request, your oracle provider status will automatically get deactivated and you must send MsgActivate to activate again after a 10-minute waiting period and make sure that yoda is up.

Closing Remarks

With the successful upgrade from Wenchang to GuanYu on the testnet, the last step before the public upgrade on Mainnet via governance proposal on CosmoScan is battle-testing the network to ensure everything works smoothly without problems from various attack vectors.

We welcome existing and new validators to join the testnet to help us through this final stage which will secure decentralized oracle functionality on BandChain once live in the production environment.

About Band Protocol
Band Protocol is a cross-chain data oracle platform that aggregates and connects real-world data and APIs to smart contracts. Blockchains are great at immutable storage and deterministic, verifiable computations — however, they cannot securely access data available outside the blockchain networks. Band Protocol enables smart contract applications such as DeFi, prediction markets, and games to be built on-chain without relying on the single point of failure of a centralized oracle. Band Protocol is backed by a strong network of stakeholders including Sequoia Capital, one of the top venture capital firms in the world, and the leading cryptocurrency exchange, Binance.
Website | Whitepaper | Telegram | Medium | Twitter | Reddit | Github

--

--