Cosmos Testnet Validator Program

Blockchain Status: Fetching data ...

Prerequisites

You need to have GO, GCC, and git installed on your machine.

You should now have $GOROOT and $GOPATH setup.

Build

$ go get github.com/cosmos/gaia
$ cd $GOPATH/src/github.com/cosmos/gaia
$ make all

Upon success, the gaia binary will be installed in the $GOPATH/bin directory.

$ gaia version
v0.5.0

Next, initialize your gaia client utility to the gaia-2 test network. Note: You can add the --home=$HOME/.cosmos-gaia-2-cli flag to all gaia client commands if you wish to use a data directory other than $HOME/.cosmos-gaia-cli.

gaia client init --chain-id=gaia-2 --node=tcp://gaia-2-node0.testnets.interblock.io:46657

Troubleshooting

If you see errors, try the following, and then re-run make all.

Create your own wallet

We use the gaia client utility to create public / private key pairs for the wallet.

$ gaia client keys new MyAccount
Enter a passphrase:MyPassword
Repeat the passphrase:MyPassword
MyAccount		ABCDEFGHIGKLMNOPQRSTUVWXYZ123456789

Get some tokens

Currently this faucet only works with the gaia-2 testnet. Your balance will not update if you are running a different version of the testnet.

Please use the form below to send some tokens to your newly created wallet (called fermions on the gaia test network).

It is the ABCDEFGHIGKLMNOPQRSTUVWXYZ123456789 from the above example

You should now be able to see them in your account via the gaia client.

$ gaia client query account ABCDEFGHIGKLMNOPQRSTUVWXYZ123456789
{
  "height": 1473,
  "data": {
    "coins": [
      {
        "denom": "fermion",
        "amount": 10
      }
    ],
    "credit": []
  }
}

Run your own node

Check out the testnets configurations from github to your local directory, and point the $GAIANET environment variable to the gaia-2 network configuration files.

$ git clone https://github.com/tendermint/testnets $HOME/testnets
$ GAIANET=$HOME/testnets/gaia-2/gaia
$ cd $GAIANET

Now you can run your own node. It will take some time to sync up. You can check the current status (including the latest block height) of the gaia-2 network here.

$ gaia node start --home=$GAIANET
... ...
I[11-07|18:07:44.857] Committed state                              module=state height=1458 txs=0 hash=951D888E60F268E05AA7B87C0F45233479F37D25
... ...

Bond your node as a validator

To bond your node as a validator of the gaia-2 network, you need two pieces of information.

$ gaia client tx bond --amount 10fermion --name MyAccount --pubkey THE_PUB_KEY_OF_MY_NODE

Now, you should be able to see your node (indentified by its public key) in the network validators end point.

Automated scripts

Once you understand how the process works, you can use the following community maintained scripts to automate the deployment of your testnet node so that you do not have to type in everything every time!