Skip to content

Commit

Permalink
Merge pull request cosmos#2604 from cosmos/release/v0.25.0
Browse files Browse the repository at this point in the history
Merge 0.25.0 back to develop
  • Loading branch information
jaekwon authored Oct 31, 2018
2 parents 0d8325b + 1538ab8 commit 7c0a067
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 64 deletions.
18 changes: 10 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down
2 changes: 0 additions & 2 deletions PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,5 @@ BUG FIXES
* Gaia

* SDK
- #2573 [x/distribution] accum invariance bugfix
- #2573 [x/slashing] unbonding-delegation slashing invariance bugfix

* Tendermint
74 changes: 37 additions & 37 deletions docs/sdk/clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
:::
Expand All @@ -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.
Expand All @@ -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 <account_cosmos>
gaiacli query account <account_cosmos>
```

::: warning Note
Expand All @@ -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=<chain_id> \
--name=<key_name> \
--from=<key_name> \
--to=<destination_cosmos>
```

Expand All @@ -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 <account_cosmos>
gaiacli account <destination_cosmos>
gaiacli query account <account_cosmos>
gaiacli query account <destination_cosmos>
```

You can also check your balance at a given block by using the `--block` flag:

```bash
gaiacli account <account_cosmos> --block=<block_height>
gaiacli query account <account_cosmos> --block=<block_height>
```

You can simulate a transaction without actually broadcasting it by appending the `--dry-run` flag to the command line:
Expand All @@ -144,7 +156,7 @@ You can simulate a transaction without actually broadcasting it by appending the
gaiacli tx send \
--amount=10faucetToken \
--chain-id=<chain_id> \
--name=<key_name> \
--from=<key_name> \
--to=<destination_cosmosaccaddr> \
--dry-run
```
Expand All @@ -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=<chain_id> \
--name=<key_name> \
--from=<key_name> \
--to=<destination_cosmosaccaddr> \
--generate-only > unsignedSendTx.json
```
Expand All @@ -165,7 +177,7 @@ You can now sign the transaction file generated through the `--generate-only` fl
```bash
gaiacli tx sign \
--chain-id=<chain_id> \
--name=<key_name>
--from=<key_name>
unsignedSendTx.json > signedSendTx.json
```

Expand Down Expand Up @@ -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=<key_name> \
--validator=<validator> \
--from=<key_name> \
--chain-id=<chain_id>
```

`<validator>` 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
Expand All @@ -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=<account_cosmosval> \
--shares-percent=100 \
--shares-fraction=0.5 \
--from=<key_name> \
--chain-id=<chain_id>
```

Later you must complete the unbonding process by using the `gaiacli tx unbond complete` command:

```bash
gaiacli tx unbond complete \
--validator=<account_cosmosval> \
--from=<key_name> \
--chain-id=<chain_id>
```
The unbonding will be automatically completed when the unbonding period has passed.

##### Query Unbonding-Delegations

Expand Down Expand Up @@ -288,21 +301,14 @@ A redelegation is a type delegation that allows you to bond illiquid tokens from
gaiacli tx redelegate begin \
--addr-validator-source=<account_cosmosval> \
--addr-validator-dest=<account_cosmosval> \
--shares-percent=50 \
--shares-fraction=50 \
--from=<key_name> \
--chain-id=<chain_id>
```

Here you can also redelegate a specific `shares-amount` or a `shares-percent` with the corresponding flags.

Later you must complete the redelegation process by using the `gaiacli tx redelegate complete` command:
Here you can also redelegate a specific `shares-amount` or a `shares-fraction` with the corresponding flags.

```bash
gaiacli tx unbond complete \
--validator=<account_cosmosval> \
--from=<key_name> \
--chain-id=<chain_id>
```
The redelegation will be automatically completed when the unbonding period has passed.

##### Query Redelegations

Expand Down Expand Up @@ -357,7 +363,6 @@ gaiacli tx submit-proposal \
--title=<title> \
--description=<description> \
--type=<Text/ParameterChange/SoftwareUpgrade> \
--proposer=<account_cosmos> \
--deposit=<40steak> \
--from=<name> \
--chain-id=<chain_id>
Expand Down Expand Up @@ -387,7 +392,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>
Expand All @@ -402,7 +406,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>
Expand All @@ -428,9 +431,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
Expand Down
18 changes: 7 additions & 11 deletions docs/validators/validator-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
--from=<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"
Expand All @@ -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"
```

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions x/stake/client/cli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const (
FlagPubKey = "pubkey"
FlagAmount = "amount"
FlagSharesAmount = "shares-amount"
FlagSharesPercent = "shares-percent"
FlagSharesFraction = "shares-fraction"

FlagMoniker = "moniker"
FlagIdentity = "identity"
Expand Down Expand Up @@ -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")
Expand Down
8 changes: 4 additions & 4 deletions x/stake/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 7c0a067

Please sign in to comment.