Skip to content

Commit

Permalink
Merge PR cosmos#3838: Update Docs for mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
gamarin2 authored and jackzampolin committed Mar 13, 2019
1 parent 7af11ec commit 5b62109
Show file tree
Hide file tree
Showing 11 changed files with 271 additions and 238 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ breaking changes.

**Note**: Requires [Go 1.11.5+](https://golang.org/dl/)

## Cosmos Hub Public Testnet
## Cosmos Hub Mainnet

To run a full-node in the latest public testnet of the Hub, first [install `gaia`](./docs/gaia/installation.md), then follow [the guide](./docs/gaia/join-testnet.md).
To run a full-node for the mainnet of the Cosmos Hub, first [install `gaia`](./docs/gaia/installation.md), then follow [the guide](./docs/gaia/join-mainnet.md).

For status updates and genesis files, see the
[testnets repo](https://github.com/cosmos/testnets).
For status updates and genesis file, see the
[launch repo](https://github.com/cosmos/launch).


## Quick Start
Expand Down
11 changes: 6 additions & 5 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
sidebar: [
{
title: "Overview",
collapsable: false,
collapsable: true,
children: [
"/intro/",
"/intro/sdk-app-architecture",
Expand All @@ -35,24 +35,25 @@ module.exports = {
},
{
title: "Gaia",
collapsable: false,
collapsable: true,
children: [
"/gaia/what-is-gaia",
"/gaia/installation",
"/gaia/join-testnet",
"/gaia/join-mainnet",
"/gaia/validators/validator-setup",
"/gaia/validators/overview",
"/gaia/validators/security",
"/gaia/validators/validator-faq",
"/gaia/delegator-guide-cli",
"/gaia/ledger",
"/gaia/gaiacli",
"/gaia/join-testnet",
"/gaia/deploy-testnet"
]
},
{
title: "Tutorial",
collapsable: false,
collapsable: true,
children: [
"/tutorial/",
"/tutorial/app-design",
Expand All @@ -74,7 +75,7 @@ module.exports = {
},
{
title: "Clients",
collapsable: false,
collapsable: true,
children: [
"/clients/",
"/clients/cli",
Expand Down
5 changes: 3 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
- [SDK API Reference](https://godoc.org/github.com/cosmos/cosmos-sdk): Godocs of the Cosmos SDK.
- [REST API spec](https://cosmos.network/rpc/): List of endpoints to interact with a `gaia` full-node through REST.

## Cosmos Hub testnet
## Cosmos Hub

- [Join the public testnet](./gaia/join-testnet.md) of the Cosmos Hub.
- [Join the mainnet](./gaia/join-mainnet.md) of the Cosmos Hub.
- [Join the latest public testnet](./gaia/join-testnet.md) of the Cosmos Hub.
- [Start your own `gaia` testnet](./gaia/deploy-testnet.md).

## Creating a new SDK project
Expand Down
8 changes: 6 additions & 2 deletions docs/gaia/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

Welcome to the `Gaia` docs. `Gaia` is the current name of the Cosmos SDK application for the Cosmos Hub.

## Join the Cosmos Hub public testnet
## Join the Cosmos Hub Mainnet

- [Install the `gaia` application](./installation.md)
- [Set up a full node and join the current public testnet](./join-testnet.md)
- [Set up a full node and join the mainnet](./join-mainnet.md)
- [Upgrade to a validator node](./validators/validator-setup.md)

## Join the Cosmos Hub Public Testnet

- [Join the testnet](./join-testnet.md)

## Setup your own `gaia` testnet

- [Setup your own `gaia` testnet](./deploy-testnet.md)
Expand Down
26 changes: 17 additions & 9 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,12 +336,16 @@ 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:
```
fees = gas * gasPrices
fees = ceil(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.
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
31 changes: 11 additions & 20 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 = 1000000uatom`. 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 @@ -365,10 +360,6 @@ 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/)!
:::

##### Query Delegations

Once submitted a delegation to a validator, you can see it's information by using the following command:
Expand Down Expand Up @@ -527,7 +518,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 +547,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 +716,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
16 changes: 10 additions & 6 deletions docs/gaia/installation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Install Gaia

This guide will explain how to install the `gaiad` and `gaiacli` entrypoints onto your system. With these installed on a server, you can participate in the latest testnet as either a [Full Node](./join-testnet.md#run-a-full-node) or a [Validator](./validators/validator-setup.md).
This guide will explain how to install the `gaiad` and `gaiacli` entrypoints onto your system. With these installed on a server, you can participate in the mainnet as either a [Full Node](./join-mainnet.md) or a [Validator](./validators/validator-setup.md).

### Install Go

Expand All @@ -23,6 +23,10 @@ Next, let's install the latest version of Gaia. Here we'll use the `master` bran
If necessary, make sure you `git checkout` the correct
[released version](https://github.com/cosmos/cosmos-sdk/releases).

::: warning
For the mainnet, make sure your version if greather than `v0.33.0`
:::

```bash
mkdir -p $GOPATH/src/github.com/cosmos
cd $GOPATH/src/github.com/cosmos
Expand All @@ -43,11 +47,11 @@ $ gaiacli version --long
`gaiacli` for instance should output something similar to:

```
cosmos-sdk: 0.31.2-10-g1fba7308
git commit: 1fba7308fa226e971964cd6baad9527d4b51d9fc
vendor hash: 1aec7edfad9888a967b3e9063e42f66b28f447e6
cosmos-sdk: 0.33.0
git commit: 7b4104aced52aa5b59a96c28b5ebeea7877fc4f0
vendor hash: 5db0df3e24cf10545c84f462a24ddc61882aa58f
build tags: netgo ledger
go version go1.11.5 linux/amd64
go version go1.12 linux/amd64
```

##### Build Tags
Expand All @@ -66,4 +70,4 @@ Build tags indicate special features that have been enabled in the binary.

### Next

Now you can [join the public testnet](./join-testnet.md) or [create you own testnet](./deploy-testnet.md)
Now you can [join the mainnet](./join-mainnet.md), [the public testnet](./join-testnet.md) or [create you own testnet](./deploy-testnet.md)
Loading

0 comments on commit 5b62109

Please sign in to comment.