BandChain: Wenchang Testnet Launch

Kevin Lu
Band Protocol
Published in
5 min readFeb 19, 2020

Band Protocol, the first decentralized community-oriented oracle solution, is proud to officially announce the first testnet launch of BandChain Phase 0 — the next iteration of Band. Phase 0 codename is Wenchang (文昌).

While working closely with some of the best blockchain projects in the space, it’s essential to listen and garner valuable feedback on the protocol. Band Protocol will cycle through multiple iterations by continuously making improvements to create the optimal data query layer for all decentralized web 3.0 applications.

This current iteration marks the alpha release of Band Protocol’s independent Cosmos-based blockchain for data requests and payments called BandChain. We are releasing the first testnet of phase 0 that will support token-related activities such as token transfers, staking and slashing for malicious actors.

How to Build & Run BandChain Phase 0

TLDR: BandChain is fully compatible with the Cosmos-SDK standard.
Tendermint RPC: http://band-wenchang-testnet1.bandchain.org:26657/
Cosmos-SDK RPC: http://band-wenchang-testnet1.bandchain.org:1317/
Block Explorer: http://band-wenchang-testnet1.bandchain.org:12000/

The following release is intended for developers or tech-savvy users to test the BandChain consensus between nodes running on different continents while also providing the general public with the tooling and infrastructure to interact with Band Chain without running your own local network. Additionally, to kickstart the integration with third-party wallets and exchanges.

Please note that in testnet, the Band Foundation will be responsible for running most of the nodes. External participants are encouraged to join and sync with the world state, or you can also connect to our public nodes — similarly to connecting with Ethereum through Infura or connecting with Binance Chain through the provided APIs from Binance.

Technical Guide: Step 1 — Installing BandChain Wenchang

Step 1 is to install BandChain binaries, including bandd and bandcli. This guide works on Ubuntu 18.04 OS. We start by installing Golang version 1.13 and other utility commands onto the machine.

$ apt-get update -y
$ apt-get upgrade -y
$ apt-get install -y build-essential make git wget curl jq
$ wget https://dl.google.com/go/go1.13.7.linux-amd64.tar.gz
$ tar -xvf go1.13.7.linux-amd64.tar.gz
$ mv go /usr/local/
$ echo "export GOROOT=/usr/local/go" >> ~/.bashrc
$ echo "export GOPATH=\$HOME/go" >> ~/.bashrc
$ echo "export PATH=\$GOPATH/bin:\$GOROOT/bin:\$PATH" >> ~/.bashrc
$ source ~/.bashrc
$ go version
# You should see go version go1.13.7 linux/amd64

The next step is to install BandChain Wenchang binaries by building from BandChain repository branch v0-wenchang.

$ git clone https://github.com/bandprotocol/bandchain
$ cd bandchain/chain
$ git checkout v0-wenchang
$ make install

Technical Guide: Step 2 — Creating BandChain Account

You can use bandcli to create a new BandChain wallet address. You will see your address prefixed with band and your mnemonic key (the 24 words at the bottom) to recover the wallet. You can share your address, but don’t share your mnemonic key with anyone!

$ bandcli keys add <your-wallet-name>Enter a passphrase to encrypt your key to disk:
Repeat the passphrase:
- name: my-wallet
type: local
address: band1pgznyas3aulqltmgepelyh5n20jrt698dk6cgc
pubkey: bandpub1addwnpepqd2hkzyel7u0h8exu57ev5auh23csnpgufm4jumt79dh4m39g5h5ve3m395
mnemonic: ""
threshold: 0
pubkeys: []
**Important** write this mnemonic phrase in a safe place.
It is the only way to recover your account if you ever forget your password.
never potato install vintage spy dress trap age sudden access garden staff focus friend estate core genuine lava hamster motion pink castle best orchard

We have a public faucet serving. You can POST a request to the following URL with your BAND address to receive 100 testnet BAND tokens.

$ curl -X POST http://band-wenchang-testnet1.bandchain.org:5000/faucet/band1pgznyas3aulqltmgepelyh5n20jrt698dk6cgc{"txhash":"43B84668CAA02DEC088A60449F87D05286470BC10E0994915DACABB56FA284F0"}

Go to the testnet explorer to verify that the transaction actually goes through. You can also check your balance via bandcli. Note that the amount you see is in micro-BAND (uband). 1,000,000 uband is 1 BAND.

$ bandcli query account band1pgznyas3aulqltmgepelyh5n20jrt698dk6cgc --node=http://band-wenchang-testnet1.bandchain.org:26657 --trust-nodeaddress: band1pgznyas3aulqltmgepelyh5n20jrt698dk6cgc
coins:
- denom: uband
amount: "100000000"
pubkey: ""
accountnumber: 8
sequence: 0

Technical Guide: Step 3 — Running BandChain Node as a Validator

To run as a validator, we first initialize the environment to run the node with the proper genesis file and add a persistent peer.

$ bandd init test-validator-alice --chain-id band-wenchang-testnet# Copy genesis file from the official RPC endpoint
$ curl -Ss http://band-wenchang-testnet1.bandchain.org:26657/genesis | jq -r ".result.genesis" > ~/.bandd/config/genesis.json
# Add a persistent peer
$ sed -E -i 's/persistent_peers = \".*\"/persistent_peers = \"4957ff892247b5a106136d812f36df329560bab2@104.248.149.37:26656\"/' ~/.bandd/config/config.toml

Running a node is as simple as running bandd start. Note that it will take a while for your node to sync up with the world state

$ bandd start

After the blockchain is fully synced, now it’s time to become a block validator! To apply as a validator, you can use the BAND you received from the faucet. Use the following command to send a transaction to apply to be a validator. It would be best to keep bandd running while applying to be a validator.

$ bandcli tx staking create-validator --amount 100000000uband --commission-max-change-rate 0.01 --commission-max-rate 0.2 --commission-rate 0.1 --from <your-wallet-name> —-min-self-delegation 1 --moniker <your-moniker> --pubkey $(bandd tendermint show-validator) --chain-id band-wenchang-testnet1# Check your node status. You can also see your voting power here.
$ bandcli status

Closing Remarks

We are excited to take this significant step towards our new mainnet release and will be letting this testnet run for the next few weeks before launch while onboarding block validators, exchanges, wallets, and other ecosystem players.

To all developers, we have a grant program for amazing dApps with great potential, so let us know about cool things you’re building on Band Protocol. We’d love to support you!

Additionally, keep an eye out for bug bounties and prizes as we ramp up our community and hackathon effort this year!

About Band Protocol
Band Protocol is a decentralized oracle framework for Web3.0 applications. Band Protocol connects smart contracts with trusted off-chain information, provided through community-curated oracle data providers. Blockchains are enabled to connect to any web API with assured data integrity through dPoS economic incentives through one simple function call. Developers using Band Protocol will be able to easily build and manage off-chain oracles, reputation scores, identity management systems and much more.

Website | Whitepaper | Telegram | Medium | Twitter | Reddit | Github

--

--

Kevin Lu
Band Protocol

Co-Founder @GMIStudios | Previously OG @BandProtocol