From 7ec3d3d6fc158146a31f81eec710a05cc44d5e6c Mon Sep 17 00:00:00 2001 From: gamarin Date: Fri, 8 Mar 2019 22:24:50 +0100 Subject: [PATCH 01/37] update docs for mainnet --- README.md | 8 +- docs/.vuepress/config.js | 11 ++- docs/README.md | 5 +- docs/gaia/README.md | 8 +- docs/gaia/installation.md | 16 +-- docs/gaia/join-mainnet.md | 124 ++++++++++++++++++++++++ docs/gaia/join-testnet.md | 122 ++--------------------- docs/gaia/validators/validator-faq.md | 5 +- docs/gaia/validators/validator-setup.md | 120 +++++++++-------------- 9 files changed, 212 insertions(+), 207 deletions(-) create mode 100644 docs/gaia/join-mainnet.md diff --git a/README.md b/README.md index d23a1edc8d..37b5c41011 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 669c2467e5..e8ee111d64 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -26,7 +26,7 @@ module.exports = { sidebar: [ { title: "Overview", - collapsable: false, + collapsable: true, children: [ "/intro/", "/intro/sdk-app-architecture", @@ -35,11 +35,11 @@ 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", @@ -47,12 +47,13 @@ module.exports = { "/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", @@ -74,7 +75,7 @@ module.exports = { }, { title: "Clients", - collapsable: false, + collapsable: true, children: [ "/clients/", "/clients/cli", diff --git a/docs/README.md b/docs/README.md index 09c96f9ebb..7b16324376 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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 diff --git a/docs/gaia/README.md b/docs/gaia/README.md index 488ac960c9..eaf21a8238 100644 --- a/docs/gaia/README.md +++ b/docs/gaia/README.md @@ -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) diff --git a/docs/gaia/installation.md b/docs/gaia/installation.md index 676044c3ca..cfbab511a0 100644 --- a/docs/gaia/installation.md +++ b/docs/gaia/installation.md @@ -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 latest testnet as either a [Full Node](./join-mainnet.md) or a [Validator](./validators/validator-setup.md). ### Install Go @@ -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 @@ -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: build tags: netgo ledger -go version go1.11.5 linux/amd64 +go version go1.12 darwin/amd64 ``` ##### Build Tags @@ -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) diff --git a/docs/gaia/join-mainnet.md b/docs/gaia/join-mainnet.md new file mode 100644 index 0000000000..94c34126a2 --- /dev/null +++ b/docs/gaia/join-mainnet.md @@ -0,0 +1,124 @@ +# Join the mainnet + +::: tip +See the [launch](https://github.com/cosmos/launch) for +information on the mainnet, including the correct version +of the Cosmos-SDK to use and details about the genesis file. +::: + +::: warning +**You need to [install gaia](./installation.md) before you go further** +::: + +## Setting Up a New Node + +These instructions are for setting up a brand new full node from scratch. + +First, initialize the node and create the necessary config files: + +```bash +gaiad init +``` + +::: warning Note +Monikers can contain only ASCII characters. Using Unicode characters will render your node unreachable. +::: + +You can edit this `moniker` later, in the `~/.gaiad/config/config.toml` file: + +```toml +# A custom human readable name for this node +moniker = "" +``` + +You can edit the `~/.gaiad/config/gaiad.toml` file in order to enable the anti spam mechanism and reject incoming transactions with less than the minimum gas prices: + +``` +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +##### main base config options ##### + +# The minimum gas prices a validator is willing to accept for processing a +# transaction. A transaction's fees must meet the minimum of any denomination +# specified in this config (e.g. 10uatom). + +minimum-gas-prices = "" +``` + +Your full node has been initialized! + +## Genesis & Seeds + +### Copy the Genesis File + +Fetch the testnet's `genesis.json` file into `gaiad`'s config directory. + +```bash +mkdir -p $HOME/.gaiad/config +curl https://raw.githubusercontent.com/cosmos/launch/master/latest/genesis.json > $HOME/.gaiad/config/genesis.json +``` + +Note we use the `latest` directory in the [launch repo](https://github.com/cosmos/launch) which contains details for the mainnet like the latest version and the genesis file. + +::: tip +If you want to connect to the public testnet instead, click [here](./join-testnet.md) +::: + +To verify the correctness of the configuration run: + +```bash +gaiad start +``` + +### Add Seed Nodes + +Your node needs to know how to find peers. You'll need to add healthy seed nodes to `$HOME/.gaiad/config/config.toml`. The [`launch`](https://github.com/cosmos/launch) repo contains links to some seed nodes. + +If those seeds aren't working, you can find more seeds and persistent peers on a Cosmos Hub explorer (a list can be found on the [launch page](https://cosmos.network/launch)). + +You can also ask for peers on the [Validators Riot Room](https://riot.im/app/#/room/#cosmos-validators:matrix.org) + +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). + +## Run a Full Node + +Start the full node with this command: + +```bash +gaiad start +``` + +Check that everything is running smoothly: + +```bash +gaiacli status +``` + +View the status of the network with the [Cosmos Explorer](https://cosmos.network/launch). + +## Export State + +Gaia can dump the entire application state to a JSON file, which could be useful for manual analysis and can also be used as the genesis file of a new network. + +Export state with: + +```bash +gaiad export > [filename].json +``` + +You can also export state from a particular height (at the end of processing the block of that height): + +```bash +gaiad export --height [height] > [filename].json +``` + +If you plan to start a new network from the exported state, export with the `--for-zero-height` flag: + +```bash +gaiad export --height [height] --for-zero-height > [filename].json +``` + +## Upgrade to Validator Node + +You now have an active full node. What's the next step? You can upgrade your full node to become a Cosmos Validator. The top 100 validators have the ability to propose new blocks to the Cosmos Hub. Continue onto [the Validator Setup](./validators/validator-setup.md). diff --git a/docs/gaia/join-testnet.md b/docs/gaia/join-testnet.md index df47f88bb4..469abdd84b 100644 --- a/docs/gaia/join-testnet.md +++ b/docs/gaia/join-testnet.md @@ -1,4 +1,4 @@ -# Join the public testnet +# Join the Public Testnet ::: tip Current Testnet See the [testnet repo](https://github.com/cosmos/testnets) for @@ -10,47 +10,20 @@ of the Cosmos-SDK to use and details about the genesis file. **You need to [install gaia](./installation.md) before you go further** ::: -## Setting Up a New Node +## Starting a new Node > NOTE: If you ran a full node on a previous testnet, please skip to [Upgrading From Previous Testnet](#upgrading-from-previous-testnet). -These instructions are for setting up a brand new full node from scratch. +To start a new node, the mainnet instructions apply: -First, initialize the node and create the necessary config files: +- [Join the mainnet](./join-mainnet.md) +- [Deploy a validator](./validators/validator-setup.md) -```bash -gaiad init -``` +The only difference is the SDK version and genesis file. See the [testnet repo](https://github.com/cosmos/testnets) for information on testnets, including the correct version of the Cosmos-SDK to use and details about the genesis file. -::: warning Note -Monikers can contain only ASCII characters. Using Unicode characters will render your node unreachable. -::: +## Upgrading your Node -You can edit this `moniker` later, in the `~/.gaiad/config/config.toml` file: - -```toml -# A custom human readable name for this node -moniker = "" -``` - -You can edit the `~/.gaiad/config/gaiad.toml` file in order to enable the anti spam mechanism and reject incoming transactions with less than a minimum fee: - -``` -# This is a TOML config file. -# For more information, see https://github.com/toml-lang/toml - -##### main base config options ##### - -# Validators reject any tx from the mempool with less than the minimum fee per gas. -minimum_fees = "" -``` - - -Your full node has been initialized! Please skip to [Genesis & Seeds](#genesis-seeds). - -## Upgrading From Previous Testnet - -These instructions are for full nodes that have ran on previous testnets and would like to upgrade to the latest testnet. +These instructions are for full nodes that have ran on previous versions of and would like to upgrade to the latest testnet. ### Reset Data @@ -84,81 +57,6 @@ make update_tools install ::: Note we use `master` here since it contains the latest stable release. -See the [testnet repo](https://github.com/cosmos/testnets) -for details on which version is needed for which testnet, -and the [SDK release page](https://github.com/cosmos/cosmos-sdk/releases) -for details on each release. +See the [testnet repo](https://github.com/cosmos/testnets) for details on which version is needed for which testnet, and the [SDK release page](https://github.com/cosmos/cosmos-sdk/releases) for details on each release. -Your full node has been cleanly upgraded! - -## Genesis & Seeds - -### Copy the Genesis File - -Fetch the testnet's `genesis.json` file into `gaiad`'s config directory. - -```bash -mkdir -p $HOME/.gaiad/config -curl https://raw.githubusercontent.com/cosmos/testnets/master/latest/genesis.json > $HOME/.gaiad/config/genesis.json -``` - -Note we use the `latest` directory in the [testnets repo](https://github.com/cosmos/testnets) -which contains details for the latest testnet. If you are connecting to a different testnet, ensure you get the right files. - -To verify the correctness of the configuration run: - -```bash -gaiad start -``` - -### Add Seed Nodes - -Your node needs to know how to find peers. You'll need to add healthy seed nodes to `$HOME/.gaiad/config/config.toml`. The `testnets` repo contains links to the seed nodes for each testnet. If you are looking to join the running testnet please [check the repository for details](https://github.com/cosmos/testnets) on which nodes to use. - -If those seeds aren't working, you can find more seeds and persistent peers on the [Cosmos Explorer](https://explorer.cosmos.network/nodes). Open the the `Full Nodes` pane and select nodes that do not have private (`10.x.x.x`) or [local IP addresses](https://en.wikipedia.org/wiki/Private_network). The `Persistent Peer` field contains the connection string. For best results use 4-6. - -You can also ask for peers on the [Validators Riot Room](https://riot.im/app/#/room/#cosmos-validators:matrix.org) - -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). - -## Run a Full Node - -Start the full node with this command: - -```bash -gaiad start -``` - -Check that everything is running smoothly: - -```bash -gaiacli status -``` - -View the status of the network with the [Cosmos Explorer](https://explorecosmos.network). Once your full node syncs up to the current block height, you should see it appear on the [list of full nodes](https://explorecosmos.network/validators). If it doesn't show up, that's ok--the Explorer does not connect to every node. - -## Export State - -Gaia can dump the entire application state to a JSON file, which could be useful for manual analysis and can also be used as the genesis file of a new network. - -Export state with: - -```bash -gaiad export > [filename].json -``` - -You can also export state from a particular height (at the end of processing the block of that height): - -```bash -gaiad export --height [height] > [filename].json -``` - -If you plan to start a new network from the exported state, export with the `--for-zero-height` flag: - -```bash -gaiad export --height [height] --for-zero-height > [filename].json -``` - -## Upgrade to Validator Node - -You now have an active full node. What's the next step? You can upgrade your full node to become a Cosmos Validator. The top 100 validators have the ability to propose new blocks to the Cosmos Hub. Continue onto [the Validator Setup](./validators/validator-setup.md). +Your full node has been cleanly upgraded! \ No newline at end of file diff --git a/docs/gaia/validators/validator-faq.md b/docs/gaia/validators/validator-faq.md index 2c159ab40b..a303989df9 100644 --- a/docs/gaia/validators/validator-faq.md +++ b/docs/gaia/validators/validator-faq.md @@ -218,9 +218,10 @@ We have to solve this simple equation to find the reward R for each validator: ### What are the slashing conditions? -If a validator misbehaves, their delegated stake will be partially slashed. There is currently one main fault that can result in slashing of funds for a validator and their delegators: +If a validator misbehaves, their delegated stake will be partially slashed. There are currently two faults that can result in slashing of funds for a validator and their delegators: -* **Double signing:** If someone reports on chain A that a validator signed two blocks at the same height on chain A and chain B, and if chain A and chain B share a common ancestor, then this validator will get slashed on chain A +* **Double signing:** If someone reports on chain A that a validator signed two blocks at the same height on chain A and chain B, and if chain A and chain B share a common ancestor, then this validator will get slashed by 5% on chain A. +* **Downtime:** If a validator misses more than 95% of the last 10.000 blocks, they will get slashed by 0.01%. ### Do validators need to self-delegate Atoms? diff --git a/docs/gaia/validators/validator-setup.md b/docs/gaia/validators/validator-setup.md index 7c5e7d03bd..7a448900e5 100644 --- a/docs/gaia/validators/validator-setup.md +++ b/docs/gaia/validators/validator-setup.md @@ -1,12 +1,10 @@ -# Run a Validator on the public testnet +# Run a Validator on the Cosmos Hub Mainnet ::: tip -Information on how to join the current testnet (`genesis.json` file and seeds) is held [in our `testnet` repo](https://github.com/cosmos/testnets/tree/master/latest). Please check there if you are looking to join our latest testnet. +Information on how to join the mainnet (`genesis.json` file and seeds) is held [in our `launch` repo](https://github.com/cosmos/launch/tree/master/latest). ::: -__Note__: This documentation is only intended for validators of the **public testnet** - -Before setting up your validator node, make sure you've already gone through the [Full Node Setup](../join-testnet.md) guide. +Before setting up your validator node, make sure you've already gone through the [Full Node Setup](../join-mainnet.md) guide. ## What is a Validator? @@ -16,7 +14,7 @@ Before setting up your validator node, make sure you've already gone through the If you want to become a validator for the Hub's `mainnet`, you should [research security](./security.md). ::: -You may want to skip the next section if you have already [set up a full-node](../join-testnet.md). +You may want to skip the next section if you have already [set up a full-node](../join-mainnet.md). ## Create Your Validator @@ -26,10 +24,10 @@ Your `cosmosvalconspub` can be used to create a new validator by staking tokens. gaiad tendermint show-validator ``` -Next, craft your `gaiad gentx` command: +To create your validator, just use the following command: -::: warning Note -Don't use more `STAKE` thank you have! You can always get more by using the [Faucet](https://faucet.cosmos.network/)! +::: warning +Don't use more `uatom` thank you have! ::: ```bash @@ -38,86 +36,68 @@ gaiacli tx staking create-validator \ --pubkey=$(gaiad tendermint show-validator) \ --moniker="choose a moniker" \ --chain-id= \ - --from= \ --commission-rate="0.10" \ --commission-max-rate="0.20" \ - --commission-max-change-rate="0.01" + --commission-max-change-rate="0.01" \ + --from= ``` -__Note__: 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 +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. +::: -__Note__: If unspecified, `consensus_pubkey` will default to the output of `gaiad tendermint show-validator`. -`key_name` is the name of the private key that will be used to sign the transaction. +You can confirm that you are in the validator set by using a third party explorer. ## Participate in genesis as a validator -__Note__: This section only concerns validators that want to be in the genesis -file. If the chain you want to validate is already live, skip this section. - -__Note__: `Gaia-9002` and `Game of stakes` will not use this process. They will -be bootstrapped using validators operated by Tendermint. You will just need to use the -[create-validator](#create-your-validator) command in order to join as a validator -for these networks. - -If you want to participate in genesis as a validator, you need to justify that -you have some stake at genesis, create one (or multiple) transactions to bond this -stake to your validator address, and include this transaction in the genesis file. - -You will need create a `gentx`: - -```bash -gaiad gentx \ - --amount \ - --commission-rate \ - --commission-max-rate \ - --commission-max-change-rate \ - --pubkey \ - --name -``` - -__Note__: This command automatically store your `gentx` in `~/.gaiad/config/gentx` -for it to be processed at genesis. - -::: tip -Consult `gaiad gentx --help` for more information on the flags defaults. +::: warning +This section only concerns validators that want to be in the genesis +file of the Cosmos Hub mainnet. If the mainnet is already live, skip this section. ::: -A `gentx` is a JSON file carrying a self-delegation. All genesis transactions are -collected by a `genesis coordinator` and validated against an initial `genesis.json`. -Such initial `genesis.json` contains only a list of accounts and their coins. -Once the transactions are processed, they are merged in the `genesis.json`'s `gentxs` field. +If you want to participate in genesis as a validator, you need to justify that +you have some stake at genesis, create one (or multiple) transactions to bond this stake to your validator address, and include this transaction in the genesis file. -### Copy the Initial Genesis File and Process Genesis Transactions - -Fetch the `genesis.json` file into `gaiad`'s config directory. +Your `cosmosvalconspub` can be used to create a new validator by staking tokens. You can find your validator pubkey by running: ```bash -mkdir -p $HOME/.gaiad/config -curl https://raw.githubusercontent.com/cosmos/testnets/master/latest/genesis.json > $HOME/.gaiad/config/genesis.json +gaiad tendermint show-validator ``` -__Note:__ We use the `latest` directory in the [testnets repo](https://github.com/cosmos/testnets) -which contains details for the latest testnet. If you are connecting to a different testnet, ensure you get the right files. +Next, craft your `gaiad gentx` command. +::: tip +A `gentx` is a JSON file carrying a self-delegation. All genesis transactions are collected by a `genesis coordinator` and validated against an initial `genesis.json`. +::: -You also need to fetch the genesis transactions of all the other genesis validators. For now there is no repository where genesis transactions can be submitted by validators, but this will as soon as we try out this feature in a testnet. - -Once you've collected all genesis transactions in `~/.gaiad/config/gentx`, you can run: +::: warning Note +Don't use more `uatom` thank you have! +::: ```bash -gaiad collect-gentxs +gaiacli tx staking create-validator \ + --amount=50000000uatom \ + --pubkey=$(gaiad tendermint show-validator) \ + --moniker="choose a moniker" \ + --chain-id= \ + --commission-rate="0.10" \ + --commission-max-rate="0.20" \ + --commission-max-change-rate="0.01" \ + --generate-only > myUnsignedGentx.json ``` -__Note:__ The accounts from which you delegate in the `gentx` transactions need to possess stake tokens in the genesis file, otherwise `collect-gentx` will fail. +::: 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. +::: -The previous command will collect all genesis transactions and finalise `genesis.json`. To verify the correctness of the configuration and start the node run: +After you generate your unsigned `gentx`, sign it. ```bash -gaiad start +gaiacli tx sign myUnsignedGentx.json --from > 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 You can edit your validator's public description. This info is to identify your validator, and will be relied on by delegators to decide which validators to stake to. Make sure to provide input for every flag below, otherwise the field will default to empty (`--moniker` defaults to the machine name). @@ -187,23 +167,15 @@ To be in the validator set, you need to have more total voting power than the 10 ### Problem #1: My validator has `voting_power: 0` -Your validator has become auto-unbonded. In `gaia-8000`, we unbond validators if they do not vote on `50` of the last `100` blocks. Since blocks are proposed every ~2 seconds, a validator unresponsive for ~100 seconds will become unbonded. This usually happens when your `gaiad` process crashes. +Your validator has become jailed. Validators get jailed, i.e. get removed from the active validator set, if they do not vote on `500` of the last `10000` blocks, or if they double sign. -Here's how you can return the voting power back to your validator. First, if `gaiad` is not running, start it up again: +If you got jailed for downtime, you can get your voting power back to your validator. First, if `gaiad` is not running, start it up again: ```bash gaiad start ``` -Wait for your full node to catch up to the latest block. Next, run the following command. Note that `` is the address of your validator account, and `` is the name of the validator account. You can find this info by running `gaiacli keys list`. - -```bash -gaiacli tx slashing unjail --chain-id= --from= -``` - -::: danger Warning -If you don't wait for `gaiad` to sync before running `unjail`, you will receive an error message telling you your validator is still jailed. -::: +Wait for your full node to catch up to the latest block. Next, run the following command. Then, you can [unjail your validator](#unjail-validator) Lastly, check your validator again to see if your voting power is back. From 1662d6b03792e19cd1a6e4ebd0d9ed8d76ee3d64 Mon Sep 17 00:00:00 2001 From: gamarin Date: Mon, 11 Mar 2019 18:55:13 +0100 Subject: [PATCH 02/37] finalize mainnet docs --- docs/gaia/delegator-guide-cli.md | 24 +++++++---- docs/gaia/gaiacli.md | 29 ++++++------- docs/gaia/join-mainnet.md | 28 +++++++++++++ docs/gaia/validators/validator-setup.md | 55 ++++++++++++++++++------- 4 files changed, 95 insertions(+), 41 deletions(-) diff --git a/docs/gaia/delegator-guide-cli.md b/docs/gaia/delegator-guide-cli.md index 26ae01abc3..9813a5a054 100644 --- a/docs/gaia/delegator-guide-cli.md +++ b/docs/gaia/delegator-guide-cli.md @@ -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 @@ -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: @@ -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 @@ -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: =cosmosvaloper18thamkhnj9wz8pa4nhnp9rldprgant57pk2m8s, =10000stake, =0.001stake +// ex value for flags: =cosmosvaloper18thamkhnj9wz8pa4nhnp9rldprgant57pk2m8s, =10000000uatom, =0.025uatom gaiacli tx staking delegate --from --gas auto --gas-prices // Withdraw all rewards -// ex value for flag: =0.001stake +// ex value for flag: =0.025uatom gaiacli tx distr withdraw-all-rewards --from --gas auto --gas-prices // 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: =cosmosvaloper18thamkhnj9wz8pa4nhnp9rldprgant57pk2m8s, =10000stake, =0.001stake +// ex value for flags: =cosmosvaloper18thamkhnj9wz8pa4nhnp9rldprgant57pk2m8s, =10000000uatom, =0.025uatom gaiacli tx staking unbond --from --gas auto --gas-prices ``` @@ -434,13 +442,13 @@ At the end of the voting period, the proposal is accepted if there are more than ```bash // Submit a Proposal // =text/parameter_change/software_upgrade -// ex value for flag: =0.0001stake +// ex value for flag: =0.025uatom -gaiacli tx gov submit-proposal --title "Test Proposal" --description "My awesome proposal" --type --deposit=10stake --gas auto --gas-prices --from +gaiacli tx gov submit-proposal --title "Test Proposal" --description "My awesome proposal" --type --deposit=10000000uatom --gas auto --gas-prices --from // Increase deposit of a proposal // Retrieve proposalID from $gaiacli query gov proposals --status deposit_period -// ex value for parameter: =1stake +// ex value for parameter: =10000000uatom gaiacli tx gov deposit --gas auto --gas-prices --from @@ -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: =10000stake, =cosmosvaloper18thamkhnj9wz8pa4nhnp9rldprgant57pk2m8s, =0.001stake, =cosmos10snjt8dmpr5my0h76xj48ty80uzwhraqalu4eg +// ex value for flags: =10000000uatom, =cosmosvaloper18thamkhnj9wz8pa4nhnp9rldprgant57pk2m8s, =0.025uatom, =cosmos10snjt8dmpr5my0h76xj48ty80uzwhraqalu4eg gaiacli tx staking delegate --from --gas auto --gas-prices --generate-only > unsignedTX.json ``` diff --git a/docs/gaia/gaiacli.md b/docs/gaia/gaiacli.md index 198911f67d..95af81ca23 100644 --- a/docs/gaia/gaiacli.md +++ b/docs/gaia/gaiacli.md @@ -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 @@ -345,11 +340,11 @@ gaiacli query staking validator #### 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= \ --from= \ --chain-id= @@ -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 @@ -527,7 +522,7 @@ gaiacli tx gov submit-proposal \ --title= \ --description=<description> \ --type=<Text/ParameterChange/SoftwareUpgrade> \ - --deposit=<40steak> \ + --deposit="1000000uatom" \ --from=<name> \ --chain-id=<chain_id> ``` @@ -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> ``` @@ -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 ``` diff --git a/docs/gaia/join-mainnet.md b/docs/gaia/join-mainnet.md index 94c34126a2..e524920447 100644 --- a/docs/gaia/join-mainnet.md +++ b/docs/gaia/join-mainnet.md @@ -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: diff --git a/docs/gaia/validators/validator-setup.md b/docs/gaia/validators/validator-setup.md index 7a448900e5..17798021bc 100644 --- a/docs/gaia/validators/validator-setup.md +++ b/docs/gaia/validators/validator-setup.md @@ -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: @@ -32,13 +54,16 @@ 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> ``` @@ -46,6 +71,10 @@ gaiacli tx staking create-validator \ 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 @@ -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 @@ -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" ``` From d563a264152181528b73c75f89261ae11e7dec58 Mon Sep 17 00:00:00 2001 From: gamarin <gautier@tendermint.com> Date: Mon, 11 Mar 2019 19:20:46 +0100 Subject: [PATCH 03/37] bez review --- docs/gaia/delegator-guide-cli.md | 2 +- docs/gaia/installation.md | 4 ++-- docs/gaia/validators/validator-setup.md | 22 ---------------------- 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/docs/gaia/delegator-guide-cli.md b/docs/gaia/delegator-guide-cli.md index 9813a5a054..6b2096be6b 100644 --- a/docs/gaia/delegator-guide-cli.md +++ b/docs/gaia/delegator-guide-cli.md @@ -345,7 +345,7 @@ On Cosmos Hub mainnet, the accepted denom is `uatom`, where `1atom = 1.000.000ua 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. diff --git a/docs/gaia/installation.md b/docs/gaia/installation.md index cfbab511a0..cd150b57b3 100644 --- a/docs/gaia/installation.md +++ b/docs/gaia/installation.md @@ -48,8 +48,8 @@ $ gaiacli version --long ``` cosmos-sdk: 0.33.0 -git commit: 7b4104aced52aa5b59a96c28b5ebeea7877fc4f0 -vendor hash: +git commit: 06f741609bbce747643e9f1f2abf67040ad78e16 +vendor hash: decf1ff8b31df2243aa27bcd6e1a40df4d30be81 build tags: netgo ledger go version go1.12 darwin/amd64 ``` diff --git a/docs/gaia/validators/validator-setup.md b/docs/gaia/validators/validator-setup.md index 17798021bc..d72f75f1cf 100644 --- a/docs/gaia/validators/validator-setup.md +++ b/docs/gaia/validators/validator-setup.md @@ -16,28 +16,6 @@ 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: From 3f87671232bfd01166ec21c222ad5d206a92a945 Mon Sep 17 00:00:00 2001 From: Jack Zampolin <jack.zampolin@gmail.com> Date: Mon, 11 Mar 2019 14:57:04 -0700 Subject: [PATCH 04/37] Apply suggestions from code review Co-Authored-By: jackzampolin <jack.zampolin@gmail.com> --- docs/gaia/gaiacli.md | 4 ++-- docs/gaia/join-mainnet.md | 2 +- docs/gaia/validators/validator-setup.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/gaia/gaiacli.md b/docs/gaia/gaiacli.md index 95af81ca23..c4429cf6aa 100644 --- a/docs/gaia/gaiacli.md +++ b/docs/gaia/gaiacli.md @@ -340,7 +340,7 @@ gaiacli query staking validator <account_cosmosval> #### Bond Tokens -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): +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 \ @@ -361,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 `uatom` thank you have! You can always get more by using the [Faucet](https://faucetcosmos.network/)! +Don't use more `uatom` than you have! You can always get more by using the [Faucet](https://faucetcosmos.network/)! ::: ##### Query Delegations diff --git a/docs/gaia/join-mainnet.md b/docs/gaia/join-mainnet.md index e524920447..4bc6a2f685 100644 --- a/docs/gaia/join-mainnet.md +++ b/docs/gaia/join-mainnet.md @@ -1,7 +1,7 @@ # Join the mainnet ::: tip -See the [launch](https://github.com/cosmos/launch) for +See the [launch repo](https://github.com/cosmos/launch) for information on the mainnet, including the correct version of the Cosmos-SDK to use and details about the genesis file. ::: diff --git a/docs/gaia/validators/validator-setup.md b/docs/gaia/validators/validator-setup.md index d72f75f1cf..199dbdd8df 100644 --- a/docs/gaia/validators/validator-setup.md +++ b/docs/gaia/validators/validator-setup.md @@ -27,7 +27,7 @@ gaiad tendermint show-validator To create your validator, just use the following command: ::: warning -Don't use more `uatom` thank you have! +Don't use more `uatom` than you have! ::: ```bash @@ -78,7 +78,7 @@ A `gentx` is a JSON file carrying a self-delegation. All genesis transactions ar ::: ::: warning Note -Don't use more `uatom` thank you have! +Don't use more `uatom` than you have! ::: ```bash From e111162f0c47793b00fb453b448a96d5c6cbf8ec Mon Sep 17 00:00:00 2001 From: Jack Zampolin <jack.zampolin@gmail.com> Date: Mon, 11 Mar 2019 14:57:49 -0700 Subject: [PATCH 05/37] Update docs/gaia/delegator-guide-cli.md --- docs/gaia/delegator-guide-cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/gaia/delegator-guide-cli.md b/docs/gaia/delegator-guide-cli.md index 6b2096be6b..0859422d02 100644 --- a/docs/gaia/delegator-guide-cli.md +++ b/docs/gaia/delegator-guide-cli.md @@ -337,7 +337,7 @@ 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` +On Cosmos Hub mainnet, the accepted denom is `uatom`, where `1atom = 1,000,000uatom` ::: ### A note on gas and fees From 5b5960c5e9aedcd4f7d4fd8198f981a6e6a3e3a0 Mon Sep 17 00:00:00 2001 From: gamarin <gautier@tendermint.com> Date: Tue, 12 Mar 2019 18:31:23 +0100 Subject: [PATCH 06/37] fix version --- docs/gaia/installation.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/gaia/installation.md b/docs/gaia/installation.md index cd150b57b3..94ea9c8010 100644 --- a/docs/gaia/installation.md +++ b/docs/gaia/installation.md @@ -48,10 +48,10 @@ $ gaiacli version --long ``` cosmos-sdk: 0.33.0 -git commit: 06f741609bbce747643e9f1f2abf67040ad78e16 -vendor hash: decf1ff8b31df2243aa27bcd6e1a40df4d30be81 +git commit: 7b4104aced52aa5b59a96c28b5ebeea7877fc4f0 +vendor hash: 5db0df3e24cf10545c84f462a24ddc61882aa58f build tags: netgo ledger -go version go1.12 darwin/amd64 +go version go1.12 linux/amd64 ``` ##### Build Tags From 9e446dfeb7befe60989b4a1f5e7910e4823d4242 Mon Sep 17 00:00:00 2001 From: gamarin <gautier@tendermint.com> Date: Wed, 13 Mar 2019 13:57:09 +0100 Subject: [PATCH 07/37] melekes review --- docs/gaia/gaiacli.md | 4 ---- docs/gaia/installation.md | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/gaia/gaiacli.md b/docs/gaia/gaiacli.md index c4429cf6aa..ba24567d84 100644 --- a/docs/gaia/gaiacli.md +++ b/docs/gaia/gaiacli.md @@ -360,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 `uatom` than 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: diff --git a/docs/gaia/installation.md b/docs/gaia/installation.md index 94ea9c8010..74d0ea30f0 100644 --- a/docs/gaia/installation.md +++ b/docs/gaia/installation.md @@ -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-mainnet.md) 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 From 85b0733a6a1d7c336dabb16c838fd721fbf4d4e3 Mon Sep 17 00:00:00 2001 From: Christopher Goes <cwgoes@pluranimity.org> Date: Wed, 13 Mar 2019 15:30:48 +0100 Subject: [PATCH 08/37] Apply suggestions from code review Co-Authored-By: gamarin2 <gautier@tendermint.com> --- docs/gaia/delegator-guide-cli.md | 2 +- docs/gaia/join-mainnet.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/gaia/delegator-guide-cli.md b/docs/gaia/delegator-guide-cli.md index 0859422d02..03a3051d4a 100644 --- a/docs/gaia/delegator-guide-cli.md +++ b/docs/gaia/delegator-guide-cli.md @@ -337,7 +337,7 @@ 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` +On Cosmos Hub mainnet, the accepted denom is `uatom` (micro-Atom), where `1atom = 1,000,000uatom` ::: ### A note on gas and fees diff --git a/docs/gaia/join-mainnet.md b/docs/gaia/join-mainnet.md index 4bc6a2f685..d2feece2e5 100644 --- a/docs/gaia/join-mainnet.md +++ b/docs/gaia/join-mainnet.md @@ -90,7 +90,7 @@ On Cosmos Hub mainnet, the accepted denom is `uatom`, where `1atom = 1.000.000ua 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. From bd1b693bc6fbd340061c12aa9bb2c4f43daaf478 Mon Sep 17 00:00:00 2001 From: gamarin <gautier@tendermint.com> Date: Wed, 13 Mar 2019 15:32:51 +0100 Subject: [PATCH 09/37] chris review --- docs/gaia/gaiacli.md | 4 ++-- docs/gaia/validators/validator-setup.md | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/gaia/gaiacli.md b/docs/gaia/gaiacli.md index ba24567d84..dbbc05ebe9 100644 --- a/docs/gaia/gaiacli.md +++ b/docs/gaia/gaiacli.md @@ -141,7 +141,7 @@ txs by `gasPrice` in the mempool, so providing higher fees or gas prices may yie e.g. ```bash -gaiacli tx send ... --fees=1000000uatom +gaiacli tx send ... --fees=50000uatom ``` or @@ -547,7 +547,7 @@ 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: `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: +In order for a proposal to be broadcasted to the network, the amount deposited must be above a `minDeposit` value (initial value: `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> "10000000uatom" \ diff --git a/docs/gaia/validators/validator-setup.md b/docs/gaia/validators/validator-setup.md index 199dbdd8df..117aacc00d 100644 --- a/docs/gaia/validators/validator-setup.md +++ b/docs/gaia/validators/validator-setup.md @@ -58,8 +58,7 @@ You can confirm that you are in the validator set by using a third party explore ## Participate in genesis as a validator ::: warning -This section only concerns validators that want to be in the genesis -file of the Cosmos Hub mainnet. If the mainnet is already live, skip this section. +The genesis ceremony for the Cosmos Hub mainnet is closed. Please skip to the next section. ::: If you want to participate in genesis as a validator, you need to justify that From f39cc0d548b6f1c8c8398ba48dade91a40e3b3e3 Mon Sep 17 00:00:00 2001 From: gamarin <gautier@tendermint.com> Date: Wed, 13 Mar 2019 15:37:26 +0100 Subject: [PATCH 10/37] typo fix --- docs/gaia/validators/validator-setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/gaia/validators/validator-setup.md b/docs/gaia/validators/validator-setup.md index 117aacc00d..fdf7fad81c 100644 --- a/docs/gaia/validators/validator-setup.md +++ b/docs/gaia/validators/validator-setup.md @@ -175,7 +175,7 @@ If you got jailed for downtime, you can get your voting power back to your valid gaiad start ``` -Wait for your full node to catch up to the latest block. Next, run the following command. Then, you can [unjail your validator](#unjail-validator) +Wait for your full node to catch up to the latest block. Then, you can [unjail your validator](#unjail-validator) Lastly, check your validator again to see if your voting power is back. From ce82e01ec416e6348192595e451bfd4e92eb5583 Mon Sep 17 00:00:00 2001 From: gamarin2 <gautier@tendermint.com> Date: Tue, 19 Mar 2019 00:58:11 +0100 Subject: [PATCH 11/37] Merge PR #3922: DOCS: gamarin/master docs update --- docs/gaia/delegator-guide-cli.md | 32 ++++++++++++++++++++------------ docs/gaia/installation.md | 1 + 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/docs/gaia/delegator-guide-cli.md b/docs/gaia/delegator-guide-cli.md index 03a3051d4a..a77914c1ef 100644 --- a/docs/gaia/delegator-guide-cli.md +++ b/docs/gaia/delegator-guide-cli.md @@ -286,7 +286,7 @@ gaiacli config trust-node false Finally, let us set the `chain-id` of the blockchain we want to interact with: ```bash -gaiacli config chain-id gos-6 +gaiacli config chain-id cosmoshub-1 ``` ## Querying the state @@ -299,7 +299,7 @@ gaiacli config chain-id gos-6 ```bash // query account balances and other account-related information -gaiacli query account +gaiacli query account <yourAddress> // query the list of validators gaiacli query staking validators @@ -348,7 +348,7 @@ Transactions on the Cosmos Hub network need to include a transaction fee in orde 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. +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. For the remainder of this tutorial, we will use a `--gas-adjustment` of `1.5`. 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`. @@ -376,20 +376,20 @@ For mainnet, the recommended `gas-prices` is `0.025uatom`. // Bond a certain amount of Atoms to a given validator // ex value for flags: <validatorAddress>=cosmosvaloper18thamkhnj9wz8pa4nhnp9rldprgant57pk2m8s, <amountToBound>=10000000uatom, <gasPrice>=0.025uatom -gaiacli tx staking delegate <validatorAddress> <amountToBond> --from <delegatorKeyName> --gas auto --gas-prices <gasPrice> +gaiacli tx staking delegate <validatorAddress> <amountToBond> --from <delegatorKeyName> --gas auto --gas-adjustment 1.5 --gas-prices <gasPrice> // Withdraw all rewards // ex value for flag: <gasPrice>=0.025uatom -gaiacli tx distr withdraw-all-rewards --from <delegatorKeyName> --gas auto --gas-prices <gasPrice> +gaiacli tx distr withdraw-all-rewards --from <delegatorKeyName> --gas auto --gas-adjustment 1.5 --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>=10000000uatom, <gasPrice>=0.025uatom -gaiacli tx staking unbond <validatorAddress> <amountToUnbond> --from <delegatorKeyName> --gas auto --gas-prices <gasPrice> +gaiacli tx staking unbond <validatorAddress> <amountToUnbond> --from <delegatorKeyName> --gas auto --gas-adjustment 1.5 --gas-prices <gasPrice> ``` ::: warning @@ -444,19 +444,19 @@ At the end of the voting period, the proposal is accepted if there are more than // <type>=text/parameter_change/software_upgrade // ex value for flag: <gasPrice>=0.025uatom -gaiacli tx gov submit-proposal --title "Test Proposal" --description "My awesome proposal" --type <type> --deposit=10000000uatom --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-adjustment 1.5 --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>=10000000uatom -gaiacli tx gov deposit <proposalID> <deposit> --gas auto --gas-prices <gasPrice> --from <delegatorKeyName> +gaiacli tx gov deposit <proposalID> <deposit> --gas auto --gas-adjustment 1.5 --gas-prices <gasPrice> --from <delegatorKeyName> // Vote on a proposal // Retrieve proposalID from $gaiacli query gov proposals --status voting_period // <option>=yes/no/no_with_veto/abstain -gaiacli tx gov vote <proposalID> <option> --gas auto --gas-prices <gasPrice> --from <delegatorKeyName> +gaiacli tx gov vote <proposalID> <option> --gas auto --gas-adjustment 1.5 --gas-prices <gasPrice> --from <delegatorKeyName> ``` ### Signing transactions from an offline computer @@ -467,7 +467,15 @@ If you do not have a ledger device and want to interact with your private key on // Bond Atoms // 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 +gaiacli tx staking delegate <validatorAddress> <amountToBond> --from <delegatorAddress> --gas auto --gas-adjustment 1.5 --gas-prices <gasPrice> --generate-only > unsignedTX.json +``` + +In order to sign, you will also need the `chain-id`, `account-number` and `sequence`. The `chain-id` is a unique identifier for the blockchain on which you are submitting the transaction. The `account-number` is an identifier generated when your account first receives funds. The `sequence` number is used to keep track of the number of transactions you have sent and prevent replay attacks. + +Get the chain-id from the genesis file (`cosmoshub-1`), and the two other fields using the account query: + +```bash +gaiacli query account <yourAddress> --chain-id cosmoshub-1 ``` Then, copy `unsignedTx.json` and transfer it (e.g. via USB) to the offline computer. If it is not done already, [create an account on the offline computer](#using-a-computer). For additional security, you can double check the parameters of your transaction before signing it using the following command: @@ -476,10 +484,10 @@ Then, copy `unsignedTx.json` and transfer it (e.g. via USB) to the offline compu cat unsignedTx.json ``` -Now, sign the transaction using the following command: +Now, sign the transaction using the following command. You will need the `chain-id`, `sequence` and `account-number` obtained earlier: ```bash -gaiacli tx sign unsignedTx.json --from <delegatorKeyName> > signedTx.json +gaiacli tx sign unsignedTx.json --from <delegatorKeyName> --offline --chain-id cosmoshub-1 --sequence <sequence> --account-number <account-number> > signedTx.json ``` Copy `signedTx.json` and transfer it back to the online computer. Finally, use the following command to broadcast the transaction: diff --git a/docs/gaia/installation.md b/docs/gaia/installation.md index 74d0ea30f0..f35568ebb1 100644 --- a/docs/gaia/installation.md +++ b/docs/gaia/installation.md @@ -11,6 +11,7 @@ mkdir -p $HOME/go/bin echo "export GOPATH=$HOME/go" >> ~/.bash_profile echo "export GOBIN=$GOPATH/bin" >> ~/.bash_profile echo "export PATH=$PATH:$GOBIN" >> ~/.bash_profile +source ~/.bash_profile ``` ::: tip From da17a6d7253e258a286d72c92205b9c819666102 Mon Sep 17 00:00:00 2001 From: frog power 4000 <rigel.rozanski@gmail.com> Date: Tue, 2 Apr 2019 10:24:46 -0400 Subject: [PATCH 12/37] Merge PR #3999: Fix distribution zero height export bug --- .pending/bugfixes/gaia/3999-fix-distribution-export | 1 + cmd/gaia/app/export.go | 1 + 2 files changed, 2 insertions(+) create mode 100644 .pending/bugfixes/gaia/3999-fix-distribution-export diff --git a/.pending/bugfixes/gaia/3999-fix-distribution-export b/.pending/bugfixes/gaia/3999-fix-distribution-export new file mode 100644 index 0000000000..25d34de6c4 --- /dev/null +++ b/.pending/bugfixes/gaia/3999-fix-distribution-export @@ -0,0 +1 @@ +#3999 Fix distribution delegation for zero height export bug diff --git a/cmd/gaia/app/export.go b/cmd/gaia/app/export.go index 3bd4393962..773a718388 100644 --- a/cmd/gaia/app/export.go +++ b/cmd/gaia/app/export.go @@ -118,6 +118,7 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailWhiteList []st // reinitialize all delegations for _, del := range dels { app.distrKeeper.Hooks().BeforeDelegationCreated(ctx, del.DelegatorAddress, del.ValidatorAddress) + app.distrKeeper.Hooks().AfterDelegationModified(ctx, del.DelegatorAddress, del.ValidatorAddress) } // reset context height From 1822dee416d77afc434f332abfc85c9b2f189595 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Date: Tue, 2 Apr 2019 10:27:37 -0400 Subject: [PATCH 13/37] Update CHANGELOG --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3eeb79a92..96338760e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.31.1 + +### Bug Fixes + +#### Gaia + +* [\#3999](https://github.com/cosmos/cosmos-sdk/issues/3999) Fix distribution delegation for zero height export bug + ## 0.33.0 BREAKING CHANGES From 7d85a064225bc2c57f4dbf4c3af5db0f9e47ed01 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Date: Tue, 2 Apr 2019 10:34:17 -0400 Subject: [PATCH 14/37] Fix link in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96338760e0..1f03ff1670 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ #### Gaia -* [\#3999](https://github.com/cosmos/cosmos-sdk/issues/3999) Fix distribution delegation for zero height export bug +* [\#3999](https://github.com/cosmos/cosmos-sdk/pull/3999) Fix distribution delegation for zero height export bug ## 0.33.0 From cc534d73944684591ffade09f1721e5b589f966e Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Date: Tue, 2 Apr 2019 10:41:29 -0400 Subject: [PATCH 15/37] Remove pending log --- .pending/bugfixes/gaia/3999-fix-distribution-export | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .pending/bugfixes/gaia/3999-fix-distribution-export diff --git a/.pending/bugfixes/gaia/3999-fix-distribution-export b/.pending/bugfixes/gaia/3999-fix-distribution-export deleted file mode 100644 index 25d34de6c4..0000000000 --- a/.pending/bugfixes/gaia/3999-fix-distribution-export +++ /dev/null @@ -1 +0,0 @@ -#3999 Fix distribution delegation for zero height export bug From d0152b35c162e1d66a360927a3f24855a26141d4 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Date: Tue, 2 Apr 2019 10:56:35 -0400 Subject: [PATCH 16/37] Fix version in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f03ff1670..6b37137b26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 0.31.1 +## 0.33.1 ### Bug Fixes From fd957f2c545f4c867b62d5f040d5a503122ed4af Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Date: Wed, 3 Apr 2019 09:38:46 -0400 Subject: [PATCH 17/37] Update CHANGELOG --- CHANGELOG.md | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3eeb79a92..cd1b6ed356 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,119 @@ # Changelog +## 0.34.0 + +### Breaking Changes + +#### Gaia + +* [\#3463](https://github.com/cosmos/cosmos-sdk/issues/3463) Revert bank module handler fork (re-enables transfers) +* [\#3875](https://github.com/cosmos/cosmos-sdk/issues/3875) Replace `async` flag with `--broadcast-mode` flag where the default + value is `sync`. The `block` mode should not be used. The REST client now + uses `mode` parameter instead of the `return` parameter. + +#### Gaia CLI + +* [\#3938](https://github.com/cosmos/cosmos-sdk/issues/3938) Remove REST server's SSL support altogether. + +#### SDK + +* [\#3245](https://github.com/cosmos/cosmos-sdk/issues/3245) Rename validator.GetJailed() to validator.IsJailed() +* [\#3516](https://github.com/cosmos/cosmos-sdk/issues/3516) Remove concept of shares from staking unbonding and redelegation UX; + replaced by direct coin amount. + +#### Tendermint + +* [\#4029](https://github.com/cosmos/cosmos-sdk/issues/4029) Upgrade Tendermint to v0.31.3 + +### New features + +#### SDK + +* [\#2935](https://github.com/cosmos/cosmos-sdk/issues/2935) New module Crisis which can test broken invariant with messages +* [\#3813](https://github.com/cosmos/cosmos-sdk/issues/3813) New sdk.NewCoins safe constructor to replace bare sdk.Coins{} declarations. +* [\#3858](https://github.com/cosmos/cosmos-sdk/issues/3858) add website, details and identity to gentx cli command +* Implement coin conversion and denomination registration utilities + +#### Gaia + +* [\#2935](https://github.com/cosmos/cosmos-sdk/issues/2935) Optionally assert invariants on a blockly basis using `gaiad --assert-invariants-blockly` +* [\#3886](https://github.com/cosmos/cosmos-sdk/issues/3886) Implement minting module querier and CLI/REST clients. + +#### Gaia CLI + +* [\#3937](https://github.com/cosmos/cosmos-sdk/issues/3937) Add command to query community-pool + +#### Gaia REST API + +* [\#3937](https://github.com/cosmos/cosmos-sdk/issues/3937) Add route to fetch community-pool +* [\#3949](https://github.com/cosmos/cosmos-sdk/issues/3949) added /slashing/signing_infos to get signing_info for all validators + +### Improvements + +#### Gaia + +* [\#3808](https://github.com/cosmos/cosmos-sdk/issues/3808) `gaiad` and `gaiacli` integration tests use ./build/ binaries. +* \[\#3819](https://github.com/cosmos/cosmos-sdk/issues/3819) Simulation refactor, log output now stored in ~/.gaiad/simulation/ + * Simulation moved to its own module (not a part of mock) + * Logger type instead of passing function variables everywhere + * Logger json output (for reloadable simulation running) + * Cleanup bank simulation messages / remove dup code in bank simulation + * Simulations saved in `~/.gaiad/simulations/` + * "Lean" simulation output option to exclude No-ops and !ok functions (`--SimulationLean` flag) +* [\#3893](https://github.com/cosmos/cosmos-sdk/issues/3893) Improve `gaiacli tx sign` command + * Add shorthand flags -a and -s for the account and sequence numbers respectively + * Mark the account and sequence numbers required during "offline" mode + * Always do an RPC query for account and sequence number during "online" mode + +#### Gaia CLI + +* [\#3833](https://github.com/cosmos/cosmos-sdk/issues/3833) Modify stake to atom in gaia's doc. +* [\#3841](https://github.com/cosmos/cosmos-sdk/issues/3841) Add indent to JSON of `gaiacli keys [add|show|list]` +* [\#3859](https://github.com/cosmos/cosmos-sdk/issues/3859) Add newline to echo of `gaiacli keys ...` +* [\#3959](https://github.com/cosmos/cosmos-sdk/issues/3959) Improving error messages when signing with ledger devices fails + +#### SDK + +* [\#3238](https://github.com/cosmos/cosmos-sdk/issues/3238) Add block time to tx responses when querying for + txs by tags or hash. +* \[\#3752](https://github.com/cosmos/cosmos-sdk/issues/3752) Explanatory docs for minting mechanism (`docs/spec/mint/01_concepts.md`) +* [\#3801](https://github.com/cosmos/cosmos-sdk/issues/3801) `baseapp` safety improvements +* [\#3820](https://github.com/cosmos/cosmos-sdk/issues/3820) Make Coins.IsAllGT() more robust and consistent. +* [\#3828](https://github.com/cosmos/cosmos-sdk/issues/3828) New sdkch tool to maintain changelogs +* [\#3864](https://github.com/cosmos/cosmos-sdk/issues/3864) Make Coins.IsAllGTE() more consistent. +* [\#3907](https://github.com/cosmos/cosmos-sdk/issues/3907): dep -> go mod migration + - Drop dep in favor of go modules. + - Upgrade to Go 1.12.1. +* [\#3917](https://github.com/cosmos/cosmos-sdk/issues/3917) Allow arbitrary decreases to validator commission rates. +* [\#3937](https://github.com/cosmos/cosmos-sdk/issues/3937) Implement community pool querier. +* [\#3940](https://github.com/cosmos/cosmos-sdk/issues/3940) Codespace should be lowercase. +* [\#3986](https://github.com/cosmos/cosmos-sdk/issues/3986) Update the Stringer implementation of the Proposal type. +* \[\#926](https://github.com/cosmos/cosmos-sdk/issues/926) circuit breaker high level explanation +* Fixed various linters warnings in the context of the gometalinter -> golangci-lint migration [\#3896](https://github.com/cosmos/cosmos-sdk/issues/3896). + +### Bug Fixes + +#### Gaia + +* [\#3825](https://github.com/cosmos/cosmos-sdk/issues/3825) Validate genesis before running gentx +* [\#3889](https://github.com/cosmos/cosmos-sdk/issues/3889) When `--generate-only` is provided, the Keybase is not used and as a result + the `--from` value must be a valid Bech32 cosmos address. +* 3974 Fix go env setting in installation.md +* 3996 Change 'make get_tools' to 'make tools' in DOCS_README.md. + +#### Gaia CLI + +* [\#3883](https://github.com/cosmos/cosmos-sdk/issues/3883) Remove Height Flag from CLI Queries +* [\#3899](https://github.com/cosmos/cosmos-sdk/issues/3899) Using 'gaiacli config node' breaks ~/config/config.toml + +#### SDK + +* [\#3837](https://github.com/cosmos/cosmos-sdk/issues/3837) Fix `WithdrawValidatorCommission` to properly set the validator's remaining commission. +* [\#3870](https://github.com/cosmos/cosmos-sdk/issues/3870) Fix DecCoins#TruncateDecimal to never return zero coins in + either the truncated coins or the change coins. +* [\#3915](https://github.com/cosmos/cosmos-sdk/issues/3915) Remove ';' delimiting support from ParseDecCoins +* [\#3977](https://github.com/cosmos/cosmos-sdk/issues/3977) Fix docker image build + ## 0.33.0 BREAKING CHANGES From d8833d760d9ec2ad61e3fce45195a2916b71f9f5 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Date: Wed, 3 Apr 2019 09:39:06 -0400 Subject: [PATCH 18/37] Remove pending files --- ...63-Revert-bank-module-handler-fork-re-enables-transfers | 1 - ...async-flag-with---broadcast-mode-flag-where-the-default | 3 --- .pending/breaking/gaiacli/Remove-REST-server-s | 1 - .pending/breaking/sdk/3245-Rename-validato | 1 - ...pt-of-shares-from-staking-unbonding-and-redelegation-UX | 2 -- .../breaking/tendermint/4029-Upgrade-Tendermint-to-v0-31-3 | 1 - .../gaia/3825-Validate-genesis-before-running-gentx | 1 - ...nly-is-provided-the-Keybase-is-not-used-and-as-a-result | 2 -- .pending/bugfixes/gaia/3974-Fix-go-env-sett | 1 - .pending/bugfixes/gaia/3996-Change-make-get | 1 - .pending/bugfixes/gaiacli/3883-Remove-Height-F | 1 - .pending/bugfixes/gaiacli/3899-Using-gaiacli-c | 1 - ...on-to-properly-set-the-validator-s-remaining-commission | 1 - ...-DecCoins-TruncateDecimal-to-never-return-zero-coins-in | 2 -- .../sdk/3915-Remove-delimiting-support-from-ParseDecCoins | 1 - .pending/bugfixes/sdk/3977-Fix-docker-imag | 1 - .pending/features/gaia/2935-optionally-asse | 1 - ...6-Implement-minting-module-querier-and-CLI-REST-clients | 1 - .../gaiacli/3937-Add-command-to-query-community-pool | 1 - .../gaiarest/3937-Add-route-to-fetch-community-pool | 1 - ...ors-signing_info-to-get-signing_info-for-all-validators | 1 - .pending/features/sdk/2935-New-module-Cris | 1 - .../3813-New-sdk-NewCoins-safe-constructor-to-replace-bare | 1 - ...8-add-website-details-and-identity-to-gentx-cli-command | 1 - ...coin-conversion-and-denomination-registration-utilities | 1 - ...-gaiad-and-gaiacli-integration-tests-use-build-binaries | 1 - .pending/improvements/gaia/3819-Simulation-refa | 7 ------- .../improvements/gaia/3893-Improve-gaiacli-tx-sign-command | 4 ---- .pending/improvements/gaiacli/3833-Modify-stake-to | 1 - .pending/improvements/gaiacli/3841-Add-indent-to-J | 1 - .../gaiacli/3859-Add-newline-to-echo-of-gaiacli-keys | 1 - ...g-error-messages-when-signing-with-ledger-devices-fails | 1 - .../3238-Add-block-time-to-tx-responses-when-querying-for | 2 -- .pending/improvements/sdk/3752-Explanatory-doc | 1 - .pending/improvements/sdk/3801-baseapp-safety-improvements | 1 - .../sdk/3820-Make-Coins-IsAllGT-more-robust-and-consistent | 1 - .../sdk/3828-New-sdkch-tool-to-maintain-changelogs | 1 - .../sdk/3864-Make-Coins-IsAllGTE-more-consistent | 1 - .pending/improvements/sdk/3907-Drop-dep-in-fav | 3 --- ...Allow-arbitrary-decreases-to-validator-commission-rates | 1 - .../improvements/sdk/3937-Implement-community-pool-querier | 1 - .pending/improvements/sdk/3940-Codespace-shoul | 1 - ...Update-the-Stringer-implementation-of-the-Proposal-type | 1 - .pending/improvements/sdk/926-circuit-breaker- | 1 - .pending/improvements/sdk/Fixed-various-linter | 1 - 45 files changed, 62 deletions(-) delete mode 100644 .pending/breaking/gaia/3463-Revert-bank-module-handler-fork-re-enables-transfers delete mode 100644 .pending/breaking/gaia/3875-Replace-async-flag-with---broadcast-mode-flag-where-the-default delete mode 100644 .pending/breaking/gaiacli/Remove-REST-server-s delete mode 100644 .pending/breaking/sdk/3245-Rename-validato delete mode 100644 .pending/breaking/sdk/3516-Remove-concept-of-shares-from-staking-unbonding-and-redelegation-UX delete mode 100644 .pending/breaking/tendermint/4029-Upgrade-Tendermint-to-v0-31-3 delete mode 100644 .pending/bugfixes/gaia/3825-Validate-genesis-before-running-gentx delete mode 100644 .pending/bugfixes/gaia/3889-When---generate-only-is-provided-the-Keybase-is-not-used-and-as-a-result delete mode 100644 .pending/bugfixes/gaia/3974-Fix-go-env-sett delete mode 100644 .pending/bugfixes/gaia/3996-Change-make-get delete mode 100644 .pending/bugfixes/gaiacli/3883-Remove-Height-F delete mode 100644 .pending/bugfixes/gaiacli/3899-Using-gaiacli-c delete mode 100644 .pending/bugfixes/sdk/3837-Fix-WithdrawValidatorCommission-to-properly-set-the-validator-s-remaining-commission delete mode 100644 .pending/bugfixes/sdk/3870-Fix-DecCoins-TruncateDecimal-to-never-return-zero-coins-in delete mode 100644 .pending/bugfixes/sdk/3915-Remove-delimiting-support-from-ParseDecCoins delete mode 100644 .pending/bugfixes/sdk/3977-Fix-docker-imag delete mode 100644 .pending/features/gaia/2935-optionally-asse delete mode 100644 .pending/features/gaia/3886-Implement-minting-module-querier-and-CLI-REST-clients delete mode 100644 .pending/features/gaiacli/3937-Add-command-to-query-community-pool delete mode 100644 .pending/features/gaiarest/3937-Add-route-to-fetch-community-pool delete mode 100644 .pending/features/gaiarest/3949-added-slashing-validators-signing_info-to-get-signing_info-for-all-validators delete mode 100644 .pending/features/sdk/2935-New-module-Cris delete mode 100644 .pending/features/sdk/3813-New-sdk-NewCoins-safe-constructor-to-replace-bare delete mode 100644 .pending/features/sdk/3858-add-website-details-and-identity-to-gentx-cli-command delete mode 100644 .pending/features/sdk/Implement-coin-conversion-and-denomination-registration-utilities delete mode 100644 .pending/improvements/gaia/3808-gaiad-and-gaiacli-integration-tests-use-build-binaries delete mode 100644 .pending/improvements/gaia/3819-Simulation-refa delete mode 100644 .pending/improvements/gaia/3893-Improve-gaiacli-tx-sign-command delete mode 100644 .pending/improvements/gaiacli/3833-Modify-stake-to delete mode 100644 .pending/improvements/gaiacli/3841-Add-indent-to-J delete mode 100644 .pending/improvements/gaiacli/3859-Add-newline-to-echo-of-gaiacli-keys delete mode 100644 .pending/improvements/gaiacli/3959-Improving-error-messages-when-signing-with-ledger-devices-fails delete mode 100644 .pending/improvements/sdk/3238-Add-block-time-to-tx-responses-when-querying-for delete mode 100644 .pending/improvements/sdk/3752-Explanatory-doc delete mode 100644 .pending/improvements/sdk/3801-baseapp-safety-improvements delete mode 100644 .pending/improvements/sdk/3820-Make-Coins-IsAllGT-more-robust-and-consistent delete mode 100644 .pending/improvements/sdk/3828-New-sdkch-tool-to-maintain-changelogs delete mode 100644 .pending/improvements/sdk/3864-Make-Coins-IsAllGTE-more-consistent delete mode 100644 .pending/improvements/sdk/3907-Drop-dep-in-fav delete mode 100644 .pending/improvements/sdk/3917-Allow-arbitrary-decreases-to-validator-commission-rates delete mode 100644 .pending/improvements/sdk/3937-Implement-community-pool-querier delete mode 100644 .pending/improvements/sdk/3940-Codespace-shoul delete mode 100644 .pending/improvements/sdk/3986-Update-the-Stringer-implementation-of-the-Proposal-type delete mode 100644 .pending/improvements/sdk/926-circuit-breaker- delete mode 100644 .pending/improvements/sdk/Fixed-various-linter diff --git a/.pending/breaking/gaia/3463-Revert-bank-module-handler-fork-re-enables-transfers b/.pending/breaking/gaia/3463-Revert-bank-module-handler-fork-re-enables-transfers deleted file mode 100644 index 02589d3117..0000000000 --- a/.pending/breaking/gaia/3463-Revert-bank-module-handler-fork-re-enables-transfers +++ /dev/null @@ -1 +0,0 @@ -#3463 Revert bank module handler fork (re-enables transfers) diff --git a/.pending/breaking/gaia/3875-Replace-async-flag-with---broadcast-mode-flag-where-the-default b/.pending/breaking/gaia/3875-Replace-async-flag-with---broadcast-mode-flag-where-the-default deleted file mode 100644 index dbbf6928aa..0000000000 --- a/.pending/breaking/gaia/3875-Replace-async-flag-with---broadcast-mode-flag-where-the-default +++ /dev/null @@ -1,3 +0,0 @@ -#3875 Replace `async` flag with `--broadcast-mode` flag where the default -value is `sync`. The `block` mode should not be used. The REST client now -uses `mode` parameter instead of the `return` parameter. diff --git a/.pending/breaking/gaiacli/Remove-REST-server-s b/.pending/breaking/gaiacli/Remove-REST-server-s deleted file mode 100644 index e308511133..0000000000 --- a/.pending/breaking/gaiacli/Remove-REST-server-s +++ /dev/null @@ -1 +0,0 @@ -#3938 Remove REST server's SSL support altogether. diff --git a/.pending/breaking/sdk/3245-Rename-validato b/.pending/breaking/sdk/3245-Rename-validato deleted file mode 100644 index 3886cfb6c9..0000000000 --- a/.pending/breaking/sdk/3245-Rename-validato +++ /dev/null @@ -1 +0,0 @@ -#3245 Rename validator.GetJailed() to validator.IsJailed() \ No newline at end of file diff --git a/.pending/breaking/sdk/3516-Remove-concept-of-shares-from-staking-unbonding-and-redelegation-UX b/.pending/breaking/sdk/3516-Remove-concept-of-shares-from-staking-unbonding-and-redelegation-UX deleted file mode 100644 index b8153c345a..0000000000 --- a/.pending/breaking/sdk/3516-Remove-concept-of-shares-from-staking-unbonding-and-redelegation-UX +++ /dev/null @@ -1,2 +0,0 @@ -#3516 Remove concept of shares from staking unbonding and redelegation UX; -replaced by direct coin amount. diff --git a/.pending/breaking/tendermint/4029-Upgrade-Tendermint-to-v0-31-3 b/.pending/breaking/tendermint/4029-Upgrade-Tendermint-to-v0-31-3 deleted file mode 100644 index fd59019084..0000000000 --- a/.pending/breaking/tendermint/4029-Upgrade-Tendermint-to-v0-31-3 +++ /dev/null @@ -1 +0,0 @@ -#4029 Upgrade Tendermint to v0.31.3 diff --git a/.pending/bugfixes/gaia/3825-Validate-genesis-before-running-gentx b/.pending/bugfixes/gaia/3825-Validate-genesis-before-running-gentx deleted file mode 100644 index 6e70b1f392..0000000000 --- a/.pending/bugfixes/gaia/3825-Validate-genesis-before-running-gentx +++ /dev/null @@ -1 +0,0 @@ -#3825 Validate genesis before running gentx \ No newline at end of file diff --git a/.pending/bugfixes/gaia/3889-When---generate-only-is-provided-the-Keybase-is-not-used-and-as-a-result b/.pending/bugfixes/gaia/3889-When---generate-only-is-provided-the-Keybase-is-not-used-and-as-a-result deleted file mode 100644 index cdeff1d63f..0000000000 --- a/.pending/bugfixes/gaia/3889-When---generate-only-is-provided-the-Keybase-is-not-used-and-as-a-result +++ /dev/null @@ -1,2 +0,0 @@ -#3889 When `--generate-only` is provided, the Keybase is not used and as a result -the `--from` value must be a valid Bech32 cosmos address. diff --git a/.pending/bugfixes/gaia/3974-Fix-go-env-sett b/.pending/bugfixes/gaia/3974-Fix-go-env-sett deleted file mode 100644 index e71f42b754..0000000000 --- a/.pending/bugfixes/gaia/3974-Fix-go-env-sett +++ /dev/null @@ -1 +0,0 @@ -3974 Fix go env setting in installation.md \ No newline at end of file diff --git a/.pending/bugfixes/gaia/3996-Change-make-get b/.pending/bugfixes/gaia/3996-Change-make-get deleted file mode 100644 index 24cebfb7e2..0000000000 --- a/.pending/bugfixes/gaia/3996-Change-make-get +++ /dev/null @@ -1 +0,0 @@ -3996 Change 'make get_tools' to 'make tools' in DOCS_README.md. \ No newline at end of file diff --git a/.pending/bugfixes/gaiacli/3883-Remove-Height-F b/.pending/bugfixes/gaiacli/3883-Remove-Height-F deleted file mode 100644 index 3b266da542..0000000000 --- a/.pending/bugfixes/gaiacli/3883-Remove-Height-F +++ /dev/null @@ -1 +0,0 @@ -#3883 Remove Height Flag from CLI Queries \ No newline at end of file diff --git a/.pending/bugfixes/gaiacli/3899-Using-gaiacli-c b/.pending/bugfixes/gaiacli/3899-Using-gaiacli-c deleted file mode 100644 index 0e732b58ab..0000000000 --- a/.pending/bugfixes/gaiacli/3899-Using-gaiacli-c +++ /dev/null @@ -1 +0,0 @@ -#3899 Using 'gaiacli config node' breaks ~/config/config.toml \ No newline at end of file diff --git a/.pending/bugfixes/sdk/3837-Fix-WithdrawValidatorCommission-to-properly-set-the-validator-s-remaining-commission b/.pending/bugfixes/sdk/3837-Fix-WithdrawValidatorCommission-to-properly-set-the-validator-s-remaining-commission deleted file mode 100644 index 4a46c3d2b3..0000000000 --- a/.pending/bugfixes/sdk/3837-Fix-WithdrawValidatorCommission-to-properly-set-the-validator-s-remaining-commission +++ /dev/null @@ -1 +0,0 @@ -#3837 Fix `WithdrawValidatorCommission` to properly set the validator's remaining commission. diff --git a/.pending/bugfixes/sdk/3870-Fix-DecCoins-TruncateDecimal-to-never-return-zero-coins-in b/.pending/bugfixes/sdk/3870-Fix-DecCoins-TruncateDecimal-to-never-return-zero-coins-in deleted file mode 100644 index f84e6217c0..0000000000 --- a/.pending/bugfixes/sdk/3870-Fix-DecCoins-TruncateDecimal-to-never-return-zero-coins-in +++ /dev/null @@ -1,2 +0,0 @@ -#3870 Fix DecCoins#TruncateDecimal to never return zero coins in -either the truncated coins or the change coins. diff --git a/.pending/bugfixes/sdk/3915-Remove-delimiting-support-from-ParseDecCoins b/.pending/bugfixes/sdk/3915-Remove-delimiting-support-from-ParseDecCoins deleted file mode 100644 index 343d1a79e0..0000000000 --- a/.pending/bugfixes/sdk/3915-Remove-delimiting-support-from-ParseDecCoins +++ /dev/null @@ -1 +0,0 @@ -#3915 Remove ';' delimiting support from ParseDecCoins diff --git a/.pending/bugfixes/sdk/3977-Fix-docker-imag b/.pending/bugfixes/sdk/3977-Fix-docker-imag deleted file mode 100644 index 82bf994dc4..0000000000 --- a/.pending/bugfixes/sdk/3977-Fix-docker-imag +++ /dev/null @@ -1 +0,0 @@ -#3977 Fix docker image build diff --git a/.pending/features/gaia/2935-optionally-asse b/.pending/features/gaia/2935-optionally-asse deleted file mode 100644 index 2832fe8e6f..0000000000 --- a/.pending/features/gaia/2935-optionally-asse +++ /dev/null @@ -1 +0,0 @@ -#2935 Optionally assert invariants on a blockly basis using `gaiad --assert-invariants-blockly` diff --git a/.pending/features/gaia/3886-Implement-minting-module-querier-and-CLI-REST-clients b/.pending/features/gaia/3886-Implement-minting-module-querier-and-CLI-REST-clients deleted file mode 100644 index 480f542e7a..0000000000 --- a/.pending/features/gaia/3886-Implement-minting-module-querier-and-CLI-REST-clients +++ /dev/null @@ -1 +0,0 @@ -#3886 Implement minting module querier and CLI/REST clients. diff --git a/.pending/features/gaiacli/3937-Add-command-to-query-community-pool b/.pending/features/gaiacli/3937-Add-command-to-query-community-pool deleted file mode 100644 index d5ec2f09fe..0000000000 --- a/.pending/features/gaiacli/3937-Add-command-to-query-community-pool +++ /dev/null @@ -1 +0,0 @@ -#3937 Add command to query community-pool \ No newline at end of file diff --git a/.pending/features/gaiarest/3937-Add-route-to-fetch-community-pool b/.pending/features/gaiarest/3937-Add-route-to-fetch-community-pool deleted file mode 100644 index 0cf25bcacb..0000000000 --- a/.pending/features/gaiarest/3937-Add-route-to-fetch-community-pool +++ /dev/null @@ -1 +0,0 @@ -#3937 Add route to fetch community-pool \ No newline at end of file diff --git a/.pending/features/gaiarest/3949-added-slashing-validators-signing_info-to-get-signing_info-for-all-validators b/.pending/features/gaiarest/3949-added-slashing-validators-signing_info-to-get-signing_info-for-all-validators deleted file mode 100644 index 048f24cda0..0000000000 --- a/.pending/features/gaiarest/3949-added-slashing-validators-signing_info-to-get-signing_info-for-all-validators +++ /dev/null @@ -1 +0,0 @@ -#3949 added /slashing/signing_infos to get signing_info for all validators \ No newline at end of file diff --git a/.pending/features/sdk/2935-New-module-Cris b/.pending/features/sdk/2935-New-module-Cris deleted file mode 100644 index f036ad14d6..0000000000 --- a/.pending/features/sdk/2935-New-module-Cris +++ /dev/null @@ -1 +0,0 @@ -#2935 New module Crisis which can test broken invariant with messages diff --git a/.pending/features/sdk/3813-New-sdk-NewCoins-safe-constructor-to-replace-bare b/.pending/features/sdk/3813-New-sdk-NewCoins-safe-constructor-to-replace-bare deleted file mode 100644 index bd25be4feb..0000000000 --- a/.pending/features/sdk/3813-New-sdk-NewCoins-safe-constructor-to-replace-bare +++ /dev/null @@ -1 +0,0 @@ -#3813 New sdk.NewCoins safe constructor to replace bare sdk.Coins{} declarations. diff --git a/.pending/features/sdk/3858-add-website-details-and-identity-to-gentx-cli-command b/.pending/features/sdk/3858-add-website-details-and-identity-to-gentx-cli-command deleted file mode 100644 index 0d55fa7f30..0000000000 --- a/.pending/features/sdk/3858-add-website-details-and-identity-to-gentx-cli-command +++ /dev/null @@ -1 +0,0 @@ -#3858 add website, details and identity to gentx cli command \ No newline at end of file diff --git a/.pending/features/sdk/Implement-coin-conversion-and-denomination-registration-utilities b/.pending/features/sdk/Implement-coin-conversion-and-denomination-registration-utilities deleted file mode 100644 index 4bd7e51e2c..0000000000 --- a/.pending/features/sdk/Implement-coin-conversion-and-denomination-registration-utilities +++ /dev/null @@ -1 +0,0 @@ -Implement coin conversion and denomination registration utilities diff --git a/.pending/improvements/gaia/3808-gaiad-and-gaiacli-integration-tests-use-build-binaries b/.pending/improvements/gaia/3808-gaiad-and-gaiacli-integration-tests-use-build-binaries deleted file mode 100644 index bfe0564348..0000000000 --- a/.pending/improvements/gaia/3808-gaiad-and-gaiacli-integration-tests-use-build-binaries +++ /dev/null @@ -1 +0,0 @@ -#3808 `gaiad` and `gaiacli` integration tests use ./build/ binaries. diff --git a/.pending/improvements/gaia/3819-Simulation-refa b/.pending/improvements/gaia/3819-Simulation-refa deleted file mode 100644 index bc4531f962..0000000000 --- a/.pending/improvements/gaia/3819-Simulation-refa +++ /dev/null @@ -1,7 +0,0 @@ -\#3819 Simulation refactor, log output now stored in ~/.gaiad/simulation/ - * Simulation moved to its own module (not a part of mock) - * Logger type instead of passing function variables everywhere - * Logger json output (for reloadable simulation running) - * Cleanup bank simulation messages / remove dup code in bank simulation - * Simulations saved in `~/.gaiad/simulations/` - * "Lean" simulation output option to exclude No-ops and !ok functions (`--SimulationLean` flag) diff --git a/.pending/improvements/gaia/3893-Improve-gaiacli-tx-sign-command b/.pending/improvements/gaia/3893-Improve-gaiacli-tx-sign-command deleted file mode 100644 index 3d8b67791a..0000000000 --- a/.pending/improvements/gaia/3893-Improve-gaiacli-tx-sign-command +++ /dev/null @@ -1,4 +0,0 @@ -#3893 Improve `gaiacli tx sign` command - * Add shorthand flags -a and -s for the account and sequence numbers respectively - * Mark the account and sequence numbers required during "offline" mode - * Always do an RPC query for account and sequence number during "online" mode diff --git a/.pending/improvements/gaiacli/3833-Modify-stake-to b/.pending/improvements/gaiacli/3833-Modify-stake-to deleted file mode 100644 index f399a0f76e..0000000000 --- a/.pending/improvements/gaiacli/3833-Modify-stake-to +++ /dev/null @@ -1 +0,0 @@ -#3833 Modify stake to atom in gaia's doc. \ No newline at end of file diff --git a/.pending/improvements/gaiacli/3841-Add-indent-to-J b/.pending/improvements/gaiacli/3841-Add-indent-to-J deleted file mode 100644 index b6e9dfb53e..0000000000 --- a/.pending/improvements/gaiacli/3841-Add-indent-to-J +++ /dev/null @@ -1 +0,0 @@ -#3841 Add indent to JSON of `gaiacli keys [add|show|list]` diff --git a/.pending/improvements/gaiacli/3859-Add-newline-to-echo-of-gaiacli-keys b/.pending/improvements/gaiacli/3859-Add-newline-to-echo-of-gaiacli-keys deleted file mode 100644 index c8baf2c004..0000000000 --- a/.pending/improvements/gaiacli/3859-Add-newline-to-echo-of-gaiacli-keys +++ /dev/null @@ -1 +0,0 @@ -#3859 Add newline to echo of `gaiacli keys ...` diff --git a/.pending/improvements/gaiacli/3959-Improving-error-messages-when-signing-with-ledger-devices-fails b/.pending/improvements/gaiacli/3959-Improving-error-messages-when-signing-with-ledger-devices-fails deleted file mode 100644 index ef3315b6ef..0000000000 --- a/.pending/improvements/gaiacli/3959-Improving-error-messages-when-signing-with-ledger-devices-fails +++ /dev/null @@ -1 +0,0 @@ -#3959 Improving error messages when signing with ledger devices fails \ No newline at end of file diff --git a/.pending/improvements/sdk/3238-Add-block-time-to-tx-responses-when-querying-for b/.pending/improvements/sdk/3238-Add-block-time-to-tx-responses-when-querying-for deleted file mode 100644 index d254b93e62..0000000000 --- a/.pending/improvements/sdk/3238-Add-block-time-to-tx-responses-when-querying-for +++ /dev/null @@ -1,2 +0,0 @@ -#3238 Add block time to tx responses when querying for -txs by tags or hash. diff --git a/.pending/improvements/sdk/3752-Explanatory-doc b/.pending/improvements/sdk/3752-Explanatory-doc deleted file mode 100644 index 1179bf065b..0000000000 --- a/.pending/improvements/sdk/3752-Explanatory-doc +++ /dev/null @@ -1 +0,0 @@ -\#3752 Explanatory docs for minting mechanism (`docs/spec/mint/01_concepts.md`) diff --git a/.pending/improvements/sdk/3801-baseapp-safety-improvements b/.pending/improvements/sdk/3801-baseapp-safety-improvements deleted file mode 100644 index c971a2e165..0000000000 --- a/.pending/improvements/sdk/3801-baseapp-safety-improvements +++ /dev/null @@ -1 +0,0 @@ -#3801 `baseapp` safety improvements diff --git a/.pending/improvements/sdk/3820-Make-Coins-IsAllGT-more-robust-and-consistent b/.pending/improvements/sdk/3820-Make-Coins-IsAllGT-more-robust-and-consistent deleted file mode 100644 index b2ee3f547d..0000000000 --- a/.pending/improvements/sdk/3820-Make-Coins-IsAllGT-more-robust-and-consistent +++ /dev/null @@ -1 +0,0 @@ -#3820 Make Coins.IsAllGT() more robust and consistent. diff --git a/.pending/improvements/sdk/3828-New-sdkch-tool-to-maintain-changelogs b/.pending/improvements/sdk/3828-New-sdkch-tool-to-maintain-changelogs deleted file mode 100644 index 46903cfa1d..0000000000 --- a/.pending/improvements/sdk/3828-New-sdkch-tool-to-maintain-changelogs +++ /dev/null @@ -1 +0,0 @@ -#3828 New sdkch tool to maintain changelogs diff --git a/.pending/improvements/sdk/3864-Make-Coins-IsAllGTE-more-consistent b/.pending/improvements/sdk/3864-Make-Coins-IsAllGTE-more-consistent deleted file mode 100644 index 2b1a3796fe..0000000000 --- a/.pending/improvements/sdk/3864-Make-Coins-IsAllGTE-more-consistent +++ /dev/null @@ -1 +0,0 @@ -#3864 Make Coins.IsAllGTE() more consistent. diff --git a/.pending/improvements/sdk/3907-Drop-dep-in-fav b/.pending/improvements/sdk/3907-Drop-dep-in-fav deleted file mode 100644 index b443e2f1e5..0000000000 --- a/.pending/improvements/sdk/3907-Drop-dep-in-fav +++ /dev/null @@ -1,3 +0,0 @@ -#3907: dep -> go mod migration -- Drop dep in favor of go modules. -- Upgrade to Go 1.12.1. diff --git a/.pending/improvements/sdk/3917-Allow-arbitrary-decreases-to-validator-commission-rates b/.pending/improvements/sdk/3917-Allow-arbitrary-decreases-to-validator-commission-rates deleted file mode 100644 index ab82ac9bd8..0000000000 --- a/.pending/improvements/sdk/3917-Allow-arbitrary-decreases-to-validator-commission-rates +++ /dev/null @@ -1 +0,0 @@ -#3917 Allow arbitrary decreases to validator commission rates. diff --git a/.pending/improvements/sdk/3937-Implement-community-pool-querier b/.pending/improvements/sdk/3937-Implement-community-pool-querier deleted file mode 100644 index 1862a67862..0000000000 --- a/.pending/improvements/sdk/3937-Implement-community-pool-querier +++ /dev/null @@ -1 +0,0 @@ -#3937 Implement community pool querier. diff --git a/.pending/improvements/sdk/3940-Codespace-shoul b/.pending/improvements/sdk/3940-Codespace-shoul deleted file mode 100644 index 0721a2c784..0000000000 --- a/.pending/improvements/sdk/3940-Codespace-shoul +++ /dev/null @@ -1 +0,0 @@ -#3940 Codespace should be lowercase. \ No newline at end of file diff --git a/.pending/improvements/sdk/3986-Update-the-Stringer-implementation-of-the-Proposal-type b/.pending/improvements/sdk/3986-Update-the-Stringer-implementation-of-the-Proposal-type deleted file mode 100644 index 670639d2b9..0000000000 --- a/.pending/improvements/sdk/3986-Update-the-Stringer-implementation-of-the-Proposal-type +++ /dev/null @@ -1 +0,0 @@ -#3986 Update the Stringer implementation of the Proposal type. diff --git a/.pending/improvements/sdk/926-circuit-breaker- b/.pending/improvements/sdk/926-circuit-breaker- deleted file mode 100644 index 9b3321e7de..0000000000 --- a/.pending/improvements/sdk/926-circuit-breaker- +++ /dev/null @@ -1 +0,0 @@ -\#926 circuit breaker high level explanation diff --git a/.pending/improvements/sdk/Fixed-various-linter b/.pending/improvements/sdk/Fixed-various-linter deleted file mode 100644 index 5b6cd8bb20..0000000000 --- a/.pending/improvements/sdk/Fixed-various-linter +++ /dev/null @@ -1 +0,0 @@ -Fixed various linters warnings in the context of the gometalinter -> golangci-lint migration #3896. From ecba8a154a3fd9ae024c220d9694a446d065936e Mon Sep 17 00:00:00 2001 From: gamarin2 <gautier@tendermint.com> Date: Wed, 3 Apr 2019 16:36:19 +0200 Subject: [PATCH 19/37] Merge PR #4037: Fix doc conflicts --- docs/gaia/delegator-guide-cli.md | 12 +----------- docs/gaia/gaiacli.md | 4 ++-- docs/gaia/installation.md | 4 ++-- docs/gaia/join-mainnet.md | 4 ++-- docs/gaia/validators/validator-setup.md | 7 +++---- 5 files changed, 10 insertions(+), 21 deletions(-) diff --git a/docs/gaia/delegator-guide-cli.md b/docs/gaia/delegator-guide-cli.md index 12d37ac581..2a8fdf7b92 100644 --- a/docs/gaia/delegator-guide-cli.md +++ b/docs/gaia/delegator-guide-cli.md @@ -337,7 +337,7 @@ 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` +On Cosmos Hub mainnet, the accepted denom is `uatom` (micro-Atom), where `1atom = 1,000,000uatom` ::: ### A note on gas and fees @@ -470,15 +470,9 @@ If you do not have a ledger device and want to interact with your private key on gaiacli tx staking delegate <validatorAddress> <amountToBond> --from <delegatorAddress> --gas auto --gas-adjustment 1.5 --gas-prices <gasPrice> --generate-only > unsignedTX.json ``` -<<<<<<< HEAD In order to sign, you will also need the `chain-id`, `account-number` and `sequence`. The `chain-id` is a unique identifier for the blockchain on which you are submitting the transaction. The `account-number` is an identifier generated when your account first receives funds. The `sequence` number is used to keep track of the number of transactions you have sent and prevent replay attacks. -Get the chain-id from the genesis file (`cosmoshub-1`), and the two other fields using the account query: -======= -In order to sign, you will also need the `chain-id`, `account-number` and `sequence`. The `account-number` is an identifier generated when your account first receives funds. The `sequence` number is used to keep track of the number of transactions you have sent and prevent replay attacks. - Get the chain-id from the genesis file (`cosmoshub-1`), and the two other information using the `account query`: ->>>>>>> 6371dacb... docs offline procedure improvment + other minor fixes ```bash gaiacli query account <yourAddress> --chain-id cosmoshub-1 @@ -490,11 +484,7 @@ Then, copy `unsignedTx.json` and transfer it (e.g. via USB) to the offline compu cat unsignedTx.json ``` -<<<<<<< HEAD Now, sign the transaction using the following command. You will need the `chain-id`, `sequence` and `account-number` obtained earlier: -======= -Now, sign the transaction using the following command. You will need the `chaind-id`, `sequence` and `account-number` obtained earlier: ->>>>>>> 6371dacb... docs offline procedure improvment + other minor fixes ```bash gaiacli tx sign unsignedTx.json --from <delegatorKeyName> --offline --chain-id cosmoshub-1 --sequence <sequence> --account-number <account-number> > signedTx.json diff --git a/docs/gaia/gaiacli.md b/docs/gaia/gaiacli.md index d3cf2a2339..1b56ac9488 100644 --- a/docs/gaia/gaiacli.md +++ b/docs/gaia/gaiacli.md @@ -154,7 +154,7 @@ txs by `gasPrice` in the mempool, so providing higher fees or gas prices may yie e.g. ```bash -gaiacli tx send ... --fees=1000000uatom +gaiacli tx send ... --fees=50000uatom ``` or @@ -575,7 +575,7 @@ 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: `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: +In order for a proposal to be broadcasted to the network, the amount deposited must be above a `minDeposit` value (initial value: `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> "10000000uatom" \ diff --git a/docs/gaia/installation.md b/docs/gaia/installation.md index 20e5ffa44a..48f0f71a74 100644 --- a/docs/gaia/installation.md +++ b/docs/gaia/installation.md @@ -9,8 +9,8 @@ Install `go` by following the [official docs](https://golang.org/doc/install). R ```bash mkdir -p $HOME/go/bin echo "export GOPATH=$HOME/go" >> ~/.bash_profile -echo "export GOBIN=\$GOPATH/bin" >> ~/.bash_profile -echo "export PATH=\$PATH:\$GOBIN" >> ~/.bash_profile +echo "export GOBIN=$GOPATH/bin" >> ~/.bash_profile +echo "export PATH=$PATH:$GOBIN" >> ~/.bash_profile source ~/.bash_profile ``` diff --git a/docs/gaia/join-mainnet.md b/docs/gaia/join-mainnet.md index 792f258503..d2feece2e5 100644 --- a/docs/gaia/join-mainnet.md +++ b/docs/gaia/join-mainnet.md @@ -56,7 +56,7 @@ Fetch the testnet's `genesis.json` file into `gaiad`'s config directory. ```bash mkdir -p $HOME/.gaiad/config -curl https://raw.githubusercontent.com/cosmos/launch/master/genesis.json > $HOME/.gaiad/config/genesis.json +curl https://raw.githubusercontent.com/cosmos/launch/master/latest/genesis.json > $HOME/.gaiad/config/genesis.json ``` Note we use the `latest` directory in the [launch repo](https://github.com/cosmos/launch) which contains details for the mainnet like the latest version and the genesis file. @@ -90,7 +90,7 @@ On Cosmos Hub mainnet, the accepted denom is `uatom`, where `1atom = 1.000.000ua 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. diff --git a/docs/gaia/validators/validator-setup.md b/docs/gaia/validators/validator-setup.md index 65992d0e70..134fc5a864 100644 --- a/docs/gaia/validators/validator-setup.md +++ b/docs/gaia/validators/validator-setup.md @@ -58,12 +58,11 @@ You can confirm that you are in the validator set by using a third party explore ## Participate in genesis as a validator ::: warning -This section only concerns validators that want to be in the genesis -file of the Cosmos Hub mainnet. If the mainnet is already live, skip this section. +The genesis ceremony for the Cosmos Hub mainnet is closed. Please skip to the next section. ::: If you want to participate in genesis as a validator, you need to justify that -you have some atoms at genesis, create one (or multiple) transactions to bond these atoms to your validator address, and include this transaction in the genesis file. +you have some stake at genesis, create one (or multiple) transactions to bond this stake to your validator address, and include this transaction in the genesis file. Your `cosmosvalconspub` can be used to create a new validator by staking tokens. You can find your validator pubkey by running: @@ -178,7 +177,7 @@ If you got jailed for downtime, you can get your voting power back to your valid gaiad start ``` -Wait for your full node to catch up to the latest block. Next, run the following command. Then, you can [unjail your validator](#unjail-validator) +Wait for your full node to catch up to the latest block. Then, you can [unjail your validator](#unjail-validator) Lastly, check your validator again to see if your voting power is back. From 0e55b6eada7b5a2c87111df8cbc16759fb0b056b Mon Sep 17 00:00:00 2001 From: Alexander Bezobchuk <alexanderbez@users.noreply.github.com> Date: Wed, 3 Apr 2019 10:49:34 -0400 Subject: [PATCH 20/37] Merge PR #4028: Hex Encode Data in Tx Responses --- .../sdk/3916-Hex-encode-data-in-tx-responses | 1 + client/lcd/lcd_test.go | 24 ++++++++++++++----- types/result.go | 15 ++++++------ 3 files changed, 27 insertions(+), 13 deletions(-) create mode 100644 .pending/improvements/sdk/3916-Hex-encode-data-in-tx-responses diff --git a/.pending/improvements/sdk/3916-Hex-encode-data-in-tx-responses b/.pending/improvements/sdk/3916-Hex-encode-data-in-tx-responses new file mode 100644 index 0000000000..b56154ce06 --- /dev/null +++ b/.pending/improvements/sdk/3916-Hex-encode-data-in-tx-responses @@ -0,0 +1 @@ +#3916 Hex encode data in tx responses diff --git a/client/lcd/lcd_test.go b/client/lcd/lcd_test.go index 0ead2f3636..55c773cfa1 100644 --- a/client/lcd/lcd_test.go +++ b/client/lcd/lcd_test.go @@ -611,7 +611,9 @@ func TestSubmitProposal(t *testing.T) { require.Equal(t, uint32(0), resultTx.Code) var proposalID uint64 - cdc.MustUnmarshalBinaryLengthPrefixed(resultTx.Data, &proposalID) + bz, err := hex.DecodeString(resultTx.Data) + require.NoError(t, err) + cdc.MustUnmarshalBinaryLengthPrefixed(bz, &proposalID) // verify balance acc = getAccount(t, port, addr) @@ -646,7 +648,9 @@ func TestDeposit(t *testing.T) { require.Equal(t, uint32(0), resultTx.Code) var proposalID uint64 - cdc.MustUnmarshalBinaryLengthPrefixed(resultTx.Data, &proposalID) + bz, err := hex.DecodeString(resultTx.Data) + require.NoError(t, err) + cdc.MustUnmarshalBinaryLengthPrefixed(bz, &proposalID) // verify balance acc = getAccount(t, port, addr) @@ -703,7 +707,9 @@ func TestVote(t *testing.T) { require.Equal(t, uint32(0), resultTx.Code) var proposalID uint64 - cdc.MustUnmarshalBinaryLengthPrefixed(resultTx.Data, &proposalID) + bz, err := hex.DecodeString(resultTx.Data) + require.NoError(t, err) + cdc.MustUnmarshalBinaryLengthPrefixed(bz, &proposalID) // verify balance acc = getAccount(t, port, addr) @@ -804,18 +810,24 @@ func TestProposalsQuery(t *testing.T) { // Addr1 proposes (and deposits) proposals #1 and #2 resultTx := doSubmitProposal(t, port, seeds[0], names[0], passwords[0], addrs[0], halfMinDeposit, fees) var proposalID1 uint64 - cdc.MustUnmarshalBinaryLengthPrefixed(resultTx.Data, &proposalID1) + bz, err := hex.DecodeString(resultTx.Data) + require.NoError(t, err) + cdc.MustUnmarshalBinaryLengthPrefixed(bz, &proposalID1) tests.WaitForHeight(resultTx.Height+1, port) resultTx = doSubmitProposal(t, port, seeds[0], names[0], passwords[0], addrs[0], halfMinDeposit, fees) var proposalID2 uint64 - cdc.MustUnmarshalBinaryLengthPrefixed(resultTx.Data, &proposalID2) + bz, err = hex.DecodeString(resultTx.Data) + require.NoError(t, err) + cdc.MustUnmarshalBinaryLengthPrefixed(bz, &proposalID2) tests.WaitForHeight(resultTx.Height+1, port) // Addr2 proposes (and deposits) proposals #3 resultTx = doSubmitProposal(t, port, seeds[1], names[1], passwords[1], addrs[1], halfMinDeposit, fees) var proposalID3 uint64 - cdc.MustUnmarshalBinaryLengthPrefixed(resultTx.Data, &proposalID3) + bz, err = hex.DecodeString(resultTx.Data) + require.NoError(t, err) + cdc.MustUnmarshalBinaryLengthPrefixed(bz, &proposalID3) tests.WaitForHeight(resultTx.Height+1, port) // Addr2 deposits on proposals #2 & #3 diff --git a/types/result.go b/types/result.go index 9b679b3860..e83ed56e16 100644 --- a/types/result.go +++ b/types/result.go @@ -1,6 +1,7 @@ package types import ( + "encoding/hex" "encoding/json" "fmt" "strings" @@ -67,7 +68,7 @@ type TxResponse struct { Height int64 `json:"height"` TxHash string `json:"txhash"` Code uint32 `json:"code,omitempty"` - Data []byte `json:"data,omitempty"` + Data string `json:"data,omitempty"` RawLog string `json:"raw_log,omitempty"` Logs ABCIMessageLogs `json:"logs,omitempty"` Info string `json:"info,omitempty"` @@ -91,7 +92,7 @@ func NewResponseResultTx(res *ctypes.ResultTx, tx Tx, timestamp string) TxRespon TxHash: res.Hash.String(), Height: res.Height, Code: res.TxResult.Code, - Data: res.TxResult.Data, + Data: strings.ToUpper(hex.EncodeToString(res.TxResult.Data)), RawLog: res.TxResult.Log, Logs: parsedLogs, Info: res.TxResult.Info, @@ -129,7 +130,7 @@ func newTxResponseCheckTx(res *ctypes.ResultBroadcastTxCommit) TxResponse { Height: res.Height, TxHash: txHash, Code: res.CheckTx.Code, - Data: res.CheckTx.Data, + Data: strings.ToUpper(hex.EncodeToString(res.CheckTx.Data)), RawLog: res.CheckTx.Log, Logs: parsedLogs, Info: res.CheckTx.Info, @@ -156,7 +157,7 @@ func newTxResponseDeliverTx(res *ctypes.ResultBroadcastTxCommit) TxResponse { Height: res.Height, TxHash: txHash, Code: res.DeliverTx.Code, - Data: res.DeliverTx.Data, + Data: strings.ToUpper(hex.EncodeToString(res.DeliverTx.Data)), RawLog: res.DeliverTx.Log, Logs: parsedLogs, Info: res.DeliverTx.Info, @@ -177,7 +178,7 @@ func NewResponseFormatBroadcastTx(res *ctypes.ResultBroadcastTx) TxResponse { return TxResponse{ Code: res.Code, - Data: res.Data.Bytes(), + Data: res.Data.String(), RawLog: res.Log, Logs: parsedLogs, TxHash: res.Hash.String(), @@ -200,8 +201,8 @@ func (r TxResponse) String() string { sb.WriteString(fmt.Sprintf(" Code: %d\n", r.Code)) } - if r.Data != nil { - sb.WriteString(fmt.Sprintf(" Data: %s\n", string(r.Data))) + if r.Data != "" { + sb.WriteString(fmt.Sprintf(" Data: %s\n", r.Data)) } if r.RawLog != "" { From 102456273762a8aded1a26b188742fb6c0a4d660 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Date: Wed, 3 Apr 2019 10:51:35 -0400 Subject: [PATCH 21/37] Fix pending log entry --- .../improvements/sdk/3916-Hex-encode-data-in-tx-responses | 1 - CHANGELOG.md | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 .pending/improvements/sdk/3916-Hex-encode-data-in-tx-responses diff --git a/.pending/improvements/sdk/3916-Hex-encode-data-in-tx-responses b/.pending/improvements/sdk/3916-Hex-encode-data-in-tx-responses deleted file mode 100644 index b56154ce06..0000000000 --- a/.pending/improvements/sdk/3916-Hex-encode-data-in-tx-responses +++ /dev/null @@ -1 +0,0 @@ -#3916 Hex encode data in tx responses diff --git a/CHANGELOG.md b/CHANGELOG.md index cd1b6ed356..696fc5ed15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,8 +88,9 @@ * [\#3937](https://github.com/cosmos/cosmos-sdk/issues/3937) Implement community pool querier. * [\#3940](https://github.com/cosmos/cosmos-sdk/issues/3940) Codespace should be lowercase. * [\#3986](https://github.com/cosmos/cosmos-sdk/issues/3986) Update the Stringer implementation of the Proposal type. -* \[\#926](https://github.com/cosmos/cosmos-sdk/issues/926) circuit breaker high level explanation -* Fixed various linters warnings in the context of the gometalinter -> golangci-lint migration [\#3896](https://github.com/cosmos/cosmos-sdk/issues/3896). +* [\#926](https://github.com/cosmos/cosmos-sdk/issues/926) circuit breaker high level explanation +* [\#3896](https://github.com/cosmos/cosmos-sdk/issues/3896) Fixed various linters warnings in the context of the gometalinter -> golangci-lint migration +* [\#3916](https://github.com/cosmos/cosmos-sdk/issues/3916) Hex encode data in tx responses ### Bug Fixes From 9ac6d7b48438b1430614374850b718b83d15b3fc Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Date: Wed, 3 Apr 2019 13:06:40 -0400 Subject: [PATCH 22/37] Update Tendermint to use release/v0.31.0-dev0-fix This change points to a specific release branch of v0.31.0-dev0 which includes critical security fixes. --- Gopkg.lock | 4 ++-- Gopkg.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 42a2b21e7a..4d93145136 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -445,7 +445,7 @@ version = "v0.12.1" [[projects]] - digest = "1:088088db7ae1174ce66abecbca6924e969cd05632053532ed7dadc7cc35f7885" + digest = "1:97ded93050176418272057abf9819a3dea92713a40327e9906ba6deb92896e9d" name = "github.com/tendermint/tendermint" packages = [ "abci/client", @@ -511,7 +511,7 @@ "version", ] pruneopts = "UT" - revision = "v0.31.0-dev0" + revision = "ef39b7101656082f4c76a2031c4f46f2441fdba2" [[projects]] digest = "1:b73f5e117bc7c6e8fc47128f20db48a873324ad5cfeeebfc505e85c58682b5e4" diff --git a/Gopkg.toml b/Gopkg.toml index 4b1fdca789..e4b3e43f20 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -40,7 +40,7 @@ [[override]] name = "github.com/tendermint/tendermint" - revision = "v0.31.0-dev0" + revision = "ef39b7101656082f4c76a2031c4f46f2441fdba2" # release/v0.31.0-dev0-fix [[constraint]] name = "github.com/cosmos/ledger-cosmos-go" From b3b988b76824aacfbd513f1e30294b6bc74ab04c Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Date: Wed, 3 Apr 2019 13:12:08 -0400 Subject: [PATCH 23/37] Use tagged version instead of commit --- Gopkg.lock | 2 +- Gopkg.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 4d93145136..bae3081ff1 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -511,7 +511,7 @@ "version", ] pruneopts = "UT" - revision = "ef39b7101656082f4c76a2031c4f46f2441fdba2" + revision = "v0.31.0-dev0-fix0" [[projects]] digest = "1:b73f5e117bc7c6e8fc47128f20db48a873324ad5cfeeebfc505e85c58682b5e4" diff --git a/Gopkg.toml b/Gopkg.toml index e4b3e43f20..565ba42ba5 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -40,7 +40,7 @@ [[override]] name = "github.com/tendermint/tendermint" - revision = "ef39b7101656082f4c76a2031c4f46f2441fdba2" # release/v0.31.0-dev0-fix + revision = "v0.31.0-dev0-fix0" [[constraint]] name = "github.com/cosmos/ledger-cosmos-go" From 138466ed6f21d2b041aa2ba9c52c098a40833aca Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Date: Wed, 3 Apr 2019 13:15:23 -0400 Subject: [PATCH 24/37] Update Test_multiSigKey_Properties --- client/keys/show_test.go | 4 +- go.mod | 64 +++++++++++++++ go.sum | 167 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 233 insertions(+), 2 deletions(-) create mode 100644 go.mod create mode 100644 go.sum diff --git a/client/keys/show_test.go b/client/keys/show_test.go index f12efb7c53..05dd0de565 100644 --- a/client/keys/show_test.go +++ b/client/keys/show_test.go @@ -23,8 +23,8 @@ func Test_multiSigKey_Properties(t *testing.T) { assert.Equal(t, "myMultisig", tmp.GetName()) assert.Equal(t, keys.TypeMulti, tmp.GetType()) - assert.Equal(t, "79BF2B5B418A85329EC2149D1854D443F56F5A9F", tmp.GetPubKey().Address().String()) - assert.Equal(t, "cosmos10xljkk6p32zn98kzzjw3s4x5g06k7k5lz6flcv", tmp.GetAddress().String()) + assert.Equal(t, "D3923267FA8A3DD367BB768FA8BDC8FF7F89DA3F", tmp.GetPubKey().Address().String()) + assert.Equal(t, "cosmos16wfryel63g7axeamw68630wglalcnk3l0zuadc", tmp.GetAddress().String()) } func Test_showKeysCmd(t *testing.T) { diff --git a/go.mod b/go.mod new file mode 100644 index 0000000000..19da1f1ed3 --- /dev/null +++ b/go.mod @@ -0,0 +1,64 @@ +module github.com/cosmos/cosmos-sdk + +go 1.12 + +require ( + github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d + github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 + github.com/bgentry/speakeasy v0.1.0 + github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d + github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a + github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8 + github.com/cosmos/ledger-cosmos-go v0.9.8 + github.com/davecgh/go-spew v1.1.1 + github.com/ethereum/go-ethereum v1.8.23 + github.com/fsnotify/fsnotify v1.4.7 + github.com/go-kit/kit v0.8.0 + github.com/go-logfmt/logfmt v0.4.0 + github.com/go-stack/stack v1.8.0 + github.com/gogo/protobuf v1.1.1 + github.com/golang/protobuf v1.2.0 + github.com/golang/snappy v0.0.1 + github.com/gorilla/mux v1.7.0 + github.com/gorilla/websocket v1.4.0 + github.com/hashicorp/hcl v1.0.0 + github.com/inconshreveable/mousetrap v1.0.0 + github.com/jmhodges/levigo v1.0.0 + github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 + github.com/magiconair/properties v1.8.0 + github.com/mattn/go-isatty v0.0.6 + github.com/matttproud/golang_protobuf_extensions v1.0.1 + github.com/mitchellh/mapstructure v1.1.2 + github.com/otiai10/copy v0.0.0-20180813032824-7e9a647135a1 + github.com/pelletier/go-toml v1.2.0 + github.com/pkg/errors v0.8.0 + github.com/pmezard/go-difflib v1.0.0 + github.com/prometheus/client_golang v0.9.2 + github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 + github.com/prometheus/common v0.2.0 + github.com/prometheus/procfs v0.0.0-20190227231451-bbced9601137 + github.com/rakyll/statik v0.1.4 + github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165 + github.com/rs/cors v1.6.0 + github.com/spf13/afero v1.2.1 + github.com/spf13/cast v1.3.0 + github.com/spf13/cobra v0.0.3 + github.com/spf13/jwalterweatherman v1.1.0 + github.com/spf13/pflag v1.0.3 + github.com/spf13/viper v1.0.3 + github.com/stretchr/testify v1.2.2 + github.com/syndtr/goleveldb v0.0.0-20180708030551-c4c61651e9e3 + github.com/tendermint/btcd v0.1.1 + github.com/tendermint/go-amino v0.14.1 + github.com/tendermint/iavl v0.12.1 + github.com/tendermint/tendermint v0.31.0-dev0-fix0 + github.com/zondax/hid v0.9.0 + github.com/zondax/ledger-go v0.8.0 + golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 + golang.org/x/net v0.0.0-20181201002055-351d144fa1fc + golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 + golang.org/x/text v0.3.0 + google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 + google.golang.org/grpc v1.19.0 + gopkg.in/yaml.v2 v2.2.2 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000000..d938c9d902 --- /dev/null +++ b/go.sum @@ -0,0 +1,167 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d h1:1aAija9gr0Hyv4KfQcRcwlmFIrhkDmIj2dz5bkg/s/8= +github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d/go.mod h1:icNx/6QdFblhsEjZehARqbNumymUT/ydwlLojFdv7Sk= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d h1:xG8Pj6Y6J760xwETNmMzmlt38QSwz0BLp1cZ09g27uw= +github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= +github.com/btcsuite/btcutil v0.0.0-20180524032703-d4cc87b86016/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a h1:RQMUrEILyYJEoAT34XS/kLu40vC0+po/UfxrBBA4qZE= +github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8 h1:Iwin12wRQtyZhH6FV3ykFcdGNlYEzoeR0jN8Vn+JWsI= +github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/ledger-cosmos-go v0.9.8/go.mod h1:RWldjvUf4Hfi46ti/8etBH3eQ2rOqqz2hstdzROQSHo= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/ethereum/go-ethereum v1.8.23/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/go-kit/kit v0.6.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-isatty v0.0.6 h1:SrwhHcpV4nWrMGdNcC2kXpMfcBVYGDuTArqyhocJgvA= +github.com/mattn/go-isatty v0.0.6/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/otiai10/copy v0.0.0-20180813032824-7e9a647135a1/go.mod h1:pXzZSDlN+HPzSdyIBnKNN9ptD9Hx7iZMWIJPTwo4FPE= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740= +github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.2.0 h1:kUZDBDTdBVBYBj5Tmh2NZLlF60mfjA27rM34b+cVwNU= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190227231451-bbced9601137 h1:3l8oligPtjd4JuM+OZ+U8sjtwFGJs98cdWsqs6QZRWs= +github.com/prometheus/procfs v0.0.0-20190227231451-bbced9601137/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/rakyll/statik v0.1.4/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= +github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165 h1:nkcn14uNmFEuGCb2mBZbBb24RdNRL08b/wb+xBOYpuk= +github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rs/cors v1.6.0 h1:G9tHG9lebljV9mfp9SNPDL36nCDxmo3zTlAf1YgvzmI= +github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/spf13/afero v1.2.1 h1:qgMbHoJbPbw579P+1zVY+6n4nIFuIchaIjzZ/I/Yq8M= +github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/viper v1.0.3 h1:z5LPUc2iz8VLT5Cw1UyrESG6FUUnOGecYGY08BLKSuc= +github.com/spf13/viper v1.0.3/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/syndtr/goleveldb v0.0.0-20180708030551-c4c61651e9e3 h1:sAlSBRDl4psFR3ysKXRSE8ss6Mt90+ma1zRTroTNBJA= +github.com/syndtr/goleveldb v0.0.0-20180708030551-c4c61651e9e3/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= +github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= +github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= +github.com/tendermint/go-amino v0.14.1 h1:o2WudxNfdLNBwMyl2dqOJxiro5rfrEaU0Ugs6offJMk= +github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= +github.com/tendermint/iavl v0.12.1 h1:JDfyhM/Hhrumu1CL1Nxrypm8sNTPYqmeHo1IZLiJoXM= +github.com/tendermint/iavl v0.12.1/go.mod h1:EoKMMv++tDOL5qKKVnoIqtVPshRrEPeJ0WsgDOLAauM= +github.com/tendermint/tendermint v0.31.0-dev0-fix0 h1:FdgB238YmsVQJQA4ggyrQMG5zV/G1Rtt7KYacs6MAFw= +github.com/tendermint/tendermint v0.31.0-dev0-fix0/go.mod h1:ymcPyWblXCplCPQjbOYbrF1fWnpslATMVqiGgWbZrlc= +github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.8.0/go.mod h1:b2vIcu3u9gJoIx4kTWuXOgzGV7FPWeUktqRqVf6feG0= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/net v0.0.0-20180710023853-292b43bbf7cb/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc h1:a3CU5tJYVj92DY2LaA1kUkrsqD5/3mLDhx2NcNqyW+0= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180814072032-4e1fef560951/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/genproto v0.0.0-20180808183934-383e8b2c3b9e/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From c87c5563fa2d16fd404ed6152470d2fcf4452247 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Date: Wed, 3 Apr 2019 13:18:49 -0400 Subject: [PATCH 25/37] Update CHANGELOG --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b37137b26..f2c61e9a96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.33.2 + +### Improvements + +#### Tendermint + +* Upgrade Tendermint to `v0.31.0-dev0-fix0` which includes critical security fixes. + ## 0.33.1 ### Bug Fixes From dba33693c4b714db7c01eb3926edf780be12a8e5 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Date: Wed, 3 Apr 2019 13:20:32 -0400 Subject: [PATCH 26/37] Remove module files --- go.mod | 64 ---------------------- go.sum | 167 --------------------------------------------------------- 2 files changed, 231 deletions(-) delete mode 100644 go.mod delete mode 100644 go.sum diff --git a/go.mod b/go.mod deleted file mode 100644 index 19da1f1ed3..0000000000 --- a/go.mod +++ /dev/null @@ -1,64 +0,0 @@ -module github.com/cosmos/cosmos-sdk - -go 1.12 - -require ( - github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d - github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 - github.com/bgentry/speakeasy v0.1.0 - github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d - github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a - github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8 - github.com/cosmos/ledger-cosmos-go v0.9.8 - github.com/davecgh/go-spew v1.1.1 - github.com/ethereum/go-ethereum v1.8.23 - github.com/fsnotify/fsnotify v1.4.7 - github.com/go-kit/kit v0.8.0 - github.com/go-logfmt/logfmt v0.4.0 - github.com/go-stack/stack v1.8.0 - github.com/gogo/protobuf v1.1.1 - github.com/golang/protobuf v1.2.0 - github.com/golang/snappy v0.0.1 - github.com/gorilla/mux v1.7.0 - github.com/gorilla/websocket v1.4.0 - github.com/hashicorp/hcl v1.0.0 - github.com/inconshreveable/mousetrap v1.0.0 - github.com/jmhodges/levigo v1.0.0 - github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 - github.com/magiconair/properties v1.8.0 - github.com/mattn/go-isatty v0.0.6 - github.com/matttproud/golang_protobuf_extensions v1.0.1 - github.com/mitchellh/mapstructure v1.1.2 - github.com/otiai10/copy v0.0.0-20180813032824-7e9a647135a1 - github.com/pelletier/go-toml v1.2.0 - github.com/pkg/errors v0.8.0 - github.com/pmezard/go-difflib v1.0.0 - github.com/prometheus/client_golang v0.9.2 - github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 - github.com/prometheus/common v0.2.0 - github.com/prometheus/procfs v0.0.0-20190227231451-bbced9601137 - github.com/rakyll/statik v0.1.4 - github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165 - github.com/rs/cors v1.6.0 - github.com/spf13/afero v1.2.1 - github.com/spf13/cast v1.3.0 - github.com/spf13/cobra v0.0.3 - github.com/spf13/jwalterweatherman v1.1.0 - github.com/spf13/pflag v1.0.3 - github.com/spf13/viper v1.0.3 - github.com/stretchr/testify v1.2.2 - github.com/syndtr/goleveldb v0.0.0-20180708030551-c4c61651e9e3 - github.com/tendermint/btcd v0.1.1 - github.com/tendermint/go-amino v0.14.1 - github.com/tendermint/iavl v0.12.1 - github.com/tendermint/tendermint v0.31.0-dev0-fix0 - github.com/zondax/hid v0.9.0 - github.com/zondax/ledger-go v0.8.0 - golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 - golang.org/x/net v0.0.0-20181201002055-351d144fa1fc - golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 - golang.org/x/text v0.3.0 - google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 - google.golang.org/grpc v1.19.0 - gopkg.in/yaml.v2 v2.2.2 -) diff --git a/go.sum b/go.sum deleted file mode 100644 index d938c9d902..0000000000 --- a/go.sum +++ /dev/null @@ -1,167 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d h1:1aAija9gr0Hyv4KfQcRcwlmFIrhkDmIj2dz5bkg/s/8= -github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d/go.mod h1:icNx/6QdFblhsEjZehARqbNumymUT/ydwlLojFdv7Sk= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d h1:xG8Pj6Y6J760xwETNmMzmlt38QSwz0BLp1cZ09g27uw= -github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= -github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20180524032703-d4cc87b86016/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a h1:RQMUrEILyYJEoAT34XS/kLu40vC0+po/UfxrBBA4qZE= -github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= -github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= -github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= -github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8 h1:Iwin12wRQtyZhH6FV3ykFcdGNlYEzoeR0jN8Vn+JWsI= -github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= -github.com/cosmos/ledger-cosmos-go v0.9.8/go.mod h1:RWldjvUf4Hfi46ti/8etBH3eQ2rOqqz2hstdzROQSHo= -github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/ethereum/go-ethereum v1.8.23/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-kit/kit v0.6.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-isatty v0.0.6 h1:SrwhHcpV4nWrMGdNcC2kXpMfcBVYGDuTArqyhocJgvA= -github.com/mattn/go-isatty v0.0.6/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/otiai10/copy v0.0.0-20180813032824-7e9a647135a1/go.mod h1:pXzZSDlN+HPzSdyIBnKNN9ptD9Hx7iZMWIJPTwo4FPE= -github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740= -github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0 h1:kUZDBDTdBVBYBj5Tmh2NZLlF60mfjA27rM34b+cVwNU= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190227231451-bbced9601137 h1:3l8oligPtjd4JuM+OZ+U8sjtwFGJs98cdWsqs6QZRWs= -github.com/prometheus/procfs v0.0.0-20190227231451-bbced9601137/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/rakyll/statik v0.1.4/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= -github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165 h1:nkcn14uNmFEuGCb2mBZbBb24RdNRL08b/wb+xBOYpuk= -github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rs/cors v1.6.0 h1:G9tHG9lebljV9mfp9SNPDL36nCDxmo3zTlAf1YgvzmI= -github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/spf13/afero v1.2.1 h1:qgMbHoJbPbw579P+1zVY+6n4nIFuIchaIjzZ/I/Yq8M= -github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.0.3 h1:z5LPUc2iz8VLT5Cw1UyrESG6FUUnOGecYGY08BLKSuc= -github.com/spf13/viper v1.0.3/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/syndtr/goleveldb v0.0.0-20180708030551-c4c61651e9e3 h1:sAlSBRDl4psFR3ysKXRSE8ss6Mt90+ma1zRTroTNBJA= -github.com/syndtr/goleveldb v0.0.0-20180708030551-c4c61651e9e3/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= -github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= -github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= -github.com/tendermint/go-amino v0.14.1 h1:o2WudxNfdLNBwMyl2dqOJxiro5rfrEaU0Ugs6offJMk= -github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= -github.com/tendermint/iavl v0.12.1 h1:JDfyhM/Hhrumu1CL1Nxrypm8sNTPYqmeHo1IZLiJoXM= -github.com/tendermint/iavl v0.12.1/go.mod h1:EoKMMv++tDOL5qKKVnoIqtVPshRrEPeJ0WsgDOLAauM= -github.com/tendermint/tendermint v0.31.0-dev0-fix0 h1:FdgB238YmsVQJQA4ggyrQMG5zV/G1Rtt7KYacs6MAFw= -github.com/tendermint/tendermint v0.31.0-dev0-fix0/go.mod h1:ymcPyWblXCplCPQjbOYbrF1fWnpslATMVqiGgWbZrlc= -github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.8.0/go.mod h1:b2vIcu3u9gJoIx4kTWuXOgzGV7FPWeUktqRqVf6feG0= -golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/net v0.0.0-20180710023853-292b43bbf7cb/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc h1:a3CU5tJYVj92DY2LaA1kUkrsqD5/3mLDhx2NcNqyW+0= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180814072032-4e1fef560951/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/genproto v0.0.0-20180808183934-383e8b2c3b9e/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 2c4823865c135de822baeb183670eb93a394cc28 Mon Sep 17 00:00:00 2001 From: rigelrozanski <rigel.rozanski@gmail.com> Date: Wed, 3 Apr 2019 16:16:39 -0400 Subject: [PATCH 27/37] crisis manual int --- cmd/gaia/cmd/gaiad/main.go | 2 +- docs/gaia/join-mainnet.md | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/cmd/gaia/cmd/gaiad/main.go b/cmd/gaia/cmd/gaiad/main.go index 4aa8e49179..b515f5236b 100644 --- a/cmd/gaia/cmd/gaiad/main.go +++ b/cmd/gaia/cmd/gaiad/main.go @@ -55,7 +55,7 @@ func main() { // prepare and add flags executor := cli.PrepareBaseCmd(rootCmd, "GA", app.DefaultNodeHome) - rootCmd.Flags().BoolVar(&assertInvariantsBlockly, flagAssertInvariantsBlockly, + rootCmd.PersistentFlags().BoolVar(&assertInvariantsBlockly, flagAssertInvariantsBlockly, false, "Assert registered invariants on a blockly basis") err := executor.Execute() if err != nil { diff --git a/docs/gaia/join-mainnet.md b/docs/gaia/join-mainnet.md index 792f258503..63aab166ee 100644 --- a/docs/gaia/join-mainnet.md +++ b/docs/gaia/join-mainnet.md @@ -147,6 +147,36 @@ If you plan to start a new network from the exported state, export with the `--f gaiad export --height [height] --for-zero-height > [filename].json ``` +## Verify Mainnet + +Help to prevent a catastrophe by running invariants on each block on your full +node. In essence, by running invariants you ensure that the state of mainnet is +the correct expected state. One vital invariant check is that no atoms are +being created or destroyed outside of expected protocol, however there are many +other invariant checks each unique to their respective module. Because invariant checks +are computationally expensive, they are not enabled by default. To run a node with +these checks start your node with the assert-invariants-blockly flag: + +```bash +gaiad start --assert-invariants-blockly +``` + +If an invariant is broken on your node, your node will panic and prompt you to send +a transaction which will halt mainnet. For example the provided message may look like: + +```bash +invariant broken: + loose token invariance: + pool.NotBondedTokens: 100 + sum of account tokens: 101 + CRITICAL please submit the following transaction: + gaiacli tx crisis invariant-broken staking supply + +``` + +When submitting a invariant-broken transaction, transaction fee tokens are not +deducted as the blockchain will halt (aka. this is a free transaction). + ## Upgrade to Validator Node You now have an active full node. What's the next step? You can upgrade your full node to become a Cosmos Validator. The top 100 validators have the ability to propose new blocks to the Cosmos Hub. Continue onto [the Validator Setup](./validators/validator-setup.md). From 3361871198512ca40ccd9f479313a748e0a40874 Mon Sep 17 00:00:00 2001 From: Alexander Bezobchuk <alexanderbez@users.noreply.github.com> Date: Thu, 4 Apr 2019 13:53:22 -0400 Subject: [PATCH 28/37] Merge PR #4047: Fix queryDelegationRewards --- CHANGELOG.md | 2 ++ x/distribution/keeper/querier.go | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 113597cb7a..0d01901e72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -114,6 +114,8 @@ either the truncated coins or the change coins. * [\#3915](https://github.com/cosmos/cosmos-sdk/issues/3915) Remove ';' delimiting support from ParseDecCoins * [\#3977](https://github.com/cosmos/cosmos-sdk/issues/3977) Fix docker image build +* [\#4020](https://github.com/cosmos/cosmos-sdk/issues/4020) Fix queryDelegationRewards by returning an error +when the validator or delegation do not exist. ## 0.33.2 diff --git a/x/distribution/keeper/querier.go b/x/distribution/keeper/querier.go index ac40700c52..984bb74482 100644 --- a/x/distribution/keeper/querier.go +++ b/x/distribution/keeper/querier.go @@ -207,7 +207,17 @@ func queryDelegationRewards(ctx sdk.Context, _ []string, req abci.RequestQuery, ctx, _ = ctx.CacheContext() val := k.stakingKeeper.Validator(ctx, params.ValidatorAddress) + if val == nil { + // TODO: Should use ErrNoValidatorFound from staking/types + return nil, sdk.ErrInternal(fmt.Sprintf("validator %s does not exist", params.ValidatorAddress)) + } + del := k.stakingKeeper.Delegation(ctx, params.DelegatorAddress, params.ValidatorAddress) + if del == nil { + // TODO: Should use ErrNoDelegation from staking/types + return nil, sdk.ErrInternal("delegation does not exist") + } + endingPeriod := k.incrementValidatorPeriod(ctx, val) rewards := k.calculateDelegationRewards(ctx, val, del, endingPeriod) From 1a8ab1c3219525ea0a35a8a9d4b760e49fcfb56c Mon Sep 17 00:00:00 2001 From: gamarin2 <gautier@tendermint.com> Date: Fri, 5 Apr 2019 16:37:13 +0200 Subject: [PATCH 29/37] Merge PR #4019: Update Docs from Staging --- docs/.vuepress/config.js | 27 +- docs/{gaia => cosmos-hub}/README.md | 8 +- .../delegator-guide-cli.md | 66 ++-- docs/{gaia => cosmos-hub}/deploy-testnet.md | 20 +- docs/{gaia => cosmos-hub}/gaiacli.md | 38 +- .../genesis-state.md} | 0 docs/cosmos-hub/genesis.md | 332 ++++++++++++++++++ docs/{gaia => cosmos-hub}/installation.md | 0 docs/{gaia => cosmos-hub}/join-mainnet.md | 4 +- docs/{gaia => cosmos-hub}/join-testnet.md | 6 +- docs/{gaia => cosmos-hub}/keys.md | 0 docs/{gaia => cosmos-hub}/launch/blog-1-cn.md | 0 docs/{gaia => cosmos-hub}/launch/blog-1-en.md | 0 docs/{gaia => cosmos-hub}/launch/blog-1-kr.md | 0 docs/{gaia => cosmos-hub}/launch/blog-2-cn.md | 0 docs/{gaia => cosmos-hub}/launch/blog-2-en.md | 0 docs/{gaia => cosmos-hub}/launch/blog-2-kr.md | 0 docs/{gaia => cosmos-hub}/ledger.md | 4 +- .../validators/overview.md | 0 .../validators/security.md | 6 +- .../validators/validator-faq.md | 0 .../validators/validator-setup.md | 2 +- docs/{gaia => cosmos-hub}/what-is-gaia.md | 0 ...off - The Cosmos Hub Mainnet is Live-CN.md | 63 ---- docs/gaia/launch/blog-3-en.md | 47 --- 25 files changed, 428 insertions(+), 195 deletions(-) rename docs/{gaia => cosmos-hub}/README.md (73%) rename docs/{gaia => cosmos-hub}/delegator-guide-cli.md (93%) rename docs/{gaia => cosmos-hub}/deploy-testnet.md (96%) rename docs/{gaia => cosmos-hub}/gaiacli.md (97%) rename docs/{gaia/genesis.md => cosmos-hub/genesis-state.md} (100%) create mode 100644 docs/cosmos-hub/genesis.md rename docs/{gaia => cosmos-hub}/installation.md (100%) rename docs/{gaia => cosmos-hub}/join-mainnet.md (97%) rename docs/{gaia => cosmos-hub}/join-testnet.md (96%) rename docs/{gaia => cosmos-hub}/keys.md (100%) rename docs/{gaia => cosmos-hub}/launch/blog-1-cn.md (100%) rename docs/{gaia => cosmos-hub}/launch/blog-1-en.md (100%) rename docs/{gaia => cosmos-hub}/launch/blog-1-kr.md (100%) rename docs/{gaia => cosmos-hub}/launch/blog-2-cn.md (100%) rename docs/{gaia => cosmos-hub}/launch/blog-2-en.md (100%) rename docs/{gaia => cosmos-hub}/launch/blog-2-kr.md (100%) rename docs/{gaia => cosmos-hub}/ledger.md (99%) rename docs/{gaia => cosmos-hub}/validators/overview.md (100%) rename docs/{gaia => cosmos-hub}/validators/security.md (95%) rename docs/{gaia => cosmos-hub}/validators/validator-faq.md (100%) rename docs/{gaia => cosmos-hub}/validators/validator-setup.md (99%) rename docs/{gaia => cosmos-hub}/what-is-gaia.md (100%) delete mode 100644 docs/gaia/launch/Blastoff - The Cosmos Hub Mainnet is Live-CN.md delete mode 100644 docs/gaia/launch/blog-3-en.md diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index e8ee111d64..0839045e82 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -34,21 +34,22 @@ module.exports = { ] }, { - title: "Gaia", + title: "Cosmos Hub", collapsable: true, children: [ - "/gaia/what-is-gaia", - "/gaia/installation", - "/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" + "/cosmos-hub/what-is-gaia", + "/cosmos-hub/installation", + "/cosmos-hub/join-mainnet", + "/cosmos-hub/validators/validator-setup", + "/cosmos-hub/validators/overview", + "/cosmos-hub/validators/security", + "/cosmos-hub/validators/validator-faq", + "/cosmos-hub/delegator-guide-cli", + "/cosmos-hub/genesis.md", + "/cosmos-hub/ledger", + "/cosmos-hub/gaiacli", + "/cosmos-hub/join-testnet", + "/cosmos-hub/deploy-testnet" ] }, { diff --git a/docs/gaia/README.md b/docs/cosmos-hub/README.md similarity index 73% rename from docs/gaia/README.md rename to docs/cosmos-hub/README.md index eaf21a8238..75a9b31f41 100644 --- a/docs/gaia/README.md +++ b/docs/cosmos-hub/README.md @@ -1,6 +1,6 @@ -# Gaia Documentation +# Cosmos Hub Documentation -Welcome to the `Gaia` docs. `Gaia` is the current name of the Cosmos SDK application for the Cosmos Hub. +Welcome to the documentation of the **Cosmos Hub application: `gaia`**. ## Join the Cosmos Hub Mainnet @@ -12,11 +12,11 @@ Welcome to the `Gaia` docs. `Gaia` is the current name of the Cosmos SDK applica - [Join the testnet](./join-testnet.md) -## Setup your own `gaia` testnet +## Setup Your Own `gaia` Testnet - [Setup your own `gaia` testnet](./deploy-testnet.md) -## Additional resources +## Additional Resources - [Intro to validators](./validators/overview.md) - [Validator FAQ](./validators/validator-faq.md) diff --git a/docs/gaia/delegator-guide-cli.md b/docs/cosmos-hub/delegator-guide-cli.md similarity index 93% rename from docs/gaia/delegator-guide-cli.md rename to docs/cosmos-hub/delegator-guide-cli.md index ad50d35ae9..aab15da884 100644 --- a/docs/gaia/delegator-guide-cli.md +++ b/docs/cosmos-hub/delegator-guide-cli.md @@ -27,22 +27,22 @@ of any kind. Please exercise extreme caution! -## Table of contents +## Table of Contents - [Installing `gaiacli`](#installing-gaiacli) - [Cosmos Accounts](#cosmos-accounts) - + [Restoring an account from the fundraiser](#restoring-an-account-from-the-fundraiser) - + [Creating an account](#creating-an-account) -- [Accessing the Cosmos Hub network](#accessing-the-cosmos-hub-network) - + [Running your own full-node](#running-your-own-full-node) - + [Connecting to a remote full-node](#connecting-to-a-remote-full-node) -- [Setting up `gaiacli`](#setting-up-gaiacli) -- [Querying the state](#querying-the-state) + + [Restoring an Account from the Fundraiser](#restoring-an-account-from-the-fundraiser) + + [Creating an Account](#creating-an-account) +- [Accessing the Cosmos Hub Network](#accessing-the-cosmos-hub-network) + + [Running Your Own Full-Node](#running-your-own-full-node) + + [Connecting to a Remote Full-Node](#connecting-to-a-remote-full-node) +- [Setting Up `gaiacli`](#setting-up-gaiacli) +- [Querying the State](#querying-the-state) - [Sending Transactions](#sending-transactions) - + [A note on gas and fees](#a-note-on-gas-and-fees) - + [Bonding Atoms and Withdrawing rewards](#bonding-atoms-and-withdrawing-rewards) + + [A Note on Gas and Fees](#a-note-on-gas-and-fees) + + [Bonding Atoms and Withdrawing Rewards](#bonding-atoms-and-withdrawing-rewards) + [Participating in Governance](#participating-in-governance) - + [Signing transactions from an offline computer](#signing-transactions-from-an-offline-computer) + + [Signing Transactions from an Offline Computer](#signing-transactions-from-an-offline-computer) ## Installing `gaiacli` @@ -109,7 +109,7 @@ The funds stored in an account are controlled by the private key. This private k The address is a public string with a human-readable prefix (e.g. `cosmos10snjt8dmpr5my0h76xj48ty80uzwhraqalu4eg`) that identifies your account. When someone wants to send you funds, they send it to your address. It is computationally infeasible to find the private key associated with a given address. -### Restoring an account from the fundraiser +### Restoring an Account from the Fundraiser ::: tip *NOTE: This section only concerns fundraiser participants* @@ -117,7 +117,7 @@ The address is a public string with a human-readable prefix (e.g. `cosmos10snjt8 If you participated in the fundraiser, you should be in possession of a 12-words mnemonic. Newly generated mnemonics use 24 words, but 12-word mnemonics are also compatible with all the Cosmos tools. -#### On a ledger device +#### On a Ledger Device At the core of a ledger device, there is a mnemonic used to generate accounts on multiple blockchains (including the Cosmos Hub). Usually, you will create a new mnemonic when you initialize your ledger device. However, it is possible to tell the ledger device to use a mnemonic provided by the user instead. Let us go ahead and see how you can input the mnemonic you obtained during the fundraiser as the seed of your ledger device. @@ -138,7 +138,7 @@ Your ledger is now correctly set up with your fundraiser mnemonic! Do not lose t Next, click [here](#using-a-ledger-device) to learn how to generate an account. -#### On a computer +#### On a Computer ::: warning **NOTE: It is more secure to perform this action on an offline computer** @@ -155,11 +155,11 @@ You will be prompted to input a passphrase that is used to encrypt the private k - `<yourKeyName>` is the name of the account. It is a reference to the account number used to derive the key pair from the mnemonic. You will use this name to identify your account when you want to send a transaction. - You can add the optional `--account` flag to specify the path (`0`, `1`, `2`, ...) you want to use to generate your account. By default, account `0` is generated. -### Creating an account +### Creating an Account To create an account, you just need to have `gaiacli` installed. Before creating it, you need to know where you intend to store and interact with your private keys. The best options are to store them in an offline dedicated computer or a ledger device. Storing them on your regular online computer involves more risk, since anyone who infiltrates your computer through the internet could exfiltrate your private keys and steal your funds. -#### Using a ledger device +#### Using a Ledger Device ::: warning **Only use Ledger devices that you bought factory new or trust fully** @@ -185,7 +185,7 @@ gaiacli keys add <yourAccountName> --ledger - `<yourKeyName>` is the name of the account. It is a reference to the account number used to derive the key pair from the mnemonic. You will use this name to identify your account when you want to send a transaction. - You can add the optional `--account` flag to specify the path (`0`, `1`, `2`, ...) you want to use to generate your account. By default, account `0` is generated. -#### Using a computer +#### Using a Computer ::: warning **NOTE: It is more secure to perform this action on an offline computer** @@ -225,7 +225,7 @@ gaiacli keys add <yourKeyName> --recover --account 1 This command will prompt you to input a passphrase as well as your mnemonic. Change the account number to generate a different account. -## Accessing the Cosmos Hub network +## Accessing the Cosmos Hub Network In order to query the state and send transactions, you need a way to access the network. To do so, you can either run your own full-node, or connect to someone else's. @@ -233,19 +233,19 @@ In order to query the state and send transactions, you need a way to access the **NOTE: Do not share your mnemonic (12 or 24 words) with anyone. The only person who should ever need to know it is you. This is especially important if you are ever approached via email or direct message by someone requesting that you share your mnemonic for any kind of blockchain services or support. No one from Cosmos, the Tendermint team or the Interchain Foundation will ever send an email that asks for you to share any kind of account credentials or your mnemonic."**. ::: -### Running your own full-node +### Running Your Own Full-Node 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-mainnet.html). -### Connecting to a remote full-node +### Connecting to a Remote Full-Node If you do not want or cannot run your own node, you can connect to someone else's full-node. You should pick an operator you trust, because a malicious operator could return incorrect query results or censor your transactions. However, they will never be able to steal your funds, as your private keys are stored locally on your computer or ledger device. Possible options of full-node operators include validators, wallet providers or exchanges. In order to connect to the full-node, you will need an address of the following form: `https://77.87.106.33:26657` (*Note: This is a placeholder*). This address has to be communicated by the full-node operator you choose to trust. You will use this address in the [following section](#setting-up-gaiacli). -## Setting up `gaiacli` +## Setting Up `gaiacli` ::: tip **Before setting up `gaiacli`, make sure you have set up a way to [access the Cosmos Hub network](#accessing-the-cosmos-hub-network)** @@ -289,7 +289,7 @@ Finally, let us set the `chain-id` of the blockchain we want to interact with: gaiacli config chain-id cosmoshub-1 ``` -## Querying the state +## Querying the State ::: tip **Before you can bond atoms and withdraw rewards, you need to [set up `gaiacli`](#setting-up-gaiacli)** @@ -337,10 +337,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` (micro-Atom), where `1atom = 1,000,000uatom` +On Cosmos Hub mainnet, the accepted denom is `uatom`, where `1atom = 1,000,000uatom` ::: -### A note on gas and fees +### 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: @@ -358,7 +358,7 @@ The transaction `fees` are the product of `gas` and `gasPrice`. As a user, you h For mainnet, the recommended `gas-prices` is `0.025uatom`. ::: -### Bonding Atoms and Withdrawing rewards +### Bonding Atoms and Withdrawing Rewards ::: tip **Before you can bond atoms and withdraw rewards, you need to [set up `gaiacli`](#setting-up-gaiacli) and [create an account](#creating-an-account)** @@ -379,6 +379,14 @@ For mainnet, the recommended `gas-prices` is `0.025uatom`. gaiacli tx staking delegate <validatorAddress> <amountToBond> --from <delegatorKeyName> --gas auto --gas-adjustment 1.5 --gas-prices <gasPrice> +// Redelegate a certain amount of Atoms from a validator to another +// Can only be used if already bonded to a validator +// Redelegation takes effect immediately, there is no waiting period to redelegate +// After a redelegation, no other redelegation can be made from the account for the next 3 weeks +// ex value for flags: <stcValidatorAddress>=cosmosvaloper18thamkhnj9wz8pa4nhnp9rldprgant57pk2m8s, <amountToRedelegate>=100000000uatom, <gasPrice>=0.025uatom + +gaiacli tx staking redelegate <srcValidatorAddress> <destValidatorAddress> <amountToRedelegate> --from <delegatorKeyName> --gas auto --gas-adjustment 1.5 --gas-prices <gasPrice> + // Withdraw all rewards // ex value for flag: <gasPrice>=0.025uatom @@ -413,9 +421,9 @@ gaiacli query tx <txHash> Double check with a block explorer if you interact with the network through a trusted full-node. -## Participating in governance +## Participating in Governance -#### Primer on governance +#### Primer on Governance The Cosmos Hub has a built-in governance system that lets bonded Atom holders vote on proposals. There are three types of proposal: @@ -429,7 +437,7 @@ Once the `deposit` reaches `minDeposit`, the proposal enters the `voting_period` At the end of the voting period, the proposal is accepted if there are more than 50% `Yes` votes (excluding `Abstain ` votes) and less than 33.33% of `NoWithVeto` votes (excluding `Abstain` votes). -#### In practice +#### In Practice ::: tip **Before you can bond atoms and withdraw rewards, you need to [bond Atoms](#bonding-atoms-and-withdrawing-rewards)** @@ -459,7 +467,7 @@ gaiacli tx gov deposit <proposalID> <deposit> --gas auto --gas-adjustment 1.5 -- gaiacli tx gov vote <proposalID> <option> --gas auto --gas-adjustment 1.5 --gas-prices <gasPrice> --from <delegatorKeyName> ``` -### Signing transactions from an offline computer +### Signing Transactions From an Offline Computer If you do not have a ledger device and want to interact with your private key on an offline computer, you can use the following procedure. First, generate an unsigned transaction on an **online computer** with the following command (example with a bonding transaction): diff --git a/docs/gaia/deploy-testnet.md b/docs/cosmos-hub/deploy-testnet.md similarity index 96% rename from docs/gaia/deploy-testnet.md rename to docs/cosmos-hub/deploy-testnet.md index 2aa2f692e4..0757d6581a 100644 --- a/docs/gaia/deploy-testnet.md +++ b/docs/cosmos-hub/deploy-testnet.md @@ -1,4 +1,4 @@ -# Deploy your own testnet +# Deploy Your Own Testnet This document describes 3 ways to setup a network of `gaiad` nodes, each serving a different usecase: @@ -20,7 +20,7 @@ In case you need to use or deploy gaia as a container you could skip the `build` The same images can be used to build your own docker-compose stack. -## Single-node, local, manual testnet +## Single-node, Local, Manual Testnet This guide helps you create a single validator node that runs a network locally for testing and other development related uses. @@ -29,7 +29,7 @@ This guide helps you create a single validator node that runs a network locally - [Install gaia](./installation.md) - [Install `jq`](https://stedolan.github.io/jq/download/) (optional) -### Create genesis file and start the network +### Create Genesis File and Start the Network ```bash # You can run all of these commands from your home directory @@ -58,7 +58,7 @@ gaiad start This setup puts all the data for `gaiad` in `~/.gaiad`. You can examine the genesis file you created at `~/.gaiad/config/genesis.json`. With this configuration `gaiacli` is also ready to use and has an account with tokens (both staking and custom). -## Multi-node, local, automated testnet +## Multi-node, Local, Automated Testnet From the [networks/local directory](https://github.com/cosmos/cosmos-sdk/tree/develop/networks/local): @@ -83,7 +83,7 @@ make build-linux make build-docker-gaiadnode ``` -### Run your testnet +### Run Your Testnet To start a 4 node testnet run: @@ -181,7 +181,7 @@ funds! **Note**: Each node's seed is located at `./build/nodeN/gaiacli/key_seed.json` and can be restored to the CLI using the `gaiacli keys add --restore` command ::: -### Special binaries +### Special Binaries If you have multiple binaries with different names, you can specify which one to run with the BINARY environment variable. The path of the binary is relative to the attached volume. For example: @@ -190,7 +190,7 @@ If you have multiple binaries with different names, you can specify which one to BINARY=gaiafoo make localnet-start ``` -## Multi-node, remote, automated testnet +## Multi-Node, Remote, Automated Testnet The following should be run from the [networks directory](https://github.com/cosmos/cosmos-sdk/tree/develop/networks). @@ -216,7 +216,7 @@ export SSH_PUBLIC_FILE="$HOME/.ssh/id_rsa.pub" These will be used by both `terraform` and `ansible`. -### Create a remote network +### Create a Remote Network ``` SERVERS=1 REGION_LIMIT=1 make validators-start @@ -228,13 +228,13 @@ The testnet name is what's going to be used in --chain-id, while the cluster nam ./new-testnet.sh "$TESTNET_NAME" "$CLUSTER_NAME" 1 1 ``` -### Quickly see the /status endpoint +### Quickly see the /status Endpoint ``` make validators-status ``` -### Delete servers +### Delete Servers ``` make validators-stop diff --git a/docs/gaia/gaiacli.md b/docs/cosmos-hub/gaiacli.md similarity index 97% rename from docs/gaia/gaiacli.md rename to docs/cosmos-hub/gaiacli.md index 1b56ac9488..5097455516 100644 --- a/docs/gaia/gaiacli.md +++ b/docs/cosmos-hub/gaiacli.md @@ -1,4 +1,4 @@ -# Gaia client +# Gaia Client ## Gaia CLI @@ -97,7 +97,7 @@ Note that this is the Tendermint signing key, _not_ the operator key you will us We strongly recommend _NOT_ using the same passphrase for multiple keys. The Tendermint team and the Interchain Foundation will not be responsible for the loss of funds. ::: -#### Generate multisig public keys +#### Generate Multisig Public Keys You can generate and print a multisig public key by typing: @@ -169,7 +169,7 @@ gaiacli tx send ... --gas-prices=0.025uatom The best way to get tokens is from the [Cosmos Testnet Faucet](https://faucetcosmos.network). If the faucet is not working for you, try asking [#cosmos-validators](https://riot.im/app/#/room/#cosmos-validators:matrix.org). The faucet needs the `cosmos` from the account you wish to use for staking. -#### Query Account balance +#### Query Account Balance After receiving tokens to your address, you can view your account's balance by typing: @@ -256,7 +256,7 @@ gaiacli tx broadcast --node=<node> signedSendTx.json ### Query Transactions -#### Matching a set of tags +#### Matching a Set of Tags You can use the transaction search command to query for transactions that match a specific set of `tags`, which are added on every transaction. @@ -293,7 +293,7 @@ You can find a list of available `tags` on each of the SDK modules: - [Bank tags](https://github.com/cosmos/cosmos-sdk/blob/d1e76221d8e28824bb4791cb4ad8662d2ae9051e/x/bank/keeper.go#L193-L206) ::: -#### Matching a transaction's hash +#### Matching a Transaction's Hash You can also query a single transaction by its hash using the following command: @@ -533,7 +533,7 @@ Some considerations about the voting process: For more information about the governance process and how it works, please check out the Governance module [specification](./../spec/governance). -#### Create a Governance proposal +#### Create a Governance Proposal In order to create a governance proposal, you must submit an initial deposit along with the proposal details: @@ -551,7 +551,7 @@ gaiacli tx gov submit-proposal \ --chain-id=<chain_id> ``` -##### Query proposals +##### Query Proposals Once created, you can now query information of the proposal: @@ -573,7 +573,7 @@ To query for the proposer of a given governance proposal: gaiacli query gov proposer <proposal_id> ``` -#### Increase deposit +#### Increase Deposit In order for a proposal to be broadcasted to the network, the amount deposited must be above a `minDeposit` value (initial value: `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: @@ -585,7 +585,7 @@ gaiacli tx gov deposit <proposal_id> "10000000uatom" \ > _NOTE_: Proposals that don't meet this requirement will be deleted after `MaxDepositPeriod` is reached. -##### Query deposits +##### Query Deposits Once a new proposal is created, you can query all the deposits submitted to it: @@ -599,7 +599,7 @@ You can also query a deposit submitted by a specific address: gaiacli query gov deposit <proposal_id> <depositor_address> ``` -#### Vote on a proposal +#### Vote on a Proposal After a proposal's deposit reaches the `MinDeposit` value, the voting period opens. Bonded `Atom` holders can then cast vote on it: @@ -609,7 +609,7 @@ gaiacli tx gov vote <proposal_id> <Yes/No/NoWithVeto/Abstain> \ --chain-id=<chain_id> ``` -##### Query votes +##### Query Votes Check the vote with the option you just submitted: @@ -631,7 +631,7 @@ To check the current tally of a given proposal you can use the `tally` command: gaiacli query gov tally <proposal_id> ``` -#### Query governance parameters +#### Query Governance Parameters To check the current governance parameters run: @@ -649,7 +649,7 @@ gaiacli query gov param deposit ### Fee Distribution -#### Query distribution parameters +#### Query Distribution Parameters To check the current distribution parameters, run: @@ -673,7 +673,7 @@ To check the current outstanding (un-withdrawn) rewards, run: gaiacli query distr outstanding-rewards ``` -#### Query validator commission +#### Query Validator Commission To check the current outstanding commission for a validator, run: @@ -681,7 +681,7 @@ To check the current outstanding commission for a validator, run: gaiacli query distr commission <validator_address> ``` -#### Query validator slashes +#### Query Validator Slashes To check historical slashes for a validator, run: @@ -689,7 +689,7 @@ To check historical slashes for a validator, run: gaiacli query distr slashes <validator_address> <start_height> <end_height> ``` -#### Query delegator rewards +#### Query Delegator Rewards To check current rewards for a delegation (were they to be withdrawn), run: @@ -697,7 +697,7 @@ To check current rewards for a delegation (were they to be withdrawn), run: gaiacli query distr rewards <delegator_address> <validator_address> ``` -#### Query all delegator rewards +#### Query All Delegator Rewards To check all current rewards for a delegation (were they to be withdrawn), run: @@ -705,7 +705,7 @@ To check all current rewards for a delegation (were they to be withdrawn), run: gaiacli query distr rewards <delegator_address> ``` -### Multisig transactions +### Multisig Transactions Multisig transactions require signatures of multiple private keys. Thus, generating and signing a transaction from a multisig account involve cooperation among the parties involved. A multisig @@ -797,7 +797,7 @@ The transaction can now be sent to the node: gaiacli tx broadcast signedTx.json ``` -## Shells completion scripts +## Shells Completion Scripts Completion scripts for popular UNIX shell interpreters such as `Bash` and `Zsh` can be generated through the `completion` command, which is available for both diff --git a/docs/gaia/genesis.md b/docs/cosmos-hub/genesis-state.md similarity index 100% rename from docs/gaia/genesis.md rename to docs/cosmos-hub/genesis-state.md diff --git a/docs/cosmos-hub/genesis.md b/docs/cosmos-hub/genesis.md new file mode 100644 index 0000000000..427abfe62b --- /dev/null +++ b/docs/cosmos-hub/genesis.md @@ -0,0 +1,332 @@ +# Genesis File + +This document explains how the genesis file of the Cosmmos Hub mainnet is structured. It also explains how you can build a genesis file for your own `gaia` testnet. + +Note that you can generate a default genesis file for your own testnet by running the following command: + +```bash +gaiad init <moniker> --chain-id <chain-id> +``` + +The genesis file is stored in `~/.gaiad/config/genesis.toml`. + +## What is a Genesis File + +A genesis file is a JSON file which defines the initial state of your blockchain. It can be seen as height `0` of your blockchain. The first block, at height `1`, will reference the genesis file as its parent. + +The state defined in the genesis file contains all the necessary information, like initial token allocation, genesis time, default parameters, and more. Let us break down these information. + +## Genesis Time and Chain_id + +The `genesis_time` is defined at the top of the genesis file. It is a `UTC` timestamps which specifies when the blockchain is due to start. At this time, genesis validators are supposed to come online and start participating in the consensus process. The blockchain starts when more than 2/3rd of the genesis validators (weighted by voting power) are online. + +```json +"genesis_time": "2019-03-13T17:00:00.000000000Z", +``` + +The `chain_id` is a unique identifier for your chain. It helps differentiate between different chains using the same version of the software. + +```json +"chain_id": "cosmoshub-1", +``` + +## Consensus Parameters + +Next, the genesis file defines consensus parameters. Consensus parameters regroup all the parameters that are related to the consensus layer, which is `Tendermint` in the case of `gaia`. Let us look at these parameters: + +- `block` + + `max_bytes`: Maximum number of bytes per block. + + `max_gas`: Gas limit per block. Each transaction included in the block will consume some gas. The total gas used by transactions included in a block cannot exceed this limit. +- `evidence` + + `max_age`: An evidence is a proof that a validator signed two different blocks at the same height (and round). This is an explicitely malicious behaviour that is punished at the state-machine level. The `max_age` defines the maximum number of **blocks** after which an evidence is not valid anymore. +- `validator` + + `pub_key_types`: The types of pubkey (`ed25519`, `secp256k1`, ...) that are accepted for validators. Currently only `ed25519` is accepted. + +```json +"consensus_params": { + "block_size": { + "max_bytes": "150000", + "max_gas": "1500000" + }, + "evidence": { + "max_age": "1000000" + }, + "validator": { + "pub_key_types": [ + "ed25519" + ] + } + }, +``` + +## Application State + +The application state defines the initial state of the state-machine. + +### Genesis Accounts + +In this section, initial allocation of tokens is defined. It is possible to add accounts manually by directly editing the genesis file, but it is also possible to use the following command: + +```bash +// Example: gaiad add-genesis-account cosmos1qs8tnw2t8l6amtzvdemnnsq9dzk0ag0z37gh3h 10000000uatom + +gaiad add-genesis-account <account-address> <amount><denom> +``` + +This command creates an item in the `accounts` list, under the `app_state` section. + +```json +"accounts": [ + { + "address": "cosmos1qs8tnw2t8l6amtzvdemnnsq9dzk0ag0z37gh3h", + "coins": [ + { + "denom": "uatom", + "amount": "10000000" + } + ], + "sequence_number": "0", + "account_number": "0", + "original_vesting": [ + { + "denom": "uatom", + "amount": "26306000000" + } + ], + "delegated_free": null, + "delegated_vesting": null, + "start_time": "0", + "end_time": "10000" + } +] +``` + +Let us break down the parameters: + +- `sequence_number`: This number is used to count the number of transactions sent by this account. It is incremented each time a transaction is included in a block, and used to prevent replay attacks. Initial value is `0`. +- `account_number`: Unique identifier for the account. It is generated the first time a transaction including this account is included in a block. +- `original_vesting`: Vesting is natively supported by `gaia`. You can define an amount of token owned by the account that needs to be vested for a period of time before they can be transferred. Vested tokens can be delegated. Default value is `null`. +- `delegated_free`: Amount of delegated tokens that can be transferred after they've been vested. Most of the time, will be `null` in genesis. +- `delegated_vesting`: Amount of delegated tokens that are still vesting. Most of the time, will be `null` in genesis. +- `start_time`: Block at which the vesting period starts. `0` most of the time in genesis. +- `end_time`: Block at which the vesting period ends. `0` if no vesting for this account. + +### Bank + +The `bank` module handles tokens. The only parameter that needs to be defined in this section is wether `transfers` are enabled at genesis or not. + +```json +"bank": { + "send_enabled": false + } +``` + +### Staking + +The `staking` module handles the bulk of the Proof-of-Stake logic of the state-machine. This section should look like the following: + +```json +"staking": { + "pool": { + "not_bonded_tokens": "10000000", + "bonded_tokens": "0" + }, + "params": { + "unbonding_time": "1814400000000000", + "max_validators": 100, + "max_entries": 7, + "bond_denom": "uatom" + }, + "last_total_power": "0", + "last_validator_powers": null, + "validators": null, + "bonds": null, + "unbonding_delegations": null, + "redelegations": null, + "exported": false + } +``` + +Let us break down the parameters: + +- `pool` + + `not_bonded_tokens`: Defines the amount of tokens not bonded (i.e. delegated) in genesis. Generally, it equals the total supply of the staking token (`uatom` in this example). + + `bonded_tokens`: Amount of bonded tokens in genesis. Generally `0`. +- `params` + + `unbonding_time`: Time in **nanosecond** it takes for tokens to complete unbonding. + + `max_validators`: Maximum number of active validators. + + `max_entries`: Maximum unbonding delegations and redelegations between a particular pair of delegator / validator. + + `bond_denom`: Denomination of the staking token. +- `last_total_power`: Total amount of voting power. Generally `0` in genesis (except if genesis was generated using a previous state). +- `last_validator_powers`: Power of each validator in last known state. Generally `null` in genesis (except if genesis was generated using a previous state). +- `validators`: List of last knoww validators. Generally `null` in genesis (except if genesis was generated using a previous state). +- `bonds`: List of last known delegation. Generally `null` in genesis (except if genesis was generated using a previous state). +- `unbonding_delegations`: List of last known unbonding delegations. Generally `null` in genesis (except if genesis was generated using a previous state). +- `redelegations`: List of last known redelegations. Generally `null` in genesis (except if genesis was generated using a previous state). +- `exported`: Wether this genesis was generated using the export of a previous state. + +### Mint + +The `mint` module governs the logic of inflating the supply of token. The `mint` section in the genesis file looks like the follwing: + +```json +"mint": { + "minter": { + "inflation": "0.070000000000000000", + "annual_provisions": "0.000000000000000000" + }, + "params": { + "mint_denom": "uatom", + "inflation_rate_change": "0.130000000000000000", + "inflation_max": "0.200000000000000000", + "inflation_min": "0.070000000000000000", + "goal_bonded": "0.670000000000000000", + "blocks_per_year": "6311520" + } + } +``` + +Let us break down the parameters: + +- `minter` + + `inflation`: Initial yearly percentage of increase in the total supply of staking token, compounded weekly. A `0.070000000000000000` value means the target is `7%` yearly inflation, compounded weekly. + + `annual_provisions`: Calculated each block. Initialize at `0.000000000000000000`. +- `params` + + `mint_denom`: Denom of the staking token that is inflated. + + `inflation_rate_change`: Max yearly change in inflation. + + `inflation_max`: Maximum level of inflation. + + `inflation_min`: Minimum level of inflation. + + `goal_bonded`: Percentage of the total supply that is targeted to be bonded. If the percentage of bonded staking tokens is below this target, the inflation increases (following `inflation_rate_change`) until it reaches `inflation_max`. If the percentage of bonded staking tokens is above this target, the inflation decreases (following `inflation_rate_change`) until it reaches `inflation_min`. + + `blocks_per_year`: Estimation of the amount of blocks per year. Used to compute the block reward coming from inflated staking token (called block provisions). + +### Distribution + +The `distr` module handles the logic of distribution block provisions and fees to validators and delegators. The `distr` section in the genesis file looks like the follwing: + +```json + "distr": { + "fee_pool": { + "community_pool": null + }, + "community_tax": "0.020000000000000000", + "base_proposer_reward": "0.010000000000000000", + "bonus_proposer_reward": "0.040000000000000000", + "withdraw_addr_enabled": false, + "delegator_withdraw_infos": null, + "previous_proposer": "", + "outstanding_rewards": null, + "validator_accumulated_commissions": null, + "validator_historical_rewards": null, + "validator_current_rewards": null, + "delegator_starting_infos": null, + "validator_slash_events": null + } +``` + +Let us break down the parameters: + +- `fee_pool` + + `community_pool`: The community pool is a pool of tokens that can be used to pay for bounties. It is allocated via governance proposals. Generally `null` in genesis. +- `community_tax`: The tax percentage on fees and block rewards that goes to the community pool. +- `base_proposer_reward`: Base bonus on transaction fees collected in a valid block that goes to the proposer of block. If value is `0.010000000000000000`, 1% of the fees go to the proposer. +- `bonus_proposer_reward`: Max bonus on transaction fees collected in a valid block that goes to the proposer of block. The bonus depends on the number of `precommits` the proposer includes. If the proposer includes 2/3rd `precommits` weighted by voting power (minimum for the block to be valid), they get a bonus of `base_proposer_reward`. This bonus increases linearly up to `bonus_proposer_reward` if the proposer includes 100% of `precommits`. +- `withdraw_addr_enabled`: If `true`, delegators can set a different address to withdraw their rewards. Set to `false` if you want to disable transfers at genesis, as it can be used as a way to get around the restriction. +- `delegator_withdraw_infos`: List of delegators withdraw address. Generally `null` if genesis was not exported from previous state. +- `previous_proposer`: Proposer of the previous block. Set to `""` if genesis was not exported from previous state. +- `outstanding_rewards`: Outstanding (un-withdrawn) rewards. Set to `null` if genesis was not exported from previous state. +- `validator_accumulated_commission`: Outstanding (un-withdrawn) commission of validators. Set to `null` if genesis was not exported from previous state. +- `validator_historical_rewards`: Set of information related to the historical rewards of validators and used by the `distr` module for various computation. Set to `null` if genesis was not exported from previous state. +- `validators_current_rewards`: Set of information related to the current rewards of validators and used by the `distr` module for various computation. Set to `null` if genesis was not exported from previous state. +- `delegator_starting_infos`: Tracks the previous validator period, the delegation's amount of staking token, and the creation height (to check later on if any slashes have occurred). Set to `null` if genesis was not exported from previous state. +- `validator_slash_events`: Set of information related to the past slashing of validators. Set to `null` if genesis was not exported from previous state. + +### Governance + +The `gov` module handles all governance-related transactions. The initial state of the `gov` section looks like the following: + +```json +"gov": { + "starting_proposal_id": "1", + "deposits": null, + "votes": null, + "proposals": null, + "deposit_params": { + "min_deposit": [ + { + "denom": "uatom", + "amount": "512000000" + } + ], + "max_deposit_period": "1209600000000000" + }, + "voting_params": { + "voting_period": "1209600000000000" + }, + "tally_params": { + "quorum": "0.4", + "threshold": "0.5", + "veto": "0.334", + "governance_penalty": "0.0" + } + } +``` + +Let us break down the parameters: + +- `starting_proposal_id`: This parameter defines the ID of the first proposal. Each proposal is identified by a unique ID. +- `deposits`: List of deposits for each proposal ID. Set to `null` if genesis was not exported from previous state. +- `votes`: List of votes for each proposal ID. Set to `null` if genesis was not exported from previous state. +- `proposals`: List of proposals for each proposal ID: Set to `null` if genesis was not exported from previous state. +- `deposit_params` + + `min_deposit`: The minimum deposit required for the proposal to enter `Voting Period`. If multiple denoms are provided, the `OR` operator applies. + + `max_deposit_period`: The maximum period (in **nanoseconds**) after which it is not possible to deposit on the proposal anymore. +- `voting_params` + + `voting_period`: Length of the voting period in **nanoseconds**. +- `tally_params` + + `quorum`: Minimum percentage of bonded staking tokens that needs to vote for the result to be valid. + + `threshold`: Minimum percentage of votes that need to be `YES` for the result to be valid. + + `veto`: Maximum percentage `NO_WITH_VETO` votes for the result to be valid. + + `governance_penalty`: Penalty for validators that do not vote on a given proposal. + +### Slashing + +The `slashing` module handles the logic to slash delegators if their validator misbehave. The `slashing` section in genesis looks as follows: + +```json +"slashing": { + "params": { + "max_evidence_age": "1814400000000000", + "signed_blocks_window": "10000", + "min_signed_per_window": "0.050000000000000000", + "downtime_jail_duration": "600000000000", + "slash_fraction_double_sign": "0.050000000000000000", + "slash_fraction_downtime": "0.000100000000000000" + }, + "signing_infos": {}, + "missed_blocks": {} + } +``` + +Let us break down the parameters: + +- `params` + + `max_evidence_age`: Maximum age of the evidence in **nanoseconds**. + + `signed_blocks_window`: Moving window of blocks to figure out offline validators. + + `min_signed_per_window`: Minimum percentage of `precommits`that must be present in the `block window` for the validator to be considered online. + + `downtime_jail_duration`: Duration in **nanoseconds** for which a validator is jailed after they get slashed for downtime. + + `slash_fraction_double_sign`: Percentage of delegators bonded stake slashed when their validator double signs. + + `slash_fraction_downtime`: Percentage of delegators bonded stake slashed when their validator is down. +- `signing_infos`: Various infos per validator needed by the `slashing` module. Set to `{}` if genesis was not exported from previous state. +- `missed_blocks`: Various infos related to missed blocks needed by the `slashing` module. Set to `{}` if genesis was not exported from previous state. + +### Genesis Transactions + +By default, the genesis file do not contain any `gentxs`. A `gentx` is a transaction that bonds staking token present in the genesis file under `accounts` to a validator, essentially creating a validator at genesis. The chain will start as soon as more than 2/3rds of the validators (weighted by voting power) that are the recipient of a valid `gentx` come online after `genesis_time`. + +A `gentx` can be added manually to the genesis file, or via the following command: + +```bash +gaiad collect-gentxs +``` + +This command will add all the `gentxs` stored in `~/.gaiad/config/gentx` to the genesis file. In order to create a genesis transaction, click [here](./validators/validator-setup.md#participate-in-genesis-as-a-validator). diff --git a/docs/gaia/installation.md b/docs/cosmos-hub/installation.md similarity index 100% rename from docs/gaia/installation.md rename to docs/cosmos-hub/installation.md diff --git a/docs/gaia/join-mainnet.md b/docs/cosmos-hub/join-mainnet.md similarity index 97% rename from docs/gaia/join-mainnet.md rename to docs/cosmos-hub/join-mainnet.md index 6f69fa6851..aa947d703b 100644 --- a/docs/gaia/join-mainnet.md +++ b/docs/cosmos-hub/join-mainnet.md @@ -56,7 +56,7 @@ Fetch the testnet's `genesis.json` file into `gaiad`'s config directory. ```bash mkdir -p $HOME/.gaiad/config -curl https://raw.githubusercontent.com/cosmos/launch/master/latest/genesis.json > $HOME/.gaiad/config/genesis.json +curl https://raw.githubusercontent.com/cosmos/launch/master/genesis.json > $HOME/.gaiad/config/genesis.json ``` Note we use the `latest` directory in the [launch repo](https://github.com/cosmos/launch) which contains details for the mainnet like the latest version and the genesis file. @@ -81,7 +81,7 @@ 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 +## A Note on Gas and Fees ::: warning On Cosmos Hub mainnet, the accepted denom is `uatom`, where `1atom = 1.000.000uatom` diff --git a/docs/gaia/join-testnet.md b/docs/cosmos-hub/join-testnet.md similarity index 96% rename from docs/gaia/join-testnet.md rename to docs/cosmos-hub/join-testnet.md index 469abdd84b..30a7c33d04 100644 --- a/docs/gaia/join-testnet.md +++ b/docs/cosmos-hub/join-testnet.md @@ -10,7 +10,7 @@ of the Cosmos-SDK to use and details about the genesis file. **You need to [install gaia](./installation.md) before you go further** ::: -## Starting a new Node +## Starting a New Node > NOTE: If you ran a full node on a previous testnet, please skip to [Upgrading From Previous Testnet](#upgrading-from-previous-testnet). @@ -21,7 +21,7 @@ To start a new node, the mainnet instructions apply: The only difference is the SDK version and genesis file. See the [testnet repo](https://github.com/cosmos/testnets) for information on testnets, including the correct version of the Cosmos-SDK to use and details about the genesis file. -## Upgrading your Node +## Upgrading Your Node These instructions are for full nodes that have ran on previous versions of and would like to upgrade to the latest testnet. @@ -59,4 +59,4 @@ make update_tools install Note we use `master` here since it contains the latest stable release. See the [testnet repo](https://github.com/cosmos/testnets) for details on which version is needed for which testnet, and the [SDK release page](https://github.com/cosmos/cosmos-sdk/releases) for details on each release. -Your full node has been cleanly upgraded! \ No newline at end of file +Your full node has been cleanly upgraded! diff --git a/docs/gaia/keys.md b/docs/cosmos-hub/keys.md similarity index 100% rename from docs/gaia/keys.md rename to docs/cosmos-hub/keys.md diff --git a/docs/gaia/launch/blog-1-cn.md b/docs/cosmos-hub/launch/blog-1-cn.md similarity index 100% rename from docs/gaia/launch/blog-1-cn.md rename to docs/cosmos-hub/launch/blog-1-cn.md diff --git a/docs/gaia/launch/blog-1-en.md b/docs/cosmos-hub/launch/blog-1-en.md similarity index 100% rename from docs/gaia/launch/blog-1-en.md rename to docs/cosmos-hub/launch/blog-1-en.md diff --git a/docs/gaia/launch/blog-1-kr.md b/docs/cosmos-hub/launch/blog-1-kr.md similarity index 100% rename from docs/gaia/launch/blog-1-kr.md rename to docs/cosmos-hub/launch/blog-1-kr.md diff --git a/docs/gaia/launch/blog-2-cn.md b/docs/cosmos-hub/launch/blog-2-cn.md similarity index 100% rename from docs/gaia/launch/blog-2-cn.md rename to docs/cosmos-hub/launch/blog-2-cn.md diff --git a/docs/gaia/launch/blog-2-en.md b/docs/cosmos-hub/launch/blog-2-en.md similarity index 100% rename from docs/gaia/launch/blog-2-en.md rename to docs/cosmos-hub/launch/blog-2-en.md diff --git a/docs/gaia/launch/blog-2-kr.md b/docs/cosmos-hub/launch/blog-2-kr.md similarity index 100% rename from docs/gaia/launch/blog-2-kr.md rename to docs/cosmos-hub/launch/blog-2-kr.md diff --git a/docs/gaia/ledger.md b/docs/cosmos-hub/ledger.md similarity index 99% rename from docs/gaia/ledger.md rename to docs/cosmos-hub/ledger.md index 3a36bad87f..63038b1a26 100644 --- a/docs/gaia/ledger.md +++ b/docs/cosmos-hub/ledger.md @@ -1,6 +1,6 @@ # Ledger Nano Support -## A note on HD wallet +## A Note on HD Wallet HD Wallets, originally specified in Bitcoin's [BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki), are a special kind of wallet that let users derive any number of accounts from a single seed. To understand what that means, let us first define some terminology: @@ -54,7 +54,7 @@ The process of derivating accounts from the seed is deterministic. This means th The funds stored in an account are controlled by the private key. This private key is generated using a one-way function from the mnemonic. If you lose the private key, you can retrieve it using the mnemonic. However, if you lose the mnemonic, you will lose access to all the derived private keys. Likewise, if someone gains access to your mnemonic, they gain access to all the associated accounts. -## Ledger Support for account keys +## Ledger Support for Account Keys At the core of a Ledger device, there is a mnemonic that is used to generate private keys. When you initialize you Ledger, a mnemonic is generated. diff --git a/docs/gaia/validators/overview.md b/docs/cosmos-hub/validators/overview.md similarity index 100% rename from docs/gaia/validators/overview.md rename to docs/cosmos-hub/validators/overview.md diff --git a/docs/gaia/validators/security.md b/docs/cosmos-hub/validators/security.md similarity index 95% rename from docs/gaia/validators/security.md rename to docs/cosmos-hub/validators/security.md index ec5c7c4793..cb822d45f4 100644 --- a/docs/gaia/validators/security.md +++ b/docs/cosmos-hub/validators/security.md @@ -2,7 +2,7 @@ Each validator candidate is encouraged to run its operations independently, as diverse setups increase the resilience of the network. Validator candidates should commence their setup phase now in order to be on time for launch. -## Key management - HSM +## Key Management - HSM It is mission critical that an attacker cannot steal a validator's key. If this is possible, it puts the entire stake delegated to the compromised validator at risk. Hardware security modules are an important strategy for mitigating this risk. @@ -37,7 +37,9 @@ pex = false Sentry Nodes should edit their config.toml: ```bash # Comma separated list of peer IDs to keep private (will not be gossiped to other peers) -private_peer_ids = "id of validator nodes" +# Example ID: 3e16af0cead27979e1fc3dac57d03df3c7a77acc@3.87.179.235:26656 + +private_peer_ids = "node_ids_of_private_peers" ``` ## Environment Variables diff --git a/docs/gaia/validators/validator-faq.md b/docs/cosmos-hub/validators/validator-faq.md similarity index 100% rename from docs/gaia/validators/validator-faq.md rename to docs/cosmos-hub/validators/validator-faq.md diff --git a/docs/gaia/validators/validator-setup.md b/docs/cosmos-hub/validators/validator-setup.md similarity index 99% rename from docs/gaia/validators/validator-setup.md rename to docs/cosmos-hub/validators/validator-setup.md index 134fc5a864..4c524b52fc 100644 --- a/docs/gaia/validators/validator-setup.md +++ b/docs/cosmos-hub/validators/validator-setup.md @@ -55,7 +55,7 @@ When specifying commission parameters, the `commission-max-change-rate` is used You can confirm that you are in the validator set by using a third party explorer. -## Participate in genesis as a validator +## Participate in Genesis as a Validator ::: warning The genesis ceremony for the Cosmos Hub mainnet is closed. Please skip to the next section. diff --git a/docs/gaia/what-is-gaia.md b/docs/cosmos-hub/what-is-gaia.md similarity index 100% rename from docs/gaia/what-is-gaia.md rename to docs/cosmos-hub/what-is-gaia.md diff --git a/docs/gaia/launch/Blastoff - The Cosmos Hub Mainnet is Live-CN.md b/docs/gaia/launch/Blastoff - The Cosmos Hub Mainnet is Live-CN.md deleted file mode 100644 index 551e7a743e..0000000000 --- a/docs/gaia/launch/Blastoff - The Cosmos Hub Mainnet is Live-CN.md +++ /dev/null @@ -1,63 +0,0 @@ -# Cosmos主网创世成功启动,一键发链开启神奇宇宙之旅! - -## 关于Cosmos -2014年,Cosmos创始人Jae Kwon发现经典拜占庭容错(BFT)共识算法的安全性有助于我们在公链环境中利用PoS机制,而无需外部伪随机源来抵抗Sybil。 2015年,他与Ethan Buchman一起规划了Cosmos的蓝图,希望未来的区块链能像今天的互联网应用一样,遍地开花。 - -为了证明我们可以建立一个安全的BFT-PoS系统,我们需要在公开透明、去中心化的区块链上进行测试。Cosmos Hub就这样诞生了。 - -为可扩展的公链网络提供基础设施的美好愿景正是推动此次主网启动的核心动力。Cosmos就是要实现成千上万个加密货币系统之间的互联互通,而不必基于PoW就能实现网络的扩展。 - -为了实现这一愿景,我们开发了BFT共识引擎Tendermint Core,可以用作任何PoS区块链的底层。同时还需要搭建一个框架,以大大降低DApp开发的门槛。与Ruby on Rails或Django等Web框架引发寒武纪的Web应用爆炸类似,基于Cosmos SDK,你可以很容易地搭建区块链,因此区块链的应用也将会如雨后春笋一般,野蛮生长。 - -自Tendermint Core建立至今已近五年,建立一个基于BFT PoS的区块链互联网的梦想已成为现实。回首这一发展历程,我们更加信心倍增,斗志昂扬,继续Cosmos的神奇宇宙之旅! - -![image](https://cdn-images-1.medium.com/max/1200/0*RDRFM1k3pbVbJhES) - -有关Cosmos及其顶尖开源软件的介绍,请戳:cosmos.network/intro -如何使用Cosmos SDK对自定义应用专有链进行编程,请参照[本教程](https://cosmos.network/docs/tutorial)。 - - - -## Cosmos主网上线 - -Cosmos主网是近40年来实用拜占庭容错(PBFT)研究历史中首个基于POS的公链。主网上线将分三个阶段(中文链接):网络逐步趋于稳定、开启交易、启用IBC协议。 - -阅读Coindesk对Cosmos Hub发布的[评论](https://www.coindesk.com/a-blockchain-to-connect-all-blockchains-cosmos-is-now-officially-live)。 - -了解有关Cosmos的[更多信息](cosmos.network/about)。 - - - -## Cosmos生态 - -Tendermint Inc的A轮融资 -Tendermint Inc—— [Tendermint Core](https://github.com/tendermint/tendermint), [Cosmos SDK](https://github.com/cosmos/cosmos-sdk)和[Cosmos网络](https://cosmos.network)核心开发者,已完成了A轮融资,筹集了4亿美元的区块链基金,由[Paradigm](https://medium.com/paradigm-fund)领投,其他支持机构如[贝恩资本](https://medium.com/paradigm-fund)和[1 Confirmation](https://www.1confirmation.com)跟投。部分资金将由Tendermint Inc用于支持Cosmos网络及其生态系统的持续发展。 - - - - -## ICF研发 -[ICF](https://interchain.io)是一家瑞士的非营利性基金会,为Cosmos网络技术开发提供资金支持,同时也在通过与[其他研究机构](https://interchain.io/research)合作并发展其[内部团队](https://interchain.io/careers)开展研发工作,也接受其他需要资金的[项目的申请](https://interchain.typeform.com/to/P3tOm0)。 - - - -## 生态及用例 - -虽然Cosmos Hub是Cosmos网络中上线的第一个区块链,但更广泛的Cosmos项目正在迅速扩张。 核心软件库的代码贡献者数量已增至150多个。测试网上的验证人已逾百人,参与主网分布式启动的验证人共有67位。有一张社区贡献的策列表显示,共有80个项目表明他们正在或打算基于Cosmos SDK和/或Tendermint Core构建应用程序。 在我们的[生态系统页面](https://cosmos.network/ecosystem)上,可以看到一些非常耀眼的项目,涉及领域包括游戏、内容发布、音乐、生态监测和再生、跨链操作等应用程序 。这些都是通过我们提供的开源模块及通用的基础设施而实现的。 - -![image](https://cdn-images-1.medium.com/max/800/0*E7QxLaEAdjs0rgOX) - -![image](https://cdn-images-1.medium.com/max/800/0*zMsFj_tFPMj7IOND) - -![image](https://cdn-images-1.medium.com/max/400/0*wuyk3SMH4AX_0Anm) - - -基于Cosmos SDK / Tendermint Core开发的[项目列表](cosmos.network/ecosystem)。 - - -## 来自合作伙伴的评价 - -> “Cosmos团队搭建了一个非常必要的基础设施,有可能触发加密经济网络的指数型增长。” — Brian Kelly,BKCM -> - -> “我们很高兴能够支持Cosmos对跨链生态系统的愿景。 Jae Kwon带领的团队展现了严谨务实的奉献精神和对去中心化系统设计的远见卓识。 我们对团队在建立第一个生产就绪的 POS BFT系统方面的进展感到特别兴奋,期待能够看到新的去中心化应用早日实现。“ — Matt Huang和Charlie Noyes,Paradigm diff --git a/docs/gaia/launch/blog-3-en.md b/docs/gaia/launch/blog-3-en.md deleted file mode 100644 index 201165ad6a..0000000000 --- a/docs/gaia/launch/blog-3-en.md +++ /dev/null @@ -1,47 +0,0 @@ -# Blastoff — The Cosmos Hub Mainnet is Live -**Announcing the Mainnet Launch of the Cosmos Hub** - -## About Cosmos -In 2014, Jae Kwon observed that the safety-favoring nature of classical Byzantine Fault Tolerant (BFT) consensus algorithms would allow us to use Proof of Stake (PoS) for Sybil resistance in a public blockchain context without the need for external sources of pseudorandomness. In 2015, he was joined by Ethan Buchman to build a future where there are as many blockchains as there are web apps today. - -In order to prove that we could have a secure, BFT system running on Proof-of-Stake, we needed to test the theory out on a public, decentralized blockchain. That blockchain is the Cosmos Hub. - -The core motivation fueling this launch is the desire to provide infrastructure for a scalable public blockchain network. The Cosmos vision is to enable communication and connectivity among thousands of cryptocurrency systems, allowing the network to scale without utilizing Proof-of-Work. - -To make this vision a reality, [Tendermint Core](https://github.com/tendermint/tendermint) was developed as a BFT consensus engine that could be used as the first layer for any PoS blockchain. - -The vision also required a framework to significantly lower the barrier to entry for developing decentralized applications. Similar to how web frameworks such as Ruby on Rails or Django brought about a Cambrian explosion of web applications, the [Cosmos SDK](https://github.com/cosmos/cosmos-sdk) was created to make blockchain development easy and catalyze the explosion of blockchain applications. - -Nearly five years since the creation of Tendermint Core, the dream of creating an Internet of Blockchains powered by BFT Proof-of-Stake has become a reality. Here’s a look back at a brief history of the development progress which set the gears in motion toward our journey to the Cosmos. - -Get an intro to Cosmos and its flagship open-source software here: [cosmos.network/intro](https://cosmos.network/intro) - -Learn how to program custom application-specific blockchains with the Cosmos SDK by following [this tutorial](https://cosmos.network/docs/tutorial/). - -### Cosmos Mainnet Launch -The Cosmos Hub is the first public BFT blockchain powered by proof-of-stake, and the first BFT system deployed at scale in almost 40 years of Byzantine Fault Tolerance (BFT) research history. The mainnet is set to be rolled out in three phases: network gains stability, transfers enabled, and IBC enabled. - -- Read what Coindesk [has to say](https://www.coindesk.com/a-blockchain-to-connect-all-blockchains-cosmos-is-now-officially-live) about the Cosmos Hub launch. - -Learn more about Cosmos here: [cosmos.network/about](https://cosmos.network/about) - -## Cosmos Ecosystem -Below are some highlights from the Cosmos universe. - -### Tendermint Inc Series A Round -Tendermint Inc, the lead developer of [Tendermint Core](https://github.com/tendermint/tendermint), [Cosmos SDK](https://github.com/cosmos/cosmos-sdk), and the [Cosmos Network](https://cosmos.network/), has raised its Series A in a round led by Paradigm’s USD $400 million blockchain fund. Other prominent investors like [Bain Capital](https://www.baincapitalventures.com/) and [1confirmation](https://www.1confirmation.com/) also participated. Part of the funds will be used by Tendermint Inc to support the continued development of the Cosmos Network and its ecosystem. - -[Read more here](https://medium.com/tendermint/tendermint-inc-announces-series-a-round-9c062d1bd7de) - -### Interchain Foundation Research & Development -[Interchain Foundation](https://interchain.io/) (ICF), the Swiss non-profit funding development of the Cosmos Network technology, is growing its research and development efforts by [collaborating with other research institutions](https://interchain.io/research) and [growing its internal R&D team](https://interchain.io/careers). It is also [accepting applications](https://interchain.typeform.com/to/P3tOm0) from projects seeking funding. - -### Ecosystem & Use Cases -While the Cosmos Hub is the first blockchain launched in the Cosmos Network, the wider Cosmos project, like the observable universe, is quickly expanding. The number of contributors to the core software repositories has grown to over 150. The number of validators on testnets has been well over 100; the number of validators participating in the decentralized main net launch is over 50. There is a community-curated list where [80 projects](https://forum.cosmos.network/t/list-of-projects-in-cosmos-tendermint-ecosystem/243) and counting have indicated they are building, or intend to build, applications with the Cosmos SDK and/or Tendermint Core. Some of the highest profile projects can be found on the [ecosystem page](https://cosmos.network/ecosystem), and include applications in gaming, content distribution, music, ecological monitoring and regeneration, blockchain interoperability, and more — the wide diversity of use cases made possible by the modular and general purpose infrastructure that we’ve open-sourced. - -Here’s a list of Cosmos SDK/Tendermint Core-based projects: [cosmos.network/ecosystem](https://cosmos.network/ecosystem) - -### What our partners say about us -“The Cosmos team has created an essential piece of infrastructure that has the potential to ignite exponential growth in crypto-economic networks.” — Brian Kelly, BKCM - -“We are excited to support Cosmos’s vision for an ecosystem of interoperable blockchains. The team, led by Jae Kwon, has shown years of dedication and a keen understanding for trade-offs in decentralized system design. We are particularly excited with the team’s progress in building the first production-ready Proof of Stake BFT system, and we look forward to seeing what new decentralized applications that enables.” — Matt Huang & Charlie Noyes, Paradigm From 576eb519284470754fa275b7d407ba2dcf6c880f Mon Sep 17 00:00:00 2001 From: Alexander Bezobchuk <alexanderbez@users.noreply.github.com> Date: Fri, 5 Apr 2019 14:13:22 -0400 Subject: [PATCH 30/37] Merge PR #4058: Fix DecCoins Bugs --- CHANGELOG.md | 28 +++++++++++++++++ types/dec_coin.go | 70 ++++++++++++++++++++++++++++++++---------- types/dec_coin_test.go | 25 +++++++++++++++ 3 files changed, 107 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d01901e72..b40b9aa0fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,31 @@ # Changelog +* [0.34.0](#0340) + * [Breaking Changes](#breaking-changes) + * [Gaia](#gaia) + * [Gaia CLI](#gaia-cli) + * [SDK](#sdk) + * [Tendermint](#tendermint) + * [New features](#new-features) + * [SDK](#sdk-1) + * [Gaia](#gaia-1) + * [Gaia CLI](#gaia-cli-1) + * [Gaia REST API](#gaia-rest-api) + * [Improvements](#improvements) + * [Gaia](#gaia-2) + * [Gaia CLI](#gaia-cli-2) + * [SDK](#sdk-2) + * [Bug Fixes](#bug-fixes) + * [Gaia](#gaia-3) + * [Gaia CLI](#gaia-cli-3) + * [SDK](#sdk-3) +* [0.33.2](#0332) + * [Improvements](#improvements-1) + * [Tendermint](#tendermint-1) +* [0.33.1](#0331) + * [Bug Fixes](#bug-fixes-1) + * [Gaia](#gaia-4) + ## 0.34.0 ### Breaking Changes @@ -116,6 +142,8 @@ * [\#3977](https://github.com/cosmos/cosmos-sdk/issues/3977) Fix docker image build * [\#4020](https://github.com/cosmos/cosmos-sdk/issues/4020) Fix queryDelegationRewards by returning an error when the validator or delegation do not exist. +* [\#4050](https://github.com/cosmos/cosmos-sdk/issues/4050) Fix DecCoins APIs +where rounding or truncation could result in zero decimal coins. ## 0.33.2 diff --git a/types/dec_coin.go b/types/dec_coin.go index d9116c323e..4d53667eca 100644 --- a/types/dec_coin.go +++ b/types/dec_coin.go @@ -312,55 +312,93 @@ func (coins DecCoins) IsAnyNegative() bool { return false } -// multiply all the coins by a decimal +// MulDec multiplies all the coins by a decimal. +// +// CONTRACT: No zero coins will be returned. func (coins DecCoins) MulDec(d Dec) DecCoins { - res := make([]DecCoin, len(coins)) - for i, coin := range coins { + var res DecCoins + for _, coin := range coins { product := DecCoin{ Denom: coin.Denom, Amount: coin.Amount.Mul(d), } - res[i] = product + + if !product.IsZero() { + res = res.Add(DecCoins{product}) + } } + return res } -// multiply all the coins by a decimal, truncating +// MulDecTruncate multiplies all the decimal coins by a decimal, truncating. It +// panics if d is zero. +// +// CONTRACT: No zero coins will be returned. func (coins DecCoins) MulDecTruncate(d Dec) DecCoins { - res := make([]DecCoin, len(coins)) - for i, coin := range coins { + if d.IsZero() { + panic("invalid zero decimal") + } + + var res DecCoins + for _, coin := range coins { product := DecCoin{ Denom: coin.Denom, Amount: coin.Amount.MulTruncate(d), } - res[i] = product + + if !product.IsZero() { + res = res.Add(DecCoins{product}) + } } + return res } -// divide all the coins by a decimal +// QuoDec divides all the decimal coins by a decimal. It panics if d is zero. +// +// CONTRACT: No zero coins will be returned. func (coins DecCoins) QuoDec(d Dec) DecCoins { - res := make([]DecCoin, len(coins)) - for i, coin := range coins { + if d.IsZero() { + panic("invalid zero decimal") + } + + var res DecCoins + for _, coin := range coins { quotient := DecCoin{ Denom: coin.Denom, Amount: coin.Amount.Quo(d), } - res[i] = quotient + + if !quotient.IsZero() { + res = res.Add(DecCoins{quotient}) + } } + return res } -// divide all the coins by a decimal, truncating +// QuoDecTruncate divides all the decimal coins by a decimal, truncating. It +// panics if d is zero. +// +// CONTRACT: No zero coins will be returned. func (coins DecCoins) QuoDecTruncate(d Dec) DecCoins { - res := make([]DecCoin, len(coins)) - for i, coin := range coins { + if d.IsZero() { + panic("invalid zero decimal") + } + + var res DecCoins + for _, coin := range coins { quotient := DecCoin{ Denom: coin.Denom, Amount: coin.Amount.QuoTruncate(d), } - res[i] = quotient + + if !quotient.IsZero() { + res = res.Add(DecCoins{quotient}) + } } + return res } diff --git a/types/dec_coin_test.go b/types/dec_coin_test.go index f439484f92..7e904fe5dc 100644 --- a/types/dec_coin_test.go +++ b/types/dec_coin_test.go @@ -290,3 +290,28 @@ func TestDecCoinsTruncateDecimal(t *testing.T) { ) } } + +func TestDecCoinsQuoDecTruncate(t *testing.T) { + x := MustNewDecFromStr("1.00") + y := MustNewDecFromStr("10000000000000000000.00") + + testCases := []struct { + coins DecCoins + input Dec + result DecCoins + panics bool + }{ + {DecCoins{}, ZeroDec(), DecCoins(nil), true}, + {DecCoins{NewDecCoinFromDec("foo", x)}, y, DecCoins(nil), false}, + {DecCoins{NewInt64DecCoin("foo", 5)}, NewDec(2), DecCoins{NewDecCoinFromDec("foo", MustNewDecFromStr("2.5"))}, false}, + } + + for i, tc := range testCases { + if tc.panics { + require.Panics(t, func() { tc.coins.QuoDecTruncate(tc.input) }) + } else { + res := tc.coins.QuoDecTruncate(tc.input) + require.Equal(t, tc.result, res, "unexpected result; tc #%d, coins: %s, input: %s", i, tc.coins, tc.input) + } + } +} From bec468953edcb82e7a49b4725bdc485246be1fc2 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Mon, 8 Apr 2019 18:49:14 +0200 Subject: [PATCH 31/37] Merge PR #4023: Genesis port script v0.33.x to v0.34.0 --- .gitignore | 1 + .../improvements/gaia/4018-create-genesis- | 1 + contrib/export/lib.py | 28 +++++++++++++ contrib/export/v0.33.x-to-v0.34.0.py | 42 +++++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 .pending/improvements/gaia/4018-create-genesis- create mode 100644 contrib/export/lib.py create mode 100755 contrib/export/v0.33.x-to-v0.34.0.py diff --git a/.gitignore b/.gitignore index 836329e728..b6c9df729d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.swn .vscode .idea +*.pyc # Build vendor diff --git a/.pending/improvements/gaia/4018-create-genesis- b/.pending/improvements/gaia/4018-create-genesis- new file mode 100644 index 0000000000..e2c106b942 --- /dev/null +++ b/.pending/improvements/gaia/4018-create-genesis- @@ -0,0 +1 @@ +#4018 create genesis port script for release v.0.34.0 diff --git a/contrib/export/lib.py b/contrib/export/lib.py new file mode 100644 index 0000000000..2e7457f753 --- /dev/null +++ b/contrib/export/lib.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python3 + +import argparse +import json +import sys + + +def init_default_argument_parser(prog_desc, default_chain_id, default_start_time): + parser = argparse.ArgumentParser(description=prog_desc) + parser.add_argument( + 'exported_genesis', + help='exported genesis.json file', + type=argparse.FileType('r'), default=sys.stdin, + ) + parser.add_argument('--chain-id', type=str, default=default_chain_id) + parser.add_argument('--start-time', type=str, default=default_start_time) + return parser + + +def main(argument_parser, process_genesis_func): + args = argument_parser.parse_args() + if args.chain_id.strip() == '': + sys.exit('chain-id required') + + genesis = json.loads(args.exported_genesis.read()) + + print(json.dumps(process_genesis_func( + genesis=genesis, parsed_args=args,), indent=True)) diff --git a/contrib/export/v0.33.x-to-v0.34.0.py b/contrib/export/v0.33.x-to-v0.34.0.py new file mode 100755 index 0000000000..c3528a206b --- /dev/null +++ b/contrib/export/v0.33.x-to-v0.34.0.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python3 + +import lib + + +def process_raw_genesis(genesis, parsed_args): + # update genesis with breaking changes + genesis['consensus_params']['block'] = genesis['consensus_params']['block_size'] + del genesis['consensus_params']['block_size'] + + genesis['app_state']['crisis'] = { + 'constant_fee': { + 'amount': '1333000000', # ~$5,000 worth of uatoms + 'denom': 'uatom', + }, + } + + # proposal #1 updates + genesis['app_state']['mint']['params']['blocks_per_year'] = '4855015' + + # proposal #2 updates + genesis['consensus_params']['block']['max_gas'] = '2000000' + genesis['consensus_params']['block']['max_bytes'] = '200000' + + # enable transfers + genesis['app_state']['bank']['send_enabled'] = True + genesis['app_state']['distr']['withdraw_addr_enabled'] = True + + # Set new chain ID and genesis start time + genesis['chain_id'] = parsed_args.chain_id.strip() + genesis['genesis_time'] = parsed_args.start_time + + return genesis + + +if __name__ == '__main__': + parser = lib.init_default_argument_parser( + prog_desc='Convert genesis.json from v0.33.x to v0.34.0', + default_chain_id='cosmoshub-n', + default_start_time='2019-02-11T12:00:00Z', + ) + lib.main(parser, process_raw_genesis) From c255764c4f1e274499a7b21d248c009391e9dee5 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Date: Mon, 8 Apr 2019 18:14:27 -0400 Subject: [PATCH 32/37] Add back IOTA time in consensus params --- contrib/export/v0.33.x-to-v0.34.0.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/export/v0.33.x-to-v0.34.0.py b/contrib/export/v0.33.x-to-v0.34.0.py index c3528a206b..bb7d6520cf 100755 --- a/contrib/export/v0.33.x-to-v0.34.0.py +++ b/contrib/export/v0.33.x-to-v0.34.0.py @@ -15,6 +15,9 @@ def process_raw_genesis(genesis, parsed_args): }, } + # default tm value + genesis['consensus_params']['block']['time_iota_ms'] = '1000' + # proposal #1 updates genesis['app_state']['mint']['params']['blocks_per_year'] = '4855015' From ace9910e944ad47d039b22b3c4f13281ccc50ab1 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Date: Wed, 10 Apr 2019 11:24:46 -0400 Subject: [PATCH 33/37] Update change log --- .pending/improvements/gaia/4018-create-genesis- | 1 - CHANGELOG.md | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 .pending/improvements/gaia/4018-create-genesis- diff --git a/.pending/improvements/gaia/4018-create-genesis- b/.pending/improvements/gaia/4018-create-genesis- deleted file mode 100644 index e2c106b942..0000000000 --- a/.pending/improvements/gaia/4018-create-genesis- +++ /dev/null @@ -1 +0,0 @@ -#4018 create genesis port script for release v.0.34.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index b40b9aa0fb..706ac4e96a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ * Add shorthand flags -a and -s for the account and sequence numbers respectively * Mark the account and sequence numbers required during "offline" mode * Always do an RPC query for account and sequence number during "online" mode +* [\#4018](https://github.com/cosmos/cosmos-sdk/issues/4018) create genesis port script for release v.0.34.0 #### Gaia CLI From 38e3fdfcea9c300bbce0744aa12d8dcabf691a97 Mon Sep 17 00:00:00 2001 From: frog power 4000 <rigel.rozanski@gmail.com> Date: Wed, 10 Apr 2019 18:53:42 -0400 Subject: [PATCH 34/37] Merge PR #4094: Account for Rounding Errors in Distribution Calculations --- CHANGELOG.md | 2 ++ types/staking.go | 1 + x/distribution/keeper/delegation.go | 39 +++++++++++++++++++---------- x/distribution/keeper/validator.go | 5 +++- x/staking/types/validator.go | 6 +++++ 5 files changed, 39 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 706ac4e96a..ff1081e7c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -145,6 +145,8 @@ when the validator or delegation do not exist. * [\#4050](https://github.com/cosmos/cosmos-sdk/issues/4050) Fix DecCoins APIs where rounding or truncation could result in zero decimal coins. +* [\#4088](https://github.com/cosmos/cosmos-sdk/issues/4088) Fix `calculateDelegationRewards` +by accounting for rounding errors when multiplying stake by slashing fractions. ## 0.33.2 diff --git a/types/staking.go b/types/staking.go index fadf57f913..79832ac00a 100644 --- a/types/staking.go +++ b/types/staking.go @@ -75,6 +75,7 @@ type Validator interface { GetDelegatorShares() Dec // total outstanding delegator shares TokensFromShares(Dec) Dec // token worth of provided delegator shares TokensFromSharesTruncated(Dec) Dec // token worth of provided delegator shares, truncated + TokensFromSharesRoundUp(Dec) Dec // token worth of provided delegator shares, rounded up SharesFromTokens(amt Int) (Dec, Error) // shares worth of delegator's bond SharesFromTokensTruncated(amt Int) (Dec, Error) // truncated shares worth of delegator's bond } diff --git a/x/distribution/keeper/delegation.go b/x/distribution/keeper/delegation.go index f6d9bdc280..677c38342c 100644 --- a/x/distribution/keeper/delegation.go +++ b/x/distribution/keeper/delegation.go @@ -64,13 +64,16 @@ func (k Keeper) calculateDelegationRewards(ctx sdk.Context, val sdk.Validator, d startingPeriod := startingInfo.PreviousPeriod stake := startingInfo.Stake - // iterate through slashes and withdraw with calculated staking for sub-intervals - // these offsets are dependent on *when* slashes happen - namely, in BeginBlock, after rewards are allocated... - // slashes which happened in the first block would have been before this delegation existed, - // UNLESS they were slashes of a redelegation to this validator which was itself slashed - // (from a fault committed by the redelegation source validator) earlier in the same BeginBlock + // Iterate through slashes and withdraw with calculated staking for + // distribution periods. These period offsets are dependent on *when* slashes + // happen - namely, in BeginBlock, after rewards are allocated... + // Slashes which happened in the first block would have been before this + // delegation existed, UNLESS they were slashes of a redelegation to this + // validator which was itself slashed (from a fault committed by the + // redelegation source validator) earlier in the same BeginBlock. startingHeight := startingInfo.Height - // slashes this block happened after reward allocation, but we have to account for them for the stake sanity check below + // Slashes this block happened after reward allocation, but we have to account + // for them for the stake sanity check below. endingHeight := uint64(ctx.BlockHeight()) if endingHeight > startingHeight { k.IterateValidatorSlashEventsBetween(ctx, del.GetValidatorAddr(), startingHeight, endingHeight, @@ -78,7 +81,9 @@ func (k Keeper) calculateDelegationRewards(ctx sdk.Context, val sdk.Validator, d endingPeriod := event.ValidatorPeriod if endingPeriod > startingPeriod { rewards = rewards.Add(k.calculateDelegationRewardsBetween(ctx, val, startingPeriod, endingPeriod, stake)) - // note: necessary to truncate so we don't allow withdrawing more rewards than owed + + // Note: It is necessary to truncate so we don't allow withdrawing + // more rewards than owed. stake = stake.MulTruncate(sdk.OneDec().Sub(event.Fraction)) startingPeriod = endingPeriod } @@ -87,18 +92,26 @@ func (k Keeper) calculateDelegationRewards(ctx sdk.Context, val sdk.Validator, d ) } - // a stake sanity check - recalculated final stake should be less than or equal to current stake - // here we cannot use Equals because stake is truncated when multiplied by slash fractions - // we could only use equals if we had arbitrary-precision rationals + // A total stake sanity check; Recalculated final stake should be less than or + // equal to current stake here. We cannot use Equals because stake is truncated + // when multiplied by slash fractions (see above). We could only use equals if + // we had arbitrary-precision rationals. currentStake := val.TokensFromShares(del.GetShares()) if stake.GT(currentStake) { - panic(fmt.Sprintf("calculated final stake for delegator %s greater than current stake: %s, %s", - del.GetDelegatorAddr(), stake, currentStake)) + // account for rounding errors due to stake being multiplied by slash fractions + currentStakeRoundUp := val.TokensFromSharesRoundUp(del.GetShares()) + if stake.Equal(currentStakeRoundUp) { + stake = currentStake + } else { + panic(fmt.Sprintf("calculated final stake for delegator %s greater than current stake"+ + "\n\tfinal stake:\t%s"+ + "\n\tcurrent stake:\t%s", + del.GetDelegatorAddr(), stake, currentStake)) + } } // calculate rewards for final period rewards = rewards.Add(k.calculateDelegationRewardsBetween(ctx, val, startingPeriod, endingPeriod, stake)) - return rewards } diff --git a/x/distribution/keeper/validator.go b/x/distribution/keeper/validator.go index 18c6cc6e87..93c20f4793 100644 --- a/x/distribution/keeper/validator.go +++ b/x/distribution/keeper/validator.go @@ -106,7 +106,10 @@ func (k Keeper) updateValidatorSlashFraction(ctx sdk.Context, valAddr sdk.ValAdd } currentMultiplicand := sdk.OneDec().Sub(currentFraction) newMultiplicand := sdk.OneDec().Sub(fraction) - updatedFraction := sdk.OneDec().Sub(currentMultiplicand.Mul(newMultiplicand)) + + // using MulTruncate here conservatively increases the slashing amount + updatedFraction := sdk.OneDec().Sub(currentMultiplicand.MulTruncate(newMultiplicand)) + if updatedFraction.LT(sdk.ZeroDec()) { panic("negative slash fraction") } diff --git a/x/staking/types/validator.go b/x/staking/types/validator.go index e7132ebff3..c048de744c 100644 --- a/x/staking/types/validator.go +++ b/x/staking/types/validator.go @@ -421,6 +421,12 @@ func (v Validator) TokensFromSharesTruncated(shares sdk.Dec) sdk.Dec { return (shares.MulInt(v.Tokens)).QuoTruncate(v.DelegatorShares) } +// TokensFromSharesRoundUp returns the token worth of provided shares, rounded +// up. +func (v Validator) TokensFromSharesRoundUp(shares sdk.Dec) sdk.Dec { + return (shares.MulInt(v.Tokens)).QuoRoundUp(v.DelegatorShares) +} + // SharesFromTokens returns the shares of a delegation given a bond amount. It // returns an error if the validator has no tokens. func (v Validator) SharesFromTokens(amt sdk.Int) (sdk.Dec, sdk.Error) { From f8b9a60d6704f93344903a57cb43d09575596603 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Date: Wed, 10 Apr 2019 19:22:15 -0400 Subject: [PATCH 35/37] Fix docs config --- docs/.vuepress/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 0839045e82..52dfd3a2b4 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -45,7 +45,7 @@ module.exports = { "/cosmos-hub/validators/security", "/cosmos-hub/validators/validator-faq", "/cosmos-hub/delegator-guide-cli", - "/cosmos-hub/genesis.md", + "/cosmos-hub/genesis", "/cosmos-hub/ledger", "/cosmos-hub/gaiacli", "/cosmos-hub/join-testnet", From de720660db6d0548587981cac3e6b821295db298 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Date: Wed, 10 Apr 2019 21:44:24 -0400 Subject: [PATCH 36/37] Remove panic on zero input during MulDecTruncate --- types/dec_coin.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/types/dec_coin.go b/types/dec_coin.go index 4d53667eca..1ecfd82608 100644 --- a/types/dec_coin.go +++ b/types/dec_coin.go @@ -336,11 +336,8 @@ func (coins DecCoins) MulDec(d Dec) DecCoins { // // CONTRACT: No zero coins will be returned. func (coins DecCoins) MulDecTruncate(d Dec) DecCoins { - if d.IsZero() { - panic("invalid zero decimal") - } - var res DecCoins + for _, coin := range coins { product := DecCoin{ Denom: coin.Denom, From 927f76f6bb3d0cfb81ee4fcafc9d60090b76a172 Mon Sep 17 00:00:00 2001 From: Jack Zampolin <jack.zampolin@gmail.com> Date: Fri, 12 Apr 2019 11:51:01 -0700 Subject: [PATCH 37/37] Update Tendermint to v0.31.4 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index faa47726d1..a845f33837 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ require ( github.com/tendermint/btcd v0.1.1 github.com/tendermint/go-amino v0.14.1 github.com/tendermint/iavl v0.12.1 - github.com/tendermint/tendermint v0.31.3 + github.com/tendermint/tendermint v0.31.4 github.com/zondax/hid v0.9.0 // indirect golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 google.golang.org/grpc v1.19.0 // indirect diff --git a/go.sum b/go.sum index fea25091b8..f7fe4d2786 100644 --- a/go.sum +++ b/go.sum @@ -146,8 +146,8 @@ github.com/tendermint/go-amino v0.14.1 h1:o2WudxNfdLNBwMyl2dqOJxiro5rfrEaU0Ugs6o github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= github.com/tendermint/iavl v0.12.1 h1:JDfyhM/Hhrumu1CL1Nxrypm8sNTPYqmeHo1IZLiJoXM= github.com/tendermint/iavl v0.12.1/go.mod h1:EoKMMv++tDOL5qKKVnoIqtVPshRrEPeJ0WsgDOLAauM= -github.com/tendermint/tendermint v0.31.3 h1:IlehDNREaGdt/VVZTjs978R/lhmnIf4NOH3j+ZhhbZA= -github.com/tendermint/tendermint v0.31.3/go.mod h1:ymcPyWblXCplCPQjbOYbrF1fWnpslATMVqiGgWbZrlc= +github.com/tendermint/tendermint v0.31.4 h1:F/vZ/fMHZJriAkDLjf9ZrReJQsuELiTmJLqigmbE5NU= +github.com/tendermint/tendermint v0.31.4/go.mod h1:ymcPyWblXCplCPQjbOYbrF1fWnpslATMVqiGgWbZrlc= github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=