From 0b5106090c1a0ad4a2d3b9e73463bc50f491514c Mon Sep 17 00:00:00 2001 From: Christopher Goes Date: Fri, 26 Oct 2018 13:44:49 +0200 Subject: [PATCH 1/7] PENDING.md => CHANGELOG.md --- CHANGELOG.md | 6 ++++-- PENDING.md | 3 --- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 322142889..36061ed5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -220,6 +220,7 @@ IMPROVEMENTS * [types/decimal] [\#2378](https://github.com/cosmos/cosmos-sdk/issues/2378) - Added truncate functionality to decimal * [client] [\#1184](https://github.com/cosmos/cosmos-sdk/issues/1184) Remove unused `client/tx/sign.go`. * [tools] [\#2464](https://github.com/cosmos/cosmos-sdk/issues/2464) Lock binary dependencies to a specific version + * #2573 [x/distribution] add accum invariance BUG FIXES @@ -240,8 +241,9 @@ BUG FIXES * [\#2158](https://github.com/cosmos/cosmos-sdk/issues/2158) Fix non-deterministic ordering of validator iteration when slashing in `gov EndBlocker` * [simulation] [\#1924](https://github.com/cosmos/cosmos-sdk/issues/1924) Make simulation stop on SIGTERM * [\#2388](https://github.com/cosmos/cosmos-sdk/issues/2388) Remove dependency on deprecated tendermint/tmlibs repository. - * [\#2416](https://github.com/cosmos/cosmos-sdk/issues/2416) Refactored - `InitializeTestLCD` to properly include proposing validator in genesis state. + * [\#2416](https://github.com/cosmos/cosmos-sdk/issues/2416) Refactored `InitializeTestLCD` to properly include proposing validator in genesis state. + * #2573 [x/distribution] accum invariance bugfix + * #2573 [x/slashing] unbonding-delegation slashing invariance bugfix ## 0.24.2 diff --git a/PENDING.md b/PENDING.md index f315af561..4d87301f0 100644 --- a/PENDING.md +++ b/PENDING.md @@ -35,7 +35,6 @@ IMPROVEMENTS * Gaia * SDK - - #2573 [x/distribution] add accum invariance * Tendermint @@ -49,7 +48,5 @@ BUG FIXES * Gaia * SDK - - #2573 [x/distribution] accum invariance bugfix - - #2573 [x/slashing] unbonding-delegation slashing invariance bugfix * Tendermint From 331b8ee25d930c301e0276e9d3d0b148fafb0e84 Mon Sep 17 00:00:00 2001 From: Christopher Goes Date: Fri, 26 Oct 2018 15:12:05 +0200 Subject: [PATCH 2/7] Manually linkify --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36061ed5f..915703b62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,7 +46,7 @@ BREAKING CHANGES * `cosmosvaladdr` / `cosmosvalpub` => `cosmosvaloper` / `cosmosvaloperpub` * [x/stake] [#1013] TendermintUpdates now uses transient store * [x/stake] [\#2435](https://github.com/cosmos/cosmos-sdk/issues/2435) Remove empty bytes from the ValidatorPowerRank store key - * [x/gov] [#2195] Governance uses BFT Time + * [x/gov] [\#2195](https://github.com/cosmos/cosmos-sdk/issues/2195) Governance uses BFT Time * [x/gov] [\#2256](https://github.com/cosmos/cosmos-sdk/issues/2256) Removed slashing for governance non-voting validators * [simulation] [\#2162](https://github.com/cosmos/cosmos-sdk/issues/2162) Added back correct supply invariants * [x/slashing] [\#2430](https://github.com/cosmos/cosmos-sdk/issues/2430) Simulate more slashes, check if validator is jailed before jailing From 08fa5977adf8a63fb52085ebbb87b65a5162d990 Mon Sep 17 00:00:00 2001 From: Christopher Goes Date: Fri, 26 Oct 2018 15:16:13 +0200 Subject: [PATCH 3/7] Manually fix some links --- CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 915703b62..764d481f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -138,7 +138,7 @@ FEATURES * Gaia CLI (`gaiacli`) * [cli] Cmds to query staking pool and params - * [gov][cli] #2062 added `--proposal` flag to `submit-proposal` that allows a JSON file containing a proposal to be passed in + * [gov][cli] [\#2062](https://github.com/cosmos/cosmos-sdk/issues/2062) added `--proposal` flag to `submit-proposal` that allows a JSON file containing a proposal to be passed in * [\#2040](https://github.com/cosmos/cosmos-sdk/issues/2040) Add `--bech` to `gaiacli keys show` and respective REST endpoint to provide desired Bech32 prefix encoding * [cli] [\#2047](https://github.com/cosmos/cosmos-sdk/issues/2047) [\#2306](https://github.com/cosmos/cosmos-sdk/pull/2306) Passing --gas=simulate triggers a simulation of the tx before the actual execution. @@ -156,8 +156,8 @@ FEATURES * [cli][\#2554](https://github.com/cosmos/cosmos-sdk/issues/2554) Make `gaiacli keys show` multisig ready. * Gaia - * [cli] #2170 added ability to show the node's address via `gaiad tendermint show-address` - * [simulation] #2313 Reworked `make test_sim_gaia_slow` to `make test_sim_gaia_full`, now simulates from multiple starting seeds in parallel + * [cli] [\#2170](https://github.com/cosmos/cosmos-sdk/issues/2170) added ability to show the node's address via `gaiad tendermint show-address` + * [simulation] [\#2313](https://github.com/cosmos/cosmos-sdk/issues/2313) Reworked `make test_sim_gaia_slow` to `make test_sim_gaia_full`, now simulates from multiple starting seeds in parallel * [cli] [\#1921] (https://github.com/cosmos/cosmos-sdk/issues/1921) * New configuration file `gaiad.toml` is now created to host Gaia-specific configuration. * New --minimum_fees/minimum_fees flag/config option to set a minimum fee. @@ -184,8 +184,8 @@ IMPROVEMENTS * [x/stake] Refactor REST utils * Gaia CLI (`gaiacli`) - * [cli] #2060 removed `--select` from `block` command - * [cli] #2128 fixed segfault when exporting directly after `gaiad init` + * [cli] [\#2060](https://github.com/cosmos/cosmos-sdk/issues/2060) removed `--select` from `block` command + * [cli] [\#2128](https://github.com/cosmos/cosmos-sdk/issues/2128) fixed segfault when exporting directly after `gaiad init` * [cli] [\#1255](https://github.com/cosmos/cosmos-sdk/issues/1255) open KeyBase in read-only mode for query-purpose CLI commands From cce48dc68c9f302ef72800eaa3b848c2f2cdb1ae Mon Sep 17 00:00:00 2001 From: Christopher Goes Date: Fri, 26 Oct 2018 15:47:07 +0200 Subject: [PATCH 4/7] Docs fixes in progress while running through the release process --- docs/sdk/clients.md | 76 ++++++++++++++++++++----------------- x/stake/client/cli/flags.go | 4 +- x/stake/client/cli/tx.go | 8 ++-- 3 files changed, 47 insertions(+), 41 deletions(-) diff --git a/docs/sdk/clients.md b/docs/sdk/clients.md index 4703c4921..8697a14a9 100644 --- a/docs/sdk/clients.md +++ b/docs/sdk/clients.md @@ -10,6 +10,16 @@ 🚧 We are actively working on improving documentation for Gaiacli and Gaiad. ::: +::: tip Note +If you receive this error message: + +```bash +Must specify these options: --chain-id when --trust-node is false +``` + +you must choose whether you wish to verify lite client proofs. If you trust the node which you are querying, you can simply pass `--trust-node=true` - otherwise you'll need to specify `--chain-id`. +::: + `gaiacli` is the command line interface to manage accounts and transactions on Cosmos testnets. Here is a list of useful `gaiacli` commands, including usage examples. ### Keys @@ -70,6 +80,8 @@ View the validator pubkey for your node by typing: gaiad tendermint show-validator ``` +Note that this is the Tendermint signing key, *not* the operator key you will use in delegation transactions. + ::: danger Warning 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. ::: @@ -79,7 +91,7 @@ We strongly recommend _NOT_ using the same passphrase for multiple keys. The Ten You can generate and print a multisig public key by typing: ```bash -gaiacli show -m K key1 key2...keyK +gaiacli show --multisig-threshold K name1 name2 name3 [...] ``` `K` is the minimum weight, e.g. minimum number of private keys that must have signed the transactions that carry the generated public key. @@ -95,7 +107,7 @@ The best way to get tokens is from the [Cosmos Testnet Faucet](https://faucetcos After receiving tokens to your address, you can view your account's balance by typing: ```bash -gaiacli account +gaiacli query account ``` ::: warning Note @@ -111,7 +123,7 @@ The following command could be used to send coins from one account to another: gaiacli tx send \ --amount=10faucetToken \ --chain-id= \ - --name= \ + --from= \ --to= ``` @@ -128,14 +140,14 @@ Gas estimate might be inaccurate as state changes could occur in between the end Now, view the updated balances of the origin and destination accounts: ```bash -gaiacli account -gaiacli account +gaiacli query account +gaiacli query account ``` You can also check your balance at a given block by using the `--block` flag: ```bash -gaiacli account --block= +gaiacli query account --block= ``` You can simulate a transaction without actually broadcasting it by appending the `--dry-run` flag to the command line: @@ -144,7 +156,7 @@ You can simulate a transaction without actually broadcasting it by appending the gaiacli tx send \ --amount=10faucetToken \ --chain-id= \ - --name= \ + --from= \ --to= \ --dry-run ``` @@ -155,7 +167,7 @@ Furthermore, you can build a transaction and print its JSON format to STDOUT by gaiacli tx send \ --amount=10faucetToken \ --chain-id= \ - --name= \ + --from= \ --to= \ --generate-only > unsignedSendTx.json ``` @@ -165,7 +177,7 @@ You can now sign the transaction file generated through the `--generate-only` fl ```bash gaiacli tx sign \ --chain-id= \ - --name= + --from= unsignedSendTx.json > signedSendTx.json ``` @@ -206,11 +218,19 @@ On the testnet, we delegate `steak` instead of `atom`. Here's how you can bond t ```bash gaiacli tx delegate \ --amount=10steak \ - --validator=$(gaiad tendermint show-validator) \ - --name= \ + --validator= \ + --from= \ --chain-id= ``` +`` is the operator address of the validator to which you intend to delegate. If you are running a local testnet, you can find this with: + +```bash +gaiacli keys show [name] --bech val +``` + +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 @@ -237,24 +257,17 @@ You can also get previous delegation(s) status by adding the `--height` flag. #### Unbond Tokens -If for any reason the validator misbehaves, or you just want to unbond a certain amount of tokens, use this following command. You can unbond a specific `shares-amount` (eg:`12.1`\) or a `shares-percent` (eg:`25`) with the corresponding flags. +If for any reason the validator misbehaves, or you just want to unbond a certain amount of tokens, use this following command. You can unbond a specific `shares-amount` (eg:`12.1`\) or a `shares-fraction` (eg:`0.25`) with the corresponding flags. ```bash gaiacli tx unbond begin \ --validator= \ - --shares-percent=100 \ + --shares-fraction=0.5 \ --from= \ --chain-id= ``` -Later you must complete the unbonding process by using the `gaiacli tx unbond complete` command: - -```bash -gaiacli tx unbond complete \ - --validator= \ - --from= \ - --chain-id= -``` +The unbonding will be automatically completed when the unbonding period has passed. ##### Query Unbonding-Delegations @@ -280,23 +293,16 @@ A redelegation is a type delegation that allows you to bond illiquid tokens from ```bash gaiacli tx redelegate begin \ - --address-validator-source= \ - --address-validator-dest= \ - --shares-percent=50 \ + --addr-validator-source= \ + --addr-validator-dest= \ + --shares-fraction=50 \ --from= \ --chain-id= ``` -Here you can also redelegate a specific `shares-amount` or a `shares-percent` with the corresponding flags. +Here you can also redelegate a specific `shares-amount` or a `shares-fraction` with the corresponding flags. -Later you must complete the redelegation process by using the `gaiacli tx redelegate complete` command: - -```bash -gaiacli tx unbond complete \ - --validator= \ - --from= \ - --chain-id= -``` +The redelegation will be automatically completed when the unbonding period has passed. ##### Query Redelegations @@ -305,8 +311,8 @@ Once you begin an redelegation, you can see it's information by using the follow ```bash gaiacli query redelegation \ --address-delegator= \ - --address-validator-source= \ - --address-validator-dest= \ + --addr-validator-source= \ + --addr-validator-dest= \ ``` Or if you want to check all your current unbonding-delegations with disctinct validators: diff --git a/x/stake/client/cli/flags.go b/x/stake/client/cli/flags.go index 29237b6ba..e4948f945 100644 --- a/x/stake/client/cli/flags.go +++ b/x/stake/client/cli/flags.go @@ -15,7 +15,7 @@ const ( FlagPubKey = "pubkey" FlagAmount = "amount" FlagSharesAmount = "shares-amount" - FlagSharesPercent = "shares-percent" + FlagSharesFraction = "shares-fraction" FlagMoniker = "moniker" FlagIdentity = "identity" @@ -51,7 +51,7 @@ func init() { fsPk.String(FlagPubKey, "", "Go-Amino encoded hex PubKey of the validator. For Ed25519 the go-amino prepend hex is 1624de6220") fsAmount.String(FlagAmount, "", "Amount of coins to bond") fsShares.String(FlagSharesAmount, "", "Amount of source-shares to either unbond or redelegate as a positive integer or decimal") - fsShares.String(FlagSharesPercent, "", "Percent of source-shares to either unbond or redelegate as a positive integer or decimal >0 and <=1") + fsShares.String(FlagSharesFraction, "", "Fraction of source-shares to either unbond or redelegate as a positive integer or decimal >0 and <=1") fsDescriptionCreate.String(FlagMoniker, "", "validator name") fsDescriptionCreate.String(FlagIdentity, "", "optional identity signature (ex. UPort or Keybase)") fsDescriptionCreate.String(FlagWebsite, "", "optional website") diff --git a/x/stake/client/cli/tx.go b/x/stake/client/cli/tx.go index e3f1060ee..c43e1276e 100644 --- a/x/stake/client/cli/tx.go +++ b/x/stake/client/cli/tx.go @@ -255,9 +255,9 @@ func GetCmdBeginRedelegate(storeName string, cdc *codec.Codec) *cobra.Command { // get the shares amount sharesAmountStr := viper.GetString(FlagSharesAmount) - sharesPercentStr := viper.GetString(FlagSharesPercent) + sharesFractionStr := viper.GetString(FlagSharesFraction) sharesAmount, err := getShares( - storeName, cdc, sharesAmountStr, sharesPercentStr, + storeName, cdc, sharesAmountStr, sharesFractionStr, delAddr, valSrcAddr, ) if err != nil { @@ -318,9 +318,9 @@ func GetCmdBeginUnbonding(storeName string, cdc *codec.Codec) *cobra.Command { // get the shares amount sharesAmountStr := viper.GetString(FlagSharesAmount) - sharesPercentStr := viper.GetString(FlagSharesPercent) + sharesFractionStr := viper.GetString(FlagSharesFraction) sharesAmount, err := getShares( - storeName, cdc, sharesAmountStr, sharesPercentStr, + storeName, cdc, sharesAmountStr, sharesFractionStr, delAddr, valAddr, ) if err != nil { From 8288490430568e8dc60f31f4dfaf7cba2af7d179 Mon Sep 17 00:00:00 2001 From: Christopher Goes Date: Fri, 26 Oct 2018 15:57:18 +0200 Subject: [PATCH 5/7] More docs fixes --- docs/sdk/clients.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/sdk/clients.md b/docs/sdk/clients.md index 8697a14a9..d75758e78 100644 --- a/docs/sdk/clients.md +++ b/docs/sdk/clients.md @@ -351,7 +351,6 @@ gaiacli tx submit-proposal \ --title= \ --description=<description> \ --type=<Text/ParameterChange/SoftwareUpgrade> \ - --proposer=<account_cosmos> \ --deposit=<40steak> \ --from=<name> \ --chain-id=<chain_id> @@ -381,7 +380,6 @@ In order for a proposal to be broadcasted to the network, the amount deposited m ```bash gaiacli tx deposit \ --proposal-id=<proposal_id> \ - --depositer=<account_cosmos> \ --deposit=<200steak> \ --from=<name> \ --chain-id=<chain_id> @@ -422,9 +420,6 @@ gaiacli query parameters With the above command you will get the values for: -- Maximum and minumum Inflation rate -- Maximum annual change in inflation rate, -- Goal of bonded tokens (%) - Unbonding time - Maximum numbers of validators - Coin denomination for staking From 860245e6fa520fa4dbbf24d33a81e3b8d13bbee4 Mon Sep 17 00:00:00 2001 From: Christopher Goes <cwgoes@pluranimity.org> Date: Fri, 26 Oct 2018 16:09:17 +0200 Subject: [PATCH 6/7] '--voter' is no longer required --- docs/sdk/clients.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/sdk/clients.md b/docs/sdk/clients.md index d75758e78..e28a7f2b3 100644 --- a/docs/sdk/clients.md +++ b/docs/sdk/clients.md @@ -394,7 +394,6 @@ After a proposal's deposit reaches the `MinDeposit` value, the voting period ope ```bash gaiacli tx vote \ --proposal-id=<proposal_id> \ - --voter=<account_cosmos> \ --option=<Yes/No/NoWithVeto/Abstain> \ --from=<name> \ --chain-id=<chain_id> From 9c28c69c40bff400ce382f1a9d17b8f454293a26 Mon Sep 17 00:00:00 2001 From: Christopher Goes <cwgoes@pluranimity.org> Date: Fri, 26 Oct 2018 16:33:27 +0200 Subject: [PATCH 7/7] Rectify validator setup documentation --- docs/validators/validator-setup.md | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/docs/validators/validator-setup.md b/docs/validators/validator-setup.md index 43a3b0672..d07697136 100644 --- a/docs/validators/validator-setup.md +++ b/docs/validators/validator-setup.md @@ -32,10 +32,9 @@ Don't use more `steak` thank you have! You can always get more by using the [Fau gaiacli tx create-validator \ --amount=5steak \ --pubkey=$(gaiad tendermint show-validator) \ - --address-validator=<account_cosmosval> --moniker="choose a moniker" \ --chain-id=<chain_id> \ - --name=<key_name> \ + --from=<key_name> \ --commission-rate="0.10" \ --commission-max-rate="0.20" \ --commission-max-change-rate="0.01" @@ -53,13 +52,12 @@ The `--identity` can be used as to verify identity with systems like Keybase or ```bash gaiacli tx edit-validator - --validator=<account_cosmos> --moniker="choose a moniker" \ --website="https://cosmos.network" \ - --identity=6A0D65E29A4CBC8E - --details="To infinity and beyond!" + --identity=6A0D65E29A4CBC8E \ + --details="To infinity and beyond!" \ --chain-id=<chain_id> \ - --name=<key_name> \ + --from=<key_name> \ --commission-rate="0.10" ``` @@ -83,20 +81,18 @@ gaiacli query validator <account_cosmos> In order to keep track of a validator's signatures in the past you can do so by using the `signing-info` command: ```bash -gaiacli query signing-information <validator-pubkey>\ +gaiacli query signing-info <validator-pubkey>\ --chain-id=<chain_id> ``` ### Unjail Validator -When a validator is "jailed" for downtime, you must submit an `Unjail` transaction in order to be able to get block proposer rewards again (depends on the zone fee distribution). +When a validator is "jailed" for downtime, you must submit an `Unjail` transaction from the operator account in order to be able to get block proposer rewards again (depends on the zone fee distribution). ```bash gaiacli tx unjail \ --from=<key_name> \ --chain-id=<chain_id> - --validator=<account_cosmosval> \ - --chain-id=gaia-6002 ``` ### Confirm Your Validator is Running @@ -128,7 +124,7 @@ gaiad start Wait for your full node to catch up to the latest block. Next, run the following command. Note that `<cosmos>` is the address of your validator account, and `<name>` is the name of the validator account. You can find this info by running `gaiacli keys list`. ```bash -gaiacli tx unjail <cosmos> --chain-id=<chain_id> --name=<name> +gaiacli tx unjail <cosmos> --chain-id=<chain_id> --from=<from> ``` ::: danger Warning