Skip to content

Commit

Permalink
Merge branch 'release0.8' of https://github.com/irisnet/irishub into …
Browse files Browse the repository at this point in the history
…silei/release0.8
  • Loading branch information
wukongcheng committed Dec 13, 2018
2 parents 78f92d4 + 6feb601 commit 0d81116
Show file tree
Hide file tree
Showing 51 changed files with 861 additions and 417 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 0.8.0

*December 10th, 2018*
*December 13th, 2018*

- Upgrade tendermint to v0.27.0-dev1

Expand Down
425 changes: 177 additions & 248 deletions docs/.vuepress/config.js

Large diffs are not rendered by default.

55 changes: 46 additions & 9 deletions docs/cli-client/bank/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Description

Querying account information.
This command is used for querying balance information of certain address.

## Usage:

Expand Down Expand Up @@ -36,10 +36,10 @@ iriscli bank account [address] [flags]
## Examples
### Query account
### Query your account in trust-mode
```
iriscli bank account faa19aamjx3xszzxgqhrh0yqd4hkurkea7f6d429yx
iriscli bank account faa19aamjx3xszzxgqhrh0yqd4hkurkea7f6d429yx --trust-node=true
```

After that, you will get the detail info for the account.
Expand Down Expand Up @@ -69,15 +69,16 @@ After that, you will get the detail info for the account.

}

```
### Common Issue
If you query an wrong account, you will get the fellow information.
```
If you query an wrrong account, you will get the fellow information.
```
iriscli bank account faa19aamjx3xszzxgqhrh0yqd4hkurkea7f6d429zz
ERROR: decoding bech32 failed: checksum failed. Expected d429yx, got d429zz.
iriscli bank account faa19aamjx3xszzxgqhrh0yqd4hkurkea7f6d429zz
ERROR: decoding bech32 failed: checksum failed. Expected 100, got 0.
```
If you query an empty account, you will get the fellow information.
If you query an empty account, you will get the fellow error. But don't panic when you see the following error.
```
iriscli bank account faa1kenrwk5k4ng70e5s9zfsttxpnlesx5ps0gfdv7
ERROR: No account with address faa1kenrwk5k4ng70e5s9zfsttxpnlesx5ps0gfdv7 was found in the state.
Expand All @@ -87,10 +88,46 @@ Are you sure there has been a transaction involving it?
## Extended description
Query your account in iris network.
Query your account in iris network. If you want to create a validator, you should use `iriscli bank account` to make sure
that your balance is above 0.
### Query your account in Fuxi testnet
If you want to query your account in Fuxi-6000 testnet, you should use the following:
```
iriscli bank account faa19aamjx3xszzxgqhrh0yqd4hkurkea7f6d429yx --chain-id=fuxi-6000
```
After that, you will get the detail info for the account.
```
{
"address": "faa19aamjx3xszzxgqhrh0yqd4hkurkea7f6d429yx",
"coins": [
"50iris"
],
"public_key": {
"type": "tendermint/PubKeySecp256k1",
"value": "AzlCwiA5Tvxwi7lMB/Hihfp2qnaks5Wrrgkg/Jy7sEkF"
},
"account_number": "0",
"sequence": "1"
}
```


57 changes: 57 additions & 0 deletions docs/cli-client/bank/broadcast.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# iriscli bank broadcast

## Description

This command is used for broadcasting a signed transaction to the network after generating a signed transaction
offline with [sign](./sign.md).

## Usage:

```
iriscli bank broadcast [tx-file] [flags]
```
## Flags
| Name,shorthand | Type | Required | Default | Description |
| -------------- | ------ | -------- | --------------------- | ------------------------------------------------------------ |
| -h, --help | | False | | help for account |
| --chain-id | String | False | | Chain ID of tendermint node |
| --height | Int | False | | Block height to query, omit to get most recent provable block |
| --ledger | String | False | | Use a connected Ledger device |
| --node | String | False | tcp://localhost:26657 | <host>:<port> to tendermint rpc interface for this chain |
| --trust-node | String | False | True | Don't verify proofs for responses |
## Global Flags
| Name,shorthand | Default | Description | Required | Type |
| --------------------- | -------------- | ------------------------------------------- | -------- | ------ |
| -e, --encoding string | hex | String Binary encoding (hex \|b64 \|btc ) | False | String |
| --home string | /root/.iriscli | Directory for config and data | False | String |
| -o, --output string | text | Output format (text \|json) | False | String |
| --trace | | Print out full stack trace on errors | False | |
## Examples
### Broadcast your transaction
```
iriscli bank broadcast sign.json --chain-id=irishub-stage
```
After that, you will get the commit info of this transaction.
```
Committed at block 2265 (tx hash: A60224C8433487D48C8B03B51CB7A2BCB014932A97A55D946E5F30E561E1195E, response: {Code:0 Data:[] Log:Msg 0: Info: GasWanted:200000 GasUsed:4690 Tags:[{Key:[115 101 110 100 101 114] Value:[102 97 97 49 57 97 97 109 106 120 51 120 115 122 122 120 103 113 104 114 104 48 121 113 100 52 104 107 117 114 107 101 97 55 102 54 100 52 50 57 121 120] XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0} {Key:[114 101 99 105 112 105 101 110 116] Value:[102 97 97 49 57 97 97 109 106 120 51 120 115 122 122 120 103 113 104 114 104 48 121 113 100 52 104 107 117 114 107 101 97 55 102 54 100 52 50 57 121 120] XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0} {Key:[99 111 109 112 108 101 116 101 67 111 110 115 117 109 101 100 84 120 70 101 101 45 105 114 105 115 45 97 116 116 111] Value:[34 57 51 56 48 48 48 48 48 48 48 48 48 48 48 34] XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0}] Codespace: XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0})
{
"tags": {
"completeConsumedTxFee-iris-atto": "\"93800000000000\"",
"recipient": "faa19aamjx3xszzxgqhrh0yqd4hkurkea7f6d429yx",
"sender": "faa19aamjx3xszzxgqhrh0yqd4hkurkea7f6d429yx"
}
}
```
7 changes: 7 additions & 0 deletions docs/cli-client/bank/send.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,10 @@ Committed at block 2265 (tx hash: A60224C8433487D48C8B03B51CB7A2BCB014932A97A55D
}

```
### Common Issues
* Wrong password
```$xslt
ERROR: Ciphertext decryption failed
```
1 change: 1 addition & 0 deletions docs/cli-client/bank/sign.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,4 @@ Password to sign with 'test':
{"type":"auth/StdTx","value":{"msg":[{"type":"cosmos-sdk/Send","value":{"inputs":[{"address":"faa19aamjx3xszzxgqhrh0yqd4hkurkea7f6d429yx","coins":[{"denom":"iris-atto","amount":"10000000000000000000"}]}],"outputs":[{"address":"faa19aamjx3xszzxgqhrh0yqd4hkurkea7f6d429yx","coins":[{"denom":"iris-atto","amount":"10000000000000000000"}]}]}}],"fee":{"amount":[{"denom":"iris-atto","amount":"4000000000000000"}],"gas":"200000"},"signatures":[{"pub_key":{"type":"tendermint/PubKeySecp256k1","value":"AzlCwiA5Tvxwi7lMB/Hihfp2qnaks5Wrrgkg/Jy7sEkF"},"signature":"ci+5QuYUVcsARBQWyPGDgmTKYu/SRj6TpCGvrC7AE3REMVdqFGFK3hzlgIphzOocGmOIa/wicXGlMK2G89tPJg==","account_number":"0","sequence":"2"}],"memo":""}}
```

After signing a transaction, it could be broadcast to the network with [broadcastc command](./broadcast.md)
17 changes: 17 additions & 0 deletions docs/cli-client/keys/show.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,20 @@ You'll get the local public keys with 'address' and 'pubkey' element of a given
NAME: TYPE: ADDRESS: PUBKEY:
MyKey local faa1kkm4w5pvmcw0e3vjcxqtfxwqpm3k0zakl7lxn5 fap1addwnpepq0gsl90v9dgac3r9hzgz53ul5ml5ynq89ax9x8qs5jgv5z5vyssskww57lw
```
### Show Validator Operator Address
If an address has bonded to be a validator operator, then you could use `iriscli keys show` to get the operator's
address:
```$xslt
iriscli keys show alice --bech val
```
Then you could see the following:
```$xslt
NAME: TYPE: ADDRESS: PUBKEY:
alice local fva12nda6xwpmp000jghyneazh4kkgl2tnzy73dmzy fvp1addwnpepqfw52vyzt9xgshxmw7vgpfqrey30668g36f9z837kj9dy68kn2wxqh3zvz9
```
The result could be use for `--address-validator` in [create a delegation](../stake/delegate.md)
7 changes: 7 additions & 0 deletions docs/cli-client/stake/delegate.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@ iriscli stake delegate --help
```
iriscli stake delegate --chain-id=<chain-id> --from=<key name> --fee=0.004iris --amount=100iris --address-validator=<ValidatorAddress>
```
> Note: bech32 prefix for validator address is `fva`
For example, if you want to delegate 10iris on fuxi-6000:
```$xslt
iriscli stake delegate --chain-id=fuxi-6000 --from=abc --fee=0.004iris --amount=10iris --address-validator=fva12zgt9hc5r5mnxegam9evjspgwhkgn4wzjxkvqy
```
34 changes: 33 additions & 1 deletion docs/cli-client/stake/unjail.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Introduction

Unjail validator which may be jailed previously for downtime
In Proof-of-Stake blockchain, validators will get block provisions by staking their token. But if they failed to keep online, they will be punished by slashing a small portion of their staked tokens. The offline validators will be removed from the validator set and put into jail, which means their voting power is zero. During the jail period, these nodes are not event validator candidates . Once the jail period is end, they can send unjail transactions to free themselves and become validator candidates again.

## Usage

Expand All @@ -22,3 +22,35 @@ iriscli stake unjail --help
```
iriscli stake unjail --from=<key name> --fee=0.004iris --chain-id=<chain-id>
```
### Common Issue
* Check the jailing time for this validator:
```$xslt
iriscli stake signing-info fvp1zcjduepqewwc93xwvt0ym6prxx9ppfzeufs33flkcpu23n5eutjgnnqmgazsw54sfv --node=localhost:36657 --trust-node
```
If your validator is jailed, it will tell the jailing time.
```
Start height: 565, index offset: 2, jailed until: 2018-12-12 06:46:37.274910287 +0000 UTC, missed blocks counter: 2
```
If you do `unjail` before the jailing time, you will see the following error.
```$xslt
ERROR: Msg 0 failed: {"codespace":10,"code":102,"abci_code":655462,"message":"validator still jailed, cannot yet be unjailed"}
```
After that jailing period, you could submit an `unjail` transaction.
Sample output:
```$xslt
Committed at block 15016 (tx hash: 6FA77DA9334EF5FA4279FB8DBDDBAED5B4B8CEA672A41F63B7E62112296CB73F, response: {Code:0 Data:[] Log:Msg 0: Info: GasWanted:200000 GasUsed:4593 Tags:[{Key:[97 99 116 105 111 110] Value:[117 110 106 97 105 108] XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0} {Key:[118 97 108 105 100 97 116 111 114] Value:[102 118 97 49 50 122 103 116 57 104 99 53 114 53 109 110 120 101 103 97 109 57 101 118 106 115 112 103 119 104 107 103 110 52 119 122 106 120 107 118 113 121] XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0} {Key:[99 111 109 112 108 101 116 101 67 111 110 115 117 109 101 100 84 120 70 101 101 45 105 114 105 115 45 97 116 116 111] Value:[34 57 49 56 54 48 48 48 48 48 48 48 48 48 48 48 34] XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0}] Codespace: XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0})
{
"tags": {
"action": "unjail",
"completeConsumedTxFee-iris-atto": "\"918600000000000\"",
"validator": "fva12zgt9hc5r5mnxegam9evjspgwhkgn4wzjxkvqy"
}
}
```
37 changes: 23 additions & 14 deletions docs/cli-client/tendermint/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
# iriscli tendermint
# iris tendermint

## Description

Tendermint state querying subcommands
This command will return some Tendermint related info to you.

## Usage

```
iriscli tendermint [command]
```shell
iris tendermint [command]
```

## Available Commands

| Name, shorthand | Description |
| --------------- | -------------------------- |
| [tx](tx.md) | Matches this txhash over all committed blocks |
| txs | Search for all transactions that match the given tags |
| [block](block.md)| Get verified data for a the block at given height |
| [validator-set](validator-set.md) | Get the full tendermint validator set at given height |

| Name | Description |
| ----------------------- | -------------------------------------------------------------------------------------------- |
| [show-node-id](show-node-id.md) | |
| [show-validator](show-validator.md) | |
| [show-address](show-address.md) | |

## Flags

|Name, shorthand|Description|
|--- |--- |
|--help,-h |help for tendermint|
| Name, shorthand | Default | Description | Required |
| --------------- | ------- | ------------- | -------- |
| --help, -h | | Help for keys | |

## Global Flags

| Name, shorthand | Default | Description | Required |
| --------------- | -------------- | -------------------------------------- | -------- |
| --encoding, -e | hex | [string] Binary encoding (hex|b64|btc) | |
| --home | $HOME/.iriscli | [string] Directory for config and data | |
| --output, -o | text | [string] Output format (text|json) | |
| --trace | | Print out full stack trace on errors | |


43 changes: 43 additions & 0 deletions docs/cli-client/tendermint/show-address.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# iris tendermint show-address

## Description

Shows this node's tendermint validator address, this could be used for staking commands like: `iriscli stake validator`

## Usage

```
iris tendermint show-address [flags]
```

## Flags

| Name, shorthand | Default | Description | Required |
| -------------------- | ----------------- | -------------------------------------------------------------- | -------- |
| --help, -h | | help for show | |

## Global Flags

| Name,shorthand | Default | Description | Required | Type |
| --------------------- | -------------- | ------------------------------------------- | -------- | ------ |
| -e, --encoding string | hex | String Binary encoding (hex \|b64 \|btc ) | False | String |
| --home string | /root/.iriscli | Directory for config and data | False | String |
| -o, --output string | text | Output format (text \|json) | False | String |
| --trace | | Print out full stack trace on errors | False | |

## Examples

### Show Public Key of Your Node

```shell
iris tendermint show-address --home={iris-home}
```
The sample output could be:
```$xslt
fva17vgjsua3309q6cvhpqcf8zstqxfjrumj4t26jh
```

The output is encoded in Bech32, to read more about this encoding method, read [this](../../features/basic-concepts/bech32-prefix.md)

The result could be used to query a validators info. Read more [here](../stake/validator.md)
40 changes: 40 additions & 0 deletions docs/cli-client/tendermint/show-node-id.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# iris tendermint show-node-id

## Description

Show the id of your node, this id will be used for making connection between peers.

## Usage

```
iris tendermint show-node-id [flags]
```

## Flags

| Name, shorthand | Default | Description | Required |
| -------------------- | ----------------- | -------------------------------------------------------------- | -------- |
| --help, -h | | help for show | |

## Global Flags

| Name,shorthand | Default | Description | Required | Type |
| --------------------- | -------------- | ------------------------------------------- | -------- | ------ |
| -e, --encoding string | hex | String Binary encoding (hex \|b64 \|btc ) | False | String |
| --home string | /root/.iriscli | Directory for config and data | False | String |
| -o, --output string | text | Output format (text \|json) | False | String |
| --trace | | Print out full stack trace on errors | False | |

## Examples

### Show Public Key of Your Node

```shell
iris tendermint show-node-id --home={iris-home}
```
The sample output could be:
```$xslt
b18d3d1990c886555241f91331f9c00fe69421aa
```

Loading

0 comments on commit 0d81116

Please sign in to comment.