Hippo Protocol
is an application chain built using the Cosmos SDK for medical purposes.
For detailed guide, please refer to Hippo Protocol official document.
If you want to spin up a quick testnet with your friends, you can follow these steps. Unless otherwise noted, every step must be done by everyone who wants to participate in this testnet.
-
If you've run
hippod
before, you may need to reset your genesis file(including gentx) and database before starting a new testnet. You can do with the following command:$ rm -rf .hippo
from your Home(or User) directory. If you want to reset only database, just do$ go run hippod/main.go tendermint unsafe-reset-all
in root dir. -
$ go run hippod/main.go init hippo --chain-id hippo-protocol-1
. This will initialize a new working directory at the default location~/.hippod
. You need to provide a "moniker" and a "chain id". These two names are "hippo" and "hippo-protocol-1" here. If you want to overwrite just genesis file(not including gentx), add--overwrite
flag. -
$ go run hippod/main.go keys add alice --keyring-backend file
. This command will create a new key named alice, using the file backend for secure local
key storage. Make sure to save the output, especially the generated address, as you will need it later during configuration or transactions. -
$ go run hippod/main.go genesis add-genesis-account alice 1084734273380000000000000000ahp --keyring-backend file
, wherekey_name
is the same key name as before; and1084734273380000000000000000ahp
isamount
. -
$ go run hippod/main.go genesis gentx alice 1000000000000000000ahp --chain-id hippo-protocol-1 --keyring-backend file
. This will create the genesis transaction for your new chain. Hereamount
should be at least1000000000000000000ahp
. If you provide too much or too little, you will encounter an error when starting your node. -
Now, one person needs to create the genesis file
genesis.json
using the genesis transactions from every participant, by gathering all the genesis transactions underconfig/gentx
and then calling$ go run hippod/main.go genesis collect-gentxs
. This will create a newgenesis.json
file that includes data from all the validators (we sometimes call it the "super genesis file" to distinguish it from single-validator genesis files). -
Once you've received the super genesis file, overwrite your original
genesis.json
file with the new supergenesis.json
. -
Modify your
config/config.toml
(in the.hippo
working directory) to include the other participants as persistent peers:# Comma separated list of nodes to keep persistent connections to persistent_peers = "[validator_address]@[ip_address]:[port],[validator_address]@[ip_address]:[port]"
You can find
validator_address
by running$ go run hippod/main.go tendermint show-node-id
. The output will be the hex-encodedvalidator_address
. The defaultport
is 26656.To connect with testnet or mainnet, please check the hub repository and official document.
-
Now you can start your nodes:
$ go run hippod/main.go start
. -
You can also now build binary
$ make build
, and then$ cd build
, where you can use command line starting with$ hippod
.
Now you have a hippod testnet that you can use to try out changes to the Cosmos SDK or Tendermint!
NOTE: Sometimes creating the network through the collect-gentxs
will fail, and validators will start
in a funny state (and then panic). If this happens, you can try to create and start the network first
with a single validator and then add additional validators using a create-validator
transaction.