docs: update simapp instructions (#9374)
* update simapp instructions * fix typo and amount Co-authored-by: ryanchrypto <12519942+ryanchrypto@users.noreply.github.com> Co-authored-by: Marko <marbar3778@yahoo.com>
This commit is contained in:
parent
45265b1ea6
commit
8669f0b4b9
|
@ -12,22 +12,24 @@ If you want to spin up a quick testnet with your friends, you can follow these s
|
||||||
Unless otherwise noted, every step must be done by everyone who wants to participate
|
Unless otherwise noted, every step must be done by everyone who wants to participate
|
||||||
in this testnet.
|
in this testnet.
|
||||||
|
|
||||||
1. `$ make build`. This will build the `simd` binary and install it in your Cosmos SDK repo,
|
1. From the root directory of the Cosmos SDK repository, run `$ make build`. This will build the
|
||||||
inside a new `build` directory. The following instructions are run from inside
|
`simd` binary inside a new `build` directory. The following instructions are run from inside
|
||||||
that directory.
|
the `build` directory.
|
||||||
2. If you've run `simd` before, you may need to reset your database before starting a new
|
2. If you've run `simd` before, you may need to reset your database before starting a new
|
||||||
testnet: `$ ./simd unsafe-reset-all`
|
testnet. You can reset your database with the following command: `$ ./simd unsafe-reset-all`.
|
||||||
3. `$ ./simd init [moniker]`. This will initialize a new working directory, by default at
|
3. `$ ./simd init [moniker] --chain-id [chain-id]`. This will initialize a new working directory
|
||||||
`~/.simapp`. You need a provide a "moniker," but it doesn't matter what it is.
|
at the default location `~/.simapp`. You need to provide a "moniker" and a "chain id". These
|
||||||
|
two names can be anything, but you will need to use the same "chain id" in the following steps.
|
||||||
4. `$ ./simd keys add [key_name]`. This will create a new key, with a name of your choosing.
|
4. `$ ./simd keys add [key_name]`. This will create a new key, with a name of your choosing.
|
||||||
Save the output of this command somewhere; you'll need the address generated here later.
|
Save the output of this command somewhere; you'll need the address generated here later.
|
||||||
5. `$ ./simd add-genesis-account $(simd keys show [key_name] -a) [amount]`, where `key_name`
|
5. `$ ./simd add-genesis-account [key_name] [amount]`, where `key_name` is the same key name as
|
||||||
is the same key name as before; and `amount` is something like `10000000000000000000000000stake`.
|
before; and `amount` is something like `10000000000000000000000000stake`.
|
||||||
6. `$ ./simd gentx [key_name] [amount] --chain-id [chain-id]`. This will create the
|
6. `$ ./simd gentx [key_name] [amount] --chain-id [chain-id]`. This will create the genesis
|
||||||
genesis transaction for your new chain.
|
transaction for your new chain. Here `amount` should be at least `1000000000stake`. If you
|
||||||
|
provide too much or too little, you will encounter an error when starting your node.
|
||||||
7. Now, one person needs to create the genesis file `genesis.json` using the genesis transactions
|
7. Now, one person needs to create the genesis file `genesis.json` using the genesis transactions
|
||||||
from every participant, by gathering all the genesis transactions under `config/gentx` and then
|
from every participant, by gathering all the genesis transactions under `config/gentx` and then
|
||||||
calling `./simd collect-gentxs`. This will create a new `genesis.json` file that includes data
|
calling `$ ./simd collect-gentxs`. This will create a new `genesis.json` file that includes data
|
||||||
from all the validators (we sometimes call it the "super genesis file" to distinguish it from
|
from all the validators (we sometimes call it the "super genesis file" to distinguish it from
|
||||||
single-validator genesis files).
|
single-validator genesis files).
|
||||||
8. Once you've received the super genesis file, overwrite your original `genesis.json` file with
|
8. Once you've received the super genesis file, overwrite your original `genesis.json` file with
|
||||||
|
@ -37,11 +39,11 @@ in this testnet.
|
||||||
|
|
||||||
```
|
```
|
||||||
# Comma separated list of nodes to keep persistent connections to
|
# Comma separated list of nodes to keep persistent connections to
|
||||||
persistent_peers = "[validator address]@[ip address]:[port],[validator address]@[ip address]:[port]"
|
persistent_peers = "[validator_address]@[ip_address]:[port],[validator_address]@[ip_address]:[port]"
|
||||||
```
|
```
|
||||||
|
|
||||||
You can find `validator address` by running `./simd tendermint show-node-id`. (It will be hex-encoded.)
|
You can find `validator_address` by running `$ ./simd tendermint show-node-id`. The output will
|
||||||
By default, `port` is 26656.
|
be the hex-encoded `validator_address`. The default `port` is 26656.
|
||||||
10. Now you can start your nodes: `$ ./simd start`.
|
10. Now you can start your nodes: `$ ./simd start`.
|
||||||
|
|
||||||
Now you have a small testnet that you can use to try out changes to the Cosmos SDK or Tendermint!
|
Now you have a small testnet that you can use to try out changes to the Cosmos SDK or Tendermint!
|
||||||
|
|
Loading…
Reference in New Issue