Tendermint/Cosmos Test

What we have achieved

The internet is full of traps and many people are highly familiar with the importance of online security, logins, usernames and passwords. In the world of crypto, users need to find ways to secure their assets. Hardware wallet, also referred as cold wallets or cold storages are regarded as a safer way to hold larger amount of assets than wallets on mobile or web wallets.

Ledger Nano S is one of the most popular hardware wallets in the market. Established in 2015, Ledger is used to secure a wide variety of crypto assets: Bitcoin, Ethereum, Ripple, etc. In the latest release, Cosmos team provides a Ledger solution. You could find the release notes here. And this app have been placed on the roadmap of Ledger. I wish we could download it from Ledger Manager soon. But right now, you could also build firmware yourself and get it installed.

Why you need a Ledger

Cosmos Hub relays on a bunch of validators to secure the network. To become a validator, someone has to stake a large amount of Atoms in the system. Meanwhile, we expect the validators will compete to stay as a validator, so the Atoms will be set aside for a very long time.

As a result, you should keep validator key offline all the time. The key should not be found on any host. From the perspective of a delegator, he/she should reach the same level of security. A delegator should keep signing PoS-related transactions offline.

Get Cosmos App Installed

The full instructions could be found here.

Requirements

You need to have the following software installed:

Docker CE

CircleCI

Python 2.7

Add Dependencies

Ubuntu:

Install the following packages:

sudo apt update && apt-get -y install build-essential git sudo wget cmake libssl-dev libgmp-dev autoconf libtool

OSX:

You need to install brew and xcode, also

brew install libusb

Building BOLOS / Ledger firmware

First you need to download the repo:

At the same time, be sure you get all the submodules, by calling:

git submodule update --init --recursive

You could build the app firmware inside a container. All output will be available to the host.

./nanocli.sh make

Then, you could plug your Ledger to add this app to your device:

./nanocli.sh load

Last, you need to confirm the installation. Be careful, this is a beta product, don't expose any valuable information here.

Test PoS transactions on Gaia-7001

Create an account of testnet

First, you need to make sure you have Cosmos-sdk v0.22.0 installed and you could run the correct version of gaiacli

gaiacli keys add <name> --ledger

This command will add a key to Ledger. This key will only be accessible while the Ledger is plugged in and unlocked.

2. Send tokens around

In Gaia-7001, you could get some steak from official faucet. Then, you could play around with your steak

gaiacli send --amount=1steak --chain-id=gaia-7001 --from=<name> --to=<address> --gas=20000000 --node=<Ip-of-one-gaia-full-node>

Remember to double check the validator address and the usernames. Confirm the tx on your Ledger and the expected output is the following:

Sign Transaction Offline

Defaulting to account number: 174

Defaulting to next sequence number: 1

Committed at block 17604. Hash: 2E14932A5F82EFC941B2BF0097C4B0EBA9557E56

3. Create a validator

You could bond your own node to be a validator with the create-validator command:

gaiacli create-validator --amount=5steak \

--pubkey=$(gaiad tendermint show_validator) \

--address-validator=<account_cosmosaccaddr>

--moniker="choose a moniker" \

--chain-id=gaia-7001 \

--from=<key_name>

And now, you made it. You are a validator now!