From d50b249f4a683f856b000d358df0c019f252e352 Mon Sep 17 00:00:00 2001 From: jiacheng Date: Fri, 16 Nov 2018 23:03:36 +0800 Subject: [PATCH 01/12] Finish the upgrade EN --- docs/cli-client/upgrade/README.md | 26 ++++++++- docs/cli-client/upgrade/info.md | 67 ++++++++++++++++++++++++ docs/cli-client/upgrade/query-switch.md | 32 +++++++++++ docs/cli-client/upgrade/submit-switch.md | 44 ++++++++++++++++ 4 files changed, 168 insertions(+), 1 deletion(-) create mode 100644 docs/cli-client/upgrade/info.md create mode 100644 docs/cli-client/upgrade/query-switch.md create mode 100644 docs/cli-client/upgrade/submit-switch.md diff --git a/docs/cli-client/upgrade/README.md b/docs/cli-client/upgrade/README.md index 5083eb47f..29d783ecc 100644 --- a/docs/cli-client/upgrade/README.md +++ b/docs/cli-client/upgrade/README.md @@ -1 +1,25 @@ -# iriscli \ No newline at end of file +# iriscli upgrade + +## Description + +Be used to participate in the software upgrade process. + +## Usage + +```shell +iriscli upgrade [command] +``` + +## Available Commands + +| Name | Description | +| ------------- | ------------------------------------- | +| [submit-switch](submit-switch.md) | Submit a switch msg for a upgrade propsal| +| [query-switch](query-switch.md) | query switch detail | +| [info](info.md) | Query the information of upgrade module | + +## Flags + +| Name, shorthand | Default | Description | Required | +| --------------- | ------- | ---------------- | -------- | +| --help, -h | | help for upgrade | | diff --git a/docs/cli-client/upgrade/info.md b/docs/cli-client/upgrade/info.md new file mode 100644 index 000000000..e90d80522 --- /dev/null +++ b/docs/cli-client/upgrade/info.md @@ -0,0 +1,67 @@ +# iriscli upgrade info + +## Description + +Query the information of software version and upgrade module. + +## Usage + +``` +iriscli upgrade info +``` + +## Flags + +| Name, shorthand | Default | Description | Required | +| --------------- | -------------------------- | ----------------------------------------------------------------- | -------- | +| --chain-id | | [string] Chain ID of tendermint node | | +| --height | most recent provable block | block height to query | | +| --help, -h | | help for query | | +| --indent | | Add indent to JSON response | | +| --ledger | | Use a connected Ledger device | | +| --node | tcp://localhost:26657 | [string] \:\ to tendermint rpc interface for this chain | | +| --trust-node | true | Don't verify proofs for responses | | + +## Example + +Query the current version information. + +``` +iriscli upgrade info +``` + +Then it will show + +``` +{ +"current_proposal_id": "0", +"current_proposal_accept_height": "-1", +"version": { +"Id": "0", +"ProposalID": "0", +"Start": "0", +"ModuleList": [ +{ +"Start": "0", +"End": "9223372036854775807", +"Handler": "bank", +"Store": [ +"acc" +] +}, +{ +"Start": "0", +"End": "9223372036854775807", +"Handler": "stake", +"Store": [ +"stake", +"acc", +"mint", +"distr" +] +}, +....... +] +} +} +``` diff --git a/docs/cli-client/upgrade/query-switch.md b/docs/cli-client/upgrade/query-switch.md new file mode 100644 index 000000000..b447683fe --- /dev/null +++ b/docs/cli-client/upgrade/query-switch.md @@ -0,0 +1,32 @@ +# iriscli upgrade query-switch + +## Description +Query the switch information to know if someone have send the switch message for the certain software upgrade proposal. + +## Usage + +``` +iriscli upgrade query-switch --proposal-id --voter +``` + +## Flags + +| Name, shorthand | Default | Description | Required | +| --------------- | -------------------------- | ----------------------------------------------------------------- | -------- | +| --proposal-id | | proposalID of upgrade swtich being queried | Yes | +| --voter | | Address sign the switch msg | Yes | +| --chain-id | | [string] Chain ID of tendermint node | | +| --height | most recent provable block | block height to query | | +| --help, -h | | help for query | | +| --indent | | Add indent to JSON response | | +| --ledger | | Use a connected Ledger device | | +| --node | tcp://localhost:26657 | [string] \:\ to tendermint rpc interface for this chain | | +| --trust-node | true | Don't verify proofs for responses | | + +## Example + +Query if the address `faa1qvt2r6hh9vyg3kh4tnwgx8wh0kpa7q2lsk03fe` send the switch message for the software upgrade proposal whose ID is 5. + +``` +iriscli upgrade query-switch --proposal-id=5 --voter=faa1qvt2r6hh9vyg3kh4tnwgx8wh0kpa7q2lsk03fe +``` diff --git a/docs/cli-client/upgrade/submit-switch.md b/docs/cli-client/upgrade/submit-switch.md new file mode 100644 index 000000000..51dee96a9 --- /dev/null +++ b/docs/cli-client/upgrade/submit-switch.md @@ -0,0 +1,44 @@ +# iriscli upgrade submit-switch + +## Description + +Submit a switch msg for a upgrade propsal after installing the new software and broadcast to the whole network. + +## Usage + +``` +iriscli upgrade submit-switch [flags] +``` + +## Flags + +| Name, shorthand | Default | Description | Required | +| --------------- | --------- | ------------------------------------------------------------ | -------- | +| --proposal-id | | proposalID of upgrade proposal | Yes | +| --title | | title of switch | | +| --help, -h | | help for submit-switch | | +| --account-number | | [int] AccountNumber number to sign the tx | | +| --async | | Broadcast transactions asynchronously | | +| --chain-id | | [string] Chain ID of tendermint node | Yes | +| --dry-run | | Ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it | | +| --fee | | [string] Fee to pay along with transaction | Yes | +| --from | | [string] Name of private key with which to sign | Yes | +| --from-addr | | [string] Specify from address in generate-only mode | | +| --gas string | 200000 | Gas limit to set per-transaction; set to "simulate" to calculate required gas automatically | | +| --gas-adjustment | 1 | [float] Adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored | | +| --generate-only | | Build an unsigned transaction and write it to STDOUT | | +| --indent | | Add indent to JSON response | | +| --json | | return output in json format | | +| --ledger | | Use a connected Ledger device | | +| --memo | | [string] Memo to send along with transaction | | +| --node | tcp://localhost:26657 | [string] \:\ to tendermint rpc interface for this chain | | Yes | +| --print-response | | return tx response (only works with async = false) | | +| --sequence | | [int] Sequence number to sign the tx | | +| --trust-node | true | Don't verify proofs for responses | | +## Examples + +Send a switch message for the software upgrade proposal whose `proposalID` is 5. + +``` +iriscli upgrade submit-switch --chain-id=IRISnet --from=x --fee=0.004iris --proposalID 5 --title="Run new verison" +``` From 4e23e40d25d9be3f5161939c72c95faacda7bab9 Mon Sep 17 00:00:00 2001 From: jiacheng Date: Fri, 16 Nov 2018 23:06:53 +0800 Subject: [PATCH 02/12] Finish the upgrade ZH --- docs/zh/cli-client/upgrade/README.md | 26 +++++++- docs/zh/cli-client/upgrade/info.md | 69 +++++++++++++++++++++ docs/zh/cli-client/upgrade/query-switch.md | 33 ++++++++++ docs/zh/cli-client/upgrade/submit-switch.md | 45 ++++++++++++++ 4 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 docs/zh/cli-client/upgrade/info.md create mode 100644 docs/zh/cli-client/upgrade/query-switch.md create mode 100644 docs/zh/cli-client/upgrade/submit-switch.md diff --git a/docs/zh/cli-client/upgrade/README.md b/docs/zh/cli-client/upgrade/README.md index 5083eb47f..2fd3a1ad5 100644 --- a/docs/zh/cli-client/upgrade/README.md +++ b/docs/zh/cli-client/upgrade/README.md @@ -1 +1,25 @@ -# iriscli \ No newline at end of file +# iriscli upgrade + +## 描述 + +用来参与软件升级的流程,并可查看当前版本的信息。 + +## 用法 + +```shell +iriscli upgrade [command] +``` + +## 相关命令 + +| Name | Description | +| ------------- | ------------------------------------- | +| [submit-switch](submit-switch.md) | Submit a switch msg for a upgrade propsal| +| [query-switch](query-switch.md) | query switch detail | +| [info](info.md) | Query the information of upgrade module | + +## 标志 + +| 名称, 速记 | 默认值 | 描述 | 必需 | +| --------------- | ------- | ---------------- | -------- | +| --help, -h | | 升级命令帮助 | | diff --git a/docs/zh/cli-client/upgrade/info.md b/docs/zh/cli-client/upgrade/info.md new file mode 100644 index 000000000..1ad172160 --- /dev/null +++ b/docs/zh/cli-client/upgrade/info.md @@ -0,0 +1,69 @@ +# iriscli upgrade info + +## 描述 + +查询软件版本信息和升级模块的信息 + +## 用法 + +``` +iriscli upgrade info +``` + +## 标志 + +| 名称, 速记 | 默认值 | 描述 | 必需 | +| --------------- | -------------------------- | ----------------------------------------------------------------- | -------- | +| --proposal-id | | 软件升级提议的ID | 是 | +| --voter | | 签名switch消息的地址 | 是 | +| --chain-id | | [string] tendermint节点的链ID | 是 | +| --height | 最近可证明区块高度 | [int] 查询的区块高度 | | +| --help, -h | | 查询命令帮助 | | +| --indent | | 在JSON格式的应答中添加缩进 | | +| --ledger | | 使用连接的硬件记账设备 | | +| --node | tcp://localhost:26657 | [string] tendermint节点开启的远程过程调用接口\<主机>:\<端口> | | +| --trust-node | true | 关闭响应结果校验 | | + +## 例子 + +查询当前版本信息 + +``` +iriscli upgrade info +``` + +然后它会打印如下内容: + +``` +{ + "current_proposal_id": "0", + "current_proposal_accept_height": "-1", + "version": { + "Id": "0", + "ProposalID": "0", + "Start": "0", + "ModuleList": [ + { + "Start": "0", + "End": "9223372036854775807", + "Handler": "bank", + "Store": [ + "acc" + ] + }, + { + "Start": "0", + "End": "9223372036854775807", + "Handler": "stake", + "Store": [ + "stake", + "acc", + "mint", + "distr" + ] + }, + ....... + ] + } +} +``` \ No newline at end of file diff --git a/docs/zh/cli-client/upgrade/query-switch.md b/docs/zh/cli-client/upgrade/query-switch.md new file mode 100644 index 000000000..1aaa09389 --- /dev/null +++ b/docs/zh/cli-client/upgrade/query-switch.md @@ -0,0 +1,33 @@ +# iriscli upgrade query-switch + +## 描述 + +查询switch信息来知道某人对某升级提议是否发送了switch消息。 + +## 用法 + +``` +iriscli upgrade query-switch --proposal-id --voter +``` + +## 标志 + +| 名称, 速记 | 默认值 | 描述 | 必需 | +| --------------- | -------------------------- | ----------------------------------------------------------------- | -------- | +| --proposal-id | | 软件升级提议的ID | 是 | +| --voter | | 签名switch消息的地址 | 是 | +| --chain-id | | [string] tendermint节点的链ID | 是 | +| --height | 最近可证明区块高度 | [int] 查询的区块高度 | | +| --help, -h | | 查询命令帮助 | | +| --indent | | 在JSON格式的应答中添加缩进 | | +| --ledger | | 使用连接的硬件记账设备 | | +| --node | tcp://localhost:26657 | [string] tendermint节点开启的远程过程调用接口\<主机>:\<端口> | | +| --trust-node | true | 关闭响应结果校验 | | + +## 例子 + +查询用户`faa1qvt2r6hh9vyg3kh4tnwgx8wh0kpa7q2lsk03fe`是否对升级提议(ID为5)发送了switch消息 + +``` +iriscli upgrade query-switch --proposal-id=5 --voter=faa1qvt2r6hh9vyg3kh4tnwgx8wh0kpa7q2lsk03fe +``` diff --git a/docs/zh/cli-client/upgrade/submit-switch.md b/docs/zh/cli-client/upgrade/submit-switch.md new file mode 100644 index 000000000..61c40bc6e --- /dev/null +++ b/docs/zh/cli-client/upgrade/submit-switch.md @@ -0,0 +1,45 @@ +# iriscli upgrade submit-switch + +## 描述 + +安装完新软件后,向这次升级相关的提议发送switch消息,表明自己已经安装新软件并把消息广播到全网。 + +## 用例 + +``` +iriscli upgrade submit-switch [flags] +``` + +## 标志 + +| 名称, 速记 | 默认值 | 描述 | 必需 | +| --------------- | --------- | ------------------------------------------------------------ | -------- | +| --proposal-id | | 软件升级提议的ID | 是 | +| --title | | switch消息对标题 | | +| --account-number | | [int] 用来签名交易的AccountNumber | | +| --async | | 异步广播交易 | | +| --chain-id | | [string] tendermint节点的链ID | 是 | +| --description | description | [string] 上传文件的描述信息 | | +| --dry-run | | 忽略--gas标志并进行本地的交易仿真 | | +| --fee | | [string] 支付的交易费用 | 是 | +| --from | | [string] 用来签名的私钥名 | 是 | +| --from-addr | | [string] 指定generate-only模式下的from address | | +| --gas string | 200000 | 单次交易的gas上限; 设置为"simulate"将自动计算相应的阈值 | | +| --gas-adjustment | 1 | [float] 这个调整因子将乘以交易仿真返回的估计值; 如果手动设置了gas的上限,这个标志将被忽略 | | +| --generate-only | | 构建一个未签名交易并将其打印到标准输出 | | +| -h, --help | | 提交命令帮助 | | +| --indent | | 在JSON响应中添加缩进 | | +| --json | | 输出将以json格式返回 | | +| --ledger | | 使用连接的硬件记账设备 | | +| --memo | | [string] 发送交易的备忘录 | | +| --node | tcp://localhost:26657 | [string] [string] tendermint节点开启的远程过程调用接口\<主机>:\<端口> | | +| --print-response | | 返回交易响应 (当且仅当同步模式下使用)) | | +| --sequence | | [int] 用来签名交易的sequence number | | +| --trust-node | true | 关闭响应结果校验 | | +## 用例 + +发送对软件升级提议(ID为5)switch消息 + +``` +iriscli upgrade submit-switch --chain-id=IRISnet --from=x --fee=0.004iris --proposalID 5 --title="Run new verison" +``` \ No newline at end of file From 900c0779e48fb3b0f713adb5f98c079e5af02c40 Mon Sep 17 00:00:00 2001 From: jiacheng Date: Fri, 16 Nov 2018 23:17:18 +0800 Subject: [PATCH 03/12] Finish the Feature/gov --- docs/zh/features/governance.md | 311 ++++++++++++--------------------- 1 file changed, 111 insertions(+), 200 deletions(-) diff --git a/docs/zh/features/governance.md b/docs/zh/features/governance.md index 8678c4cc4..a1ecd1be5 100644 --- a/docs/zh/features/governance.md +++ b/docs/zh/features/governance.md @@ -1,255 +1,166 @@ -# Gov/Iparam User Guide +# Gov User Guide -## 基本功能描述 +## Basic Function Description -1. 文本提议的链上治理 -2. 参数修改提议的链上治理 -3. 软件升级提议的链上治理 +1. On-chain governance proposals on text +2. On-chain governance proposals on parameter change +3. On-chain governance proposals on software upgrade -## 交互流程 +## Interactive process -### 治理流程 +### governance process -1. 任何用户可以发起提议,并抵押一部分token,如果超过`min_deposit`,提议进入投票,否则留在抵押期。其他人可以对在抵押期的提议进行抵押token,如果提议的抵押token总和超过`min_deposit`,则进入投票期。但若提议在抵押期停留的出块数目超过`max_deposit_period`,则提议被关闭。 -2. 进入投票期的提议,只有验证人和委托人可以进行投票。如果委托人没投票,则他继承他委托的验证人的投票选项。如果委托人投票了,则覆盖他委托的验证人的投票选项。当提议到达`voting_perid`,统计投票结果。 -3. 具体提议投票逻辑细节见[CosmosSDK-Gov-spec](https://github.com/cosmos/cosmos-sdk/blob/develop/docs/spec/governance/overview.md) +1. Any users can deposit some tokens to initiate a proposal. Once deposit reaches a certain value `min_deposit`, enter voting period, otherwise it will remain in the deposit period. Others can deposit the proposals on the deposit period. Once the sum of the deposit reaches `min_deposit`, enter voting period. However, if the block-time exceeds `max_deposit_period` in the deposit period, the proposal will be closed. +2. The proposals which enter voting period only can be voted by validators and delegators. The vote of a delegator who hasn't vote will be the same as his validator's vote, and the vote of a delegator who has voted will be remained. The votes wil be tallyed when reach `voting_period'. +3. Our tally have a limit on participation, Other details about voting for proposals: +[CosmosSDK-Gov-spec](https://github.com/cosmos/cosmos-sdk/blob/develop/docs/spec/governance/overview.md) -## 使用场景 -### 创建使用环境 +## Usage Scenario -``` -rm -rf iris -rm -rf .iriscli -iris init gen-tx --name=x --home=iris -iris init --gen-txs --chain-id=gov-test -o --home=iris -iris start --home=iris -``` - -### 参数修改的使用场景 +### Usage scenario of parameter change -场景一:通过命令行带入参数修改信息进行参数修改 +Scenario 1:Change the parameters through the command lines ``` -# 根据gov模块名查询的可修改的参数 +# Query parameters can be changed by the modules'name in gov iriscli gov query-params --module=gov --trust-node -# 结果 +# Results [ - "Gov/gov/DepositProcedure", - "Gov/gov/TallyingProcedure", - "Gov/gov/VotingProcedure" +"Gov/govDepositProcedure", +"Gov/govTallyingProcedure", +"Gov/govVotingProcedure" ] -# 根据Key查询可修改参数的内容 -iriscli gov query-params --key=Gov/gov/DepositProcedure --trust-node +# Query parameters can be modified by "key” +iriscli gov query-params --key=Gov/govDepositProcedure --trust-node -# 结果 -{"key":"Gov/gov/DepositProcedure","value":"{\"min_deposit\":[{\"denom\":\"iris-atto\",\"amount\":\"10000000000000000000\"}],\"max_deposit_period\":10}","op":""} +# Results +{"key":"Gov/govDepositProcedure","value":"{\"min_deposit\":[{\"denom\":\"iris-atto\",\"amount\":\"10000000000000000000\"}],\"max_deposit_period\":172800000000000}","op":""} -# 发送提议,返回参数修改的内容 -echo 1234567890 | iriscli gov submit-proposal --title="update MinDeposit" --description="test" --type="ParameterChange" --deposit="10iris" --param='{"key":"Gov/gov/DepositProcedure","value":"{\"min_deposit\":[{\"denom\":\"iris-atto\",\"amount\":\"10000000000000000000\"}],\"max_deposit_period\":20}","op":"update"}' --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 +# Send proposals, return changed parameters +iriscli gov submit-proposal --title="update MinDeposit" --description="test" --type="ParameterChange" --deposit="10iris" --param='{"key":"Gov/govDepositProcedure","value":"{\"min_deposit\":[{\"denom\":\"iris-atto\",\"amount\":\"20000000000000000000\"}],\"max_deposit_period\":172800000000000}","op":"update"}}' --from=x --chain-id=gov-test --fee=0.05iris --gas=200000 -# 对提议进行抵押 -echo 1234567890 | iriscli gov deposit --proposal-id=1 --deposit=1iris --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 +# Deposit for a proposal +iriscli gov deposit --proposal-id=1 --deposit=1iris --from=x --chain-id=gov-test --fee=0.05iris --gas=200000 -# 对提议投票 -echo 1234567890 | iriscli gov vote --proposal-id=1 --option=Yes --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 +# Vote for a proposal +echo 1234567890 | iriscli gov vote --proposal-id=1 --option=Yes --from=x --chain-id=gov-test --fee=0.05iris --gas=200000 -# 查询提议情况 +# Query the state of a proposal iriscli gov query-proposal --proposal-id=1 --trust-node ``` -场景二,通过文件修改参数 +Scenario 2: Change the parameters by the files ``` -# 导出配置文件 +# Export profiles iriscli gov pull-params --path=iris --trust-node -# 查询配置文件信息 -cat iris/config/params.json +# Query profiles' info +cat iris/config/params.json { +"gov": { +"Gov/govDepositProcedure": { +"min_deposit": [ { - "gov": { - "Gov/gov/DepositProcedure": { - "min_deposit": [ - { - "denom": "iris-atto", - "amount": "10000000000000000000" - } - ], - "max_deposit_period": "10" - }, - "Gov/gov/VotingProcedure": { - "voting_period": "10" - }, - "Gov/gov/TallyingProcedure": { - "threshold": "1/2", - "veto": "1/3", - "governance_penalty": "1/100" - } - } +"denom": "iris-atto", +"amount": "10000000000000000000" +} +], +"max_deposit_period": "172800000000000" +}, +"Gov/govVotingProcedure": { +"voting_period": "10000000000" +}, +"Gov/govTallyingProcedure": { +"threshold": "0.5000000000", +"veto": "0.3340000000", +"participation": "0.6670000000" } -# 修改配置文件(TallyingProcedure的governance_penalty) -vi iris/config/params.json -{ - "gov": { - "Gov/gov/DepositProcedure": { - "min_deposit": [ - { - "denom": "iris-atto", - "amount": "10000000000000000000" - } - ], - "max_deposit_period": "10" - }, - "Gov/gov/VotingProcedure": { - "voting_period": "10" - }, - "Gov/gov/TallyingProcedure": { - "threshold": "1/2", - "veto": "1/3", - "governance_penalty": "20/100" - } - } } -# 通过文件修改参数的命令,返回参数修改的内容 -echo 1234567890 | iriscli gov submit-proposal --title="update MinDeposit" --description="test" --type="ParameterChange" --deposit="10iris" --path=iris --key=Gov/gov/TallyingProcedure --op=update --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 - -# 对提议进行抵押 -echo 1234567890 | iriscli gov deposit --proposal-id=1 --deposit=1iris --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 - -# 对提议投票 -echo 1234567890 | iriscli gov vote --proposal-id=1 --option=Yes --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 - -# 查询提议情况 -iriscli gov query-proposal --proposal-id=1 --trust-node -``` - -## CLI命令详情 - -### 治理模块基础方法 - -``` -# 文本类提议 -iriscli gov submit-proposal --title="update MinDeposit" --description="test" --type="Text" --deposit="10iris" --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 -``` +# Modify profiles (TallyingProcedure的governance_penalty) +vi iris/config/params.json { +"gov": { +"Gov/govDepositProcedure": { +"min_deposit": [ +{ +"denom": "iris-atto", +"amount": "10000000000000000000" +} +], +"max_deposit_period": "172800000000000" +}, +"Gov/govVotingProcedure": { +"voting_period": "10000000000" +}, +"Gov/govTallyingProcedure": { +"threshold": "0.5000000000", +"veto": "0.3340000000", +"participation": "0.4990000000" +} +} -* `--title` 提议的标题 -* `--description` 提议的描述 -* `--type` 提议的类型 {'Text','ParameterChange','SoftwareUpgrade'} -* `--deposit` 抵押的token数量 -* 上面就是典型的文本类提议 +# Change the parameters through files, return changed parameters +iriscli gov submit-proposal --title="update MinDeposit" --description="test" --type="ParameterChange" --deposit="10iris" --path=iris --key=Gov/govTallyingProcedure --op=update --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 -``` +# Deposit for a proposal iriscli gov deposit --proposal-id=1 --deposit=1iris --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 -``` -* `--propsal-id` 抵押提议ID -* `--deposit` 抵押的token数量 - -``` +# Vote for a proposal iriscli gov vote --proposal-id=1 --option=Yes --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 -``` - -* `--proposal-id` 投票提议ID -* `--option` 投票的选项{'Yes'赞同,'Abstain'弃权,'No'不同意,'nowithVeto'强烈不同意} - -``` -# 查询提议情况 +# Query the state of a proposal iriscli gov query-proposal --proposal-id=1 --trust-node ``` -* `--proposal-id` 查询提议ID +### Proposals on software upgrade +Detail in [Upgrade](upgrade.md) - -### 参数修改提议部分 +## Basic parameters ``` -# 根据gov模块名查询的可修改的参数 -iriscli gov query-params --module=gov --trust-node -``` - -* `--module` 查询module可修改参数的key的列表 - - -``` -# 根据Key查询可修改参数的内容 -iriscli gov query-params --key=Gov/gov/DepositProcedure --trust-node -``` - -* `--key` 查询key对应的参数值 - -``` -# 导出配置文件 -iriscli gov pull-params --path=iris --trust-node -``` - -* `--path` 节点初始化的文件夹 - - - -``` -# 通过命令行带入参数修改信息进行参数修改 -iriscli gov submit-proposal --title="update MinDeposit" --description="test" --type="ParameterChange" --deposit="10iris" --param='{"key":"Gov/gov/DepositProcedure","value":"{\"min_deposit\":[{\"denom\":\"iris-atto\",\"amount\":\"10000000000000000000\"}],\"max_deposit_period\":20}","op":"update"}' --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 -``` - -* `--param` 参数修改的具体内容(通过query-params得到参数内容,然后直接对其修改,并在"op"上添上update,具体可见使用场景) -* 其他字段与文本提议类似 - -``` -# 通过文件修改参数的命令,返回参数修改的内容 -echo 1234567890 | iriscli gov submit-proposal --title="update MinDeposit" --description="test" --type="ParameterChange" --deposit="10iris" --path=iris --key=Gov/gov/TallyingProcedure --op=update --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 -``` - -* `--path` 节点初始化的文件夹 -* `--key` 要修改参数的key -* `--op` 参数修改类型,目前只实现了'update' -* 其他字段与文本提议类似 - -### 软件升级提议部分 - -## 基本参数 - -``` -# DepositProcedure(抵押阶段的参数) -"Gov/gov/DepositProcedure": { - "min_deposit": [ - { - "denom": "iris-atto", - "amount": "10000000000000000000" - } - ], - "max_deposit_period": "10" +# DepositProcedure(The parameters in deposit period) +"Gov/govDepositProcedure": { +"min_deposit": [ +{ +"denom": "iris-atto", +"amount": "10000000000000000000" +} +], +"max_deposit_period": "172800000000000" } ``` -* 可修改参数 -* 参数的key:"Gov/gov/DepositProcedure" -* `min_deposit[0].denom` 最小抵押token只能是单位是iris-atto的iris通证。 -* `min_deposit[0].amount` 最小抵押token数量,默认:10iris,范围(1iris,200iris) -* `max_deposit_period` 补交抵押token的窗口期,默认:10,范围(0,1) +* Parameters can be changed +* The key of parameters:"Gov/gov/DepositProcedure" +* `min_deposit[0].denom` The minimum tokens deposited are counted by iris-atto. +* `min_deposit[0].amount` The number of minimum tokens and the default scope:1000iris,(1iris,10000iris) +* `max_deposit_period` Window period for repaying deposit, default:172800000000000ns==2Days, scope(20s,3Day) ``` -# VotingProcedure(投票阶段的参数) -"Gov/gov/VotingProcedure": { - "voting_period": "10" -}, +# VotingProcedure(The parameters in voting period) +"Gov/govVotingProcedure": { +"voting_period": "10000000000" +} ``` -* `voting_perid` 投票的窗口期,默认:10,范围(20,20000) +* Parameters can be changed +* `voting_perid` Window period for vote, default:172800000000000ns==2Days, scope(20s,3Days) ``` -# TallyingProcedure (统计阶段段参数) -"Gov/gov/TallyingProcedure": { - "threshold": "1/2", - "veto": "1/3", - "governance_penalty": "1/100" +# TallyingProcedure (The parameters in Tallying period) +"Gov/govTallyingProcedure": { +"threshold": "0.5000000000", +"veto": "0.3340000000", +"participation": "0.6670000000" } -``` -* `veto` 默认:1/3,范围(0,1) -* `threshold` 默认:1/2,范围(0,1) -* `governance_penalty` 未投票的验证人惩罚token的比例 默认:1/100,范围(0,1) -* 投票统计逻辑:如果强烈反对的voting_power占总的voting_power 超过 veto,提议不通过。然后再看赞同的voting_power占总的投票的voting_power 是否超过 veto,超过则提议不通过,不超过则不通过。 \ No newline at end of file +``` + +* Parameters can be changed +* `veto` default: 0.334, scope(0,1) +* `threshold` default: 0.5, scope(0,1) +* `governance_penalty` default: 0.667, scope(0,1) +* Vote rules:If the ratio of all voters' `voting_power` to the total 'voting_power' in system less than “participation”, the proposal won't be passed. If the ratio of strongly opposed `voting_power` to all voters' `voting_power` more than “veto”, the proposal won't be passed. Then if the ratio of approved `voting_power` to all voter's `voting_power` except abstentions over “threshold”, the proposal will be passed. Otherwise, N/A. From 77ae0cb8a2290a42150c2eee2c6e6586ef10068e Mon Sep 17 00:00:00 2001 From: jiacheng Date: Fri, 16 Nov 2018 23:21:48 +0800 Subject: [PATCH 04/12] Finish the Bech32 --- .../features/basic-concepts/bech32-prefix.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/zh/features/basic-concepts/bech32-prefix.md b/docs/zh/features/basic-concepts/bech32-prefix.md index e69de29bb..b6ece16dd 100644 --- a/docs/zh/features/basic-concepts/bech32-prefix.md +++ b/docs/zh/features/basic-concepts/bech32-prefix.md @@ -0,0 +1,30 @@ +# Bech32 on IRISnet + +Bech32是由Pieter Wuille和Greg Maxwel提出的新比特币地址格式。除了比特币之外,bech32可以编码任何短二进制数据。在IRISnet里,私钥和地址可能指的是一些在网络中不同的角色,例如普通账户和验证人账户等。IRISnet设计使用Bech32地址格式来提供对数据鲁棒的完整性检查。 用户可读部分(human readable part) 使得用户更有效率的理解地址和阅读错误信息。 + + +## 用户可读部分表 + +| HRP | Definition | +| -----------|:-------------| +|faa| IRISnet Account Address| +|fap| IRISnet Account Public Key| +|fva| IRISnet Validator's Operator Address| +|fvp| IRISnet Validator's Operator Public Key| +|fca| IRISnet Consensus Address| +|fcp| IRISnet Consensus Public Key| + +## 编码 + +不是所有IRISnet的用户地址都会以bech32的格式暴露出来。许多地址仍然是hex编码或者base64编码。 在bech32编码之前,首先要使用amino对其他地址私钥二进制表示进行编码。 + +## 例子 + +一旦创建一个新的账户,你将会看到以下信息: + +``` +NAME: TYPE: ADDRESS: PUBKEY: +test1 local faa18ekc4dswwrh2a6lfyev4tr25h5y76jkpqsz7kl fap1addwnpepqgxa40ww28uy9q46gg48g6ulqdzwupyjcwfumgfjpvz7krmg5mrnw6zv8uv +``` + +这意味着你创建了一个新账户地址 `faa18ekc4dswwrh2a6lfyev4tr25h5y76jkpqsz7kl`, 他的用户可读部分是 `faa`。他的公钥被密码成 `fap1addwnpepqgxa40ww28uy9q46gg48g6ulqdzwupyjcwfumgfjpvz7krmg5mrnw6zv8uv`, 他的用户可读部分是 `fap`。 \ No newline at end of file From c9f75a09c9008a4cd4ab674b3501de8f2a836da5 Mon Sep 17 00:00:00 2001 From: jiacheng Date: Fri, 16 Nov 2018 23:23:41 +0800 Subject: [PATCH 05/12] Finish the genesis --- docs/features/basic-concepts/genesis-file.md | 46 +++++++++++++++++++ .../features/basic-concepts/genesis-file.md | 46 +++++++++++++++++++ 2 files changed, 92 insertions(+) diff --git a/docs/features/basic-concepts/genesis-file.md b/docs/features/basic-concepts/genesis-file.md index e69de29bb..ded17325a 100644 --- a/docs/features/basic-concepts/genesis-file.md +++ b/docs/features/basic-concepts/genesis-file.md @@ -0,0 +1,46 @@ +# Genesis File + +The Genesis file is the basis for the entire network initialization,which contains most info for creating a Genesis block (such as ChainID, consensus params,app state), initialize account balances, parameters for each module, and validators info. + +## Basic State + +* genesis_time The time to build Genesis file +* chain_id Blockchain’s ID + +## Consensus Params + +* block_size Block size and config params of the number of Gas in the block +* evidence The lifecycle of deception evidence in the block + +## App State + +* **accounts** Initialization account info + +* **stake** Params related to the staking consensus + * `loose_tokens` The sum of unbonded tokens in the entire network + * `unbonding_time` The time between the moment a validator begin to unbond until the moment it is unbonded successfully + * `max_validators` The max of validators + +* **mint** Params related to inflation + * `inflation_max` The max of inflation rate + * `inflation_min` The min of inflation rate + +* **distribution** Params related to distribution & commission + +* **gov** Params related to on-chain governance + * `DepositProcedure` Params in deposit period + * `VotingProcedure` Params in voting period + * `TallyingProcedure` Params in tallying period + +* **upgrade** Params related to upgrade + * `switch_period` After upgrade, a switch message needs to be sent in switch_perid + +* **slashing** Params related to slashing validators + +* **service** Params related to Service + * `MaxRequestTimeout` The max of waiting blocks for service invocation + * `MinProviderDeposit` The min deposit for service binding + +## Gentxs + +Gentxs contains the transaction set of creating validators in genesis block. \ No newline at end of file diff --git a/docs/zh/features/basic-concepts/genesis-file.md b/docs/zh/features/basic-concepts/genesis-file.md index e69de29bb..ed88418e5 100644 --- a/docs/zh/features/basic-concepts/genesis-file.md +++ b/docs/zh/features/basic-concepts/genesis-file.md @@ -0,0 +1,46 @@ +# Genesis + +Genesis文件是整个网络初始化的基础。它包含了创建创世块的大部分信息(比如ChainID,共识的参数),初始化账户余额,每个模块的参数,validators信息。 + +## Basic State + +* genesis_time Genesis文件创建时间 +* chain_id 区块链的ID + +## Consensus Params + +* block_size 区块大小和区块内Gas数量的配置参数 +* evidence 区块内作恶证据的生命周期 + +## App State + +* **accounts** 初始化账户信息 + +* **stake** 与抵押共识相关的参数 + * `loose_tokens` 全网未绑定的通证总和 + * `unbonding_time` 开始解绑到解绑成功需要的时间 + * `max_validators` 最大验证人数目 + +* **mint** 与通货膨胀相关的参数 + * `inflation_max` 最大通货膨胀率 + * `inflation_min` 最小通货膨胀率 + +* **distribution** 与分配收益有关的参数 + +* **gov** 与链上治理相关的参数 + * `DepositProcedure` 抵押阶段的参数 + * `VotingProcedure` 投票阶段的参数 + * `TallyingProcedure` 统计阶段的参数 + +* **upgrade** 与升级相关的参数 + * `switch_period` 软件升级通过后需要在switch_perid内发送switch消息 + +* **slashing** 与惩罚validator相关的参数 + +* **service** 与Service相关的参数 + * `MaxRequestTimeout` 服务调用最大等待区块个数 + * `MinProviderDeposit` 服务绑定最小抵押金额 + +## Gentxs + +Gentxs中包含了创世区块中创建validators的交易集合。 \ No newline at end of file From 86b162783e769c4b42826933cbf74187297cf0f4 Mon Sep 17 00:00:00 2001 From: jiacheng Date: Fri, 16 Nov 2018 23:34:29 +0800 Subject: [PATCH 06/12] Finish the gov params --- docs/features/basic-concepts/gov-params.md | 18 ++++++++++++++++++ docs/zh/features/basic-concepts/gov-params.md | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/docs/features/basic-concepts/gov-params.md b/docs/features/basic-concepts/gov-params.md index e69de29bb..7b5a53761 100644 --- a/docs/features/basic-concepts/gov-params.md +++ b/docs/features/basic-concepts/gov-params.md @@ -0,0 +1,18 @@ +# Gov Params + +In IRISnet, there are some special parameters can be modified through on-chain governance. All the IRIS holders are able to modify. If the community is not satisfied with certain modifiable parameters, it is available to set the proper values in governance module. + +## Gov Module + +* `DepositProcedure` Parameters in deposit period (The minimum of deposit, deposit period) +* `VotingProcedure` Parameters in voting period(Voting period) +* `TallyingProcedure` Parameters in tallying period(The standards of voting) + +Details in [gov](gov.md) + +## Service Module + +* `MaxRequestTimeout` The maximum of waiting blocks for service invocation +* `MinProviderDeposit` The minimum deposit for service binding + +Details in [service](serivice.md) \ No newline at end of file diff --git a/docs/zh/features/basic-concepts/gov-params.md b/docs/zh/features/basic-concepts/gov-params.md index e69de29bb..5b653387b 100644 --- a/docs/zh/features/basic-concepts/gov-params.md +++ b/docs/zh/features/basic-concepts/gov-params.md @@ -0,0 +1,18 @@ +# Gov Params + +在IRISnet中,存在一些特殊的参数,它们可通过链上治理被修改。持有IRIS通证的用户都可以参与到参数修改的链上治理。如果社区对某些可修改的参数不满意,完全可以通过治理模块设置合适的值。 + +## Gov Module + +* `DepositProcedure` 抵押阶段的参数(最小抵押金额,抵押期) +* `VotingProcedure` 投票阶段的参数(投票期) +* `TallyingProcedure` 统计阶段的参数(投票是否通过的标准) + +详细见[gov](gov.md) + +## Service Module + +* `MaxRequestTimeout` 服务调用最大等待区块个数 +* `MinProviderDeposit` 服务绑定最小抵押金额 + +详细见[service](serivice.md) From bbc96960c0be2c477da30476c63184018feb8c67 Mon Sep 17 00:00:00 2001 From: jiacheng Date: Fri, 16 Nov 2018 23:42:59 +0800 Subject: [PATCH 07/12] Finish the Bech32 EN --- docs/features/basic-concepts/bech32-prefix.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/docs/features/basic-concepts/bech32-prefix.md b/docs/features/basic-concepts/bech32-prefix.md index e69de29bb..a0fc83ebb 100644 --- a/docs/features/basic-concepts/bech32-prefix.md +++ b/docs/features/basic-concepts/bech32-prefix.md @@ -0,0 +1,34 @@ +# Bech32 on IRISnet + +Bech32 is a new Bitcoin address format proposed by Pieter Wuille and Greg Maxwell. Besides Bitcoin addresses, Bech32 can encode any short binary data. In the IRIS network, keys and addresses may refer to a number of different roles in the network like accounts, validators etc. The IRIS network is designed to use the Bech32 address format to provide robust integrity checks on data. The human readable part(HRP) makes it more efficient to read and the users could see error messages. + + +## Human Readable Part Table + + +| HRP | Definition | +| -----------|:-------------| +|faa| IRISnet Account Address| +|fap| IRISnet Account Public Key| +|fva| IRISnet Validator's Operator Address| +|fvp| IRISnet Validator's Operator Public Key| +|fca| IRISnet Consensus Address| +|fcp| IRISnet Consensus Public Key| + +## Encoding + +Not all interfaces to users IRISnet should be exposed as bech32 interfaces. Many address are still in hex or base64 encoded form. + +To covert between other binary reprsentation of addresses and keys, it is important to first apply the Amino enocoding process before bech32 encoding. + + +## Example + +Once you create a new address, you should see the following: + +``` +NAME: TYPE: ADDRESS: PUBKEY: +test1 local faa18ekc4dswwrh2a6lfyev4tr25h5y76jkpqsz7kl fap1addwnpepqgxa40ww28uy9q46gg48g6ulqdzwupyjcwfumgfjpvz7krmg5mrnw6zv8uv +``` + +This means you have created a new address `faa18ekc4dswwrh2a6lfyev4tr25h5y76jkpqsz7kl`, its hrp is `faa`. And its public key could be encoded into `fap1addwnpepqgxa40ww28uy9q46gg48g6ulqdzwupyjcwfumgfjpvz7krmg5mrnw6zv8uv`, its hrp is `fap`. From 5ed67c9889ae12ae75eeef76c24a26ea3fdc86d9 Mon Sep 17 00:00:00 2001 From: jiacheng Date: Sat, 17 Nov 2018 21:06:59 +0800 Subject: [PATCH 08/12] Finish the features/gov ZH --- docs/zh/features/governance.md | 100 ++++++++++++++++----------------- 1 file changed, 49 insertions(+), 51 deletions(-) diff --git a/docs/zh/features/governance.md b/docs/zh/features/governance.md index a1ecd1be5..9b9007d7e 100644 --- a/docs/zh/features/governance.md +++ b/docs/zh/features/governance.md @@ -1,64 +1,63 @@ # Gov User Guide -## Basic Function Description +## 基本功能描述 -1. On-chain governance proposals on text -2. On-chain governance proposals on parameter change -3. On-chain governance proposals on software upgrade +1. 文本提议的链上治理 +2. 参数修改提议的链上治理 +3. 软件升级提议的链上治理 -## Interactive process +## 交互流程 -### governance process +### 治理流程 -1. Any users can deposit some tokens to initiate a proposal. Once deposit reaches a certain value `min_deposit`, enter voting period, otherwise it will remain in the deposit period. Others can deposit the proposals on the deposit period. Once the sum of the deposit reaches `min_deposit`, enter voting period. However, if the block-time exceeds `max_deposit_period` in the deposit period, the proposal will be closed. -2. The proposals which enter voting period only can be voted by validators and delegators. The vote of a delegator who hasn't vote will be the same as his validator's vote, and the vote of a delegator who has voted will be remained. The votes wil be tallyed when reach `voting_period'. -3. Our tally have a limit on participation, Other details about voting for proposals: -[CosmosSDK-Gov-spec](https://github.com/cosmos/cosmos-sdk/blob/develop/docs/spec/governance/overview.md) +1. 任何用户可以发起提议,并抵押一部分token,如果超过`min_deposit`,提议进入投票,否则留在抵押期。其他人可以对在抵押期的提议进行抵押token,如果提议的抵押token总和超过`min_deposit`,则进入投票期。但若提议在抵押期停留的出块数目超过`max_deposit_period`,则提议被关闭。 +2. 进入投票期的提议,只有验证人和委托人可以进行投票。如果委托人没投票,则他继承他委托的验证人的投票选项。如果委托人投票了,则覆盖他委托的验证人的投票选项。当提议到达`voting_perid`,统计投票结果。 +3. 我们统计结果有参与度的限制,其他逻辑细节见[CosmosSDK-Gov-spec](https://github.com/cosmos/cosmos-sdk/blob/develop/docs/spec/governance/overview.md) -## Usage Scenario +## 使用场景 -### Usage scenario of parameter change +### 参数修改的使用场景 -Scenario 1:Change the parameters through the command lines +场景一:通过命令行带入参数修改信息进行参数修改 ``` -# Query parameters can be changed by the modules'name in gov +# 根据gov模块名查询的可修改的参数 iriscli gov query-params --module=gov --trust-node -# Results +# 结果 [ "Gov/govDepositProcedure", "Gov/govTallyingProcedure", "Gov/govVotingProcedure" ] -# Query parameters can be modified by "key” +# 根据Key查询可修改参数的内容 iriscli gov query-params --key=Gov/govDepositProcedure --trust-node -# Results +# 结果 {"key":"Gov/govDepositProcedure","value":"{\"min_deposit\":[{\"denom\":\"iris-atto\",\"amount\":\"10000000000000000000\"}],\"max_deposit_period\":172800000000000}","op":""} -# Send proposals, return changed parameters +# 发送提议,返回参数修改的内容 iriscli gov submit-proposal --title="update MinDeposit" --description="test" --type="ParameterChange" --deposit="10iris" --param='{"key":"Gov/govDepositProcedure","value":"{\"min_deposit\":[{\"denom\":\"iris-atto\",\"amount\":\"20000000000000000000\"}],\"max_deposit_period\":172800000000000}","op":"update"}}' --from=x --chain-id=gov-test --fee=0.05iris --gas=200000 -# Deposit for a proposal +# 对提议进行抵押 iriscli gov deposit --proposal-id=1 --deposit=1iris --from=x --chain-id=gov-test --fee=0.05iris --gas=200000 -# Vote for a proposal -echo 1234567890 | iriscli gov vote --proposal-id=1 --option=Yes --from=x --chain-id=gov-test --fee=0.05iris --gas=200000 +# 对提议投票 +iriscli gov vote --proposal-id=1 --option=Yes --from=x --chain-id=gov-test --fee=0.05iris --gas=200000 -# Query the state of a proposal +# 查询提议情况 iriscli gov query-proposal --proposal-id=1 --trust-node ``` -Scenario 2: Change the parameters by the files +场景二,通过文件修改参数 ``` -# Export profiles +# 导出配置文件 iriscli gov pull-params --path=iris --trust-node -# Query profiles' info +# 查询配置文件信息 cat iris/config/params.json { "gov": { "Gov/govDepositProcedure": { @@ -80,7 +79,7 @@ cat iris/config/params.json { } } -# Modify profiles (TallyingProcedure的governance_penalty) +# 修改配置文件 (TallyingProcedure的governance_penalty) vi iris/config/params.json { "gov": { "Gov/govDepositProcedure": { @@ -102,27 +101,28 @@ vi iris/config/params.json { } } -# Change the parameters through files, return changed parameters +# 通过文件修改参数的命令,返回参数修改的内容 iriscli gov submit-proposal --title="update MinDeposit" --description="test" --type="ParameterChange" --deposit="10iris" --path=iris --key=Gov/govTallyingProcedure --op=update --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 -# Deposit for a proposal +# 对提议进行抵押 iriscli gov deposit --proposal-id=1 --deposit=1iris --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 -# Vote for a proposal +# 对提议投票 iriscli gov vote --proposal-id=1 --option=Yes --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 -# Query the state of a proposal +# 查询提议情况 iriscli gov query-proposal --proposal-id=1 --trust-node ``` -### Proposals on software upgrade +### 软件升级提议部分 -Detail in [Upgrade](upgrade.md) +详细参考[Upgrade](upgrade.md) + +## 基本参数 -## Basic parameters ``` -# DepositProcedure(The parameters in deposit period) +# DepositProcedure(抵押阶段的参数) "Gov/govDepositProcedure": { "min_deposit": [ { @@ -134,33 +134,31 @@ Detail in [Upgrade](upgrade.md) } ``` -* Parameters can be changed -* The key of parameters:"Gov/gov/DepositProcedure" -* `min_deposit[0].denom` The minimum tokens deposited are counted by iris-atto. -* `min_deposit[0].amount` The number of minimum tokens and the default scope:1000iris,(1iris,10000iris) -* `max_deposit_period` Window period for repaying deposit, default:172800000000000ns==2Days, scope(20s,3Day) +* 可修改参数 +* 参数的key:"Gov/gov/DepositProcedure" +* `min_deposit[0].denom` 最小抵押token只能是单位是iris-atto的iris通证。 +* `min_deposit[0].amount` 最小抵押token数量,默认:10iris,范围(1iris,200iris) +* `max_deposit_period` 补交抵押token的窗口期,默认:172800000000000纳秒==2天,范围(20秒,3天) ``` -# VotingProcedure(The parameters in voting period) +# VotingProcedure(投票阶段的参数) "Gov/govVotingProcedure": { "voting_period": "10000000000" } ``` - -* Parameters can be changed -* `voting_perid` Window period for vote, default:172800000000000ns==2Days, scope(20s,3Days) +* 可修改参数 +* `voting_perid` 投票的窗口期,默认:172800000000000纳秒==2天,范围(20秒,3天) ``` -# TallyingProcedure (The parameters in Tallying period) +# TallyingProcedure (统计阶段段参数) "Gov/govTallyingProcedure": { "threshold": "0.5000000000", "veto": "0.3340000000", "participation": "0.6670000000" } -``` - -* Parameters can be changed -* `veto` default: 0.334, scope(0,1) -* `threshold` default: 0.5, scope(0,1) -* `governance_penalty` default: 0.667, scope(0,1) -* Vote rules:If the ratio of all voters' `voting_power` to the total 'voting_power' in system less than “participation”, the proposal won't be passed. If the ratio of strongly opposed `voting_power` to all voters' `voting_power` more than “veto”, the proposal won't be passed. Then if the ratio of approved `voting_power` to all voter's `voting_power` except abstentions over “threshold”, the proposal will be passed. Otherwise, N/A. +``` +* 可修改参数 +* `veto` 默认:0.334,范围(0,1) +* `threshold` 默认:0.500,范围(0,1) +* `participation` 默认:0.667,范围(0,1) +* 投票统计逻辑:如果所有投票者的`voting_power`占系统总的`voting_power`的比例没有超过participation,投票不通过。如果强烈反对的`voting_power`占所有投票者的`voting_power` 超过 veto,提议不通过。然后再看赞同的`voting_power`占排除投弃权以外的投票者的总`voting_power` 是否超过 threshold, 超过则提议通过,不超过则不通过。 From 531dc3d5a9a7086ddd94d2e1d6d10b21c166f7f2 Mon Sep 17 00:00:00 2001 From: jiacheng Date: Sat, 17 Nov 2018 23:27:21 +0800 Subject: [PATCH 09/12] Complete the cli-client readme.md --- docs/zh/cli-client/README.md | 3 ++- docs/zh/cli-client/upgrade/README.md | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/zh/cli-client/README.md b/docs/zh/cli-client/README.md index 6f280cdca..e6889113b 100644 --- a/docs/zh/cli-client/README.md +++ b/docs/zh/cli-client/README.md @@ -2,7 +2,7 @@ ## 查询命令的flags -| Name, shorthand | type | Required | Default Value | Description | +| 名称, 速记 | 类型 |必需 |默认值 | 描述 | | --------------- | ---- | -------- | --------------------- | -------------------------------------------------------------------- | | --chain-id | string | false | "" | Tendermint节点的Chain ID | | --height | int | false | 0 | 查询某个高度的区块链数据,如果是0,这返回最新的区块链数据 | @@ -16,6 +16,7 @@ ## 发送交易命令的flags +| 名称, 速记 | 类型 |必需 |默认值 | 描述 | | Name, shorthand | type | Required | Default | Description | | -----------------| ----- | -------- | --------------------- | ------------------------------------------------------------------- | | --account-number | int | false | 0 | 发起交易的账户的编号 | diff --git a/docs/zh/cli-client/upgrade/README.md b/docs/zh/cli-client/upgrade/README.md index 2fd3a1ad5..bdde59d82 100644 --- a/docs/zh/cli-client/upgrade/README.md +++ b/docs/zh/cli-client/upgrade/README.md @@ -12,11 +12,11 @@ iriscli upgrade [command] ## 相关命令 -| Name | Description | +| 命令 | 描述 | | ------------- | ------------------------------------- | -| [submit-switch](submit-switch.md) | Submit a switch msg for a upgrade propsal| -| [query-switch](query-switch.md) | query switch detail | -| [info](info.md) | Query the information of upgrade module | +| [submit-switch](submit-switch.md) | 针对软件升级提议发送switch消息| +| [query-switch](query-switch.md) | 查询switch信息 | +| [info](info.md) | 查询软件升级模块的信息| ## 标志 From 950ad46a9493d026bfcff3ffe51fb8a8a710210c Mon Sep 17 00:00:00 2001 From: jiacheng Date: Sat, 17 Nov 2018 23:45:08 +0800 Subject: [PATCH 10/12] Fix the comment --- docs/features/basic-concepts/bech32-prefix.md | 2 +- docs/features/governance.md | 246 ++++++------------ .../features/basic-concepts/bech32-prefix.md | 4 +- docs/zh/features/governance.md | 2 +- 4 files changed, 80 insertions(+), 174 deletions(-) diff --git a/docs/features/basic-concepts/bech32-prefix.md b/docs/features/basic-concepts/bech32-prefix.md index a0fc83ebb..79dbb1fb3 100644 --- a/docs/features/basic-concepts/bech32-prefix.md +++ b/docs/features/basic-concepts/bech32-prefix.md @@ -1,6 +1,6 @@ # Bech32 on IRISnet -Bech32 is a new Bitcoin address format proposed by Pieter Wuille and Greg Maxwell. Besides Bitcoin addresses, Bech32 can encode any short binary data. In the IRIS network, keys and addresses may refer to a number of different roles in the network like accounts, validators etc. The IRIS network is designed to use the Bech32 address format to provide robust integrity checks on data. The human readable part(HRP) makes it more efficient to read and the users could see error messages. +Bech32 is a new Bitcoin address format proposed by Pieter Wuille and Greg Maxwell. Besides Bitcoin addresses, Bech32 can encode any short binary data. In the IRIS network, keys and addresses may refer to a number of different roles in the network like accounts, validators etc. The IRIS network is designed to use the Bech32 address format to provide robust integrity checks on data. The human readable part(HRP) makes it more efficient to read and the users could see error messages. More details in [bip-0173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki) ## Human Readable Part Table diff --git a/docs/features/governance.md b/docs/features/governance.md index 7961541cc..b90348f27 100644 --- a/docs/features/governance.md +++ b/docs/features/governance.md @@ -1,4 +1,4 @@ -# Gov/Iparam User Guide +# Gov User Guide ## Basic Function Description @@ -12,19 +12,10 @@ 1. Any users can deposit some tokens to initiate a proposal. Once deposit reaches a certain value `min_deposit`, enter voting period, otherwise it will remain in the deposit period. Others can deposit the proposals on the deposit period. Once the sum of the deposit reaches `min_deposit`, enter voting period. However, if the block-time exceeds `max_deposit_period` in the deposit period, the proposal will be closed. 2. The proposals which enter voting period only can be voted by validators and delegators. The vote of a delegator who hasn't vote will be the same as his validator's vote, and the vote of a delegator who has voted will be remained. The votes wil be tallyed when reach `voting_period'. -3. More details about voting for proposals: -[CosmosSDK-Gov-spec](https://github.com/cosmos/cosmos-sdk/blob/develop/docs/spec/governance/overview.md) +3. Our tally have a limit on participation, Other details about voting for proposals: +[CosmosSDK-Gov-spec](https://github.com/cosmos/cosmos-sdk/blob/v0.26.0/docs/spec/governance/overview.md) ## Usage Scenario -### Create an environment - -``` -rm -rf iris -rm -rf .iriscli -iris init gen-tx --name=x --home=iris -iris init --gen-txs --chain-id=gov-test -o --home=iris -iris start --home=iris -``` ### Usage scenario of parameter change @@ -36,25 +27,25 @@ iriscli gov query-params --module=gov --trust-node # Results [ - "Gov/gov/DepositProcedure", - "Gov/gov/TallyingProcedure", - "Gov/gov/VotingProcedure" +"Gov/govDepositProcedure", +"Gov/govTallyingProcedure", +"Gov/govVotingProcedure" ] # Query parameters can be modified by "key” -iriscli gov query-params --key=Gov/gov/DepositProcedure --trust-node +iriscli gov query-params --key=Gov/govDepositProcedure --trust-node # Results -{"key":"Gov/gov/DepositProcedure","value":"{\"min_deposit\":[{\"denom\":\"iris-atto\",\"amount\":\"10000000000000000000\"}],\"max_deposit_period\":10}","op":""} +{"key":"Gov/govDepositProcedure","value":"{\"min_deposit\":[{\"denom\":\"iris-atto\",\"amount\":\"10000000000000000000\"}],\"max_deposit_period\":172800000000000}","op":""} # Send proposals, return changed parameters -echo 1234567890 | iriscli gov submit-proposal --title="update MinDeposit" --description="test" --type="ParameterChange" --deposit="10iris" --param='{"key":"Gov/gov/DepositProcedure","value":"{\"min_deposit\":[{\"denom\":\"iris-atto\",\"amount\":\"10000000000000000000\"}],\"max_deposit_period\":20}","op":"update"}' --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 +iriscli gov submit-proposal --title="update MinDeposit" --description="test" --type="ParameterChange" --deposit="10iris" --param='{"key":"Gov/govDepositProcedure","value":"{\"min_deposit\":[{\"denom\":\"iris-atto\",\"amount\":\"20000000000000000000\"}],\"max_deposit_period\":172800000000000}","op":"update"}}' --from=x --chain-id=gov-test --fee=0.05iris --gas=200000 # Deposit for a proposal -echo 1234567890 | iriscli gov deposit --proposal-id=1 --deposit=1iris --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 +iriscli gov deposit --proposal-id=1 --deposit=1iris --from=x --chain-id=gov-test --fee=0.05iris --gas=200000 # Vote for a proposal -echo 1234567890 | iriscli gov vote --proposal-id=1 --option=Yes --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 +echo 1234567890 | iriscli gov vote --proposal-id=1 --option=Yes --from=x --chain-id=gov-test --fee=0.05iris --gas=200000 # Query the state of a proposal iriscli gov query-proposal --proposal-id=1 --trust-node @@ -68,193 +59,108 @@ Scenario 2: Change the parameters by the files iriscli gov pull-params --path=iris --trust-node # Query profiles' info -cat iris/config/params.json +cat iris/config/params.json { +"gov": { +"Gov/govDepositProcedure": { +"min_deposit": [ { - "gov": { - "Gov/gov/DepositProcedure": { - "min_deposit": [ - { - "denom": "iris-atto", - "amount": "10000000000000000000" - } - ], - "max_deposit_period": "10" - }, - "Gov/gov/VotingProcedure": { - "voting_period": "10" - }, - "Gov/gov/TallyingProcedure": { - "threshold": "1/2", - "veto": "1/3", - "governance_penalty": "1/100" - } - } +"denom": "iris-atto", +"amount": "10000000000000000000" } +], +"max_deposit_period": "172800000000000" +}, +"Gov/govVotingProcedure": { +"voting_period": "10000000000" +}, +"Gov/govTallyingProcedure": { +"threshold": "0.5000000000", +"veto": "0.3340000000", +"participation": "0.6670000000" +} +} + # Modify profiles (TallyingProcedure的governance_penalty) -vi iris/config/params.json +vi iris/config/params.json { +"gov": { +"Gov/govDepositProcedure": { +"min_deposit": [ { - "gov": { - "Gov/gov/DepositProcedure": { - "min_deposit": [ - { - "denom": "iris-atto", - "amount": "10000000000000000000" - } - ], - "max_deposit_period": "10" - }, - "Gov/gov/VotingProcedure": { - "voting_period": "10" - }, - "Gov/gov/TallyingProcedure": { - "threshold": "1/2", - "veto": "1/3", - "governance_penalty": "20/100" - } - } +"denom": "iris-atto", +"amount": "10000000000000000000" +} +], +"max_deposit_period": "172800000000000" +}, +"Gov/govVotingProcedure": { +"voting_period": "10000000000" +}, +"Gov/govTallyingProcedure": { +"threshold": "0.5000000000", +"veto": "0.3340000000", +"participation": "0.4990000000" +} } # Change the parameters through files, return changed parameters -echo 1234567890 | iriscli gov submit-proposal --title="update MinDeposit" --description="test" --type="ParameterChange" --deposit="10iris" --path=iris --key=Gov/gov/TallyingProcedure --op=update --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 +iriscli gov submit-proposal --title="update MinDeposit" --description="test" --type="ParameterChange" --deposit="10iris" --path=iris --key=Gov/govTallyingProcedure --op=update --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 # Deposit for a proposal -echo 1234567890 | iriscli gov deposit --proposal-id=1 --deposit=1iris --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 - -# Vote for a proposal -echo 1234567890 | iriscli gov vote --proposal-id=1 --option=Yes --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 - -# Query the state of a proposal -iriscli gov query-proposal --proposal-id=1 --trust-node -``` - -## CLI Command Details - -### Basic method of gov modules - -``` -# Text proposals -iriscli gov submit-proposal --title="update MinDeposit" --description="test" --type="Text" --deposit="10iris" --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 -``` - -* `--title` The title of a proposal -* `--description` The description of a proposal -* `--type` The type of a proposal {'Text','ParameterChange','SoftwareUpgrade'} -* `--deposit` The number of the tokens deposited -* The basic text proposals are as below - -``` iriscli gov deposit --proposal-id=1 --deposit=1iris --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 -``` -* `--propsal-id` The ID of the proposal deposited -* `--deposit` The number of the tokens deposited - -``` +# Vote for a proposal iriscli gov vote --proposal-id=1 --option=Yes --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 -``` -* `--proposal-id` The ID of the proposal in voting period -* `--option` Vote option{'Yes'-agree,'Abstain'-abstain,'No'-disagree,'nowithVeto'-strongly disagree } - - -``` # Query the state of a proposal iriscli gov query-proposal --proposal-id=1 --trust-node ``` -* `--proposal-id` Query the ID of a proposal - - - -### The proposals on parameters modification - -``` -# Query parameters can be modified by the modules'name in gov -iriscli gov query-params --module=gov --trust-node -``` - -* `--module` Query the list of "key" of the parameters can be changed in the module - - -``` -# Query the parameters can be modified by "key" -iriscli gov query-params --key=Gov/gov/DepositProcedure --trust-node -``` - -* `--key` Query the parameter corresponding to the "key" - -``` -# Export profiles -iriscli gov pull-params --path=iris --trust-node -``` - -* `--path` The folder of node initialization +### Proposals on software upgrade - - -``` -# Modify the parameters through the command lines -iriscli gov submit-proposal --title="update MinDeposit" --description="test" --type="ParameterChange" --deposit="10iris" --param='{"key":"Gov/gov/DepositProcedure","value":"{\"min_deposit\":[{\"denom\":\"iris-atto\",\"amount\":\"10000000000000000000\"}],\"max_deposit_period\":20}","op":"update"}' --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 -``` - -* `--param` The details of changed parameters (get parameters through query-params, modify it and then add "update" on the "op", more details in usage scenarios) -* Other fields' proposals are similar with text proposal - -``` -# Change the parameters through files, return modified parameters -echo 1234567890 | iriscli gov submit-proposal --title="update MinDeposit" --description="test" --type="ParameterChange" --deposit="10iris" --path=iris --key=Gov/gov/TallyingProcedure --op=update --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 -``` - -* `--path` The folder of node initialization -* `--key` The key of the parameter to be modified -* `--op` The type of changed parameters; only 'update' is implemented at present -* Other fields' proposals are similar with text proposal - -### Proposals on software upgrade +Detail in [Upgrade](upgrade.md) ## Basic parameters ``` # DepositProcedure(The parameters in deposit period) -"Gov/gov/DepositProcedure": { - "min_deposit": [ - { - "denom": "iris-atto", - "amount": "10000000000000000000" - } - ], - "max_deposit_period": "10" +"Gov/govDepositProcedure": { +"min_deposit": [ +{ +"denom": "iris-atto", +"amount": "10000000000000000000" +} +], +"max_deposit_period": "172800000000000" } ``` * Parameters can be changed * The key of parameters:"Gov/gov/DepositProcedure" * `min_deposit[0].denom` The minimum tokens deposited are counted by iris-atto. -* `min_deposit[0].amount` The number of minimum tokens and the default scope:10iris,(1iris,200iris) -* `max_deposit_period` Window period for repaying deposit, default :10, scope(0,1) +* `min_deposit[0].amount` The number of minimum tokens and the default scope:1000iris,(1iris,10000iris) +* `max_deposit_period` Window period for repaying deposit, default:172800000000000ns==2Days, scope(20s,3Day) ``` # VotingProcedure(The parameters in voting period) -"Gov/gov/VotingProcedure": { - "voting_period": "10" -}, +"Gov/govVotingProcedure": { +"voting_period": "10000000000" +} ``` * Parameters can be changed -* `voting_perid` Window period for vote, default:10, scope(20,20000) - +* `voting_perid` Window period for vote, default:172800000000000ns==2Days, scope(20s,3Days) + ``` # TallyingProcedure (The parameters in Tallying period) -"Gov/gov/TallyingProcedure": { - "threshold": "1/2", - "veto": "1/3", - "governance_penalty": "1/100" +"Gov/govTallyingProcedure": { +"threshold": "0.5000000000", +"veto": "0.3340000000", +"participation": "0.6670000000" } ``` - -* Parameters can be changed -* `veto` default: 1/3, scope(0,1) -* `threshold` default 1/2, scope(0,1) -* `governance_penalty` The default ratio of slashing tokens of validators who didn't vote: 1/100, scope(0,1) -* Vote rules: If the ratio of voting power of "strongly disagree" over "veto", the proposal won't be passed. If the ratio of voting_power of "agree" over "veto", the proposal won't be passed. Otherwise, it will be passed. +* Parameters can be changed +* `veto` default: 0.334, scope(0,1) +* `threshold` default: 0.5, scope(0,1) +* `governance_penalty` default: 0.667, scope(0,1) +* Vote rules:If the ratio of all voters' `voting_power` to the total 'voting_power' in system less than “participation”, the proposal won't be passed. If the ratio of strongly opposed `voting_power` to all voters' `voting_power` more than “veto”, the proposal won't be passed. Then if the ratio of approved `voting_power` to all voter's `voting_power` except abstentions over “threshold”, the proposal will be passed. Otherwise, N/A. diff --git a/docs/zh/features/basic-concepts/bech32-prefix.md b/docs/zh/features/basic-concepts/bech32-prefix.md index b6ece16dd..a77c5140a 100644 --- a/docs/zh/features/basic-concepts/bech32-prefix.md +++ b/docs/zh/features/basic-concepts/bech32-prefix.md @@ -1,6 +1,6 @@ # Bech32 on IRISnet -Bech32是由Pieter Wuille和Greg Maxwel提出的新比特币地址格式。除了比特币之外,bech32可以编码任何短二进制数据。在IRISnet里,私钥和地址可能指的是一些在网络中不同的角色,例如普通账户和验证人账户等。IRISnet设计使用Bech32地址格式来提供对数据鲁棒的完整性检查。 用户可读部分(human readable part) 使得用户更有效率的理解地址和阅读错误信息。 +Bech32是由Pieter Wuille和Greg Maxwel提出的新比特币地址格式。除了比特币之外,bech32可以编码任何短二进制数据。在IRISnet里,私钥和地址可能指的是一些在网络中不同的角色,例如普通账户和验证人账户等。IRISnet设计使用Bech32地址格式来提供对数据鲁棒的完整性检查。 用户可读部分(human readable part) 使得用户更有效率的理解地址和阅读错误信息。Bech32更多细节见 [bip-0173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki) ## 用户可读部分表 @@ -27,4 +27,4 @@ NAME: TYPE: ADDRESS: PUBKEY: test1 local faa18ekc4dswwrh2a6lfyev4tr25h5y76jkpqsz7kl fap1addwnpepqgxa40ww28uy9q46gg48g6ulqdzwupyjcwfumgfjpvz7krmg5mrnw6zv8uv ``` -这意味着你创建了一个新账户地址 `faa18ekc4dswwrh2a6lfyev4tr25h5y76jkpqsz7kl`, 他的用户可读部分是 `faa`。他的公钥被密码成 `fap1addwnpepqgxa40ww28uy9q46gg48g6ulqdzwupyjcwfumgfjpvz7krmg5mrnw6zv8uv`, 他的用户可读部分是 `fap`。 \ No newline at end of file +这意味着你创建了一个新账户地址 `faa18ekc4dswwrh2a6lfyev4tr25h5y76jkpqsz7kl`, 他的用户可读部分是 `faa`。他的公钥被密码成 `fap1addwnpepqgxa40ww28uy9q46gg48g6ulqdzwupyjcwfumgfjpvz7krmg5mrnw6zv8uv`, 他的用户可读部分是 `fap`。 diff --git a/docs/zh/features/governance.md b/docs/zh/features/governance.md index 9b9007d7e..b8a5ec07b 100644 --- a/docs/zh/features/governance.md +++ b/docs/zh/features/governance.md @@ -12,7 +12,7 @@ 1. 任何用户可以发起提议,并抵押一部分token,如果超过`min_deposit`,提议进入投票,否则留在抵押期。其他人可以对在抵押期的提议进行抵押token,如果提议的抵押token总和超过`min_deposit`,则进入投票期。但若提议在抵押期停留的出块数目超过`max_deposit_period`,则提议被关闭。 2. 进入投票期的提议,只有验证人和委托人可以进行投票。如果委托人没投票,则他继承他委托的验证人的投票选项。如果委托人投票了,则覆盖他委托的验证人的投票选项。当提议到达`voting_perid`,统计投票结果。 -3. 我们统计结果有参与度的限制,其他逻辑细节见[CosmosSDK-Gov-spec](https://github.com/cosmos/cosmos-sdk/blob/develop/docs/spec/governance/overview.md) +3. 我们统计结果有参与度的限制,其他逻辑细节见[CosmosSDK-Gov-spec](https://github.com/cosmos/cosmos-sdk/blob/v0.26.0/docs/spec/governance/overview.md) ## 使用场景 From 88a8d5c245cb35e72b5007dc487abbf43114397e Mon Sep 17 00:00:00 2001 From: jiacheng Date: Sun, 18 Nov 2018 11:40:12 +0800 Subject: [PATCH 11/12] Modify the gov cliclient --- docs/cli-client/gov/deposit.md | 27 +++++--------------- docs/cli-client/gov/pull-params.md | 15 +++++------ docs/cli-client/gov/query-deposit.md | 14 +++++----- docs/cli-client/gov/query-deposits.md | 15 +++++------ docs/cli-client/gov/query-params.md | 14 +++++----- docs/cli-client/gov/query-proposal.md | 15 +++++------ docs/cli-client/gov/query-proposals.md | 16 ++++++------ docs/cli-client/gov/query-tally.md | 15 +++++------ docs/cli-client/gov/query-vote.md | 15 +++++------ docs/cli-client/gov/query-votes.md | 14 +++++----- docs/cli-client/gov/submit-proposal.md | 24 ++++-------------- docs/cli-client/gov/vote.md | 26 +++++-------------- docs/zh/cli-client/gov/deposit.md | 26 +++++-------------- docs/zh/cli-client/gov/pull-params.md | 15 +++++------ docs/zh/cli-client/gov/query-deposit.md | 15 +++++------ docs/zh/cli-client/gov/query-deposits.md | 13 ++++------ docs/zh/cli-client/gov/query-params.md | 13 ++++------ docs/zh/cli-client/gov/query-proposal.md | 15 +++++------ docs/zh/cli-client/gov/query-proposals.md | 11 +++----- docs/zh/cli-client/gov/query-tally.md | 15 +++++------ docs/zh/cli-client/gov/query-vote.md | 13 ++++------ docs/zh/cli-client/gov/query-votes.md | 14 +++++----- docs/zh/cli-client/gov/submit-proposal.md | 31 ++++++----------------- docs/zh/cli-client/gov/vote.md | 26 +++++-------------- 24 files changed, 148 insertions(+), 269 deletions(-) diff --git a/docs/cli-client/gov/deposit.md b/docs/cli-client/gov/deposit.md index 95c383530..5ebbad303 100644 --- a/docs/cli-client/gov/deposit.md +++ b/docs/cli-client/gov/deposit.md @@ -10,32 +10,17 @@ Deposit tokens for activing proposal iriscli gov deposit [flags] ``` +Print help messages: + +``` +iriscli gov deposit --help +``` ## Flags | Name, shorthand | Default | Description | Required | | ---------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --account-number | | [int] AccountNumber number to sign the tx | | -| --async | | Broadcast transactions asynchronously | | -| --chain-id | | [string] Chain ID of tendermint node | Yes | | --deposit | | [string] Deposit of proposal | Yes | -| --dry-run | | Ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it | | -| --fee | | [string] Fee to pay along with transaction | Yes | -| --from | | [string] Name of private key with which to sign | Yes | -| --from-addr | | [string] Specify from address in generate-only mode | | -| --gas | 200000 | [string] Gas limit to set per-transaction; set to "simulate" to calculate required gas automatically | | -| --gas-adjustment | 1 | [float] Adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored | | -| --generate-only | | Build an unsigned transaction and write it to STDOUT | | -| --help, -h | | Help for deposit | | -| --indent | | Add indent to JSON response | | -| --json | | Return output in json format | | -| --ledger | | Use a connected Ledger device | | -| --memo | | [string] Memo to send along with transaction | | -| --node | tcp://localhost:26657 | [string] \:\ to tendermint rpc interface for this chain | | -| --print-response | | return tx response (only works with async = false) | | | --proposal-id | | [string] ProposalID of proposal depositing on | Yes | -| --sequence | | [int] Sequence number to sign the tx | | -| --trust-node | true | Don't verify proofs for responses | | - ## Examples ### Deposit @@ -57,4 +42,4 @@ Committed at block 473 (tx hash: 0309E969589F19A9D9E4BFC9479720487FBF929ED6A8882 "proposal-id": "1" } } -``` \ No newline at end of file +``` diff --git a/docs/cli-client/gov/pull-params.md b/docs/cli-client/gov/pull-params.md index dd8b5397b..1830b0fa5 100644 --- a/docs/cli-client/gov/pull-params.md +++ b/docs/cli-client/gov/pull-params.md @@ -10,18 +10,17 @@ Generate param.json file iriscli gov pull-params [flags] ``` +Print help messages: + +``` +iriscli gov pull-params --help +``` + ## Flags | Name, shorthand | Default | Description | Required | | --------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --chain-id | | [string] Chain ID of tendermint node | | -| --height | | [int] Block height to query, omit to get most recent provable block | | -| --help, -h | | Help for pull-params | | -| --indent | | Add indent to JSON response | | -| --ledger | | Use a connected Ledger device | | -| --node | tcp://localhost:26657 | [string] \:\ to tendermint rpc interface for this chain | | | --path | $HOME/.iris | [string] Directory of iris home | | -| --trust-node | true | Don't verify proofs for responses | | ## Examples @@ -84,4 +83,4 @@ If you open the params.json in the --path/config directory, you can see it's jso } } } -``` \ No newline at end of file +``` diff --git a/docs/cli-client/gov/query-deposit.md b/docs/cli-client/gov/query-deposit.md index a2a98a5c1..6633eb4c4 100644 --- a/docs/cli-client/gov/query-deposit.md +++ b/docs/cli-client/gov/query-deposit.md @@ -10,19 +10,17 @@ Query details of a deposit iriscli gov query-deposit [flags] ``` +Print help messages: + +``` +iriscli gov query-deposit --help +``` ## Flags | Name, shorthand | Default | Description | Required | | --------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | | --chain-id | | [string] Chain ID of tendermint node | Yes | | --depositor | | [string] Bech32 depositor address | Yes | -| --height | | [int] Block height to query, omit to get most recent provable block | | -| --help, -h | | Help for query-deposit | | -| --indent | | Add indent to JSON response | | -| --ledger | | Use a connected Ledger device | | -| --node | tcp://localhost:26657 | [string] \:\ to tendermint rpc interface for this chain | | -| --proposal-id | | [string] ProposalID of proposal depositing on | Yes | -| --trust-node | true | Don't verify proofs for responses | | ## Examples @@ -45,4 +43,4 @@ You could query the deposited tokens on a specific proposal. } ] } -``` \ No newline at end of file +``` diff --git a/docs/cli-client/gov/query-deposits.md b/docs/cli-client/gov/query-deposits.md index d9098a365..c2b183287 100644 --- a/docs/cli-client/gov/query-deposits.md +++ b/docs/cli-client/gov/query-deposits.md @@ -10,18 +10,17 @@ Query details of a deposits iriscli gov query-deposits [flags] ``` +Print help messages: + +``` +iriscli gov query-deposits --help +``` ## Flags | Name, shorthand | Default | Description | Required | | --------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --chain-id | | [string] Chain ID of tendermint node | Yes | -| --height | | [int] Block height to query, omit to get most recent provable block | | -| --help, -h | | Help for query-deposits | | -| --indent | | Add indent to JSON response | | -| --ledger | | Use a connected Ledger device | | -| --node | tcp://localhost:26657 | [string] \:\ to tendermint rpc interface for this chain | | | --proposal-id | | [string] ProposalID of proposal depositing on | Yes | -| --trust-node | true | Don't verify proofs for responses | | + ## Examples @@ -46,4 +45,4 @@ You could query all the deposited tokens on a specific proposal, includes deposi ] } ] -``` \ No newline at end of file +``` diff --git a/docs/cli-client/gov/query-params.md b/docs/cli-client/gov/query-params.md index 543d400ba..2f61348e8 100644 --- a/docs/cli-client/gov/query-params.md +++ b/docs/cli-client/gov/query-params.md @@ -10,19 +10,17 @@ Query parameter proposal's config iriscli gov query-params [flags] ``` +Print help messages: + +``` +iriscli gov query-params --help +``` ## Flags | Name, shorthand | Default | Description | Required | | --------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --chain-id | | [string] Chain ID of tendermint node | | -| --height | | [int] Block height to query, omit to get most recent provable block | | -| --help, -h | | Help for query-params | | -| --indent | | Add indent to JSON response | | | --key | | [string] Key name of parameter | | -| --ledger | | Use a connected Ledger device | | | --module | | [string] Module name | | -| --node | tcp://localhost:26657 | [string] \:\ to tendermint rpc interface for this chain | | -| --trust-node | true | Don't verify proofs for responses | | ## Examples @@ -54,4 +52,4 @@ You'll get all the details of the key specified in the gov module. {"key":"Gov/govDepositProcedure","value":"{\"min_deposit\":[{\"denom\":\"iris-atto\",\"amount\":\"1000000000000000000000\"}],\"max_deposit_period\":172800000000000}","op":""} ``` -Note: --module and --key cannot be both empty. \ No newline at end of file +Note: --module and --key cannot be both empty. diff --git a/docs/cli-client/gov/query-proposal.md b/docs/cli-client/gov/query-proposal.md index b77535703..348052272 100644 --- a/docs/cli-client/gov/query-proposal.md +++ b/docs/cli-client/gov/query-proposal.md @@ -10,18 +10,17 @@ Query details of a single proposal iriscli gov query-proposal [flags] ``` +Print help messages: + +``` +iriscli gov query-proposal --help +``` + ## Flags | Name, shorthand | Default | Description | Required | | --------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --chain-id | | [string] Chain ID of tendermint node | Yes | -| --height | | [int] Block height to query, omit to get most recent provable block | | -| --help, -h | | Help for query-proposal | | -| --indent | | Add indent to JSON response | | -| --ledger | | Use a connected Ledger device | | -| --node | tcp://localhost:26657 | [string] \:\ to tendermint rpc interface for this chain | | | --proposal-id | | [string] ProposalID of proposal depositing on | Yes | -| --trust-node | true | Don't verify proofs for responses | | ## Examples @@ -62,4 +61,4 @@ You could query the details of a specific proposal. "op": "" } } -``` \ No newline at end of file +``` diff --git a/docs/cli-client/gov/query-proposals.md b/docs/cli-client/gov/query-proposals.md index 0c0645c3e..21424ff87 100644 --- a/docs/cli-client/gov/query-proposals.md +++ b/docs/cli-client/gov/query-proposals.md @@ -10,20 +10,20 @@ Query proposals with optional filters iriscli gov query-proposals [flags] ``` + +Print help messages: + +``` +iriscli gov query-proposals --help +``` + ## Flags | Name, shorthand | Default | Description | Required | | --------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --chain-id | | [string] Chain ID of tendermint node | Yes | | --depositor | | [string] (optional) Filter by proposals deposited on by depositor | | -| --height | | [int] Block height to query, omit to get most recent provable block | | -| --help, -h | | Help for query-proposals | | -| --indent | | Add indent to JSON response | | -| --ledger | | Use a connected Ledger device | | | --limit | | [string] (optional) Limit to latest [number] proposals. Defaults to all proposals | | -| --node | tcp://localhost:26657 | [string] \:\ to tendermint rpc interface for this chain | | | --status | | [string] (optional) filter proposals by proposal status | | -| --trust-node | true | Don't verify proofs for responses | | | --voter | | [string] (optional) Filter by proposals voted on by voted | | ## Examples @@ -51,4 +51,4 @@ Finally, here shows the proposal who's depositor address is faa14q5rf9sl2dqd2uxr ```txt 2 - new proposal -``` \ No newline at end of file +``` diff --git a/docs/cli-client/gov/query-tally.md b/docs/cli-client/gov/query-tally.md index ca9c32513..9a0331b50 100644 --- a/docs/cli-client/gov/query-tally.md +++ b/docs/cli-client/gov/query-tally.md @@ -10,17 +10,16 @@ Get the tally of a proposal vote iriscli gov query-tally [flags] ``` +Print help messages: + +``` +iriscli gov query-tally --help +``` + ## Flags | Name, shorthand | Default | Description | Required | | --------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --chain-id | | [string] Chain ID of tendermint node | Yes | -| --height | | [int] Block height to query, omit to get most recent provable block | | -| --help, -h | | Help for query-tally | | -| --indent | | Add indent to JSON response | | -| --ledger | | Use a connected Ledger device | | -| --node | tcp://localhost:26657 | [string] \:\ to tendermint rpc interface for this chain | | | --proposal-id | | [string] ProposalID of proposal depositing on | Yes | -| --trust-node | true | Don't verify proofs for responses | | ## Examples @@ -39,4 +38,4 @@ You could query the statistics of each voting option. "no": "0.0000000000", "no_with_veto": "0.0000000000" } -``` \ No newline at end of file +``` diff --git a/docs/cli-client/gov/query-vote.md b/docs/cli-client/gov/query-vote.md index 0a05d9b8c..e7175f1c3 100644 --- a/docs/cli-client/gov/query-vote.md +++ b/docs/cli-client/gov/query-vote.md @@ -10,18 +10,17 @@ Query vote iriscli gov query-vote [flags] ``` +Print help messages: + +``` +iriscli gov query-vote --help +``` + ## Flags | Name, shorthand | Default | Description | Required | | --------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --chain-id | | [string] Chain ID of tendermint node | Yes | -| --height | | [int] Block height to query, omit to get most recent provable block | | -| --help, -h | | Help for query-vote | | -| --indent | | Add indent to JSON response | | -| --ledger | | Use a connected Ledger device | | -| --node | tcp://localhost:26657 | [string] \:\ to tendermint rpc interface for this chain | | | --proposal-id | | [string] ProposalID of proposal depositing on | Yes | -| --trust-node | true | Don't verify proofs for responses | | | --voter | | [string] Bech32 voter address | Yes | ## Examples @@ -40,4 +39,4 @@ You could query the voting by specifying the proposal and the voter. "proposal_id": "1", "option": "Yes" } -``` \ No newline at end of file +``` diff --git a/docs/cli-client/gov/query-votes.md b/docs/cli-client/gov/query-votes.md index c9834c5d6..bed60f2cf 100644 --- a/docs/cli-client/gov/query-votes.md +++ b/docs/cli-client/gov/query-votes.md @@ -10,18 +10,16 @@ Query votes on a proposal iriscli gov query-votes [flags] ``` +Print help messages: + +``` +iriscli gov query-votes --help +``` ## Flags | Name, shorthand | Default | Description | Required | | --------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --chain-id | | [string] Chain ID of tendermint node | Yes | -| --height | | [int] Block height to query, omit to get most recent provable block | | -| --help, -h | | Help for query-votes | | -| --indent | | Add indent to JSON response | | -| --ledger | | Use a connected Ledger device | | -| --node | tcp://localhost:26657 | [string] \:\ to tendermint rpc interface for this chain | | | --proposal-id | | [string] ProposalID of proposal depositing on | Yes | -| --trust-node | true | Don't verify proofs for responses | | ## Examples @@ -41,4 +39,4 @@ You could query the voting of all the voters by specifying the proposal. "option": "Yes" } ] -``` \ No newline at end of file +``` diff --git a/docs/cli-client/gov/submit-proposal.md b/docs/cli-client/gov/submit-proposal.md index 10c056aca..beaf29045 100644 --- a/docs/cli-client/gov/submit-proposal.md +++ b/docs/cli-client/gov/submit-proposal.md @@ -10,36 +10,22 @@ Submit a proposal along with an initial deposit iriscli gov submit-proposal [flags] ``` +Print help messages: + +``` +iriscli gov submit-proposal --help +``` ## Flags | Name, shorthand | Default | Description | Required | | ---------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --account-number | | [int] AccountNumber number to sign the tx | | -| --async | | Broadcast transactions asynchronously | | -| --chain-id | | [string] Chain ID of tendermint node | Yes | | --deposit | | [string] Deposit of proposal | | | --description | | [string] Description of proposal | Yes | -| --dry-run | | Ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it | | -| --fee | | [string] Fee to pay along with transaction | Yes | -| --from | | [string] Name of private key with which to sign | Yes | -| --from-addr | | [string] Specify from address in generate-only mode | | -| --gas | 200000 | [string] Gas limit to set per-transaction; set to "simulate" to calculate required gas automatically | | -| --gas-adjustment | 1 | [float] Adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored | | -| --generate-only | | Build an unsigned transaction and write it to STDOUT | | -| --help, -h | | Help for submit-proposal | | -| --indent | | Add indent to JSON response | | -| --json | | Return output in json format | | | --key | | The key of parameter | | -| --ledger | | Use a connected Ledger device | | -| --memo | | [string] Memo to send along with transaction | | -| --node | tcp://localhost:26657 | [string] \:\ to tendermint rpc interface for this chain | | | --op | | [string] The operation of parameter | | | --param | | [string] Parameter of proposal,eg. [{key:key,value:value,op:update}] | | | --path | | [string] The path of param.json | | -| --print-response | | Return tx response (only works with async = false) | | -| --sequence | | [int] Sequence number to sign the tx | | | --title | | [string] Title of proposal | Yes | -| --trust-node | true | Don't verify proofs for responses | | | --type | | [string] ProposalType of proposal,eg:Text/ParameterChange/SoftwareUpgrade | Yes | ## Examples diff --git a/docs/cli-client/gov/vote.md b/docs/cli-client/gov/vote.md index 88e86ba7a..a8b63e039 100644 --- a/docs/cli-client/gov/vote.md +++ b/docs/cli-client/gov/vote.md @@ -10,31 +10,17 @@ Vote for an active proposal, options: Yes/No/NoWithVeto/Abstain iriscli gov vote [flags] ``` +Print help messages: + +``` +iriscli gov vote --help +``` ## Flags | Name, shorthand | Default | Description | Required | | ---------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --account-number | | [int] AccountNumber number to sign the tx | | -| --async | | Broadcast transactions asynchronously | | -| --chain-id | | [string] Chain ID of tendermint node | Yes | -| --dry-run | | Ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it | | -| --fee | | [string] Fee to pay along with transaction | Yes | -| --from | | [string] Name of private key with which to sign | Yes | -| --from-addr | | [string] Specify from address in generate-only mode | | -| --gas | 200000 | [string] Gas limit to set per-transaction; set to "simulate" to calculate required gas automatically | | -| --gas-adjustment | 1 | [float] Adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored | | -| --generate-only | | Build an unsigned transaction and write it to STDOUT | | -| --help, -h | | Help for vote | | -| --indent | | Add indent to JSON response | | -| --json | | Return output in json format | | -| --ledger | | Use a connected Ledger device | | -| --memo | | [string] Memo to send along with transaction | | -| --node | tcp://localhost:26657 | [string] \:\ to tendermint rpc interface for this chain | | | --option | | [string] Vote option {Yes, No, NoWithVeto, Abstain} | Yes | -| --print-response | | Return tx response (only works with async = false) | | | --proposal-id | | [string] ProposalID of proposal voting on | Yes | -| --sequence | | [int] Sequence number to sign the tx | | -| --trust-node | true | Don't verify proofs for responses | | ## Examples @@ -58,4 +44,4 @@ Committed at block 989 (tx hash: ABDD88AA3CA8F365AC499427477CCE83ADF09D7FC2D6264 "voter": "faa14q5rf9sl2dqd2uxrxykafxq3nu3lj2fp9l7pgd" } } -``` \ No newline at end of file +``` diff --git a/docs/zh/cli-client/gov/deposit.md b/docs/zh/cli-client/gov/deposit.md index a83045555..9799ca73a 100644 --- a/docs/zh/cli-client/gov/deposit.md +++ b/docs/zh/cli-client/gov/deposit.md @@ -10,31 +10,17 @@ iriscli gov deposit [flags] ``` +打印帮助信息: + +``` +iriscli gov deposit --help +``` ## 标志 | 名称, 速记 | 默认值 | 描述 | 是否必须 | | ---------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --account-number | | [int] 用来签名交易的AccountNumber | | -| --async | | 异步广播交易 | | -| --chain-id | | [string] tendermint节点的链ID | Yes | | --deposit | | [string] 发起提议的保证金 | Yes | -| --dry-run | | 忽略--gas标志并进行本地的交易仿真 | | -| --fee | | [string] 支付的交易费用 | Yes | -| --from | | [string] 用来签名的私钥名 | Yes | -| --from-addr | | [string] 指定generate-only模式下的from address | | -| --gas | 200000 | [string] 单次交易的gas上限; 设置为"simulate"将自动计算相应的阈值 | | -| --gas-adjustment | 1 | [float] 这个调整因子将乘以交易仿真返回的估计值; 如果手动设置了gas的上限,这个标志将被忽略 | | -| --generate-only | | 构建一个未签名交易并将其打印到标准输出 | | -| --help, -h | | 查询命令帮助 | | -| --indent | | 在JSON响应中添加缩进 | | -| --json | | 输出将以json格式返回 | | -| --ledger | | 使用连接的硬件记账设备 | | -| --memo | | [string] 发送交易的备忘录 | | -| --node | tcp://localhost:26657 | [string] tendermint节点开启的远程过程调用接口\<主机>:\<端口> | | -| --print-response | | 返回交易响应 (当且仅当同步模式下使用)) | | | --proposal-id | | [string] 充值保证金的提议ID | Yes | -| --sequence | | [int] 用来签名交易的sequence number | | -| --trust-node | true | 关闭响应结果校验 | | ## 例子 @@ -65,4 +51,4 @@ Committed at block 473 (tx hash: 0309E969589F19A9D9E4BFC9479720487FBF929ED6A8882 [query-deposit](query-deposit.md) -[query-deposits](query-deposits.md) \ No newline at end of file +[query-deposits](query-deposits.md) diff --git a/docs/zh/cli-client/gov/pull-params.md b/docs/zh/cli-client/gov/pull-params.md index c43dbc476..ce7189ca0 100644 --- a/docs/zh/cli-client/gov/pull-params.md +++ b/docs/zh/cli-client/gov/pull-params.md @@ -9,19 +9,16 @@ ``` iriscli gov pull-params [flags] ``` +打印帮助信息: +``` +iriscli gov pull-params --help +``` ## 标志 | 名称, 速记 | 默认值 | 描述 | 是否必须 | | --------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --chain-id | | [string] tendermint节点的链ID | | -| --height | | [int] 查询的区块高度 | | -| --help, -h | | 查询命令帮助 | | -| --indent | | 在JSON响应中添加缩进 | | -| --ledger | | 使用连接的硬件记账设备 | | -| --node | tcp://localhost:26657 | [string] tendermint节点开启的远程过程调用接口\<主机>:\<端口> | | -| --path | $HOME/.iris | [string] iris home目录 | | -| --trust-node | true | 关闭响应结果校验 | | +| --path | $HOME/.iris | [string] iris home目录 ## 例子 @@ -84,4 +81,4 @@ Save the parameter config file in /Users/trevorfu/.iris/config/params.json } } } -``` \ No newline at end of file +``` diff --git a/docs/zh/cli-client/gov/query-deposit.md b/docs/zh/cli-client/gov/query-deposit.md index c061675ff..51437efab 100644 --- a/docs/zh/cli-client/gov/query-deposit.md +++ b/docs/zh/cli-client/gov/query-deposit.md @@ -9,21 +9,18 @@ ``` iriscli gov query-deposit [flags] ``` +打印帮助信息: +``` +iriscli gov query-deposit --help +``` ## 标志 | 名称, 速记 | 默认值 | 描述 | 是否必须 | | --------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --chain-id | | [string] tendermint节点的链ID | Yes | | --depositor | | [string] bech32编码的存款人地址 | Yes | -| --height | | [int] 查询的区块高度 | | -| --help, -h | | 查询命令帮助 | | -| --indent | | 在JSON响应中添加缩进 | | -| --ledger | | 使用连接的硬件记账设备 | | -| --node | tcp://localhost:26657 | [string] tendermint节点开启的远程过程调用接口\<主机>:\<端口> | | | --proposal-id | | [string] 提议ID | Yes | -| --trust-node | true | 关闭响应结果校验 | | - + ## 例子 ### 查询充值保证金 @@ -45,4 +42,4 @@ iriscli gov query-deposit --chain-id=test --proposal-id=1 --depositor=faa1c4kjt5 } ] } -``` \ No newline at end of file +``` diff --git a/docs/zh/cli-client/gov/query-deposits.md b/docs/zh/cli-client/gov/query-deposits.md index 2f5dd8853..ef0da3e43 100644 --- a/docs/zh/cli-client/gov/query-deposits.md +++ b/docs/zh/cli-client/gov/query-deposits.md @@ -9,19 +9,16 @@ ``` iriscli gov query-deposits [flags] ``` +打印帮助信息: +``` +iriscli gov query-deposits --help +``` ## 标志 | 名称, 速记 | 默认值 | 描述 | 是否必须 | | --------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --chain-id | | [string] tendermint节点的链ID | Yes | -| --height | | [int] 查询的区块高度 | | -| --help, -h | | 查询命令帮助 | | -| --indent | | 在JSON响应中添加缩进 | | -| --ledger | | 使用连接的硬件记账设备 | | -| --node | tcp://localhost:26657 | [string] tendermint节点开启的远程过程调用接口\<主机>:\<端口> | | | --proposal-id | | [string] 提议ID | Yes | -| --trust-node | true | 关闭响应结果校验 | | ## 例子 @@ -46,4 +43,4 @@ iriscli gov query-deposits --chain-id=test --proposal-id=1 ] } ] -``` \ No newline at end of file +``` diff --git a/docs/zh/cli-client/gov/query-params.md b/docs/zh/cli-client/gov/query-params.md index 001ef7f56..1bffbcbe3 100644 --- a/docs/zh/cli-client/gov/query-params.md +++ b/docs/zh/cli-client/gov/query-params.md @@ -9,20 +9,17 @@ ``` iriscli gov query-params [flags] ``` +打印帮助信息: +``` +iriscli gov query-params --help +``` ## 标志 | 名称, 速记 | 默认值 | 描述 | 是否必须 | | --------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --chain-id | | [string] tendermint节点的链ID | | -| --height | | [int] 查询的区块高度 | | -| --help, -h | | 查询命令帮助 | | -| --indent | | 在JSON响应中添加缩进 | | | --key | | [string] 参数的键名称 | | -| --ledger | | 使用连接的硬件记账设备 | | | --module | | [string] 模块名称 | | -| --node | tcp://localhost:26657 | [string] tendermint节点开启的远程过程调用接口\<主机>:\<端口> | | -| --trust-node | true | 关闭响应结果校验 | | ## 例子 @@ -54,4 +51,4 @@ iriscli gov query-params --key=Gov/govDepositProcedure {"key":"Gov/govDepositProcedure","value":"{\"min_deposit\":[{\"denom\":\"iris-atto\",\"amount\":\"1000000000000000000000\"}],\"max_deposit_period\":172800000000000}","op":""} ``` -注意:--module和--key参数不能同时为空. \ No newline at end of file +注意:--module和--key参数不能同时为空. diff --git a/docs/zh/cli-client/gov/query-proposal.md b/docs/zh/cli-client/gov/query-proposal.md index 577e7458e..a332a4b73 100644 --- a/docs/zh/cli-client/gov/query-proposal.md +++ b/docs/zh/cli-client/gov/query-proposal.md @@ -9,20 +9,17 @@ ``` iriscli gov query-proposal [flags] ``` +打印帮助信息: + +``` +iriscli gov query-proposal --help +``` ## 标志 | 名称, 速记 | 默认值 | 描述 | 是否必须 | | --------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --chain-id | | [string] tendermint节点的链ID | Yes | -| --height | | [int] 查询的区块高度 | | -| --help, -h | | 查询命令帮助 | | -| --indent | | 在JSON响应中添加缩进 | | -| --ledger | | 使用连接的硬件记账设备 | | -| --node | tcp://localhost:26657 | [string] tendermint节点开启的远程过程调用接口\<主机>:\<端口> | | | --proposal-id | | [string] 提议ID | Yes | -| --trust-node | true | 关闭响应结果校验 | | - ## 例子 ### 查询指定的提议 @@ -62,4 +59,4 @@ iriscli gov query-proposal --chain-id=test --proposal-id=1 "op": "" } } -``` \ No newline at end of file +``` diff --git a/docs/zh/cli-client/gov/query-proposals.md b/docs/zh/cli-client/gov/query-proposals.md index 2c3b276c7..2d1a25b0c 100644 --- a/docs/zh/cli-client/gov/query-proposals.md +++ b/docs/zh/cli-client/gov/query-proposals.md @@ -9,21 +9,18 @@ ``` iriscli gov query-proposals [flags] ``` +打印帮助信息: +``` +iriscli gov query-proposals --help +``` ## 标志 | 名称, 速记 | 默认值 | 描述 | 是否必须 | | --------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --chain-id | | [string] tendermint节点的链ID | Yes | | --depositor | | [string] (可选)按存款人过滤 | | -| --height | | [int] 查询的区块高度 | | -| --help, -h | | 查询命令帮助 | | -| --indent | | 在JSON响应中添加缩进 | | -| --ledger | | 使用连接的硬件记账设备 | | | --limit | | [string] (可选)限制最新[数量]提议。 默认为所有提议 | | -| --node | tcp://localhost:26657 | [string] tendermint节点开启的远程过程调用接口\<主机>:\<端口> | | | --status | | [string] (可选)按提议状态过滤提议 | | -| --trust-node | true | 关闭响应结果校验 | | | --voter | | [string] (可选)按投票人过滤 | | ## 例子 diff --git a/docs/zh/cli-client/gov/query-tally.md b/docs/zh/cli-client/gov/query-tally.md index f9ed82baf..66a083a3b 100644 --- a/docs/zh/cli-client/gov/query-tally.md +++ b/docs/zh/cli-client/gov/query-tally.md @@ -10,17 +10,16 @@ iriscli gov query-tally [flags] ``` +打印帮助信息: + +``` +iriscli gov query-tally --help +``` + ## 标志 | 名称, 速记 | 默认值 | 描述 | 是否必须 | | --------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --chain-id | | [string] tendermint节点的链ID | Yes | -| --height | | [int] 查询的区块高度 | | -| --help, -h | | 查询命令帮助 | | -| --indent | | 在JSON响应中添加缩进 | | -| --ledger | | 使用连接的硬件记账设备 | | -| --node | tcp://localhost:26657 | [string] tendermint节点开启的远程过程调用接口\<主机>:\<端口> | | | --proposal-id | | [string] 提议ID | Yes | -| --trust-node | true | 关闭响应结果校验 | | ## 例子 @@ -39,4 +38,4 @@ iriscli gov query-tally --chain-id=test --proposal-id=1 "no": "200.0000000000", "no_with_veto": "0.0000000000" } -``` \ No newline at end of file +``` diff --git a/docs/zh/cli-client/gov/query-vote.md b/docs/zh/cli-client/gov/query-vote.md index d9846bf43..b9e93a51c 100644 --- a/docs/zh/cli-client/gov/query-vote.md +++ b/docs/zh/cli-client/gov/query-vote.md @@ -9,19 +9,16 @@ ``` iriscli gov query-vote [flags] ``` +打印帮助信息: +``` +iriscli gov query-vote --help +``` ## 标志 | 名称, 速记 | 默认值 | 描述 | 是否必须 | | --------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --chain-id | | [string] tendermint节点的链ID | Yes | -| --height | | [int] 查询的区块高度 | | -| --help, -h | | 查询命令帮助 | | -| --indent | | 在JSON响应中添加缩进 | | -| --ledger | | 使用连接的硬件记账设备 | | -| --node | tcp://localhost:26657 | [string] tendermint节点开启的远程过程调用接口\<主机>:\<端口> | | | --proposal-id | | [string] 提议ID | Yes | -| --trust-node | true | 关闭响应结果校验 | | | --voter | | [string] bech32编码的投票人地址 | Yes | ## 例子 @@ -40,4 +37,4 @@ iriscli gov query-vote --chain-id=test --proposal-id=1 --voter=faa14q5rf9sl2dqd2 "proposal_id": "1", "option": "Yes" } -``` \ No newline at end of file +``` diff --git a/docs/zh/cli-client/gov/query-votes.md b/docs/zh/cli-client/gov/query-votes.md index c60450250..97bae4270 100644 --- a/docs/zh/cli-client/gov/query-votes.md +++ b/docs/zh/cli-client/gov/query-votes.md @@ -9,19 +9,17 @@ ``` iriscli gov query-votes [flags] ``` +打印帮助信息: + +``` +iriscli gov query-votes --help +``` ## 标志 | 名称, 速记 | 默认值 | 描述 | 是否必须 | | --------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --chain-id | | [string] tendermint节点的链ID | Yes | -| --height | | [int] 查询的区块高度 | | -| --help, -h | | 查询命令帮助 | | -| --indent | | 在JSON响应中添加缩进 | | -| --ledger | | 使用连接的硬件记账设备 | | -| --node | tcp://localhost:26657 | [string] tendermint节点开启的远程过程调用接口\<主机>:\<端口> | | | --proposal-id | | [string] 提议ID | Yes | -| --trust-node | true | 关闭响应结果校验 | | ## 例子 @@ -41,4 +39,4 @@ iriscli gov query-votes --chain-id=test --proposal-id=1 "option": "Yes" } ] -``` \ No newline at end of file +``` diff --git a/docs/zh/cli-client/gov/submit-proposal.md b/docs/zh/cli-client/gov/submit-proposal.md index b089c2106..e05630d84 100644 --- a/docs/zh/cli-client/gov/submit-proposal.md +++ b/docs/zh/cli-client/gov/submit-proposal.md @@ -9,37 +9,22 @@ ``` iriscli gov submit-proposal [flags] ``` +打印帮助信息: +``` +iriscli gov submit-proposal --help +``` ## 标志 | 名称, 速记 | 默认值 | 描述 | 是否必须 | | ---------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --account-number | | [int] 用来签名交易的AccountNumber | | -| --async | | 异步广播交易 | | -| --chain-id | | [string] tendermint节点的链ID | Yes | | --deposit | | [string] 提议的保证金 | | -| --description | | [string] 提议的描述 | Yes | -| --dry-run | | 忽略--gas标志并进行本地的交易仿真 | | -| --fee | | [string] 支付的交易费用 | Yes | -| --from | | [string] 用来签名的私钥名 | Yes | -| --from-addr | | [string] 指定generate-only模式下的from address | | -| --gas | 200000 | [string] 单次交易的gas上限; 设置为"simulate"将自动计算相应的阈值 | | -| --gas-adjustment | 1 | [float] 这个调整因子将乘以交易仿真返回的估计值; 如果手动设置了gas的上限,这个标志将被忽略 | | -| --generate-only | | 构建一个未签名交易并将其打印到标准输出 | | -| --help, -h | | 查询命令帮助 | | -| --indent | | 在JSON响应中添加缩进 | | -| --json | | 输出将以json格式返回 | | -| --key | | 参数的键名称 | | -| --ledger | | 使用连接的硬件记账设备 | | -| --memo | | [string] 发送交易的备忘录 | | -| --node | tcp://localhost:26657 | [string] tendermint节点开启的远程过程调用接口\<主机>:\<端口> | | -| --op | | [string] 对参数的操作 | | +| --description | | [string] 提议的描述 | Yes | +| --key | | 参数的键名称 | | +| --op | | [string] 对参数的操作 | | | --param | | [string] 提议参数,例如: [{key:key,value:value,op:update}] | | | --path | | [string] param.json文件路径 | | -| --print-response | | 返回交易响应 (当且仅当同步模式下使用)) | | -| --sequence | | [int] 用来签名交易的sequence number | | | --title | | [string] 提议标题 | Yes | -| --trust-node | true | 关闭响应结果校验 | | | --type | | [string] 提议类型,例如:Text/ParameterChange/SoftwareUpgrade | Yes | ## 例子 @@ -91,4 +76,4 @@ iriscli gov submit-proposal --chain-id=test --title="irishub0.7.0 upgrade propos [query-proposal](query-proposal.md) -[query-proposals](query-proposals.md) \ No newline at end of file +[query-proposals](query-proposals.md) diff --git a/docs/zh/cli-client/gov/vote.md b/docs/zh/cli-client/gov/vote.md index 4131e8af1..47d0162eb 100644 --- a/docs/zh/cli-client/gov/vote.md +++ b/docs/zh/cli-client/gov/vote.md @@ -10,31 +10,17 @@ iriscli gov vote [flags] ``` +打印帮助信息: + +``` +iriscli gov vote --help +``` ## 标志 | 名称, 速记 | 默认值 | 描述 | 是否必须 | | ---------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| --account-number | | [int] 用来签名交易的AccountNumber | | -| --async | | 异步广播交易 | | -| --chain-id | | [string] tendermint节点的链ID | Yes | -| --dry-run | | 忽略--gas标志并进行本地的交易仿真 | | -| --fee | | [string] 支付的交易费用 | Yes | -| --from | | [string] 用来签名的私钥名 | Yes | -| --from-addr | | [string] 指定generate-only模式下的from address | | -| --gas | 200000 | [string] 单次交易的gas上限; 设置为"simulate"将自动计算相应的阈值 | | -| --gas-adjustment | 1 | [float] 这个调整因子将乘以交易仿真返回的估计值; 如果手动设置了gas的上限,这个标志将被忽略 | | -| --generate-only | | 构建一个未签名交易并将其打印到标准输出 | | -| --help, -h | | 查询命令帮助 | | -| --indent | | 在JSON响应中添加缩进 | | -| --json | | 输出将以json格式返回 | | -| --ledger | | 使用连接的硬件记账设备 | | -| --memo | | [string] 发送交易的备忘录 | | -| --node | tcp://localhost:26657 | [string] tendermint节点开启的远程过程调用接口\<主机>:\<端口> | | | --option | | [string] 投票选项 {Yes, No, NoWithVeto, Abstain} | Yes | -| --print-response | | 返回交易响应 (当且仅当同步模式下使用)) | | | --proposal-id | | [string] 投票的提议ID | Yes | -| --sequence | | [int] 用来签名交易的sequence number | | -| --trust-node | true | 关闭响应结果校验 | | ## 例子 @@ -68,4 +54,4 @@ Committed at block 989 (tx hash: ABDD88AA3CA8F365AC499427477CCE83ADF09D7FC2D6264 [query-votes](query-votes.md) -[query-tally](query-tally.md) \ No newline at end of file +[query-tally](query-tally.md) From b5e76374abe0c8c9327333eba576f8aa7a8d2d90 Mon Sep 17 00:00:00 2001 From: jiacheng Date: Sun, 18 Nov 2018 11:44:17 +0800 Subject: [PATCH 12/12] Modify the upgrade cli-client --- docs/cli-client/upgrade/info.md | 12 ++++----- docs/cli-client/upgrade/query-switch.md | 12 ++++----- docs/cli-client/upgrade/submit-switch.md | 25 +++++-------------- docs/zh/cli-client/upgrade/info.md | 16 +++++------- docs/zh/cli-client/upgrade/query-switch.md | 12 ++++----- docs/zh/cli-client/upgrade/submit-switch.md | 27 +++++---------------- 6 files changed, 33 insertions(+), 71 deletions(-) diff --git a/docs/cli-client/upgrade/info.md b/docs/cli-client/upgrade/info.md index e90d80522..c2c69e31f 100644 --- a/docs/cli-client/upgrade/info.md +++ b/docs/cli-client/upgrade/info.md @@ -10,17 +10,15 @@ Query the information of software version and upgrade module. iriscli upgrade info ``` +Print help messages: + +``` +iriscli upgrade info --help +``` ## Flags | Name, shorthand | Default | Description | Required | | --------------- | -------------------------- | ----------------------------------------------------------------- | -------- | -| --chain-id | | [string] Chain ID of tendermint node | | -| --height | most recent provable block | block height to query | | -| --help, -h | | help for query | | -| --indent | | Add indent to JSON response | | -| --ledger | | Use a connected Ledger device | | -| --node | tcp://localhost:26657 | [string] \:\ to tendermint rpc interface for this chain | | -| --trust-node | true | Don't verify proofs for responses | | ## Example diff --git a/docs/cli-client/upgrade/query-switch.md b/docs/cli-client/upgrade/query-switch.md index b447683fe..7889df017 100644 --- a/docs/cli-client/upgrade/query-switch.md +++ b/docs/cli-client/upgrade/query-switch.md @@ -9,19 +9,17 @@ Query the switch information to know if someone have send the switch message for iriscli upgrade query-switch --proposal-id --voter ``` +Print help messages: + +``` +iriscli upgrade query-switch --help +``` ## Flags | Name, shorthand | Default | Description | Required | | --------------- | -------------------------- | ----------------------------------------------------------------- | -------- | | --proposal-id | | proposalID of upgrade swtich being queried | Yes | | --voter | | Address sign the switch msg | Yes | -| --chain-id | | [string] Chain ID of tendermint node | | -| --height | most recent provable block | block height to query | | -| --help, -h | | help for query | | -| --indent | | Add indent to JSON response | | -| --ledger | | Use a connected Ledger device | | -| --node | tcp://localhost:26657 | [string] \:\ to tendermint rpc interface for this chain | | -| --trust-node | true | Don't verify proofs for responses | | ## Example diff --git a/docs/cli-client/upgrade/submit-switch.md b/docs/cli-client/upgrade/submit-switch.md index 51dee96a9..2e55457ec 100644 --- a/docs/cli-client/upgrade/submit-switch.md +++ b/docs/cli-client/upgrade/submit-switch.md @@ -10,31 +10,18 @@ Submit a switch msg for a upgrade propsal after installing the new software and iriscli upgrade submit-switch [flags] ``` +Print help messages: + +``` +iriscli upgrade submit-switch --help +``` ## Flags | Name, shorthand | Default | Description | Required | | --------------- | --------- | ------------------------------------------------------------ | -------- | | --proposal-id | | proposalID of upgrade proposal | Yes | | --title | | title of switch | | -| --help, -h | | help for submit-switch | | -| --account-number | | [int] AccountNumber number to sign the tx | | -| --async | | Broadcast transactions asynchronously | | -| --chain-id | | [string] Chain ID of tendermint node | Yes | -| --dry-run | | Ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it | | -| --fee | | [string] Fee to pay along with transaction | Yes | -| --from | | [string] Name of private key with which to sign | Yes | -| --from-addr | | [string] Specify from address in generate-only mode | | -| --gas string | 200000 | Gas limit to set per-transaction; set to "simulate" to calculate required gas automatically | | -| --gas-adjustment | 1 | [float] Adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored | | -| --generate-only | | Build an unsigned transaction and write it to STDOUT | | -| --indent | | Add indent to JSON response | | -| --json | | return output in json format | | -| --ledger | | Use a connected Ledger device | | -| --memo | | [string] Memo to send along with transaction | | -| --node | tcp://localhost:26657 | [string] \:\ to tendermint rpc interface for this chain | | Yes | -| --print-response | | return tx response (only works with async = false) | | -| --sequence | | [int] Sequence number to sign the tx | | -| --trust-node | true | Don't verify proofs for responses | | + ## Examples Send a switch message for the software upgrade proposal whose `proposalID` is 5. diff --git a/docs/zh/cli-client/upgrade/info.md b/docs/zh/cli-client/upgrade/info.md index 1ad172160..7a8013050 100644 --- a/docs/zh/cli-client/upgrade/info.md +++ b/docs/zh/cli-client/upgrade/info.md @@ -10,19 +10,15 @@ iriscli upgrade info ``` +打印帮助信息: + +``` +iriscli upgrade info --help +``` ## 标志 | 名称, 速记 | 默认值 | 描述 | 必需 | | --------------- | -------------------------- | ----------------------------------------------------------------- | -------- | -| --proposal-id | | 软件升级提议的ID | 是 | -| --voter | | 签名switch消息的地址 | 是 | -| --chain-id | | [string] tendermint节点的链ID | 是 | -| --height | 最近可证明区块高度 | [int] 查询的区块高度 | | -| --help, -h | | 查询命令帮助 | | -| --indent | | 在JSON格式的应答中添加缩进 | | -| --ledger | | 使用连接的硬件记账设备 | | -| --node | tcp://localhost:26657 | [string] tendermint节点开启的远程过程调用接口\<主机>:\<端口> | | -| --trust-node | true | 关闭响应结果校验 | | ## 例子 @@ -66,4 +62,4 @@ iriscli upgrade info ] } } -``` \ No newline at end of file +``` diff --git a/docs/zh/cli-client/upgrade/query-switch.md b/docs/zh/cli-client/upgrade/query-switch.md index 1aaa09389..a263c0e89 100644 --- a/docs/zh/cli-client/upgrade/query-switch.md +++ b/docs/zh/cli-client/upgrade/query-switch.md @@ -9,6 +9,11 @@ ``` iriscli upgrade query-switch --proposal-id --voter ``` +打印帮助信息: + +``` +iriscli upgrade query-switch --help +``` ## 标志 @@ -16,13 +21,6 @@ iriscli upgrade query-switch --proposal-id --voter | --------------- | -------------------------- | ----------------------------------------------------------------- | -------- | | --proposal-id | | 软件升级提议的ID | 是 | | --voter | | 签名switch消息的地址 | 是 | -| --chain-id | | [string] tendermint节点的链ID | 是 | -| --height | 最近可证明区块高度 | [int] 查询的区块高度 | | -| --help, -h | | 查询命令帮助 | | -| --indent | | 在JSON格式的应答中添加缩进 | | -| --ledger | | 使用连接的硬件记账设备 | | -| --node | tcp://localhost:26657 | [string] tendermint节点开启的远程过程调用接口\<主机>:\<端口> | | -| --trust-node | true | 关闭响应结果校验 | | ## 例子 diff --git a/docs/zh/cli-client/upgrade/submit-switch.md b/docs/zh/cli-client/upgrade/submit-switch.md index 61c40bc6e..a1ef824bc 100644 --- a/docs/zh/cli-client/upgrade/submit-switch.md +++ b/docs/zh/cli-client/upgrade/submit-switch.md @@ -9,37 +9,22 @@ ``` iriscli upgrade submit-switch [flags] ``` +打印帮助信息: +``` +iriscli upgrade submit-switch --help +``` ## 标志 | 名称, 速记 | 默认值 | 描述 | 必需 | | --------------- | --------- | ------------------------------------------------------------ | -------- | | --proposal-id | | 软件升级提议的ID | 是 | | --title | | switch消息对标题 | | -| --account-number | | [int] 用来签名交易的AccountNumber | | -| --async | | 异步广播交易 | | -| --chain-id | | [string] tendermint节点的链ID | 是 | -| --description | description | [string] 上传文件的描述信息 | | -| --dry-run | | 忽略--gas标志并进行本地的交易仿真 | | -| --fee | | [string] 支付的交易费用 | 是 | -| --from | | [string] 用来签名的私钥名 | 是 | -| --from-addr | | [string] 指定generate-only模式下的from address | | -| --gas string | 200000 | 单次交易的gas上限; 设置为"simulate"将自动计算相应的阈值 | | -| --gas-adjustment | 1 | [float] 这个调整因子将乘以交易仿真返回的估计值; 如果手动设置了gas的上限,这个标志将被忽略 | | -| --generate-only | | 构建一个未签名交易并将其打印到标准输出 | | -| -h, --help | | 提交命令帮助 | | -| --indent | | 在JSON响应中添加缩进 | | -| --json | | 输出将以json格式返回 | | -| --ledger | | 使用连接的硬件记账设备 | | -| --memo | | [string] 发送交易的备忘录 | | -| --node | tcp://localhost:26657 | [string] [string] tendermint节点开启的远程过程调用接口\<主机>:\<端口> | | -| --print-response | | 返回交易响应 (当且仅当同步模式下使用)) | | -| --sequence | | [int] 用来签名交易的sequence number | | -| --trust-node | true | 关闭响应结果校验 | | + ## 用例 发送对软件升级提议(ID为5)switch消息 ``` iriscli upgrade submit-switch --chain-id=IRISnet --from=x --fee=0.004iris --proposalID 5 --title="Run new verison" -``` \ No newline at end of file +```