docs: PR comments

This commit is contained in:
Zach Ramsay 2018-04-19 12:14:06 -04:00
parent f9fc2e88d9
commit 0fd69d56ee
3 changed files with 67 additions and 26 deletions

View File

@ -39,7 +39,7 @@ then with:
::
basecli version
gaiacli version
you should see:

View File

@ -101,34 +101,75 @@ The ``genesis.json`` should look something like:
::
{
"app_hash": "",
"app_state": {
"accounts": [
{
"address": "1FEADCDC8CCB22244769B9CC93C1F6D7489FC5AF",
"address": "1D9B2356CAADF46D3EE3488E3CCE3028B4283DEE",
"coins": [
{
"denom": "mycoin",
"amount": 9007199254740992
"denom": "fermion",
"amount": 100000
}
]
}
]
],
"stake": {
"pool": {
"total_supply": 0,
"bonded_shares": {
"num": 0,
"denom": 1
},
"unbonded_shares": {
"num": 0,
"denom": 1
},
"bonded_pool": 0,
"unbonded_pool": 0,
"inflation_last_time": 0,
"inflation": {
"num": 7,
"denom": 100
}
},
"params": {
"inflation_rate_change": {
"num": 13,
"denom": 100
},
"inflation_max": {
"num": 20,
"denom": 100
},
"inflation_min": {
"num": 7,
"denom": 100
},
"goal_bonded": {
"num": 67,
"denom": 100
},
"max_validators": 100,
"bond_denom": "fermion"
}
}
},
"chain_id": "test-chain-EsYka3",
"genesis_time": "0001-01-01T00:00:00Z",
"validators": [
{
"pub_key": {
"type": "ed25519",
"data": "57B89D41F18FE3FE69250B44693A7D68DE4E03EC563F54C27F9A86CE8B81A4B7"
"type": "AC26791624DE60",
"value": "rgpc/ctVld6RpSfwN5yxGBF17R1PwMTdhQ9gKVUZp5g="
},
"power": 10,
"name": ""
}
]
],
"app_hash": "",
"genesis_time": "0001-01-01T00:00:00Z",
"chain_id": "test-chain-Uv1EVU"
}
To notice is that the ``accounts`` field has a an address and a whole bunch of "mycoin". This is ``alice``'s address (todo: dbl check). Under ``validators`` we see the ``pub_key.data`` field, which will match the same field in the ``priv_validator.json`` file.
The ``config.toml`` is long so let's focus on one field:
@ -156,9 +197,9 @@ We'll have ``alice`` send some ``mycoin`` to ``bob``, who has now joined the net
::
gaiacli send --amount=1000mycoin --seq=0 --name=alice --to=5A35E4CC7B7DC0A5CB49CEA91763213A9AE92AD6
gaiacli send --amount=1000mycoin --sequence=0 --name=alice --to=5A35E4CC7B7DC0A5CB49CEA91763213A9AE92AD6 --chain-id=test-chain-Uv1EVU
where the ``--seq`` flag is to be incremented for each transaction, the ``--name`` flag is the sender (alice), and the ``--to`` flag takes ``bob``'s address. You'll see something like:
where the ``--sequence`` flag is to be incremented for each transaction, the ``--name`` flag is the sender (alice), and the ``--to`` flag takes ``bob``'s address. You'll see something like:
::

View File

@ -10,8 +10,8 @@ First, generate a new key with a name, and save the address:
::
MYNAME=<your name>
basecli keys new $MYNAME
basecli keys list
gaiacli keys new $MYNAME
gaiacli keys list
MYADDR=<your newly generated address>
@ -60,11 +60,11 @@ The genesis file should look like this:
**Note:** We need to change the denomination of token from default to ``steak`` in the genesis file.
Then, recover the genesis account with ``basecli``:
Then, recover the genesis account with ``gaiacli``:
::
basecli keys add <name> --recover
gaiacli keys add <name> --recover
By now, you have set up the first node. This is great!
@ -120,7 +120,7 @@ Nice. We can also lookup the validator set:
::
basecli validatorset
gaiacli validatorset
There is only **one** validator now. Let's add another one!
@ -128,19 +128,19 @@ First, we need to create a new account:
::
basecli keys new <NAME>
gaiacli keys new <NAME>
Check that we now have two accounts:
::
basecli keys list
gaiacli keys list
Then, we try to transfer some ``steak`` to another account:
::
basecli send --amount=1000steak --to=$MYADDR2 --name=$NAME --chain-id=<CHAIN-ID> --node=tcp://localhost:46657 --sequence=0
gaiacli send --amount=1000steak --to=$MYADDR2 --name=$NAME --chain-id=<CHAIN-ID> --node=tcp://localhost:46657 --sequence=0
**Note:** We need to be careful with the ``chain-id`` and ``sequence``
@ -148,7 +148,7 @@ Check the balance & sequence with:
::
basecli account $MYADDR
gaiacli account $MYADDR
We can see the balance of ``$MYADDR2`` is 1000 now.
@ -164,19 +164,19 @@ Ok, now we can bond some coins to that pubkey:
::
basecli bond --stake=1steak --validator=<validator-pubkey-hex> --sequence=0 --chain-id=<chain-id> --name=test
gaiacli bond --stake=1steak --validator=<validator-pubkey-hex> --sequence=0 --chain-id=<chain-id> --name=test
Nice. We can see there are now two validators:
::
basecli validatorset
gaiacli validatorset
Check the balance of ``$MYADDR2`` to see the difference: it has 1 less ``steak``!
::
basecli account $MYADDR2
gaiacli account $MYADDR2
To confirm for certain the new validator is active, check tendermint:
@ -188,6 +188,6 @@ Finally, to relinquish all your power, unbond some coins. You should see your Vo
::
basecli unbond --sequence=# --chain-id=<chain-id> --name=test
gaiacli unbond --sequence=# --chain-id=<chain-id> --name=test
That's it!