Skip to content

Commit

Permalink
finalize mainnet docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gamarin2 committed Mar 11, 2019
1 parent 7ec3d3d commit 1662d6b
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 41 deletions.
24 changes: 16 additions & 8 deletions docs/gaia/delegator-guide-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ In order to query the state and send transactions, you need a way to access the

This is the most secure option, but comes with relatively high resource requirements. In order to run your own full-node, you need good bandwidth and at least 1TB of disk space.

You will find the tutorial on how to install `gaiad` [here](https://cosmos.network/docs/gaia/installation.html), and the guide to run a full-node [here](https://cosmos.network/docs/gaia/join-testnet.html).
You will find the tutorial on how to install `gaiad` [here](https://cosmos.network/docs/gaia/installation.html), and the guide to run a full-node [here](https://cosmos.network/docs/gaia/join-mainnet.html).

### Connecting to a remote full-node

Expand Down Expand Up @@ -336,6 +336,10 @@ For each command, you can use the `-h` or `--help` flag to get more information.
## Sending Transactions
::: warning
On Cosmos Hub mainnet, the accepted denom is `uatom`, where `1atom = 1.000.000uatom`
:::
### A note on gas and fees
Transactions on the Cosmos Hub network need to include a transaction fee in order to be processed. This fee pays for the gas required to run the transaction. The formula is the following:
Expand All @@ -350,6 +354,10 @@ The `gasPrice` is the price of each unit of `gas`. Each validator sets a `min-ga
The transaction `fees` are the product of `gas` and `gasPrice`. As a user, you have to input 2 out of 3. The higher the `gasPrice`/`fees`, the higher the chance that your transaction will get included in a block.
::: tip
For mainnet, the recommended `gas-prices` is `0.025uatom`.
:::
### Bonding Atoms and Withdrawing rewards
::: tip
Expand All @@ -366,20 +374,20 @@ The transaction `fees` are the product of `gas` and `gasPrice`. As a user, you h
```bash
// Bond a certain amount of Atoms to a given validator
// ex value for flags: <validatorAddress>=cosmosvaloper18thamkhnj9wz8pa4nhnp9rldprgant57pk2m8s, <amountToBound>=10000stake, <gasPrice>=0.001stake
// ex value for flags: <validatorAddress>=cosmosvaloper18thamkhnj9wz8pa4nhnp9rldprgant57pk2m8s, <amountToBound>=10000000uatom, <gasPrice>=0.025uatom
gaiacli tx staking delegate <validatorAddress> <amountToBond> --from <delegatorKeyName> --gas auto --gas-prices <gasPrice>
// Withdraw all rewards
// ex value for flag: <gasPrice>=0.001stake
// ex value for flag: <gasPrice>=0.025uatom
gaiacli tx distr withdraw-all-rewards --from <delegatorKeyName> --gas auto --gas-prices <gasPrice>
// Unbond a certain amount of Atoms from a given validator
// You will have to wait 3 weeks before your Atoms are fully unbonded and transferrable
// ex value for flags: <validatorAddress>=cosmosvaloper18thamkhnj9wz8pa4nhnp9rldprgant57pk2m8s, <amountToUnbound>=10000stake, <gasPrice>=0.001stake
// ex value for flags: <validatorAddress>=cosmosvaloper18thamkhnj9wz8pa4nhnp9rldprgant57pk2m8s, <amountToUnbound>=10000000uatom, <gasPrice>=0.025uatom
gaiacli tx staking unbond <validatorAddress> <amountToUnbond> --from <delegatorKeyName> --gas auto --gas-prices <gasPrice>
```
Expand Down Expand Up @@ -434,13 +442,13 @@ At the end of the voting period, the proposal is accepted if there are more than
```bash
// Submit a Proposal
// <type>=text/parameter_change/software_upgrade
// ex value for flag: <gasPrice>=0.0001stake
// ex value for flag: <gasPrice>=0.025uatom
gaiacli tx gov submit-proposal --title "Test Proposal" --description "My awesome proposal" --type <type> --deposit=10stake --gas auto --gas-prices <gasPrice> --from <delegatorKeyName>
gaiacli tx gov submit-proposal --title "Test Proposal" --description "My awesome proposal" --type <type> --deposit=10000000uatom --gas auto --gas-prices <gasPrice> --from <delegatorKeyName>
// Increase deposit of a proposal
// Retrieve proposalID from $gaiacli query gov proposals --status deposit_period
// ex value for parameter: <deposit>=1stake
// ex value for parameter: <deposit>=10000000uatom
gaiacli tx gov deposit <proposalID> <deposit> --gas auto --gas-prices <gasPrice> --from <delegatorKeyName>
Expand All @@ -457,7 +465,7 @@ If you do not have a ledger device and want to interact with your private key on
```bash
// Bond Atoms
// ex value for flags: <amountToBound>=10000stake, <bech32AddressOfValidator>=cosmosvaloper18thamkhnj9wz8pa4nhnp9rldprgant57pk2m8s, <gasPrice>=0.001stake, <delegatorAddress>=cosmos10snjt8dmpr5my0h76xj48ty80uzwhraqalu4eg
// ex value for flags: <amountToBound>=10000000uatom, <bech32AddressOfValidator>=cosmosvaloper18thamkhnj9wz8pa4nhnp9rldprgant57pk2m8s, <gasPrice>=0.025uatom, <delegatorAddress>=cosmos10snjt8dmpr5my0h76xj48ty80uzwhraqalu4eg
gaiacli tx staking delegate <validatorAddress> <amountToBond> --from <delegatorAddress> --gas auto --gas-prices <gasPrice> --generate-only > unsignedTX.json
```
Expand Down
29 changes: 12 additions & 17 deletions docs/gaia/gaiacli.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,29 +130,24 @@ multi signature account see [Multisig Transactions](#multisig-transactions).

### Fees & Gas

Each transaction may either supply fees or gas prices, but not both. Most users
will typically provide fees as this is the cost you will end up incurring for
the transaction being included in the ledger.
Each transaction may either supply fees or gas prices, but not both.

Validator's have a minimum gas price (multi-denom) configuration and they use
this value when when determining if they should include the transaction in a block
during `CheckTx`, where `gasPrices >= minGasPrices`. Note, your transaction must
supply fees that are greater than or equal to __any__ of the denominations the validator requires.
this value when when determining if they should include the transaction in a block during `CheckTx`, where `gasPrices >= minGasPrices`. Note, your transaction must supply fees that are greater than or equal to __any__ of the denominations the validator requires.

__Note__: With such a mechanism in place, validators may start to prioritize
txs by `gasPrice` in the mempool, so providing higher fees or gas prices may yield
higher tx priority.
txs by `gasPrice` in the mempool, so providing higher fees or gas prices may yield higher tx priority.

e.g.

```bash
gaiacli tx send ... --fees=100photino
gaiacli tx send ... --fees=1000000uatom
```

or

```bash
gaiacli tx send ... --gas-prices=0.000001stake
gaiacli tx send ... --gas-prices=0.025uatom
```

### Account
Expand Down Expand Up @@ -345,11 +340,11 @@ gaiacli query staking validator <account_cosmosval>

#### Bond Tokens

On the testnet, we delegate `steak` instead of `atom`. Here's how you can bond tokens to a testnet validator (_i.e._ delegate):
On the Cosmos Hub mainnet, we delegate `uatom`, where `1atom = 10000000uatom`. Here's how you can bond tokens to a testnet validator (_i.e._ delegate):

```bash
gaiacli tx staking delegate \
--amount=10steak \
--amount=10000000uatom \
--validator=<validator> \
--from=<key_name> \
--chain-id=<chain_id>
Expand All @@ -366,7 +361,7 @@ where `[name]` is the name of the key you specified when you initialized `gaiad`
While tokens are bonded, they are pooled with all the other bonded tokens in the network. Validators and delegators obtain a percentage of shares that equal their stake in this pool.

::: tip Note
Don't use more `steak` thank you have! You can always get more by using the [Faucet](https://faucetcosmos.network/)!
Don't use more `uatom` thank you have! You can always get more by using the [Faucet](https://faucetcosmos.network/)!
:::

##### Query Delegations
Expand Down Expand Up @@ -527,7 +522,7 @@ gaiacli tx gov submit-proposal \
--title=<title> \
--description=<description> \
--type=<Text/ParameterChange/SoftwareUpgrade> \
--deposit=<40steak> \
--deposit="1000000uatom" \
--from=<name> \
--chain-id=<chain_id>
```
Expand Down Expand Up @@ -556,10 +551,10 @@ gaiacli query gov proposer <proposal_id>

#### Increase deposit

In order for a proposal to be broadcasted to the network, the amount deposited must be above a `minDeposit` value (default: `10 steak`). If the proposal you previously created didn't meet this requirement, you can still increase the total amount deposited to activate it. Once the minimum deposit is reached, the proposal enters voting period:
In order for a proposal to be broadcasted to the network, the amount deposited must be above a `minDeposit` value (default: `512000000uatom`). If the proposal you previously created didn't meet this requirement, you can still increase the total amount deposited to activate it. Once the minimum deposit is reached, the proposal enters voting period:

```bash
gaiacli tx gov deposit <proposal_id> <200steak> \
gaiacli tx gov deposit <proposal_id> "10000000uatom" \
--from=<name> \
--chain-id=<chain_id>
```
Expand Down Expand Up @@ -725,7 +720,7 @@ The first step to create a multisig transaction is to initiate it on behalf
of the multisig address created above:

```bash
gaiacli tx send cosmos1570v2fq3twt0f0x02vhxpuzc9jc4yl30q2qned 10stake \
gaiacli tx send cosmos1570v2fq3twt0f0x02vhxpuzc9jc4yl30q2qned 1000000uatom \
--from=<multisig_address> \
--generate-only > unsignedTx.json
```
Expand Down
28 changes: 28 additions & 0 deletions docs/gaia/join-mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,34 @@ You can also ask for peers on the [Validators Riot Room](https://riot.im/app/#/r

For more information on seeds and peers, you can [read this](https://github.com/tendermint/tendermint/blob/develop/docs/tendermint-core/using-tendermint.md#peers).

## A note on gas and fees

::: warning
On Cosmos Hub mainnet, the accepted denom is `uatom`, where `1atom = 1.000.000uatom`
:::

Transactions on the Cosmos Hub network need to include a transaction fee in order to be processed. This fee pays for the gas required to run the transaction. The formula is the following:

```
fees = gas * gasPrices
```

The `gas` is dependent on the transaction. Different transaction require different amount of `gas`. The `gas` amount for a transaction is calculated as it is being processed, but there is a way to estimate it beforehand by using the `auto` value for the `gas` flag. Of course, this only gives an estimate. You can adjust this estimate with the flag `--gas-adjustment` (default `1.0`) if you want to be sure you provide enough `gas` for the transaction.

The `gasPrice` is the price of each unit of `gas`. Each validator sets a `min-gas-price` value, and will only include transactions that have a `gasPrice` greater than their `min-gas-price`.

The transaction `fees` are the product of `gas` and `gasPrice`. As a user, you have to input 2 out of 3. The higher the `gasPrice`/`fees`, the higher the chance that your transaction will get included in a block.

::: tip
For mainnet, the recommended `gas-prices` is `0.025uatom`.
:::

## Set `minimum-gas-prices`

Your full-node keeps unconfirmed transactions in its mempool. In order to protect it from spam, it is better to set a `minimum-gas-prices` that the transaction must meet in order to be accepted in your node's mempool. This parameter can be set in the following file `~/.gaiad/config/gaiad.toml`.

The initial recommended `min-gas-prices` is `0.025uatom`, but you might want to change it later.

## Run a Full Node

Start the full node with this command:
Expand Down
55 changes: 39 additions & 16 deletions docs/gaia/validators/validator-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,28 @@ If you want to become a validator for the Hub's `mainnet`, you should [research

You may want to skip the next section if you have already [set up a full-node](../join-mainnet.md).

::: warning
On Cosmos Hub mainnet, the accepted denom is `uatom`, where `1atom = 1.000.000uatom`
:::

### A note on gas and fees

Transactions on the Cosmos Hub network need to include a transaction fee in order to be processed. This fee pays for the gas required to run the transaction. The formula is the following:

```
fees = gas * gasPrices
```

The `gas` is dependent on the transaction. Different transaction require different amount of `gas`. The `gas` amount for a transaction is calculated as it is being processed, but there is a way to estimate it beforehand by using the `auto` value for the `gas` flag. Of course, this only gives an estimate. You can adjust this estimate with the flag `--gas-adjustment` (default `1.0`) if you want to be sure you provide enough `gas` for the transaction.

The `gasPrice` is the price of each unit of `gas`. Each validator sets a `min-gas-price` value, and will only include transactions that have a `gasPrice` greater than their `min-gas-price`.

The transaction `fees` are the product of `gas` and `gasPrice`. As a user, you have to input 2 out of 3. The higher the `gasPrice`/`fees`, the higher the chance that your transaction will get included in a block.

::: tip
For mainnet, the recommended `gas-prices` is `0.025uatom`.
:::

## Create Your Validator

Your `cosmosvalconspub` can be used to create a new validator by staking tokens. You can find your validator pubkey by running:
Expand All @@ -32,20 +54,27 @@ Don't use more `uatom` thank you have!

```bash
gaiacli tx staking create-validator \
--amount=5STAKE \
--amount=1000000uatom \
--pubkey=$(gaiad tendermint show-validator) \
--moniker="choose a moniker" \
--chain-id=<chain_id> \
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--min-self-delegation="1" \
--gas="auto" \
--gas-prices="0.025uatom" \
--from=<key_name>
```

::: tip
When specifying commission parameters, the `commission-max-change-rate` is used to measure % _point_ change over the `commission-rate`. E.g. 1% to 2% is a 100% rate increase, but only 1 percentage point.
:::

::: tip
`Min-self-delegation` is a stritly positive integer that represents the minimum amount of self-delegated voting power your validator must always have. A `min-self-delegation` of 1 means your validator will never have a self-delegation lower than `1atom`, or `1000000uatom`
:::

You can confirm that you are in the validator set by using a third party explorer.

## Participate in genesis as a validator
Expand Down Expand Up @@ -75,27 +104,19 @@ Don't use more `uatom` thank you have!
:::

```bash
gaiacli tx staking create-validator \
--amount=50000000uatom \
--pubkey=$(gaiad tendermint show-validator) \
--moniker="choose a moniker" \
--chain-id=<chain_id> \
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--generate-only > myUnsignedGentx.json
gaiad gentx \
--amount <amount_of_delegation_uatom> \
--commission-rate <commission_rate> \
--commission-max-rate <commission_max_rate> \
--commission-max-change-rate <commission_max_change_rate> \
--pubkey <consensus_pubkey> \
--name <key_name>
```

::: tip
When specifying commission parameters, the `commission-max-change-rate` is used to measure % _point_ change over the `commission-rate`. E.g. 1% to 2% is a 100% rate increase, but only 1 percentage point.
:::

After you generate your unsigned `gentx`, sign it.

```bash
gaiacli tx sign myUnsignedGentx.json --from <key_name> > myGentx.json
```

You can then submit your `gentx` on the [launch repository](https://github.com/cosmos/launch). These `gentx` will be used to form the final genesis file.

## Edit Validator Description
Expand All @@ -111,6 +132,8 @@ gaiacli tx staking edit-validator
--identity=6A0D65E29A4CBC8E \
--details="To infinity and beyond!" \
--chain-id=<chain_id> \
--gas="auto" \
--gas-prices="0.025uatom" \
--from=<key_name> \
--commission-rate="0.10"
```
Expand Down

0 comments on commit 1662d6b

Please sign in to comment.