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/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..c2c69e31f --- /dev/null +++ b/docs/cli-client/upgrade/info.md @@ -0,0 +1,65 @@ +# iriscli upgrade info + +## Description + +Query the information of software version and upgrade module. + +## Usage + +``` +iriscli upgrade info +``` + +Print help messages: + +``` +iriscli upgrade info --help +``` +## Flags + +| Name, shorthand | Default | Description | Required | +| --------------- | -------------------------- | ----------------------------------------------------------------- | -------- | + +## 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..7889df017 --- /dev/null +++ b/docs/cli-client/upgrade/query-switch.md @@ -0,0 +1,30 @@ +# 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 +``` + +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 | + +## 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..2e55457ec --- /dev/null +++ b/docs/cli-client/upgrade/submit-switch.md @@ -0,0 +1,31 @@ +# 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] +``` + +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 | | + +## 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" +``` diff --git a/docs/features/basic-concepts/bech32-prefix.md b/docs/features/basic-concepts/bech32-prefix.md index e69de29bb..79dbb1fb3 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. More details in [bip-0173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki) + + +## 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`. 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/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/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/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/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) diff --git a/docs/zh/cli-client/upgrade/README.md b/docs/zh/cli-client/upgrade/README.md index 5083eb47f..bdde59d82 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] +``` + +## 相关命令 + +| 命令 | 描述 | +| ------------- | ------------------------------------- | +| [submit-switch](submit-switch.md) | 针对软件升级提议发送switch消息| +| [query-switch](query-switch.md) | 查询switch信息 | +| [info](info.md) | 查询软件升级模块的信息| + +## 标志 + +| 名称, 速记 | 默认值 | 描述 | 必需 | +| --------------- | ------- | ---------------- | -------- | +| --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..7a8013050 --- /dev/null +++ b/docs/zh/cli-client/upgrade/info.md @@ -0,0 +1,65 @@ +# iriscli upgrade info + +## 描述 + +查询软件版本信息和升级模块的信息 + +## 用法 + +``` +iriscli upgrade info +``` + +打印帮助信息: + +``` +iriscli upgrade info --help +``` +## 标志 + +| 名称, 速记 | 默认值 | 描述 | 必需 | +| --------------- | -------------------------- | ----------------------------------------------------------------- | -------- | + +## 例子 + +查询当前版本信息 + +``` +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" + ] + }, + ....... + ] + } +} +``` 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..a263c0e89 --- /dev/null +++ b/docs/zh/cli-client/upgrade/query-switch.md @@ -0,0 +1,31 @@ +# iriscli upgrade query-switch + +## 描述 + +查询switch信息来知道某人对某升级提议是否发送了switch消息。 + +## 用法 + +``` +iriscli upgrade query-switch --proposal-id --voter +``` +打印帮助信息: + +``` +iriscli upgrade query-switch --help +``` + +## 标志 + +| 名称, 速记 | 默认值 | 描述 | 必需 | +| --------------- | -------------------------- | ----------------------------------------------------------------- | -------- | +| --proposal-id | | 软件升级提议的ID | 是 | +| --voter | | 签名switch消息的地址 | 是 | + +## 例子 + +查询用户`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..a1ef824bc --- /dev/null +++ b/docs/zh/cli-client/upgrade/submit-switch.md @@ -0,0 +1,30 @@ +# iriscli upgrade submit-switch + +## 描述 + +安装完新软件后,向这次升级相关的提议发送switch消息,表明自己已经安装新软件并把消息广播到全网。 + +## 用例 + +``` +iriscli upgrade submit-switch [flags] +``` +打印帮助信息: + +``` +iriscli upgrade submit-switch --help +``` +## 标志 + +| 名称, 速记 | 默认值 | 描述 | 必需 | +| --------------- | --------- | ------------------------------------------------------------ | -------- | +| --proposal-id | | 软件升级提议的ID | 是 | +| --title | | switch消息对标题 | | + +## 用例 + +发送对软件升级提议(ID为5)switch消息 + +``` +iriscli upgrade submit-switch --chain-id=IRISnet --from=x --fee=0.004iris --proposalID 5 --title="Run new verison" +``` diff --git a/docs/zh/features/basic-concepts/bech32-prefix.md b/docs/zh/features/basic-concepts/bech32-prefix.md index e69de29bb..a77c5140a 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) 使得用户更有效率的理解地址和阅读错误信息。Bech32更多细节见 [bip-0173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki) + + +## 用户可读部分表 + +| 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`。 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 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) diff --git a/docs/zh/features/governance.md b/docs/zh/features/governance.md index 8678c4cc4..b8a5ec07b 100644 --- a/docs/zh/features/governance.md +++ b/docs/zh/features/governance.md @@ -1,4 +1,4 @@ -# Gov/Iparam User Guide +# Gov User Guide ## 基本功能描述 @@ -12,18 +12,9 @@ 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) ## 使用场景 -### 创建使用环境 - -``` -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 -``` ### 参数修改的使用场景 @@ -35,25 +26,25 @@ iriscli gov query-params --module=gov --trust-node # 结果 [ - "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 +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":""} +{"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 +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 +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 +iriscli gov vote --proposal-id=1 --option=Yes --from=x --chain-id=gov-test --fee=0.05iris --gas=200000 # 查询提议情况 iriscli gov query-proposal --proposal-id=1 --trust-node @@ -67,162 +58,79 @@ iriscli gov query-proposal --proposal-id=1 --trust-node iriscli gov pull-params --path=iris --trust-node # 查询配置文件信息 -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" +} } -# 修改配置文件(TallyingProcedure的governance_penalty) -vi iris/config/params.json + +# 修改配置文件 (TallyingProcedure的governance_penalty) +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" +} } # 通过文件修改参数的命令,返回参数修改的内容 -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 # 对提议进行抵押 -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 -``` - -* `--title` 提议的标题 -* `--description` 提议的描述 -* `--type` 提议的类型 {'Text','ParameterChange','SoftwareUpgrade'} -* `--deposit` 抵押的token数量 -* 上面就是典型的文本类提议 - -``` iriscli gov deposit --proposal-id=1 --deposit=1iris --from=x --chain-id=gov-test --fee=0.05iris --gas=20000 -``` -* `--propsal-id` 抵押提议ID -* `--deposit` 抵押的token数量 - -``` +# 对提议投票 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'强烈不同意} - -``` # 查询提议情况 iriscli gov query-proposal --proposal-id=1 --trust-node ``` -* `--proposal-id` 查询提议ID - - - -### 参数修改提议部分 - -``` -# 根据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' -* 其他字段与文本提议类似 - ### 软件升级提议部分 +详细参考[Upgrade](upgrade.md) + ## 基本参数 + ``` # DepositProcedure(抵押阶段的参数) -"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" } ``` @@ -230,26 +138,27 @@ echo 1234567890 | iriscli gov submit-proposal --title="update MinDeposit" --desc * 参数的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) +* `max_deposit_period` 补交抵押token的窗口期,默认:172800000000000纳秒==2天,范围(20秒,3天) ``` # VotingProcedure(投票阶段的参数) -"Gov/gov/VotingProcedure": { - "voting_period": "10" -}, +"Gov/govVotingProcedure": { +"voting_period": "10000000000" +} ``` - -* `voting_perid` 投票的窗口期,默认:10,范围(20,20000) +* 可修改参数 +* `voting_perid` 投票的窗口期,默认:172800000000000纳秒==2天,范围(20秒,3天) ``` # TallyingProcedure (统计阶段段参数) -"Gov/gov/TallyingProcedure": { - "threshold": "1/2", - "veto": "1/3", - "governance_penalty": "1/100" +"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 +* 可修改参数 +* `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, 超过则提议通过,不超过则不通过。