From 3b8e186aa26975043fafdebed326ecbe8d8ea1b3 Mon Sep 17 00:00:00 2001 From: chengwenxi Date: Sun, 18 Nov 2018 00:45:41 +0800 Subject: [PATCH 01/18] Add broadcast command in bank --- client/bank/cli/broadcast.go | 35 +++++++++++++++++++++++++++++++++++ cmd/iriscli/main.go | 1 + 2 files changed, 36 insertions(+) create mode 100644 client/bank/cli/broadcast.go diff --git a/client/bank/cli/broadcast.go b/client/bank/cli/broadcast.go new file mode 100644 index 000000000..9e535546e --- /dev/null +++ b/client/bank/cli/broadcast.go @@ -0,0 +1,35 @@ +package cli + +import ( + "github.com/cosmos/cosmos-sdk/client/context" + "github.com/spf13/cobra" + amino "github.com/tendermint/go-amino" +) + +// GetSignCommand returns the sign command +func GetBroadcastCommand(codec *amino.Codec) *cobra.Command { + cmd := &cobra.Command{ + Use: "broadcast ", + Short: "Broadcast transactions generated offline", + Long: `Broadcast transactions created with the --generate-only flag and signed with the sign command. +Read a transaction from and broadcast it to a node.`, + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) (err error) { + cliCtx := context.NewCLIContext().WithCodec(codec) + stdTx, err := readAndUnmarshalStdTx(cliCtx.Codec, args[0]) + if err != nil { + return + } + + txBytes, err := cliCtx.Codec.MarshalBinaryLengthPrefixed(stdTx) + if err != nil { + return + } + + _, err = cliCtx.BroadcastTx(txBytes) + return err + }, + } + + return cmd +} diff --git a/cmd/iriscli/main.go b/cmd/iriscli/main.go index d90ec84bb..7e520a805 100644 --- a/cmd/iriscli/main.go +++ b/cmd/iriscli/main.go @@ -77,6 +77,7 @@ func main() { client.PostCommands( bankcmd.SendTxCmd(cdc), bankcmd.GetSignCommand(cdc, authcmd.GetAccountDecoder(cdc)), + bankcmd.GetBroadcastCommand(cdc), )...) rootCmd.AddCommand( bankCmd, From 32c844cff5cb64b2c898c0da7bf7123f88b4bd5a Mon Sep 17 00:00:00 2001 From: chengwenxi Date: Sun, 18 Nov 2018 09:52:14 +0800 Subject: [PATCH 02/18] modify cosmos to irishub --- client/bank/cli/broadcast.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/bank/cli/broadcast.go b/client/bank/cli/broadcast.go index 9e535546e..950a502d0 100644 --- a/client/bank/cli/broadcast.go +++ b/client/bank/cli/broadcast.go @@ -1,7 +1,7 @@ package cli import ( - "github.com/cosmos/cosmos-sdk/client/context" + "github.com/irisnet/irishub/client/context" "github.com/spf13/cobra" amino "github.com/tendermint/go-amino" ) From e8ed3f45b537841e719b1ccde675f66d1cbe1b71 Mon Sep 17 00:00:00 2001 From: chengwenxi Date: Sun, 18 Nov 2018 10:06:38 +0800 Subject: [PATCH 03/18] Add example --- client/bank/cli/broadcast.go | 1 + client/bank/cli/sign.go | 1 + 2 files changed, 2 insertions(+) diff --git a/client/bank/cli/broadcast.go b/client/bank/cli/broadcast.go index 950a502d0..13f02ad43 100644 --- a/client/bank/cli/broadcast.go +++ b/client/bank/cli/broadcast.go @@ -13,6 +13,7 @@ func GetBroadcastCommand(codec *amino.Codec) *cobra.Command { Short: "Broadcast transactions generated offline", Long: `Broadcast transactions created with the --generate-only flag and signed with the sign command. Read a transaction from and broadcast it to a node.`, + Example: "iriscli bank broadcast ", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) (err error) { cliCtx := context.NewCLIContext().WithCodec(codec) diff --git a/client/bank/cli/sign.go b/client/bank/cli/sign.go index c71578dbf..a35d45d09 100644 --- a/client/bank/cli/sign.go +++ b/client/bank/cli/sign.go @@ -32,6 +32,7 @@ Read a transaction from , sign it, and print its JSON encoding. The --offline flag makes sure that the client will not reach out to the local cache. Thus account number or sequence number lookups will not be performed and it is recommended to set such parameters manually.`, + Example: "iriscli bank sign --name --chain-id=", RunE: makeSignCmd(codec, decoder), Args: cobra.ExactArgs(1), } From 9fc3a062f353f592432b4f69421b6dacb5d9c164 Mon Sep 17 00:00:00 2001 From: Raymond Date: Thu, 22 Nov 2018 14:34:54 +0800 Subject: [PATCH 04/18] prepare for release v0.7.0 --- CHANGELOG.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ Gopkg.lock | 8 ++++---- Gopkg.toml | 2 +- version/version.go | 2 +- 4 files changed, 50 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27d02308e..0695a848e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,49 @@ # Changelog +## 0.7.0 + +*November 22th, 2018* + +- Add broadcast command in bank +- Update iris.toml +- Improve user documents + +## 0.7.0-rc0 + +*November 19th, 2018* + +BREAKING CHANGES: +* [iris] New genesis workflow +* [iris] Validator.Owner renamed to Validator. Validator operator type has now changed to sdk.ValAddress +* [iris] unsafe_reset_all, show_validator, and show_node_id have been renamed to unsafe-reset-all, show-validator, and show-node-id +* [iris]Rename "revoked" to "jailed" +* [iris]Removed CompleteUnbonding and CompleteRedelegation Msg types, and instead added unbonding/redelegation queues to endblocker +* [iris]Removed slashing for governance non-voting validators +* [iris]Validators are no longer deleted until they can no longer possibly be slashed +* [iris]Remove ibc module +* [iris]Validator set updates delayed by one block +* [iris]Drop GenesisTx in favor of a signed StdTx with only one MsgCreateValidator message + +FEATURES: +* Upgrade cosmos-sdk denpendency to v0.26.0 +* Upgrade tendermint denpendency to v0.26.1-rc0 +* [docs]Improve docs +* [iris]Add token inflation +* [iris]Add distribution module to distribute inflation token and collected transaction fee +* [iriscli] --from can now be either an address or a key name +* [iriscli] Passing --gas=simulate triggers a simulation of the tx before the actual execution. The gas estimate obtained via the simulation will be used as gas limit in the actual execution. +* [iriscli]Add --bech to gaiacli keys show and respective REST endpoint to +* [iriscli]Introduced new commission flags for validator commands create-validator and edit-validator +* [iriscli]Add commands to query validator unbondings and redelegations +* [iriscli]Add rest apis and commands for distribution + +BUG FIXES: +* [iriscli]Mark --to and --amount as required flags for iriscli bank send +* [iris]Add general merkle absence proof (also for empty substores) +* [iris]Fix issue about consumed gas increasing rapidly +* [iris]Return correct Tendermint validator update set on EndBlocker by not including non previously bonded validators that have zero power +* [iris]Add commission data to MsgCreateValidator signature bytes + ## 0.6.0 *November 1st, 2018* diff --git a/Gopkg.lock b/Gopkg.lock index 4de10c8e2..de6c7706d 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -69,7 +69,7 @@ revision = "d4cc87b860166d00d6b5b9e0d3b3d71d6088d4d4" [[projects]] - digest = "1:06d4b3860be91d8d0bf1933758dda2ce0b5709506343c0656e033d2b69ffd776" + digest = "1:d7d3961eba6b55235b397574fa7915b0cf51148cb7eff2fcb36f249704ff02ba" name = "github.com/cosmos/cosmos-sdk" packages = [ "baseapp", @@ -113,9 +113,9 @@ "x/stake/types", ] pruneopts = "UT" - revision = "b352686dab3f9976be1347a860c7aba28c22abe0" + revision = "c9d5ede3272b9285b030c4fef92c0209e80d28bf" source = "https://github.com/irisnet/cosmos-sdk.git" - version = "v0.26.0-iris" + version = "v0.26.0-iris0.7.0" [[projects]] digest = "1:e8a3550c8786316675ff54ad6f09d265d129c9d986919af7f541afba50d87ce2" @@ -677,7 +677,7 @@ version = "v0.11.1" [[projects]] - digest = "1:83882681ddd65a2de8c1be7eae0f48075601077d85cc37050f343d00ab862bac" + digest = "1:945fd3f74b35e13f1f61883be160692d81ab0c168c812771c2e44ed9c12f9ae3" name = "github.com/tendermint/tendermint" packages = [ "abci/client", diff --git a/Gopkg.toml b/Gopkg.toml index 784f727db..77715ada9 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -29,7 +29,7 @@ [[constraint]] name = "github.com/cosmos/cosmos-sdk" source = "https://github.com/irisnet/cosmos-sdk.git" - version = "=v0.26.0-iris" + version = "=v0.26.0-iris0.7.0" [[override]] name = "github.com/tendermint/iavl" diff --git a/version/version.go b/version/version.go index 47f64586c..f4fc18f5d 100644 --- a/version/version.go +++ b/version/version.go @@ -7,7 +7,7 @@ import ( ) // Version - Iris Version -const Version = "0.7.0-Alpha" +const Version = "0.7.0" // GitCommit set by build flags var GitCommit = "" From 5ac611052c9ab1d304675ae93ad6b6a029d441e2 Mon Sep 17 00:00:00 2001 From: jiacheng Date: Thu, 22 Nov 2018 15:46:38 +0800 Subject: [PATCH 05/18] Add node.md and cli-client.md --- docs/software/cli-client.md | 103 ++++++++++++++++++++++++++++++++ docs/software/node.md | 106 +++++++++++++++++++++++++++++++++ docs/zh/software/cli-client.md | 100 +++++++++++++++++++++++++++++++ docs/zh/software/node.md | 106 +++++++++++++++++++++++++++++++++ 4 files changed, 415 insertions(+) diff --git a/docs/software/cli-client.md b/docs/software/cli-client.md index e69de29bb..8ff96b9c6 100644 --- a/docs/software/cli-client.md +++ b/docs/software/cli-client.md @@ -0,0 +1,103 @@ +# IRIS Command Line Client + +## Introduction + +`iriscli` is a client for the IRISnet network. IRISnet users can use `iriscli` to send different transactions and query the blockchain data. + +## iriscli Work Directory + +The work directory for the `iriscli` is `$HOME/.iriscli`, which is mainly used to save configuration files and data. The IRISnet `key` data is saved in the work directory of `iriscli`. You can also specify the `iriscli` work directory by `--home`. + + +## iriscli --node + +The rpc address of the tendermint node. Transactions and query requests are sent to the process listening to this port. The default is `tcp://localhost:26657`, and the rpc address can also be specified by `--node`. + +## iriscli config command + +The `iriscli config` command interactively configures some default parameters, such as chain-id, home, fee, and node. + +## Fee and Gas + +`iriscli` can send a transaction with the fee specified by `--fee` and gas(the default is 200000) specified by `--gas` . The gas divided by the fee is gas price, and the gas price can't be less than the minimum value set by the blockchain. The remaining fees after the completion of the entire transaction will be returned to the user. You can set `--gas="simulate"`, which can estimate the gas consumed by the transaction through the simulation run, and multiply the coefficient specified by `--gas-adjustment` to get the final gas as the transaction gas. Finally, the transaction will be broadcast. + +## Dry-run Mode + +`iriscli` turns off dry-run mode by default. If you want to open the dry-run mode, you can use `--dry-run`. It is similar to the simulation processing logic, and can calculate the gas that needs to be consumed, but then it will not broadcast to the full node, directly return and print the gas consumed this time. + +Example: Send a command using dry-run mode + +``` +iriscli gov submit-proposal --title="ABC" --description="test" --type=Text --deposit=1iris --from=x --chain-id=gov-test --fee=0.05iris --gas=200000 --dry-run +``` + +Print: + +``` +estimated gas = 8370 +``` + +## Asynchronous Mode + +The transaction sent by iriscli defaults to synchronous mode. Synchronous mode refers to sending a transaction and then blocking it until the reply is received or the entire command is timed out. If you want to open asynchronous mode, you can use `--async`. After sending the transaction, the transaction hash will be returned immediately. + + +## Generate Only + +`generate-only` is turned off by default, but `--generate-only` can be enabled to send the transaction, and then the unsigned transaction generated by the command line will be printed. + +Example: Enable generate-only to generate unsigned transactions + +``` +iriscli gov submit-proposal --title="ABC" --description="test" --type=Text --deposit=1iris --from=x --chain-id=gov-test --fee=0.05iris --gas=200000 --generate-only +``` + +Print: + +```json +{ + "type": "auth/StdTx", + "value": { + "msg": [ + { + "type": "cosmos-sdk/MsgSubmitProposal", + "value": { + "title": "ABC", + "description": "test", + "proposal_type": "Text", + "proposer": "faa1k47r0nxd6ec8n6sc6tzvk2053u4eff0vx99755", + "initial_deposit": [ + { + "denom": "iris-atto", + "amount": "1000000000000000000" + } + ], + "Param": { + "key": "", + "value": "", + "op": "" + } + } + } + ], + "fee": { + "amount": [ + { + "denom": "iris-atto", + "amount": "50000000000000000" + } + ], + "gas": "200000" + }, + "signatures": null, + "memo": "" + } +} + +``` + +## Trust Node + +The trust-node is true by default. When the trust-node is true, the `iriscli` only queries the data and does not perform a Merkle verification on the data. You can also use the `--trust-node=false` to perform Merkle verification on the data obtained by the query. + + diff --git a/docs/software/node.md b/docs/software/node.md index e69de29bb..2237312c3 100644 --- a/docs/software/node.md +++ b/docs/software/node.md @@ -0,0 +1,106 @@ + +# IRIS Daemon + +## Introduction + +The iris executable is the entry point for running a IRISnet network node. All the validator nodes and full nodes need to install the iris command and launching the daemon to join the IRISnet network. You can also use this command to start your own test network locally. If you need to join the IRISnet testnet, please refer to [get-started](../get-started/README.md). + +## How to start an IRISnet network locally + +### Initialize node + +First you need to create a account as the corresponding validator operator for yourself. +```bash +iriscli keys add {account_name} +``` +You can get the account information, including account address, public key address and mnemonic +``` +NAME: TYPE: ADDRESS: PUBKEY: +account_name local faa13t6jugwm5uu3h835s5d4zggkklz6rpns59keju fap1addwnpepqdne60eyssj2plrsusd8049cs5hhhl5alcxv2xu0xmzlhphy9lyd5kpsyzu +**Important** write this seed phrase in a safe place. +It is the only way to recover your account if you ever forget your password. + +witness exotic fantasy gaze brass zebra adapt guess drip quote space payment farm argue pear actress garage smile hawk bid bag screen wonder person +``` + +Initialize the configuration files such as genesis.json and config.toml +```bash +iris init --home={path_to_your_home} --chain-id={your_chain_id} +``` +This command will create the corresponding files in the home directory. + +Create the `CreateValidator` transaction and sign the transaction by the validator operator account you just created +```bash +iris gentx --name={account_name} --home={path_to_your_home} +``` +This commond will generate the transaction in the directory:{path_to_your_home}/config/gentx + +### Config genesis + +Manually modify the genesis.json file to assign the initial account balance to the above validator operator account, such as: 150 iris +```json +"accounts": [ +{ +"address": "faa13t6jugwm5uu3h835s5d4zggkklz6rpns59keju", +"coins": [ +"150iris" +], +"sequence_number": "0", +"account_number": "0" +} +], +``` + +Configuring validator information +```bash +iris collect-gentxs --home={path_to_your_home} +``` +This command reads the `CreateValidator` transaction under folder {path_to_your_home}/config/gentx and writes it to genesis.json to complete the assignment of the initial validators in the Genesis block. + +### Boot node + +After completing the above configuration, start the node with the following command +```bash +iris start --home {path_to_your_home} +``` +After the command is executed, iris generate the genesis block according to the genesis.json configured under the home and update the application state. Then, according to the current block height of the chain pointed by the chain-id, it either starts to synchronize with other peers, or enter the process of produce the first block. + +## Start a multi-node network + +To start a multi-node IRISnet network locally, you need to follow the steps below: + +* Prepare home directory: create a unique home directory for each node +* Initialization: according to the above `Initialize node` steps, initialize each node in the respective home directory (note that you need to use the same chain-id) +* Configure genesis: select the home directory of one of the nodes to configure the genesis, refer to the `Config genesis` steps, configure the account address and initial balance of each node, and copy the files from each node {path_to_your_home}/config/gentx to the current one. Execute `iris collect-gentxs` to generate the final genesis.json. Finally, copy the genesis.json to the home directory of each node, overwriting the original genesis.json. +* Configure config.toml: modify {path_to_your_home}/config/config.toml in the home directory of each node, assign different ports to each node, query the node-id of each node through `iris tendermint show-node-id`, and then add the `node-id@ip:port` of other nodes in `persistent_peers` so that nodes can connect to each other. + +In order to simplify the above configuration process, you can use the following commands to automate the initialization of local multi-node and the configuration of genesis and config.toml: +```bash +iris testnet --v 4 --output-dir ./output --chain-id irishub-test --starting-ip-address 127.0.0.1 +``` + +To start the node to join the public IRIS Testnet, please refer to [Full-Node](../get-started/Full-Node.md) + +## Introduction of home directory + +The home directory is the working directory of the iris node. The home directory contains all the configuration information and all the data that the node runs. + +In the iris command, you can specify the home directory of the node by using flag `--home`. If you run multiple nodes on the same machine, you need to specify a different home directory for them. If the `--home` flag is not specified in the iris command, the default value `$HOME/.iris` is used as the home directory used by this iris command. + +The data of the iris node is stored in the `data` directory of the home, including blockchain data, application layer data, and index data. All configuration files are stored in the home/`config` directory: + +### genesis.json + +genesis.json defines the genesis block data, which specifies the system parameters such as chain_id, consensus parameters, initial account token allocation, creation of validators, and parameters for stake/slashing/gov/upgrade. See [genesis-file](../features/basic-concepts/genesis-file.md) for details. + +### node_key.json + +node_key.json is used to store the node's key. The node-id queried by `iris tendermint show-node-id` is derived by the key, which is used to indicate the unique identity of the node. It is used in p2p connection. + +### pri_validator.json + +pri_validator.json is the key that the validator will use to sign Pre-vote/Pre-commit in each round of consensus voting. As the consensus progresses, the tendermint consensus engine will continuously update `last_height`/`last_round`/ `last_step` and other data. + +### config.toml + +config.toml is the non-consensus configuration information of the node. Different nodes can configure themselves according to their own situation. Common modifications are `persistent_peers`/`moniker`/`laddr`. diff --git a/docs/zh/software/cli-client.md b/docs/zh/software/cli-client.md index e69de29bb..5b95a6ceb 100644 --- a/docs/zh/software/cli-client.md +++ b/docs/zh/software/cli-client.md @@ -0,0 +1,100 @@ +# IRIS Command Line Client + +## 介绍 + +iriscli是参与IRISnet网络的客户端。IRISnet的用户都可以通过iriscli来发送各种不同的交易或者进行各种查询。 + +## iriscli目录 + +iriscli客户端的默认目录是`$HOME/.iriscli`,主要用来保存配置文件和数据。 IRISnet `key` 的数据就保存在iriscli的HOME目录下。也可以通过`--home`来指定客户端的HOME目录。 + +## iriscli --node + +tendermint节点的rpc地址,交易和查询的消息都发送到监听这个端口的进程。默认是`tcp://localhost:26657`,也可以通过`--node`指定rpc地址。 + +## iriscli config命令 + +iriscli config命令可以交互式地配置一些默认参数,例如chain-id,home,fee 和 node。 + +## 手续费和燃料 + +iriscli发送交易可以通过`--fee`指定手续费和`--gas`指定燃料(默认值是200000)。燃料除以手续费就是Gas Price,Gas Price不能小于区块链设定的最小值。执行完整个交易以后剩余的手续费会返还给用户。可以设置`--gas="simulate"`, 它可以通过仿真运行估算出交易大致所需要消耗的Gas,并且乘以一个由`--gas-adjustment`指定的系数得到最终的Gas,作为这次交易的gas。最后交易才会被广播出去。 + +## dry-run模式 + +iriscli默认关闭dry-run模式。如果想打开dry-run模式,就可以使用`--dry-run`。它和simulate处理逻辑类似,可以计算出需要消耗的gas,但是之后它不会广播给全节点,直接返回并打印此次消耗的gas。 + +例子:使用dry-run模式发送命令 + +``` +iriscli gov submit-proposal --title="ABC" --description="test" --type=Text --deposit=1iris --from=x --chain-id=gov-test --fee=0.05iris --gas=200000 --dry-run +``` + +返回: + +``` +estimated gas = 8370 +``` + +## 异步模式 + +iriscli发送的交易默认是同步模式。同步模式指的是发送交易,然后会堵塞,直到收到回复或者超时整个命令才结束。如果想打开异步模式,就可以使用`--async`。发送交易之后,会立马返回交易的hash。 + +## generate-only + +`generate-only`默认是关闭的,但可以使能`--generate-only`,然后会打印命令行生成的未签名交易。 + +例子:使能generate-only生成未签名交易 + +``` +iriscli gov submit-proposal --title="ABC" --description="test" --type=Text --deposit=1iris --from=x --chain-id=gov-test --fee=0.05iris --gas=200000 --generate-only +``` + +返回: + +```json +{ + "type": "auth/StdTx", + "value": { + "msg": [ + { + "type": "cosmos-sdk/MsgSubmitProposal", + "value": { + "title": "ABC", + "description": "test", + "proposal_type": "Text", + "proposer": "faa1k47r0nxd6ec8n6sc6tzvk2053u4eff0vx99755", + "initial_deposit": [ + { + "denom": "iris-atto", + "amount": "1000000000000000000" + } + ], + "Param": { + "key": "", + "value": "", + "op": "" + } + } + } + ], + "fee": { + "amount": [ + { + "denom": "iris-atto", + "amount": "50000000000000000" + } + ], + "gas": "200000" + }, + "signatures": null, + "memo": "" + } +} + +``` + +## trust-node + +trust-node默认为true。当trust-node是true时, iriscli的客户端只查询数据并不对数据进行默克尔证明。你也可以通过`--trust-node=false`, 对查询得到的数据进行默克尔证明。 + diff --git a/docs/zh/software/node.md b/docs/zh/software/node.md index e69de29bb..6e23c5c77 100644 --- a/docs/zh/software/node.md +++ b/docs/zh/software/node.md @@ -0,0 +1,106 @@ +# IRIS Daemon + +## 介绍 + +iris可执行文件是运行IRISnet网络节点的入口,包括验证人节点和其他全节点都需要通过安装iris命令并启动守护进程来加入到IRISnet网络。也可以使用该命令在本地启动自己的测试网络,如需加入IRISnet测试网请参阅[get-started](../get-started/README.md)。 + +## 如何在本地启动一个IRISnet网络 + +### 初始化节点 + +首先需要为自己创建对应的验证人账户 +```bash +iriscli keys add {account_name} +``` +得到账户信息,包括账户地址、公钥地址、助记词 +``` +NAME: TYPE: ADDRESS: PUBKEY: +account_name local faa13t6jugwm5uu3h835s5d4zggkklz6rpns59keju fap1addwnpepqdne60eyssj2plrsusd8049cs5hhhl5alcxv2xu0xmzlhphy9lyd5kpsyzu +**Important** write this seed phrase in a safe place. +It is the only way to recover your account if you ever forget your password. + +witness exotic fantasy gaze brass zebra adapt guess drip quote space payment farm argue pear actress garage smile hawk bid bag screen wonder person +``` + +初始化genesis.json和config.toml等配置文件 +```bash +iris init --home={path_to_your_home} --chain-id={your_chain_id} +``` +该命令会在home目录下创建相应文件 + +创建申请成为验证人的交易,并使用刚才创建的验证人账户对交易进行签名 +```bash +iris gentx --name={account_name} --home={path_to_your_home} +``` +生成好的交易数据存放在目录:{path_to_your_home}/config/gentx + +### 配置genesis + +手动修改genesis.json文件,为上述验证人账户分配初始账户余额,如:150个iris +```json +"accounts": [ +{ +"address": "faa13t6jugwm5uu3h835s5d4zggkklz6rpns59keju", +"coins": [ +"150iris" +], +"sequence_number": "0", +"account_number": "0" +} +], +``` + +配置验证人信息 +```bash +iris collect-gentxs --home={path_to_your_home} +``` +该命令读取 {path_to_your_home}/config/gentx 下的 `CreateValidator` 交易,并将其写入到genesis.json中,完成在创世块中对初始验证人的指定。 + +### 启动节点 + +完成上述配置后,通过以下命令启动全节点。 +```bash +iris start --home {path_to_your_home} +``` +该命令执行后,iris使用home下面所配置的genesis.json来生成创世区块并更新应用状态,后续根据chain-id所指链的当前区块高度,要么开始和其他peer同步区块,要么进入等待首次出块的流程。 + +## 启动多节点网络 + +如需在本地启动一个多节点的IRISnet网络,需要按下列步骤操作: + +* 准备home目录:为每个节点创建各自独有的home目录 +* 初始化:按照上述 `初始化节点` 步骤,在各自的home目录下为各节点完成初始化(注意需要使用同一个chain-id) +* 配置genesis:选择其中一个节点的home目录来配置genesis,参考`配置genesis`步骤,把各个节点的账户地址和初始余额配置进来,再把各个节点{path_to_your_home}/config/gentx下的文件拷贝到当前节点的{path_to_your_home}/config/gentx目录下,然后执行`iris collect-gentxs`来生成最终genesis.json,最后把该genesis.json拷贝到各个节点的home目录下,覆盖原有genesis.json +* 配置config.toml:修改各个节点home目录下的{path_to_your_home}/config/config.toml,为各个节点分配不同的端口,通过`iris tendermint show-node-id`查询各个节点的node-id,然后在`persistent_peers`中加入其它节点的`node-id@ip:port`,使得节点之间能够相互连接 + +为了简化上面的配置流程,可以使用下面命令来自动完成本地多节点的初始化和genesis、config的配置: +```bash +iris testnet --v 4 --output-dir ./output --chain-id irishub-test --starting-ip-address 127.0.0.1 +``` + +启动节点加入公共测试网络Testnet的方法可参阅[Full-Node](../get-started/Full-Node.md) + +## home目录介绍 + +home目录为iris节点的工作目录,home目录下包含了所有的配置信息和节点运行的所有数据。 + +在iris命令中可以通过flag `--home` 来指定该节点的home目录,如果在同一台机器上运行多个节点,则需要为他们指定不同的home目录。如果在iris命令中没有指定`--home` flag,则使用默认值 `$HOME/.iris` 作为本次iris命令所使用的home目录。 + +home的`data`目录下存放iris节点运行的数据,包括区块链数据、应用层数据、索引数据等。home的`config`目录下存放所有配置文件: + +### genesis.json + +genesis.json为创世块数据,指定了chain_id、共识参数、初始账户代币分配、创建验证人、stake/slashing/gov/upgrade等系统参数。详见[genesis-file](../features/basic-concepts/genesis-file.md) + +### node_key.json + +node_key.json用来存放节点的密钥,通过`iris tendermint show-node-id`查询到的node-id就是通过该密钥计算得来的,用来表示节点的唯一身份,在p2p连接中使用。 + +### pri_validator.json + +pri_validator.json为验证人在每一轮出块共识投票中对Pre-vote/Pre-commit等进行签名的密钥,随着共识的进行,tendermint共识引擎会不断更新`last_height`/`last_round`/`last_step`等数据。 + +### config.toml + +config.toml为该节点的非共识的配置信息,不同节点可根据自己的情况自行配置。常见修改项有`persistent_peers`/`moniker`/`laddr`等。 + From aa416c5a0a42268822dba434439b3786d7f4c8a2 Mon Sep 17 00:00:00 2001 From: Raymond Date: Fri, 23 Nov 2018 10:02:38 +0800 Subject: [PATCH 06/18] update doc software/node.md for v0.7.0 --- docs/software/node.md | 19 +++++++++++-------- docs/zh/software/node.md | 19 +++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/docs/software/node.md b/docs/software/node.md index 2237312c3..316a4252d 100644 --- a/docs/software/node.md +++ b/docs/software/node.md @@ -40,14 +40,17 @@ This commond will generate the transaction in the directory:{path_to_your_home Manually modify the genesis.json file to assign the initial account balance to the above validator operator account, such as: 150 iris ```json "accounts": [ -{ -"address": "faa13t6jugwm5uu3h835s5d4zggkklz6rpns59keju", -"coins": [ -"150iris" -], -"sequence_number": "0", -"account_number": "0" -} + { + "address": "faa13t6jugwm5uu3h835s5d4zggkklz6rpns59keju", + "coins": [ + { + "denom": "iris-atto", + "amount": "150000000000000000000" + } + ], + "sequence_number": "0", + "account_number": "0" + } ], ``` diff --git a/docs/zh/software/node.md b/docs/zh/software/node.md index 6e23c5c77..9925cb558 100644 --- a/docs/zh/software/node.md +++ b/docs/zh/software/node.md @@ -39,14 +39,17 @@ iris gentx --name={account_name} --home={path_to_your_home} 手动修改genesis.json文件,为上述验证人账户分配初始账户余额,如:150个iris ```json "accounts": [ -{ -"address": "faa13t6jugwm5uu3h835s5d4zggkklz6rpns59keju", -"coins": [ -"150iris" -], -"sequence_number": "0", -"account_number": "0" -} + { + "address": "faa13t6jugwm5uu3h835s5d4zggkklz6rpns59keju", + "coins": [ + { + "denom": "iris-atto", + "amount": "150000000000000000000" + } + ], + "sequence_number": "0", + "account_number": "0" + } ], ``` From 03f202b0efa8f509c6a7a1e326b0e315aabfbac2 Mon Sep 17 00:00:00 2001 From: jiacheng Date: Fri, 23 Nov 2018 17:00:56 +0800 Subject: [PATCH 07/18] Impose upgrade proposal with restrictions --- app/app.go | 12 ++++++------ modules/gov/errors.go | 5 +++++ modules/gov/handler.go | 7 ++++++- modules/gov/proposal_upgrade.go | 10 +++++++--- modules/service/error.go | 2 +- 5 files changed, 25 insertions(+), 11 deletions(-) diff --git a/app/app.go b/app/app.go index dc010b699..ea12f30bc 100644 --- a/app/app.go +++ b/app/app.go @@ -139,7 +139,7 @@ func NewIrisApp(logger log.Logger, db dbm.DB, traceStore io.Writer, baseAppOptio app.cdc, app.keyStake, app.tkeyStake, app.bankKeeper, app.paramsKeeper.Subspace(stake.DefaultParamspace), - app.RegisterCodespace(stake.DefaultCodespace), + stake.DefaultCodespace, ) app.mintKeeper = mint.NewKeeper(app.cdc, app.keyMint, app.paramsKeeper.Subspace(mint.DefaultParamspace), @@ -150,32 +150,32 @@ func NewIrisApp(logger log.Logger, db dbm.DB, traceStore io.Writer, baseAppOptio app.keyDistr, app.paramsKeeper.Subspace(distr.DefaultParamspace), app.bankKeeper, &stakeKeeper, app.feeCollectionKeeper, - app.RegisterCodespace(stake.DefaultCodespace), + distr.DefaultCodespace, ) app.slashingKeeper = slashing.NewKeeper( app.cdc, app.keySlashing, &stakeKeeper, app.paramsKeeper.Subspace(slashing.DefaultParamspace), - app.RegisterCodespace(slashing.DefaultCodespace), + slashing.DefaultCodespace, ) app.govKeeper = gov.NewKeeper( app.cdc, app.keyGov, app.bankKeeper, &stakeKeeper, - app.RegisterCodespace(gov.DefaultCodespace), + gov.DefaultCodespace, ) app.recordKeeper = record.NewKeeper( app.cdc, app.keyRecord, - app.RegisterCodespace(record.DefaultCodespace), + record.DefaultCodespace, ) app.serviceKeeper = service.NewKeeper( app.cdc, app.keyService, app.bankKeeper, - app.RegisterCodespace(service.DefaultCodespace), + service.DefaultCodespace, ) // register the staking hooks diff --git a/modules/gov/errors.go b/modules/gov/errors.go index 0ea96d2dc..32be61fdf 100644 --- a/modules/gov/errors.go +++ b/modules/gov/errors.go @@ -24,6 +24,7 @@ const ( //////////////////// iris begin /////////////////////////// CodeInvalidParam sdk.CodeType = 12 CodeInvalidParamOp sdk.CodeType = 13 + CodeSwitchPeriodInProcess sdk.CodeType = 14 //////////////////// iris end ///////////////////////////// ) @@ -78,4 +79,8 @@ func ErrInvalidParam(codespace sdk.CodespaceType) sdk.Error { func ErrInvalidParamOp(codespace sdk.CodespaceType, opStr string) sdk.Error { return sdk.NewError(codespace, CodeInvalidParamOp, fmt.Sprintf("Op '%s' is not valid", opStr)) } + +func ErrSwitchPeriodInProcess(codespace sdk.CodespaceType) sdk.Error { + return sdk.NewError(codespace, CodeSwitchPeriodInProcess, fmt.Sprintf("Software Upgrade Switch Period is in process.")) +} //////////////////// iris end ///////////////////////////// diff --git a/modules/gov/handler.go b/modules/gov/handler.go index 031d832ef..0e02467e9 100644 --- a/modules/gov/handler.go +++ b/modules/gov/handler.go @@ -8,6 +8,7 @@ import ( "strconv" "encoding/json" "github.com/irisnet/irishub/modules/gov/params" + "github.com/irisnet/irishub/modules/upgrade/params" ) // Handle all "gov" type messages. @@ -30,9 +31,13 @@ func NewHandler(keeper Keeper) sdk.Handler { func handleMsgSubmitProposal(ctx sdk.Context, keeper Keeper, msg MsgSubmitProposal) sdk.Result { //////////////////// iris begin /////////////////////////// proposal := keeper.NewProposal(ctx, msg.Title, msg.Description, msg.ProposalType,msg.Param) + if msg.ProposalType == ProposalTypeSoftwareUpgrade { + if upgradeparams.GetCurrentUpgradeProposalId(ctx) != 0 { + return ErrSwitchPeriodInProcess(keeper.codespace).Result() + } + } //////////////////// iris end ///////////////////////////// - err, votingStarted := keeper.AddDeposit(ctx, proposal.GetProposalID(), msg.Proposer, msg.InitialDeposit) if err != nil { return err.Result() diff --git a/modules/gov/proposal_upgrade.go b/modules/gov/proposal_upgrade.go index 220e193c1..851190b8e 100644 --- a/modules/gov/proposal_upgrade.go +++ b/modules/gov/proposal_upgrade.go @@ -14,10 +14,14 @@ type SoftwareUpgradeProposal struct { func (sp *SoftwareUpgradeProposal) Execute(ctx sdk.Context, k Keeper) error { logger := ctx.Logger().With("module", "x/gov") - logger.Info("Execute SoftwareProposal begin", "info", fmt.Sprintf("current height:%d", ctx.BlockHeight())) - upgradeparams.SetCurrentUpgradeProposalId(ctx,sp.ProposalID) - upgradeparams.SetProposalAcceptHeight(ctx,ctx.BlockHeight()) + if upgradeparams.GetCurrentUpgradeProposalId(ctx) == 0 { + upgradeparams.SetCurrentUpgradeProposalId(ctx,sp.ProposalID) + upgradeparams.SetProposalAcceptHeight(ctx,ctx.BlockHeight()) + logger.Info("Execute SoftwareProposal begin", "info", fmt.Sprintf("current height:%d", ctx.BlockHeight())) + } else { + logger.Info("Software Upgrade Switch Period is in process.", "info", fmt.Sprintf("current height:%d", ctx.BlockHeight())) + } return nil } diff --git a/modules/service/error.go b/modules/service/error.go index b65c9c6f1..32bcc81a4 100644 --- a/modules/service/error.go +++ b/modules/service/error.go @@ -6,7 +6,7 @@ import ( ) const ( - DefaultCodespace sdk.CodespaceType = 6 + DefaultCodespace sdk.CodespaceType = 8 CodeInvalidIDL sdk.CodeType = 100 CodeSvcDefExists sdk.CodeType = 101 From 594a8315ac703cfa03ed709bfb44e62d5f3a7533 Mon Sep 17 00:00:00 2001 From: kidinamoto01 Date: Fri, 23 Nov 2018 17:54:13 +0800 Subject: [PATCH 08/18] edit install docs --- docs/get-started/Full-Node.md | 6 +- .../get-started/Genesis-Generation-Process.md | 89 ------------------- docs/get-started/Install-the-Software.md | 18 ++-- docs/get-started/Join-the-Testnet.md | 51 +++++------ docs/get-started/README.md | 14 +-- docs/zh/get-started/Full-Node.md | 10 +-- .../get-started/Genesis-Generation-Process.md | 81 ----------------- docs/zh/get-started/Install-the-Software.md | 19 ++-- docs/zh/get-started/Join-the-Testnet.md | 53 ++++++----- docs/zh/get-started/README.md | 22 ++--- 10 files changed, 101 insertions(+), 262 deletions(-) delete mode 100644 docs/get-started/Genesis-Generation-Process.md delete mode 100644 docs/zh/get-started/Genesis-Generation-Process.md diff --git a/docs/get-started/Full-Node.md b/docs/get-started/Full-Node.md index 419a56454..b0914eefa 100644 --- a/docs/get-started/Full-Node.md +++ b/docs/get-started/Full-Node.md @@ -1,6 +1,6 @@ # Setup A Full-node -Before setting up your validator node, make sure you already had **Iris** installed by following this [guide](Install-Iris.md) +Before setting up your validator node, make sure you already had **Iris** installed by following this [guide](Install-the-Software.md) ## Init Your Node @@ -27,8 +27,8 @@ After intializing your node, please download the genesis file and the config fil cd $IRISHOME/config/ rm genesis.json rm config.toml -wget https://raw.githubusercontent.com/irisnet/testnets/master/fuxi/fuxi-4000/config/config.toml -wget https://raw.githubusercontent.com/irisnet/testnets/master/fuxi/fuxi-4000/config/genesis.json +wget https://raw.githubusercontent.com/irisnet/testnets/master/fuxi/fuxi-5000/config/config.toml +wget https://raw.githubusercontent.com/irisnet/testnets/master/fuxi/fuxi-5000/config/genesis.json ``` ## Edit Your Config File diff --git a/docs/get-started/Genesis-Generation-Process.md b/docs/get-started/Genesis-Generation-Process.md deleted file mode 100644 index 6c62ff68a..000000000 --- a/docs/get-started/Genesis-Generation-Process.md +++ /dev/null @@ -1,89 +0,0 @@ -# How To Participate in Genesis Process - -## Requirements - -You must have follow this [guide](Install-Iris.md) to install the correct version of **Iris**. - -## Gentx - -Please run the `keys add` subcommand and run the `gen-tx` subcommand to generate files. - - -``` -iriscli keys add your_name -iris gentx --name=your_name --home= --ip=Your_public_IP -``` - -For example, - -``` -iriscli keys add alice -iris gentx --name=alice --home=iris --chain-id=irishub-stage --ip=1.1.1.1 -``` - -There will be a gentx-node-ID.json a file at `$IRISHOME/config/gentx/`. - -The content of the file will be: - -``` -{ - "type": "auth/StdTx", - "value": { - "msg": [ - { - "type": "cosmos-sdk/MsgCreateValidator", - "value": { - "Description": { - "moniker": "chenggedexiaokeai.local", - "identity": "", - "website": "", - "details": "" - }, - "Commission": { - "rate": "0.1000000000", - "max_rate": "0.2000000000", - "max_change_rate": "0.0100000000" - }, - "delegator_address": "faa1cf25tf4pfjdhkzx8lqnkajlse6jcpm2fyw4yme", - "validator_address": "fva1cf25tf4pfjdhkzx8lqnkajlse6jcpm2f3lltx7", - "pubkey": { - "type": "tendermint/PubKeyEd25519", - "value": "/JvLFsvyMgm2ND4QgN4JKyLxhL42dVgat67383Q+mPY=" - }, - "delegation": { - "denom": "iris-atto", - "amount": "100000000000000000000" - } - } - } - ], - "fee": { - "amount": null, - "gas": "200000" - }, - "signatures": [ - { - "pub_key": { - "type": "tendermint/PubKeySecp256k1", - "value": "AtfNRj0zYvffAQG+iad6SScfdl29ag9G3EI0JDSwKJmy" - }, - "signature": "BwTejBceK4M+3LzmNl62jVFUr9wVv//UO7iI/yWi5KFoez9eY43HSlaZJf+3rnKLjosn2tD79EIw55BJ6SbYzQ==", - "account_number": "0", - "sequence": "0" - } - ], - "memo": "0eb02fdabb96923ac1e855ac012a5a624793264a@1.1.1.1:26656" - } -} -``` -This is the `CreateValidator` message. -validator is generated by \$IRISHOME/config/priv_validator.json - -## Submit Gentx - -Submit your `gentx-.json` to `https://github.com/irisnet/testnets/tree/master/fuxi/fuxi-4000/config/gen-tx/` by createing a pull request. - -After the team has collected all the gen-tx transactions, we will publish the genesis file in the following folder: `https://github.com/irisnet/testnets/tree/master/testnets/fuxi-3001/config/` - -You could then download the final genesis file and start a node. - diff --git a/docs/get-started/Install-the-Software.md b/docs/get-started/Install-the-Software.md index 4e80d1861..b632c0f15 100644 --- a/docs/get-started/Install-the-Software.md +++ b/docs/get-started/Install-the-Software.md @@ -22,17 +22,17 @@ Go to the download page: https://github.com/irisnet/irishub/releases/ -then get the release v0.6.0 on your computer. +then get the release v0.7.0 on your computer. `unzip -C /usr/local/bin iris$VERSION.$OS-$ARCH.zip` to `/usr/local/bin/ ` You can verify you have the right version installed by running the following commands: ``` $ iris version -v0.6.0 +v0.7.0 $ iriscli version -v0.6.0 +v0.7.0 ``` #### Compile Source Code @@ -95,9 +95,9 @@ Make sure that you can access to google.com for that our project used some libra mkdir -p $GOPATH/src/github.com/irisnet cd $GOPATH/src/github.com/irisnet git clone https://github.com/irisnet/irishub -cd irishub && git checkout v0.6.0 +cd irishub && git checkout v0.7.0 curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh -make get_tools && get_vendor_deps && make install +make all ``` If your environment variables have set up correctly, you should not get any errors by running the above commands. @@ -105,9 +105,9 @@ Now check your **Iris** version. ``` $ iris version -v0.6.0 +v0.7.0 $ iriscli version -v0.6.0 +v0.7.0 ``` ### How to Update @@ -115,10 +115,10 @@ v0.6.0 Get latest code (you can also `git fetch` only the version desired), ensure the dependencies are up to date, then recompile. ``` +iris unsafe_reset_all --home cd $GOPATH/src/github.com/irisnet/irishub git fetch -a origin -rm Gopkg.lock -git checkout v0.6.0 +git checkout v0.7.0 make get_vendor_deps make install ``` \ No newline at end of file diff --git a/docs/get-started/Join-the-Testnet.md b/docs/get-started/Join-the-Testnet.md index 52fccef53..f14ff42be 100644 --- a/docs/get-started/Join-the-Testnet.md +++ b/docs/get-started/Join-the-Testnet.md @@ -1,49 +1,50 @@ -IRISnet Testnet Codename Fuxi +# IRISnet Testnet Codename Fuxi -What is IRISnet +## What is IRISnet -IRIS network (a.k.a. IRISnet) is named after Greek goddess Iris, said to be the personification of the rainbow and the faithful messenger between heaven and humanity. IRIS network aims to build the foundation which facilitates construction of distributed business applications. IRIS hub will provide iServices, which allow resources such as data service and computing services being invoked across blockchains. To know more about IRISnet, please read this blog. +IRIS network (a.k.a. IRISnet) is named after Greek goddess **Iris**, said to be the personification of the rainbow and the faithful messenger between heaven and humanity. IRIS network aims to build the foundation which facilitates construction of distributed business applications. IRIS hub will provide iServices, which allow resources such as data service and computing services being invoked across blockchains. To know more about IRISnet, please read this blog. -How to Join Fuxi Testnet +## How to Join Fuxi Testnet -Step 1: Install Iris on Your Server +### Step 1: Install Iris on Your Server -Please follow this instruction to get Iris installed locally. +Please follow this [instruction](Install-the-Software.md) to get **Iris** installed locally. -Step 2: Run a Full Node +### Step 2: Run a Full Node -Please follow this instruction to get your full node running. +Please follow this [instruction](Full-Node.md) to get your full node running. -Step 3: Upgrade to Validator Node -Please follow this instruction to upgrade your full node to validator node. +### Step 3: Upgrade to Validator Node -Deploy IRISHub Monitor +Please follow this [instruction](Validator-Node.md) to upgrade your full node to validator node. -Please follow this guide to get IRIHub monitor running on your side. +### Deploy IRISHub Monitor -Upgrade to Validator Node +Please follow this [guide](../software/monitor.md) to get IRIHub monitor running on your side. + + +### Upgrade to Validator Node You now have an active full node. What's the next step? If you have participated in the genesis file generation process, you should be a validator once you are fully synced. -If you miss the genesis file generation process, you can still upgrade your full node to become a IRISnet Validator. The top 100 validators have the ability to propose new blocks to the IRIS Hub. Continue onto the Validator Setup. +If you miss the genesis file generation process, you can still upgrade your full node to become a IRISnet Validator. The top 100 validators have the ability to propose new blocks to the IRIS Hub. Continue onto [the Validator Setup](Validator-Node.md). -Setup a sentry node +### Setup a sentry node -A validator is under the risk of being attacked. You could follow this guide to setup a sentry node to protect yourself. - -Fuxi Incentivized Testnet +A validator is under the risk of being attacked. You could follow this [guide](../software/sentry.md) to setup a sentry node to protect yourself. +## Fuxi Incentivized Testnet IRIS foundation plans to reward all the testnet participants who took part in the testnet. In Fuxi-3001 testnet,the community members have finished the tasks and they will receive their rewards in genesis allocation. +* Task List for Fuxi-4000: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-4000/README.md + +To get more people involved, IRIS foundation decides to send out more tasks in the latest iteration of testnet:Fuxi-5000. +* Task List for Fuxi-5000: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-5000/README.md -- Task List for Fuxi-3001: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-3001/README.md -- Results:https://github.com/irisnet/testnets/issues/125 - To get more people involved, IRIS foundation decides to send out more tasks in the latest iteration of testnet:Fuxi-4001. -- Task List for Fuxi-4000: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-4000/README.md +## Useful Links -Useful Links +* Riot chat: #irisvalidators:matrix.org -- Riot chat: #irisvalidators:matrix.org -- Explorer: https://testnet.irisplorer.io/#/home +* Explorer: https://testnet.irisplorer.io/#/home \ No newline at end of file diff --git a/docs/get-started/README.md b/docs/get-started/README.md index 5ca83a259..f14ff42be 100644 --- a/docs/get-started/README.md +++ b/docs/get-started/README.md @@ -8,7 +8,7 @@ IRIS network (a.k.a. IRISnet) is named after Greek goddess **Iris**, said to be ### Step 1: Install Iris on Your Server -Please follow this [instruction](Install-Iris.md) to get **Iris** installed locally. +Please follow this [instruction](Install-the-Software.md) to get **Iris** installed locally. ### Step 2: Run a Full Node @@ -21,7 +21,7 @@ Please follow this [instruction](Validator-Node.md) to upgrade your full node to ### Deploy IRISHub Monitor -Please follow this [guide](../tools/Deploy-IRIS-Monitor.md) to get IRIHub monitor running on your side. +Please follow this [guide](../software/monitor.md) to get IRIHub monitor running on your side. ### Upgrade to Validator Node @@ -34,14 +34,14 @@ If you miss the genesis file generation process, you can still upgrade your full ### Setup a sentry node -A validator is under the risk of being attacked. You could follow this [guide](../validators/Setup-Sentry-Node.md) to setup a sentry node to protect yourself. +A validator is under the risk of being attacked. You could follow this [guide](../software/sentry.md) to setup a sentry node to protect yourself. ## Fuxi Incentivized Testnet IRIS foundation plans to reward all the testnet participants who took part in the testnet. In Fuxi-3001 testnet,the community members have finished the tasks and they will receive their rewards in genesis allocation. -* Task List for Fuxi-3001: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-3001/README.md -* Results:https://github.com/irisnet/testnets/issues/125 -To get more people involved, IRIS foundation decides to send out more tasks in the latest iteration of testnet:Fuxi-4001. -* Task List for Fuxi-4000: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-4000/README.md +* Task List for Fuxi-4000: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-4000/README.md + +To get more people involved, IRIS foundation decides to send out more tasks in the latest iteration of testnet:Fuxi-5000. +* Task List for Fuxi-5000: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-5000/README.md ## Useful Links diff --git a/docs/zh/get-started/Full-Node.md b/docs/zh/get-started/Full-Node.md index be996147c..705e08a62 100644 --- a/docs/zh/get-started/Full-Node.md +++ b/docs/zh/get-started/Full-Node.md @@ -17,13 +17,13 @@ genesis文件中定义了区块链网络的初始状态,而config.toml指定 ``` cd $IRISHOME/config/ -wget https://raw.githubusercontent.com/irisnet/testnets/master/fuxi/fuxi-4000/config/config.toml -wget https://raw.githubusercontent.com/irisnet/testnets/master/fuxi/fuxi-4000/config/genesis.json +wget https://raw.githubusercontent.com/irisnet/testnets/master/fuxi/fuxi-5000/config/config.toml +wget https://raw.githubusercontent.com/irisnet/testnets/master/fuxi/fuxi-5000/config/genesis.json ``` ### 修改配置文件 在config.toml文件中可以配置以下信息: * 将`moniker`字段配置称为自定义的名称,这样便于区分不同的节点 -* `seed`字段用语设置种子节点,在fuxi-4000中的官方中字节点为: +* `seed`字段用语设置种子节点,在fuxi-5000中的官方中字节点为: ``` c16700520a810b270206d59f0f02ea9abd85a4fe@ts-1.bianjie.ai:26656 a12cfb2f535210ea12731f94a76b691832056156@ts-2.bianjie.ai:26656 @@ -56,7 +56,7 @@ iriscli status ``` 示例输出: ```json -{"node_info":{"id":"3fb472c641078eaaee4a4acbe32841f18967672c","listen_addr":"172.31.0.190:26656","network":"fuxi-4000","version":"0.22.6","channels":"4020212223303800","moniker":"name","other":["amino_version=0.10.1","p2p_version=0.5.0","consensus_version=v1/0.2.2","rpc_version=0.7.0/3","tx_index=on","rpc_addr=tcp://0.0.0.0:26657"]},"sync_info":{"latest_block_hash":"7B1168B2055B19F811773EEE56BB3C9ECB6F3B37","latest_app_hash":"B8F7F8BF18E3F1829CCDE26897DB905A51AF4372","latest_block_height":12567,"latest_block_time":"2018-08-25T11:33:13.164432273Z","catching_up":false},"validator_info":{"address":"CAF80DAEC0F4A7036DD2116B56F89B07F43A133E","pub_key":{"type":"AC26791624DE60","value":"Cl6Yq+gqZZY14QxrguOaZqAswPhluv7bDfcyQx2uSRc="},"voting_power":0}} +{"node_info":{"id":"3fb472c641078eaaee4a4acbe32841f18967672c","listen_addr":"172.31.0.190:26656","network":"fuxi-5000","version":"0.22.6","channels":"4020212223303800","moniker":"name","other":["amino_version=0.10.1","p2p_version=0.5.0","consensus_version=v1/0.2.2","rpc_version=0.7.0/3","tx_index=on","rpc_addr=tcp://0.0.0.0:26657"]},"sync_info":{"latest_block_hash":"7B1168B2055B19F811773EEE56BB3C9ECB6F3B37","latest_app_hash":"B8F7F8BF18E3F1829CCDE26897DB905A51AF4372","latest_block_height":12567,"latest_block_time":"2018-08-25T11:33:13.164432273Z","catching_up":false},"validator_info":{"address":"CAF80DAEC0F4A7036DD2116B56F89B07F43A133E","pub_key":{"type":"AC26791624DE60","value":"Cl6Yq+gqZZY14QxrguOaZqAswPhluv7bDfcyQx2uSRc="},"voting_power":0}} ``` 通过以上命令可以查看状态: @@ -99,7 +99,7 @@ iriscli status ``` 示例输出: ```json -{"node_info":{"id":"3fb472c641078eaaee4a4acbe32841f18967672c","listen_addr":"172.31.0.190:26656","network":"fuxi-4000","version":"0.22.6","channels":"4020212223303800","moniker":"name","other":["amino_version=0.10.1","p2p_version=0.5.0","consensus_version=v1/0.2.2","rpc_version=0.7.0/3","tx_index=on","rpc_addr=tcp://0.0.0.0:26657"]},"sync_info":{"latest_block_hash":"7B1168B2055B19F811773EEE56BB3C9ECB6F3B37","latest_app_hash":"B8F7F8BF18E3F1829CCDE26897DB905A51AF4372","latest_block_height":12567,"latest_block_time":"2018-08-25T11:33:13.164432273Z","catching_up":false},"validator_info":{"address":"CAF80DAEC0F4A7036DD2116B56F89B07F43A133E","pub_key":{"type":"AC26791624DE60","value":"Cl6Yq+gqZZY14QxrguOaZqAswPhluv7bDfcyQx2uSRc="},"voting_power":100}} +{"node_info":{"id":"3fb472c641078eaaee4a4acbe32841f18967672c","listen_addr":"172.31.0.190:26656","network":"fuxi-5000","version":"0.22.6","channels":"4020212223303800","moniker":"name","other":["amino_version=0.10.1","p2p_version=0.5.0","consensus_version=v1/0.2.2","rpc_version=0.7.0/3","tx_index=on","rpc_addr=tcp://0.0.0.0:26657"]},"sync_info":{"latest_block_hash":"7B1168B2055B19F811773EEE56BB3C9ECB6F3B37","latest_app_hash":"B8F7F8BF18E3F1829CCDE26897DB905A51AF4372","latest_block_height":12567,"latest_block_time":"2018-08-25T11:33:13.164432273Z","catching_up":false},"validator_info":{"address":"CAF80DAEC0F4A7036DD2116B56F89B07F43A133E","pub_key":{"type":"AC26791624DE60","value":"Cl6Yq+gqZZY14QxrguOaZqAswPhluv7bDfcyQx2uSRc="},"voting_power":100}} ``` 通过以上命令可以查看状态: diff --git a/docs/zh/get-started/Genesis-Generation-Process.md b/docs/zh/get-started/Genesis-Generation-Process.md deleted file mode 100644 index e4909b0fd..000000000 --- a/docs/zh/get-started/Genesis-Generation-Process.md +++ /dev/null @@ -1,81 +0,0 @@ -# 参与到Genesis文件生成流程中 - - -1. 每个希望成为验证人的参与者确保安装了对应版本的软件:iris v0.7.0 - -2. 先创建账户,再执行gentx命令,获得一个gentx-node-ID.json的文件。这个操作将默认生成一个余额为150IRIS的账户,该账户默认绑定100IRIS成为一个验证人候选人。 - -``` -iriscli keys add your_name -iris gentx --name=your_name --home= --ip=Your_public_IP -``` - -代码示例: - -``` -iriscli keys add alice -iris gentx --name=alice --home=iris --chain-id=irishub-stage --ip=1.1.1.1 -``` -然后你可以发现在$IRISHOME/config目录下生成了一个gentx文件夹。里面存在一个gentx-node-ID.json文件。这个文件包含了如下信息: - -``` -{ - "type": "auth/StdTx", - "value": { - "msg": [ - { - "type": "cosmos-sdk/MsgCreateValidator", - "value": { - "Description": { - "moniker": "chenggedexiaokeai.local", - "identity": "", - "website": "", - "details": "" - }, - "Commission": { - "rate": "0.1000000000", - "max_rate": "0.2000000000", - "max_change_rate": "0.0100000000" - }, - "delegator_address": "faa1cf25tf4pfjdhkzx8lqnkajlse6jcpm2fyw4yme", - "validator_address": "fva1cf25tf4pfjdhkzx8lqnkajlse6jcpm2f3lltx7", - "pubkey": { - "type": "tendermint/PubKeyEd25519", - "value": "/JvLFsvyMgm2ND4QgN4JKyLxhL42dVgat67383Q+mPY=" - }, - "delegation": { - "denom": "iris-atto", - "amount": "100000000000000000000" - } - } - } - ], - "fee": { - "amount": null, - "gas": "200000" - }, - "signatures": [ - { - "pub_key": { - "type": "tendermint/PubKeySecp256k1", - "value": "AtfNRj0zYvffAQG+iad6SScfdl29ag9G3EI0JDSwKJmy" - }, - "signature": "BwTejBceK4M+3LzmNl62jVFUr9wVv//UO7iI/yWi5KFoez9eY43HSlaZJf+3rnKLjosn2tD79EIw55BJ6SbYzQ==", - "account_number": "0", - "sequence": "0" - } - ], - "memo": "0eb02fdabb96923ac1e855ac012a5a624793264a@1.1.1.1:26656" - } -} -``` - -`msg` 是创建验证人节点的交易 - -3. 将上述提到的json文件以提交Pull Request的形式上传到`https://github.com/irisnet/testnets/tree/master/testnets/fuxi-5000/config/gentx`目录下: - - 注意⚠️:json文中的IP改成公网IP - - - - diff --git a/docs/zh/get-started/Install-the-Software.md b/docs/zh/get-started/Install-the-Software.md index a1a5f0306..4de4bfb7d 100644 --- a/docs/zh/get-started/Install-the-Software.md +++ b/docs/zh/get-started/Install-the-Software.md @@ -28,10 +28,10 @@ tar -C /usr/local/bin -xzf iris$VERSION.$OS-$ARCH.zip ``` $ iris version -v0.6.0 +v0.7.0 $ iriscli version -v0.6.0 +v0.7.0 ``` #### 方法2:源码编译安装 @@ -88,29 +88,30 @@ source ~/.bash_profile mkdir -p $GOPATH/src/github.com/irisnet cd $GOPATH/src/github.com/irisnet git clone https://github.com/irisnet/irishub -cd irishub && git checkout v0.6.0 +cd irishub && git checkout v0.7.0 curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh -make get_tools && get_vendor_deps && make install +make all ``` -以上命令将完成 iris 和 iriscli的安装. 若出现对应的版本号则说明安装成功。 +以上命令将完成iris 和 iriscli的安装. 若出现对应的版本号则说明安装成功。 ``` $ iris version -v0.6.0 +v0.7.0 $ iriscli version -v0.6.0 +v0.7.0 ``` ### 如何升级IRISHub -通过执行一下命令可以完成IRISHub从v0.4.2到v0.6.0的升级 +通过执行一下命令可以完成IRISHub从v0.6.2到v0.7.0的升级 ``` +iris unsafe_reset_all --home cd $GOPATH/src/github.com/irisnet/irishub git fetch -a origin rm Gopkg.lock -git checkout v0.6.0 +git checkout v0.7.0 make get_tools make get_vendor_deps make install diff --git a/docs/zh/get-started/Join-the-Testnet.md b/docs/zh/get-started/Join-the-Testnet.md index 247de4868..1450035cb 100644 --- a/docs/zh/get-started/Join-the-Testnet.md +++ b/docs/zh/get-started/Join-the-Testnet.md @@ -1,52 +1,57 @@ -IRISnet测试网 +# IRISnet测试网 -IRIShub 简介 +## IRIShub 简介 IRIS Hub是在Cosmos生态中的区域性枢纽,提供iService服务 -如何加入fuxi测试网 +## 如何加入fuxi测试网 -第一步: 安装IRIShub +### 第一步: 安装IRIShub -请根据一下教程 在服务器上完成Iris的安装。 +请根据以下[教程](Install-Iris.md) 在服务器上完成**Iris**的安装。 -第二步: 运行一个全节点 +### 第二步: 运行一个全节点 -请根据一下步骤 完成初始化并开始在服务器上运行一个全节点。 +请根据以下[步骤](Full-Node.md) 完成初始化并开始在服务器上运行一个全节点。 -第三步: 将全节点升级成为一个验证人节点 -请根据以下步骤 将一个全节点升级成为验证人节点。 +### 第三步: 将全节点升级成为一个验证人节点 -部署IRISHub Monitor监控 +请根据以下[步骤](Validator-Node.md) 将一个全节点升级成为验证人节点。 -请根据以下链接 在服务器上部署一个Monitor监控。 +### 部署IRISHub Monitor监控 -如何成为一个验证人节点 +请根据以下[链接](../tools/Deploy-IRIS-Monitor.md) 在服务器上部署一个Monitor监控。 + + +### 如何成为一个验证人节点 如何你的节点已经完全同步了,那么要如何才能升级成为一个验证人节点你? 如果你参与到了genesis文件的生成过程中,那么只要你的节点与网络同时启动,它就会保持验证人的状态。 -如果你并没有参与到genesis文件的生成过程中,那么你依然可以通过执行相关操作升级成为一个验证人。目前IRIShub的验证人上限是100。升级的流程在这里. +如果你并没有参与到genesis文件的生成过程中,那么你依然可以通过执行相关操作升级成为一个验证人。目前IRIShub的验证人上限是100。升级的流程在[这里](Validator-Node.md). + +### 部署哨兵节点 + +验证人有遭受攻击的风险。你可以根据以下[教程](../validators/Setup-Sentry-Node.md)部署一个哨兵节点来保护验证人。 + +## Fuxi测试网激励计划 -部署哨兵节点 +IRIS基金会通过推出测试网激励计划来鼓励更多的人加入到Fuxi测试网中。在Fuxi-3001中,很多社区成员完成了激励任务。 -验证人有遭受攻击的风险。你可以根据以下教程部署一个哨兵节点来保护验证人。 +Fuxi-4000 任务列表: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-4000/README.md -Fuxi测试网激励计划 -IRIS基金会通过推出测试网激励计划来鼓励更多的人加入到Fuxi测试网中。在Fuxi-2000中,我们针对中国社区发布了测试网激励任务。一共有14位社区成员完成了任务。 +在Fuxi-4000测试网中, IRIS基金会决定推出更多的测试网激励计划。 -Fuxi-2000 任务列表: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-2000/README.md +Fuxi-4000任务列表: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-5000/README_CN.md -Fuxi-2000 任务完成情况:https://github.com/irisnet/testnets/issues/51 +## 更多链接 -在Fuxi-3001测试网中, IRIS基金会决定推出更多的测试网激励计划。 -Fuxi-3001任务列表: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-3001/README.md +* Explorer: https://testnet.irisplorer.io/#/home -更多链接 +* Riot chat: #irisvalidators:matrix.org -- Explorer: https://testnet.irisplorer.io/#/home -- Riot chat: #irisvalidators:matrix.org +* IRIShub验证人工作QQ群:834063323 \ No newline at end of file diff --git a/docs/zh/get-started/README.md b/docs/zh/get-started/README.md index 2cfbb8abc..c3028d4a9 100644 --- a/docs/zh/get-started/README.md +++ b/docs/zh/get-started/README.md @@ -8,11 +8,11 @@ IRIS Hub是在Cosmos生态中的区域性枢纽,提供iService服务 ### 第一步: 安装IRIShub -请根据一下[教程](Install-Iris.md) 在服务器上完成**Iris**的安装。 +请根据以下[教程](Install-the-Software.md) 在服务器上完成**Iris**的安装。 ### 第二步: 运行一个全节点 -请根据一下[步骤](Full-Node.md) 完成初始化并开始在服务器上运行一个全节点。 +请根据以下[步骤](Full-Node.md) 完成初始化并开始在服务器上运行一个全节点。 ### 第三步: 将全节点升级成为一个验证人节点 @@ -21,7 +21,7 @@ IRIS Hub是在Cosmos生态中的区域性枢纽,提供iService服务 ### 部署IRISHub Monitor监控 -请根据以下[链接](../tools/Deploy-IRIS-Monitor.md) 在服务器上部署一个Monitor监控。 +请根据以下[链接](../software/monitor.md) 在服务器上部署一个Monitor监控。 ### 如何成为一个验证人节点 @@ -34,23 +34,25 @@ IRIS Hub是在Cosmos生态中的区域性枢纽,提供iService服务 ### 部署哨兵节点 -验证人有遭受攻击的风险。你可以根据以下[教程](../validators/Setup-Sentry-Node.md)部署一个哨兵节点来保护验证人。 +验证人有遭受攻击的风险。你可以根据以下[教程](../software/sentry.md)部署一个哨兵节点来保护验证人。 ## Fuxi测试网激励计划 -IRIS基金会通过推出测试网激励计划来鼓励更多的人加入到Fuxi测试网中。在Fuxi-2000中,我们针对中国社区发布了测试网激励任务。一共有14位社区成员完成了任务。 +IRIS基金会通过推出测试网激励计划来鼓励更多的人加入到Fuxi测试网中。在Fuxi-3001中,很多社区成员完成了激励任务。 -Fuxi-2000 任务列表: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-2000/README.md +Fuxi-4000 任务列表: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-4000/README.md -Fuxi-2000 任务完成情况:https://github.com/irisnet/testnets/issues/51 -在Fuxi-3001测试网中, IRIS基金会决定推出更多的测试网激励计划。 +在Fuxi-4000测试网中, IRIS基金会决定推出更多的测试网激励计划。 + +Fuxi-4000任务列表: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-5000/README_CN.md -Fuxi-3001任务列表: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-3001/README.md ## 更多链接 * Explorer: https://testnet.irisplorer.io/#/home -* Riot chat: #irisvalidators:matrix.org \ No newline at end of file +* Riot chat: #irisvalidators:matrix.org + +* IRIShub验证人工作QQ群:834063323 \ No newline at end of file From a896ab038df560ab545ca20ca973030d31f1352f Mon Sep 17 00:00:00 2001 From: Raymond Date: Fri, 23 Nov 2018 18:41:01 +0800 Subject: [PATCH 09/18] Update Full-Node.md --- docs/zh/get-started/Full-Node.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/zh/get-started/Full-Node.md b/docs/zh/get-started/Full-Node.md index 705e08a62..405c08e9f 100644 --- a/docs/zh/get-started/Full-Node.md +++ b/docs/zh/get-started/Full-Node.md @@ -23,7 +23,7 @@ wget https://raw.githubusercontent.com/irisnet/testnets/master/fuxi/fuxi-5000/co ### 修改配置文件 在config.toml文件中可以配置以下信息: * 将`moniker`字段配置称为自定义的名称,这样便于区分不同的节点 -* `seed`字段用语设置种子节点,在fuxi-5000中的官方中字节点为: +* `seed`字段用语设置种子节点,在fuxi-5000中的官方种子节点为: ``` c16700520a810b270206d59f0f02ea9abd85a4fe@ts-1.bianjie.ai:26656 a12cfb2f535210ea12731f94a76b691832056156@ts-2.bianjie.ai:26656 @@ -105,4 +105,4 @@ iriscli status * `"catching_up":false`: 表示节点与网络保持同步 -* `"latest_block_height"`: 表示最新的区块高度 \ No newline at end of file +* `"latest_block_height"`: 表示最新的区块高度 From 76c421bd8538e97138e788633f50c0ae35399988 Mon Sep 17 00:00:00 2001 From: wind Date: Mon, 26 Nov 2018 09:47:44 +0800 Subject: [PATCH 10/18] Cli-client Tendermint docs (#681) * Update README.md --- docs/cli-client/tendermint/README.md | 28 ++++- docs/cli-client/tendermint/block.md | 39 +++++++ docs/cli-client/tendermint/tx.md | 113 ++++++++++++++++++++ docs/cli-client/tendermint/validator-set.md | 38 +++++++ docs/zh/cli-client/tendermint/README.md | 11 +- 5 files changed, 225 insertions(+), 4 deletions(-) create mode 100644 docs/cli-client/tendermint/block.md create mode 100644 docs/cli-client/tendermint/tx.md create mode 100644 docs/cli-client/tendermint/validator-set.md diff --git a/docs/cli-client/tendermint/README.md b/docs/cli-client/tendermint/README.md index 5083eb47f..d4022ceb2 100644 --- a/docs/cli-client/tendermint/README.md +++ b/docs/cli-client/tendermint/README.md @@ -1 +1,27 @@ -# iriscli \ No newline at end of file +# iriscli tendermint + +## Description + +Tendermint state querying subcommands + +## Usage + +``` +iriscli tendermint [command] +``` + +## Available Commands + +| Name, shorthand | Description | +| --------------- | -------------------------- | +| [tx](tx.md) | Matches this txhash over all committed blocks | +| txs | Search for all transactions that match the given tags | +| [block](block.md)| Get verified data for a the block at given height | +| [validator-set](validator-set.md) | Get the full tendermint validator set at given height | + + +## Flags + +|Name, shorthand|Description| +|--- |--- | +|--help,-h |help for tendermint| diff --git a/docs/cli-client/tendermint/block.md b/docs/cli-client/tendermint/block.md new file mode 100644 index 000000000..432afe2cc --- /dev/null +++ b/docs/cli-client/tendermint/block.md @@ -0,0 +1,39 @@ +# iriscli tendermint block + +## Description + +Get verified data for a the block at given height + + +## Usage + +``` + iriscli tendermint block [height] [flags] + + +``` + +## Flags + +| Name, shorthand | Default |Description | Required | +| --------------- | -------------------------- | --------------------------------------------------------- | -------- | +| --chain-id | | Chain ID of Tendermint node | yes | +| --node string | tcp://localhost:26657 | Node to connect to (default "tcp://localhost:26657") | +| --help, -h | | help for block| | +| --trust-node | true | Trust connected full node (don't verify proofs for responses) | | + +## Examples + +### tx + +```shell +iriscli tendermint block 114263 --chain-id=fuxi-4000 --trust-node=true + +``` + + + + + + + diff --git a/docs/cli-client/tendermint/tx.md b/docs/cli-client/tendermint/tx.md new file mode 100644 index 000000000..dfa8d3c64 --- /dev/null +++ b/docs/cli-client/tendermint/tx.md @@ -0,0 +1,113 @@ +# iriscli tendermint tx + +## Description + +Matches this txhash over all committed blocks + +## Usage + +``` +iriscli tendermint tx [hash] [flags] + +``` + +## Flags + +| Name, shorthand | Default |Description | Required | +| --------------- | -------------------------- | --------------------------------------------------------- | -------- | +| --chain-id | | Chain ID of Tendermint node | yes | +| --node string | tcp://localhost:26657 | Node to connect to (default "tcp://localhost:26657") | +| --help, -h | | help for tx| | +| --trust-node | true | Trust connected full node (don't verify proofs for responses) | | + +## Examples + +### tx + +```shell +iriscli tendermint tx CD117378EC1CE0BA4ED0E0EBCED01AF09DA8F6B7 --chain-id=fuxi-4000 --trust-node=true +``` + +You will get the following result. + +``` +{ + "hash": "CD117378EC1CE0BA4ED0E0EBCED01AF09DA8F6B7", + "height": "100722", + "tx": { + "type": "auth/StdTx", + "value": { + "msg": [ + { + "type": "cosmos-sdk/Send", + "value": { + "inputs": [ + { + "address": "faa1c6al0vufl8efggzsvw34hszua9pr4qqyry37jn", + "coins": [ + { + "denom": "iris-atto", + "amount": "3650000000000000000" + } + ] + } + ], + "outputs": [ + { + "address": "faa1v2ezk7yvkgjq87ey54etfuxc87353ulrvq28z9", + "coins": [ + { + "denom": "iris-atto", + "amount": "3650000000000000000" + } + ] + } + ] + } + } + ], + "fee": { + "amount": [ + { + "denom": "iris-atto", + "amount": "4787310000000000" + } + ], + "gas": "6631" + }, + "signatures": [ + { + "pub_key": { + "type": "tendermint/PubKeySecp256k1", + "value": "A/ZQqJkDnqiN7maj4N9we8u8hE1dUpFD72+bD2PZgH+V" + }, + "signature": "MEQCIEiNg0y3Xp9YgpY00cuYV6yoRIIXS1/Z7rOJeRwK8WipAiABfHZAS/yDMqPnBEPud1eJX8cZ6hhex1C7CGq286oclw==", + "account_number": "162", + "sequence": "3" + } + ], + "memo": "" + } + }, + "result": { + "log": "Msg 0: ", + "gas_wanted": "6631", + "gas_used": "4361", + "tags": [ + { + "key": "c2VuZGVy", + "value": "ZmFhMWM2YWwwdnVmbDhlZmdnenN2dzM0aHN6dWE5cHI0cXF5cnkzN2pu" + }, + { + "key": "cmVjaXBpZW50", + "value": "ZmFhMXYyZXprN3l2a2dqcTg3ZXk1NGV0ZnV4Yzg3MzUzdWxydnEyOHo5" + }, + { + "key": "Y29tcGxldGVDb25zdW1lZFR4RmVlLWlyaXMtYXR0bw==", + "value": "MzE0ODQ2MzExNDE2MDc2MA==" + } + ] + } +} + +``` diff --git a/docs/cli-client/tendermint/validator-set.md b/docs/cli-client/tendermint/validator-set.md new file mode 100644 index 000000000..bc8efe766 --- /dev/null +++ b/docs/cli-client/tendermint/validator-set.md @@ -0,0 +1,38 @@ +# iriscli tendermint validator-set + +## Description + +Get the full tendermint validator set at given height + + +## Usage + +``` + Get the full tendermint validator set at given height + + +``` + +## Flags + +| Name, shorthand | Default |Description | Required | +| --------------- | -------------------------- | --------------------------------------------------------- | -------- | +| --chain-id | | Chain ID of Tendermint node | yes | +| --node string | tcp://localhost:26657 | Node to connect to (default "tcp://localhost:26657") | +| --help, -h | | help for block| | +| --trust-node | true | Trust connected full node (don't verify proofs for responses) | | + +## Examples + +### tx + +```shell + iriscli tendermint validator-set 114360 --chain-id=fuxi-4000 --trust-node=true + +``` + + + + + + diff --git a/docs/zh/cli-client/tendermint/README.md b/docs/zh/cli-client/tendermint/README.md index b176fdf06..a6071a46e 100644 --- a/docs/zh/cli-client/tendermint/README.md +++ b/docs/zh/cli-client/tendermint/README.md @@ -13,10 +13,15 @@ iriscli tendermint [command] |命令|描述| |---|---| -|[tx](https://github.com/StrawberryFlavor/irishub/blob/feature/docs/docs/zh/cli-client/tendermint/tx.md)|在所有提交的块上匹配此txhash| +|[tx](tx.md)|在所有提交的块上匹配此txhash| | txs|搜索与给定标签匹配的所有事务| -|[block](https://github.com/StrawberryFlavor/irishub/blob/feature/docs/docs/zh/cli-client/tendermint/block.md)|获取给定高度的块的验证数据| -|[validator-set](https://github.com/StrawberryFlavor/irishub/blob/feature/docs/docs/zh/cli-client/tendermint/validator-set.md)|根据指定高度在验证器上查询| +|[block](block.md)|获取给定高度的块的验证数据| +|[validator-set](validator-set.md)|根据指定高度在验证器上查询| +|[tx](tx.md)|在所有提交的块上匹配此txhash| +| txs|搜索与给定标签匹配的所有事务| +|[block](block.md)|获取给定高度的块的验证数据| +|[validator-set](validator-set.md)|根据指定高度在验证器上查询| + ## 标志 |名称,速记|描述| From bcb1d7b53a02a7800cad1a464298d79b6a1fc544 Mon Sep 17 00:00:00 2001 From: zhangyelong Date: Mon, 26 Nov 2018 13:42:11 +0800 Subject: [PATCH 11/18] IRISHUB-821 IRISHUB-822 Document i18n config --- docs/.vuepress/config.js | 426 ++++++++++++++---------- docs/get-started/Download-Rainbow.md | 2 +- docs/introduction/README.md | 51 ++- docs/introduction/irisnet-intro.md | 51 --- docs/light-client/README.md | 4 +- docs/resources/whitepaper-kr.md | 2 +- docs/software/README.md | 0 docs/zh/get-started/Download-Rainbow.md | 2 +- docs/zh/introduction/README.md | 51 ++- docs/zh/introduction/irisnet-intro.md | 51 --- docs/zh/light-client/README.md | 4 +- docs/zh/software/README.md | 0 12 files changed, 348 insertions(+), 296 deletions(-) delete mode 100644 docs/introduction/irisnet-intro.md delete mode 100644 docs/software/README.md delete mode 100644 docs/zh/introduction/irisnet-intro.md delete mode 100644 docs/zh/software/README.md diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 2ed13bd45..3b158db89 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -1,186 +1,258 @@ module.exports = { - title: 'IRISnet Document', - description: '', base: "/docs/", + locales: { + '/': { + lang: 'English', + title: 'IRISnet Document' + }, + '/zh/': { + lang: '简体中文', + title: 'IRISnet 文档' + } + }, themeConfig: { displayAllHeaders: false, - nav: [ - {text: 'Back to IRISnet', link: 'https://www.irisnet.org'}, - {text: 'Introduction', link: '/introduction/'}, - {text: 'Software', link: '/software/'}, - {text: 'Getting Started', link: '/get-started/'}, - {text: 'Features', link: '/features/'}, - {text: 'CLI Client', link: '/cli-client/'}, - {text: 'Light Client', link: '/light-client/'}, - {text: 'Resources', link: '/resources/'}, - ], - sidebar: { - '/introduction/': [{ - title: 'The IRIS Hub', - collapsable: false, - children: [ - 'The-IRIS-Hub/Proof-of-Stake.md', - 'The-IRIS-Hub/IRIS-Tokens.md', - 'The-IRIS-Hub/Validators.md', - 'The-IRIS-Hub/Delegators.md' - ] - }, - { - title: 'The IRIS Service', - collapsable: false, - children: [ - 'The-IRIS-Service/Lifecycle.md', - 'The-IRIS-Service/Providers.md', - 'The-IRIS-Service/Consumers.md', - ] - }, - { - title: 'The IRIS Network', - collapsable: false, - children: [ - 'The-IRIS-Network/' + locales: { + '/': { + selectText: 'Languages', + nav: [ + {text: 'Back to IRISnet', link: 'https://www.irisnet.org'}, + {text: 'Introduction', link: '/introduction/'}, + {text: 'Software', link: '/software/node.md'}, + {text: 'Getting Started', link: '/get-started/'}, + {text: 'Features', link: '/features/basic-concepts/coin-type.md'}, + {text: 'CLI Client', link: '/cli-client/'}, + {text: 'Light Client', link: '/light-client/'}, + {text: 'Resources', link: '/resources/'} + ], + sidebar: { + '/software/': [ + ['node.md', 'Node'], + ['cli-client.md', 'CLI Client'], + ['light-client.md', 'Light Client'], + ['monitor.md', 'Monitor'] + ], + '/get-started/': [ + ['Download-Rainbow.md', 'Download Rainbow'], + ['Install-the-Software.md', 'Install the Software'], + ['Join-the-Testnet.md', 'Join the Testnet'] + ], + '/features/': [{ + title: 'Basic Concepts', + collapsable: false, + children: [ + ["basic-concepts/coin-type.md", 'Coin Type'], + ["basic-concepts/fee.md", 'Fee'], + ["basic-concepts/inflation.md", 'Infation'], + ["basic-concepts/bech32-prefix.md", 'Bech32 Prefix'], + ["basic-concepts/genesis-file.md", 'Genesis File'], + ["basic-concepts/gov-params.md", 'Gov Params'] + ] + },{ + title: 'Modules', + collapsable: false, + children: [ + ['bank.md', 'Bank'], + ['stake.md', 'Stake'], + ['service.md', 'Service'], + ['record.md', 'Record'], + ['governance.md', 'Governance'], + ['upgrade.md', 'Upgrade'], + ['distribution.md', 'Distribution'], + ] + }], + '/cli-client/': [{ + title: 'Status', + collapsable: false, + children: [ + ['status/', 'iriscli status'] + ] + }, + { + title: 'Tendermint', + collapsable: false, + children: [ + ['tendermint/', 'iriscli tendermint'] + ] + }, + { + title: 'Keys', + collapsable: false, + children: [ + ['keys/', 'iriscli keys'] + ] + }, + { + title: 'Bank', + collapsable: false, + children: [ + ['bank/', 'iriscli bank'] + ] + }, + { + title: 'Stake', + collapsable: false, + children: [ + ['stake/', 'iriscli stake'] + ] + }, + { + title: 'Gov', + collapsable: false, + children: [ + ['gov/', 'iriscli gov'] + ] + }, + { + title: 'Record', + collapsable: false, + children: [ + ['record/', 'iriscli record'] + ] + }, + { + title: 'Upgrade', + collapsable: false, + children: [ + ['upgrade/', 'iriscli upgrade'] + ] + }, + { + title: 'Service', + collapsable: false, + children: [ + ['service/', 'iriscli service'] + ] + }], + '/resources/': [ + ['validator-faq.md', 'Validator FAQ'], + ['delegator-faq.md', 'Delegator FAQ'], + ['whitepaper-zh.md', 'Whitepaper ZH'], + ['whitepaper-en.md', 'Whitepaper EN'], + ['whitepaper-kr.md', 'Whitepaper KR'] ] - }], - '/software/': [ - { - title: 'Node', - collapsable: false, - children: [ - ['node.md', 'Node'] - ] - }, { - title: 'CLI Client', - collapsable: false, - children: [ - ['cli-client.md', 'CLI Client'] - ] - }, { - title: 'Light Client', - collapsable: false, - children: [ - ['light-client.md', 'Light Client'] - ] - }, { - title: 'Monitor', - collapsable: false, - children: [ - ['monitor.md', 'Monitor'] - ] - }], - '/get-started/': [{ - title: 'Getting Started', - collapsable: false, - children: [ - ['Download-Rainbow.md', 'Download Rainbow'], - ['Install-the-Software.md', 'Install the Software'], - ['Join-the-Testnet.md', 'Join the Testnet'] - ] - }], - '/features/': [{ - title: 'Basic Concepts', - collapsable: false, - children: [ - ["basic-concepts/coin-type.md", 'Coin Type'], - ["basic-concepts/fee.md", 'Fee'], - ["basic-concepts/inflation.md", 'Infation'], - ["basic-concepts/bech32-prefix.md", 'Bech32 Prefix'], - ["basic-concepts/genesis-file.md", 'Genesis File'], - ["basic-concepts/gov-params.md", 'Gov Params'] - ] - },{ - title: 'Modules', - collapsable: false, - children: [ - ['bank.md', 'Bank'], - ['stake.md', 'Stake'], - ['service.md', 'Service'], - ['record.md', 'Record'], - ['governance.md', 'Governance'], - ['upgrade.md', 'Upgrade'], - ['distribution.md', 'Distribution'], - ] - }], - '/cli-client/': [{ - title: 'Status', - collapsable: false, - children: [ - ['status/', 'iriscli status'] - ] + } }, - { - title: 'Tendermint', - collapsable: false, - children: [ - ['tendermint/', 'iriscli tendermint'] - ] - }, - { - title: 'Keys', - collapsable: false, - children: [ - ['keys/', 'iriscli keys'] - ] - }, - { - title: 'Bank', - collapsable: false, - children: [ - ['bank/', 'iriscli bank'] - ] - }, - { - title: 'Stake', - collapsable: false, - children: [ - ['stake/', 'iriscli stake'] - ] - }, - { - title: 'Gov', - collapsable: false, - children: [ - ['gov/', 'iriscli gov'] - ] - }, - { - title: 'Record', - collapsable: false, - children: [ - ['record/', 'iriscli record'] - ] - }, - { - title: 'Upgrade', - collapsable: false, - children: [ - ['upgrade/', 'iriscli upgrade'] - ] - }, - { - title: 'Service', - collapsable: false, - children: [ - ['service/', 'iriscli service'] + '/zh/': { + selectText: '选择语言', + nav: [ + {text: '返回官网', link: 'https://www.irisnet.org'}, + {text: '简介', link: '/zh/introduction/'}, + {text: '软件', link: '/zh/software/node.md'}, + {text: '开始', link: '/zh/get-started/'}, + {text: '功能', link: '/zh/features/basic-concepts/coin-type.md'}, + {text: '命令行', link: '/zh/cli-client/'}, + {text: '轻客户端', link: '/zh/light-client/'}, + {text: '资源', link: '/zh/resources/'} + ], + sidebar: { + '/zh/software/': [ + ['node.md', 'Node'], + ['cli-client.md', 'CLI Client'], + ['light-client.md', 'Light Client'], + ['monitor.md', 'Monitor'] + ], + '/zh/get-started/': [ + ['Download-Rainbow.md', 'Download Rainbow'], + ['Install-the-Software.md', 'Install the Software'], + ['Join-the-Testnet.md', 'Join the Testnet'] + ], + '/zh/features/': [{ + title: 'Basic Concepts', + collapsable: false, + children: [ + ["basic-concepts/coin-type.md", 'Coin Type'], + ["basic-concepts/fee.md", 'Fee'], + ["basic-concepts/inflation.md", 'Infation'], + ["basic-concepts/bech32-prefix.md", 'Bech32 Prefix'], + ["basic-concepts/genesis-file.md", 'Genesis File'], + ["basic-concepts/gov-params.md", 'Gov Params'] + ] + },{ + title: 'Modules', + collapsable: false, + children: [ + ['bank.md', 'Bank'], + ['stake.md', 'Stake'], + ['service.md', 'Service'], + ['record.md', 'Record'], + ['governance.md', 'Governance'], + ['upgrade.md', 'Upgrade'], + ['distribution.md', 'Distribution'], + ] + }], + '/zh/cli-client/': [{ + title: 'Status', + collapsable: false, + children: [ + ['status/', 'iriscli status'] + ] + }, + { + title: 'Tendermint', + collapsable: false, + children: [ + ['tendermint/', 'iriscli tendermint'] + ] + }, + { + title: 'Keys', + collapsable: false, + children: [ + ['keys/', 'iriscli keys'] + ] + }, + { + title: 'Bank', + collapsable: false, + children: [ + ['bank/', 'iriscli bank'] + ] + }, + { + title: 'Stake', + collapsable: false, + children: [ + ['stake/', 'iriscli stake'] + ] + }, + { + title: 'Gov', + collapsable: false, + children: [ + ['gov/', 'iriscli gov'] + ] + }, + { + title: 'Record', + collapsable: false, + children: [ + ['record/', 'iriscli record'] + ] + }, + { + title: 'Upgrade', + collapsable: false, + children: [ + ['upgrade/', 'iriscli upgrade'] + ] + }, + { + title: 'Service', + collapsable: false, + children: [ + ['service/', 'iriscli service'] + ] + }], + '/zh/resources/': [ + ['validator-faq.md', 'Validator FAQ'], + ['delegator-faq.md', 'Delegator FAQ'], + ['whitepaper-zh.md', 'Whitepaper ZH'], + ['whitepaper-en.md', 'Whitepaper EN'], + ['whitepaper-kr.md', 'Whitepaper KR'] ] - }], - '/light-client/': [{ - title: 'Light Client', - collapsable: false, - children: [ - ['', 'Light Client'] - ] - }], - '/resources/': [{ - title: 'Resources', - collapsable: false, - children: [ - ['validator-faq.md', 'Validator FAQ'], - ['delegator-faq.md', 'Delegator FAQ'], - ['whitepaper-zh.md', 'Whitepaper ZH'], - ['whitepaper-en.md', 'Whitepaper EN'], - ['whitepaper-kr.md', 'Whitepaper KR'], - ] - }] + } + } } } -} \ No newline at end of file +} diff --git a/docs/get-started/Download-Rainbow.md b/docs/get-started/Download-Rainbow.md index 06f225a0b..17b712953 100644 --- a/docs/get-started/Download-Rainbow.md +++ b/docs/get-started/Download-Rainbow.md @@ -5,4 +5,4 @@ First IRISnet mobile client that supports cross-chain multi-asset transfers and iServices consumption -https://www.rainbow.one \ No newline at end of file +Website: [https://www.rainbow.one](https://www.rainbow.one) diff --git a/docs/introduction/README.md b/docs/introduction/README.md index 016d82cd6..b3ee22510 100644 --- a/docs/introduction/README.md +++ b/docs/introduction/README.md @@ -1,10 +1,51 @@ -# Introduction +# IRIS Network -## IRIS Network +The IRIS network is an internet of blockchains intended to provide a technology foundation that facilitates construction of distributed business applications. -## IRIS Hub +![Figure of IRIS Network](https://github.com/irisnet/irisnet/blob/master/images/chap2-1.png?raw=true) -## IRIS Tokens +The IRIS network is part of the larger Cosmos network -- all zones in the network would be able to interact with any other zone in the Cosmos network over the standard IBC protocol. By introducing a layer of service semantics into the network, we are going to provide an innovative solution that enables a whole new set of business scenarios, which would result in an increase in scale and diversity of the Cosmos network. -## IRIS Services +# IRIS Hub +At the "center" of the IRIS network is a blockchain known as the *IRIS Hub*, which is a Proof-of-Stake (PoS) blockchain built on Cosmos SDK and Tendermint. It will be the first regional hub that connects to the Cosmos Hub as one of its zones. The IRIS hub is equipped with a service protocol that coordinates on-chain transaction processing with off-chain data processing and business logic execution. We have also enhanced the IBC protocol to facilitate cross-chain invocation of those off-chain services, if so desired. + +The service protocol and enhanced IBC protocol could eventually be contributed back into Cosmos SDK, allowing SDK users to develop blockchains that are compatible with the IRIS network. + +Client-facing, programming language specific SDKs will also be available to make it easy to provide and consume off-chain services within the IRIS network. + +# IRIS Tokens + +The IRIS hub has its own native token known as *IRIS*. It is designed to serve three purposes in the network. + +* **Staking.** Similar to the ATOM token in the Cosmos Hub, the IRIS token will be used as a staking token to secure the PoS blockchain. + +* **Transaction Fee.** The IRIS token will also be used to pay fees for all transactions in the IRIS network. + +* **Service Fee.** It is required that service providers in the IRIS network charge service fees denominated in the IRIS token. + +It is intended that the IRIS network will eventually support all whitelisted fee tokens from the Cosmos network, which can be used to pay the transaction fees and service fees. + +# IRIS Services + +*IRIS Services* (a.k.a. "iServices") are introduced to bridge the gap between the blockchain world and the conventional business application world, mediating the complete lifecycle of off-chain services -- from their definition, binding (provider registration), invocation, to their governance (profiling and arbitration). + +## Lifecycle + +* **Definition.** Definition of what an off-chain iService can do in terms of an Interface Definition Language (IDL) file. + +* **Binding.** Declaration of the location (address), pricing and QoS of a provider endpoint that implements a given iService definition. + +* **Invocation.** Handling of consumer requests to and provider responses from a given iService provider endpoint. + +## Providers +*Providers* are network users who offer the implementation of one or more iService definitions and often act as *adaptors* of off-chain services and resources located in other public and consortium chains, as well as in enterprise legacy systems. Providers monitor and process incoming requests and send responses back to the network. A provider could at the same time act as a consumer by sending requests to other providers. As planned, providers would be required to charge a fee for any services they might offer, and the service fee, by default, would be priced in the IRIS token. + +## Consumers +*Consumers* are those users who consume iServices by sending requests to designated provider endpoints and receiving responses from providers in question. + +## Profilers +*Profilers* are special consumers who act on behalf of the IRIS Foundation Limited, a Hong Kong incorporated company limited by guarantee that takes the lead in building the IRIS network. Profilers are the sole users authorized to invoke iServices in the *profiling mode*, which is intended to help create and maintain objective provider profiles that consumers refer to for provider screening. + +## Arbitrators +*Arbitrators* are self-declared users who, working collectively, arbitrate consumer complaints against provider performance. The details about the arbitration mechanism are being actively worked on, please keep an eye on our [whitepaper](../resources/whitepaper-en.md). diff --git a/docs/introduction/irisnet-intro.md b/docs/introduction/irisnet-intro.md deleted file mode 100644 index 1a4821d93..000000000 --- a/docs/introduction/irisnet-intro.md +++ /dev/null @@ -1,51 +0,0 @@ -# IRIS Network - -The IRIS network is an internet of blockchains intended to provide a technology foundation that facilitates construction of distributed business applications. - -![Figure of IRIS Network](https://github.com/irisnet/irisnet/blob/master/images/chap2-1.png?raw=true) - -The IRIS network is part of the larger Cosmos network -- all zones in the network would be able to interact with any other zone in the Cosmos network over the standard IBC protocol. By introducing a layer of service semantics into the network, we are going to provide an innovative solution that enables a whole new set of business scenarios, which would result in an increase in scale and diversity of the Cosmos network. - -# IRIS Hub - -At the "center" of the IRIS network is a blockchain known as the *IRIS Hub*, which is a Proof-of-Stake (PoS) blockchain built on Cosmos SDK and Tendermint. It will be the first regional hub that connects to the Cosmos Hub as one of its zones. The IRIS hub is equipped with a service protocol that coordinates on-chain transaction processing with off-chain data processing and business logic execution. We have also enhanced the IBC protocol to facilitate cross-chain invocation of those off-chain services, if so desired. - -The service protocol and enhanced IBC protocol could eventually be contributed back into Cosmos SDK, allowing SDK users to develop blockchains that are compatible with the IRIS network. - -Client-facing, programming language specific SDKs will also be available to make it easy to provide and consume off-chain services within the IRIS network. - -# IRIS Tokens - -The IRIS hub has its own native token known as *IRIS*. It is designed to serve three purposes in the network. - -* **Staking.** Similar to the ATOM token in the Cosmos Hub, the IRIS token will be used as a staking token to secure the PoS blockchain. - -* **Transaction Fee.** The IRIS token will also be used to pay fees for all transactions in the IRIS network. - -* **Service Fee.** It is required that service providers in the IRIS network charge service fees denominated in the IRIS token. - -It is intended that the IRIS network will eventually support all whitelisted fee tokens from the Cosmos network, which can be used to pay the transaction fees and service fees. - -# IRIS Services - -*IRIS Services* (a.k.a. "iServices") are introduced to bridge the gap between the blockchain world and the conventional business application world, mediating the complete lifecycle of off-chain services -- from their definition, binding (provider registration), invocation, to their governance (profiling and arbitration). - -## Lifecycle - -* **Definition.** Definition of what an off-chain iService can do in terms of an Interface Definition Language (IDL) file. - -* **Binding.** Declaration of the location (address), pricing and QoS of a provider endpoint that implements a given iService definition. - -* **Invocation.** Handling of consumer requests to and provider responses from a given iService provider endpoint. - -## Providers -*Providers* are network users who offer the implementation of one or more iService definitions and often act as *adaptors* of off-chain services and resources located in other public and consortium chains, as well as in enterprise legacy systems. Providers monitor and process incoming requests and send responses back to the network. A provider could at the same time act as a consumer by sending requests to other providers. As planned, providers would be required to charge a fee for any services they might offer, and the service fee, by default, would be priced in the IRIS token. - -## Consumers -*Consumers* are those users who consume iServices by sending requests to designated provider endpoints and receiving responses from providers in question. - -## Profilers -*Profilers* are special consumers who act on behalf of the IRIS Foundation Limited, a Hong Kong incorporated company limited by guarantee that takes the lead in building the IRIS network. Profilers are the sole users authorized to invoke iServices in the *profiling mode*, which is intended to help create and maintain objective provider profiles that consumers refer to for provider screening. - -## Arbitrators -*Arbitrators* are self-declared users who, working collectively, arbitrate consumer complaints against provider performance. The details about the arbitration mechanism are being actively worked on, please keep an eye on our [whitepaper](resources/whitepaper-en.md). diff --git a/docs/light-client/README.md b/docs/light-client/README.md index 3af56333e..ce2e4aaef 100644 --- a/docs/light-client/README.md +++ b/docs/light-client/README.md @@ -12,7 +12,7 @@ IRISLCD has two subcommands: | subcommand | Description | Example command | | --------------- | --------------------------- | --------------- | | version | Print the IRISLCD version | irislcd version | -| start | Start a IRISLCD node | irislcd start --chain-id= | +| start | Start a IRISLCD node | irislcd start --chain-id=`` | `start` subcommand has these options: @@ -52,7 +52,7 @@ Once IRISLCD is started, you can open `localhost:1317/swagger-ui/` in your explo 7. `GET /txs/{hash}`: Get a Tx by hash 8. `GET /txs`: Search transactions 9. `POST /txs`: Broadcast Tx - + 2. Key management APIs 1. `GET /keys`: List of accounts stored locally diff --git a/docs/resources/whitepaper-kr.md b/docs/resources/whitepaper-kr.md index 1911a7c8e..7ea2a9335 100644 --- a/docs/resources/whitepaper-kr.md +++ b/docs/resources/whitepaper-kr.md @@ -1 +1 @@ -# IRIS \ No newline at end of file +*TODO* diff --git a/docs/software/README.md b/docs/software/README.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/docs/zh/get-started/Download-Rainbow.md b/docs/zh/get-started/Download-Rainbow.md index 1dd243942..fb05f2489 100644 --- a/docs/zh/get-started/Download-Rainbow.md +++ b/docs/zh/get-started/Download-Rainbow.md @@ -4,4 +4,4 @@ 第一个支持跨链多资产转移及服务消费的IRISnet移动客户端公测即将开启,敬请期待... -https://www.rainbow.one \ No newline at end of file +官网:[https://www.rainbow.one](https://www.rainbow.one) diff --git a/docs/zh/introduction/README.md b/docs/zh/introduction/README.md index 0b860d346..757e430f7 100644 --- a/docs/zh/introduction/README.md +++ b/docs/zh/introduction/README.md @@ -1,10 +1,51 @@ -# 简介 +# IRIS网络 -## IRIS网络 +IRIS网络是一个区块链互联网,它旨在提供便于构建分布式商业应用程序的技术基础。 -## IRIS枢纽 +![IRIS网络图](https://github.com/irisnet/irisnet/blob/master/images/chap2-1.png?raw=true) -## IRIS通证 +IRIS网络是更大的Cosmos网络的一部分 - 网络中所有分区都能够通过标准IBC协议与Cosmos网络中的任何其他分区进行交互。通过在网络中引入一层服务语义,我们将提供一种创新的解决方案,支持全新的业务场景,从而增加Cosmos网络的规模和多样性。 -## IRIS服务 +# IRIS枢纽 +在IRIS网络的“中心”是一个称为 *IRIS枢纽* 的区块链,它是一个基于Cosmos SDK和Tendermint构建的Proof-of-Stake(PoS)区块链。它将成为第一个连接Cosmos枢纽的地区级枢纽。IRIS枢纽配备了服务协议,该协议将链上的交易处理与链下的数据处理和业务逻辑执行进行协调。我们还增强了IBC协议,以促进那些链下服务在有需要的情况下被跨链调用。 + +服务协议和增强的IBC协议最终可以回馈到Cosmos SDK中,允许SDK用户开发与IRIS网络兼容的区块链。 + +我们也会提供面向客户的、针对特定编程语言的SDK,方便在IRIS网络内轻松提供和使用链下服务。 + +# IRIS通证 + +IRIS枢纽有自己的原生通证,称为 *IRIS*。它旨在为网络中的三个目的服务。 + +* **Staking。** 与Cosmos Hub中的ATOM通证类似,IRIS通证将用作Staking通证以保护PoS区块链的安全运行。 + +* **交易费用。** IRIS通证也将用于支付IRIS网络中所有交易的费用。 + +* **服务费。** IRIS网络中的服务提供者需要以IRIS通证为单位收取服务费。 + +IRIS网络最终将支持来自Cosmos网络的所有列入白名单的费用通证,它们可用于支付交易费用和服务费用。 + +# IRIS服务 + +引入 *IRIS服务*(又名“iServices”)的目标是弥合区块链世界与传统商业应用世界之间的鸿沟,居中协调链下服务的整个生命周期 - 从定义,绑定(提供者注册),调用,直到它们的治理(描画和仲裁)。 + +## 生命周期 + +* **定义。** 根据接口定义语言(IDL)文件定义链下iService可以做什么。 + +* **绑定。** 声明实现给​​定iService定义的提供者端点的位置(地址),定价和服务质量。 + +* **调用。** 处理针对给定iService提供者端点的消费者请求以及相应的提供者响应。 + +## 提供者 +*提供者* 是提供一个或多个iService定义实现的网络用户,通常充当位于其他公有链、联盟链以及企业现有系统中的链下服务和资源的 *适配器*。它们监听和处理传入的请求,并将响应发送回网络。提供者可以通过向其他提供者发送请求来同时充当消费者。按照计划,提供者将被要求为他们可能提供的服务收取费用,默认情况下,服务费将以IRIS通证定价。 + +## 消费者 +*消费者* 是那些使用iServices的用户,他们向指定的提供者端点发送请求并接收相关提供者的响应。 + +## 描画者 +*描画者* 是代表IRIS基金会行动的特殊消费者,作为注册在香港的非盈利机构,IRIS基金会牵头推进IRIS网络的建设。描画者是仅有的被授权以 *描画模式* 调用iServices的用户,该模式旨在帮助创建和维护客观的提供者“画像”,便于消费者筛选提供者时参考。 + +## 仲裁员 +*仲裁员* 是自我声明的一类用户,他们通过协作为消费者对提供者绩效的投诉进行仲裁。有关仲裁机制的细节正在积极设计中,请关注我们的[白皮书](resources/whitepaper-zh.md)。 diff --git a/docs/zh/introduction/irisnet-intro.md b/docs/zh/introduction/irisnet-intro.md deleted file mode 100644 index 757e430f7..000000000 --- a/docs/zh/introduction/irisnet-intro.md +++ /dev/null @@ -1,51 +0,0 @@ -# IRIS网络 - -IRIS网络是一个区块链互联网,它旨在提供便于构建分布式商业应用程序的技术基础。 - -![IRIS网络图](https://github.com/irisnet/irisnet/blob/master/images/chap2-1.png?raw=true) - -IRIS网络是更大的Cosmos网络的一部分 - 网络中所有分区都能够通过标准IBC协议与Cosmos网络中的任何其他分区进行交互。通过在网络中引入一层服务语义,我们将提供一种创新的解决方案,支持全新的业务场景,从而增加Cosmos网络的规模和多样性。 - -# IRIS枢纽 - -在IRIS网络的“中心”是一个称为 *IRIS枢纽* 的区块链,它是一个基于Cosmos SDK和Tendermint构建的Proof-of-Stake(PoS)区块链。它将成为第一个连接Cosmos枢纽的地区级枢纽。IRIS枢纽配备了服务协议,该协议将链上的交易处理与链下的数据处理和业务逻辑执行进行协调。我们还增强了IBC协议,以促进那些链下服务在有需要的情况下被跨链调用。 - -服务协议和增强的IBC协议最终可以回馈到Cosmos SDK中,允许SDK用户开发与IRIS网络兼容的区块链。 - -我们也会提供面向客户的、针对特定编程语言的SDK,方便在IRIS网络内轻松提供和使用链下服务。 - -# IRIS通证 - -IRIS枢纽有自己的原生通证,称为 *IRIS*。它旨在为网络中的三个目的服务。 - -* **Staking。** 与Cosmos Hub中的ATOM通证类似,IRIS通证将用作Staking通证以保护PoS区块链的安全运行。 - -* **交易费用。** IRIS通证也将用于支付IRIS网络中所有交易的费用。 - -* **服务费。** IRIS网络中的服务提供者需要以IRIS通证为单位收取服务费。 - -IRIS网络最终将支持来自Cosmos网络的所有列入白名单的费用通证,它们可用于支付交易费用和服务费用。 - -# IRIS服务 - -引入 *IRIS服务*(又名“iServices”)的目标是弥合区块链世界与传统商业应用世界之间的鸿沟,居中协调链下服务的整个生命周期 - 从定义,绑定(提供者注册),调用,直到它们的治理(描画和仲裁)。 - -## 生命周期 - -* **定义。** 根据接口定义语言(IDL)文件定义链下iService可以做什么。 - -* **绑定。** 声明实现给​​定iService定义的提供者端点的位置(地址),定价和服务质量。 - -* **调用。** 处理针对给定iService提供者端点的消费者请求以及相应的提供者响应。 - -## 提供者 -*提供者* 是提供一个或多个iService定义实现的网络用户,通常充当位于其他公有链、联盟链以及企业现有系统中的链下服务和资源的 *适配器*。它们监听和处理传入的请求,并将响应发送回网络。提供者可以通过向其他提供者发送请求来同时充当消费者。按照计划,提供者将被要求为他们可能提供的服务收取费用,默认情况下,服务费将以IRIS通证定价。 - -## 消费者 -*消费者* 是那些使用iServices的用户,他们向指定的提供者端点发送请求并接收相关提供者的响应。 - -## 描画者 -*描画者* 是代表IRIS基金会行动的特殊消费者,作为注册在香港的非盈利机构,IRIS基金会牵头推进IRIS网络的建设。描画者是仅有的被授权以 *描画模式* 调用iServices的用户,该模式旨在帮助创建和维护客观的提供者“画像”,便于消费者筛选提供者时参考。 - -## 仲裁员 -*仲裁员* 是自我声明的一类用户,他们通过协作为消费者对提供者绩效的投诉进行仲裁。有关仲裁机制的细节正在积极设计中,请关注我们的[白皮书](resources/whitepaper-zh.md)。 diff --git a/docs/zh/light-client/README.md b/docs/zh/light-client/README.md index 323b218dd..f310433f3 100644 --- a/docs/zh/light-client/README.md +++ b/docs/zh/light-client/README.md @@ -12,7 +12,7 @@ IRISLCD有两个子命令: | 子命令 | 功能 | 示例命令 | | --------------- | --------------------------- | --------------- | | version | 打印版本信息 | irislcd version | -| start | 启动一个IRISLCD节点 | irislcd start --chain-id= | +| start | 启动一个IRISLCD节点 | irislcd start --chain-id=`` | `start`子命令有如下参数可配置 @@ -52,7 +52,7 @@ IRISLCD启动以后,您可以在浏览器中访问`localhost:1317/swagger-ui/` 7. `GET /txs/{hash}`: 通过交易hash查询交易 8. `GET /txs`: 搜索交易 9. `POST /txs`: 广播交易 - + 2. Key management模块的APIs 1. `GET /keys`: 列出所有本地的秘钥 diff --git a/docs/zh/software/README.md b/docs/zh/software/README.md deleted file mode 100644 index e69de29bb..000000000 From 217bdefed8989f684a4c9e813eb7bae3474f891a Mon Sep 17 00:00:00 2001 From: jiacheng Date: Mon, 26 Nov 2018 14:50:15 +0800 Subject: [PATCH 12/18] Rollback to v0.7.0 --- docs/cli-client/upgrade/query-switch.md | 6 +++--- docs/cli-client/upgrade/submit-switch.md | 2 +- docs/software/node.md | 5 ++++- docs/zh/cli-client/upgrade/query-switch.md | 6 +++--- docs/zh/cli-client/upgrade/submit-switch.md | 2 +- docs/zh/software/node.md | 5 ++++- 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/docs/cli-client/upgrade/query-switch.md b/docs/cli-client/upgrade/query-switch.md index 7889df017..8f8c00f6f 100644 --- a/docs/cli-client/upgrade/query-switch.md +++ b/docs/cli-client/upgrade/query-switch.md @@ -6,7 +6,7 @@ Query the switch information to know if someone have send the switch message for ## Usage ``` -iriscli upgrade query-switch --proposal-id --voter +iriscli upgrade query-switch --proposalID --voter ``` Print help messages: @@ -18,7 +18,7 @@ iriscli upgrade query-switch --help | Name, shorthand | Default | Description | Required | | --------------- | -------------------------- | ----------------------------------------------------------------- | -------- | -| --proposal-id | | proposalID of upgrade swtich being queried | Yes | +| --proposalID | | proposalID of upgrade swtich being queried | Yes | | --voter | | Address sign the switch msg | Yes | ## Example @@ -26,5 +26,5 @@ iriscli upgrade query-switch --help 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 +iriscli upgrade query-switch --proposalID=5 --voter=faa1qvt2r6hh9vyg3kh4tnwgx8wh0kpa7q2lsk03fe ``` diff --git a/docs/cli-client/upgrade/submit-switch.md b/docs/cli-client/upgrade/submit-switch.md index 2e55457ec..1fd129bc6 100644 --- a/docs/cli-client/upgrade/submit-switch.md +++ b/docs/cli-client/upgrade/submit-switch.md @@ -19,7 +19,7 @@ iriscli upgrade submit-switch --help | Name, shorthand | Default | Description | Required | | --------------- | --------- | ------------------------------------------------------------ | -------- | -| --proposal-id | | proposalID of upgrade proposal | Yes | +| --proposalID | | proposalID of upgrade proposal | Yes | | --title | | title of switch | | ## Examples diff --git a/docs/software/node.md b/docs/software/node.md index 8aac959f0..ecd5843eb 100644 --- a/docs/software/node.md +++ b/docs/software/node.md @@ -42,7 +42,10 @@ Manually modify the genesis.json file to assign the initial account balance to t { "address": "faa13t6jugwm5uu3h835s5d4zggkklz6rpns59keju", "coins": [ - "150iris" + { + "denom": "iris-atto", + "amount": "150000000000000000000" + } ], "sequence_number": "0", "account_number": "0" diff --git a/docs/zh/cli-client/upgrade/query-switch.md b/docs/zh/cli-client/upgrade/query-switch.md index a263c0e89..7a7154894 100644 --- a/docs/zh/cli-client/upgrade/query-switch.md +++ b/docs/zh/cli-client/upgrade/query-switch.md @@ -7,7 +7,7 @@ ## 用法 ``` -iriscli upgrade query-switch --proposal-id --voter +iriscli upgrade query-switch --proposalID --voter ``` 打印帮助信息: @@ -19,7 +19,7 @@ iriscli upgrade query-switch --help | 名称, 速记 | 默认值 | 描述 | 必需 | | --------------- | -------------------------- | ----------------------------------------------------------------- | -------- | -| --proposal-id | | 软件升级提议的ID | 是 | +| --proposalID | | 软件升级提议的ID | 是 | | --voter | | 签名switch消息的地址 | 是 | ## 例子 @@ -27,5 +27,5 @@ iriscli upgrade query-switch --help 查询用户`faa1qvt2r6hh9vyg3kh4tnwgx8wh0kpa7q2lsk03fe`是否对升级提议(ID为5)发送了switch消息 ``` -iriscli upgrade query-switch --proposal-id=5 --voter=faa1qvt2r6hh9vyg3kh4tnwgx8wh0kpa7q2lsk03fe +iriscli upgrade query-switch --proposalID=5 --voter=faa1qvt2r6hh9vyg3kh4tnwgx8wh0kpa7q2lsk03fe ``` diff --git a/docs/zh/cli-client/upgrade/submit-switch.md b/docs/zh/cli-client/upgrade/submit-switch.md index a1ef824bc..0dc51c6a2 100644 --- a/docs/zh/cli-client/upgrade/submit-switch.md +++ b/docs/zh/cli-client/upgrade/submit-switch.md @@ -18,7 +18,7 @@ iriscli upgrade submit-switch --help | 名称, 速记 | 默认值 | 描述 | 必需 | | --------------- | --------- | ------------------------------------------------------------ | -------- | -| --proposal-id | | 软件升级提议的ID | 是 | +| --proposalID | | 软件升级提议的ID | 是 | | --title | | switch消息对标题 | | ## 用例 diff --git a/docs/zh/software/node.md b/docs/zh/software/node.md index 47a8830d4..c2e2a9adf 100644 --- a/docs/zh/software/node.md +++ b/docs/zh/software/node.md @@ -42,7 +42,10 @@ iris gentx --name={account_name} --home={path_to_your_home} { "address": "faa13t6jugwm5uu3h835s5d4zggkklz6rpns59keju", "coins": [ - "150iris" + { + "denom": "iris-atto", + "amount": "150000000000000000000" + } ], "sequence_number": "0", "account_number": "0" From fd2c2f1751521d7316aed59538b4d4c2e37e83c1 Mon Sep 17 00:00:00 2001 From: jiacheng Date: Mon, 26 Nov 2018 15:03:42 +0800 Subject: [PATCH 13/18] add iriscli config docs --- docs/cli-client/README.md | 4 ++++ docs/zh/cli-client/README.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/cli-client/README.md b/docs/cli-client/README.md index b2d562167..202aa9b84 100644 --- a/docs/cli-client/README.md +++ b/docs/cli-client/README.md @@ -55,3 +55,7 @@ Each modules provides a set of command line interfaces. Here we sort these comma 9. [status command](./status/README.md) 10. [tendermint command](./tendermint/README.md) 11. [upgrade command](./upgrade/README.md) + +## iriscli config command + +The `iriscli config` command interactively configures some default parameters, such as chain-id, home, fee, and node. diff --git a/docs/zh/cli-client/README.md b/docs/zh/cli-client/README.md index e6889113b..ea3daeab6 100644 --- a/docs/zh/cli-client/README.md +++ b/docs/zh/cli-client/README.md @@ -54,3 +54,7 @@ 9. [status command](./status/README.md) 10. [tendermint command](./tendermint/README.md) 11. [upgrade command](./upgrade/README.md) + +## iriscli config命令 + +iriscli config命令可以交互式地配置一些默认参数,例如chain-id,home,fee 和 node。 From dd55dc4892a0cdd3cf5051ddeb220d9a19cca521 Mon Sep 17 00:00:00 2001 From: HaoyangLiu Date: Mon, 26 Nov 2018 19:42:18 +0800 Subject: [PATCH 14/18] fix bech32 prefix error in irismon --- cmd/iris/main.go | 7 +------ cmd/iriscli/main.go | 7 +------ cmd/irisdebug/main.go | 6 +----- cmd/irislcd/main.go | 8 +------- cmd/irismon/main.go | 2 ++ init/prefix.go | 14 +++++++++++++- 6 files changed, 19 insertions(+), 25 deletions(-) diff --git a/cmd/iris/main.go b/cmd/iris/main.go index abf7a6700..9f45ae51c 100644 --- a/cmd/iris/main.go +++ b/cmd/iris/main.go @@ -11,7 +11,6 @@ import ( bam "github.com/irisnet/irishub/baseapp" "github.com/irisnet/irishub/client" - sdk "github.com/cosmos/cosmos-sdk/types" irisInit "github.com/irisnet/irishub/init" "github.com/irisnet/irishub/version" "github.com/spf13/viper" @@ -24,11 +23,7 @@ import ( func main() { - config := sdk.GetConfig() - config.SetBech32PrefixForAccount(irisInit.Bech32PrefixAccAddr, irisInit.Bech32PrefixAccPub) - config.SetBech32PrefixForValidator(irisInit.Bech32PrefixValAddr, irisInit.Bech32PrefixValPub) - config.SetBech32PrefixForConsensusNode(irisInit.Bech32PrefixConsAddr, irisInit.Bech32PrefixConsPub) - config.Seal() + irisInit.InitBech32Prefix() cdc := app.MakeCodec() ctx := server.NewDefaultContext() diff --git a/cmd/iriscli/main.go b/cmd/iriscli/main.go index 7e520a805..02963243c 100644 --- a/cmd/iriscli/main.go +++ b/cmd/iriscli/main.go @@ -4,7 +4,6 @@ import ( "os" "path" - sdk "github.com/cosmos/cosmos-sdk/types" authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" "github.com/irisnet/irishub/app" "github.com/irisnet/irishub/client" @@ -36,11 +35,7 @@ var ( func main() { - config := sdk.GetConfig() - config.SetBech32PrefixForAccount(irisInit.Bech32PrefixAccAddr, irisInit.Bech32PrefixAccPub) - config.SetBech32PrefixForValidator(irisInit.Bech32PrefixValAddr, irisInit.Bech32PrefixValPub) - config.SetBech32PrefixForConsensusNode(irisInit.Bech32PrefixConsAddr, irisInit.Bech32PrefixConsPub) - config.Seal() + irisInit.InitBech32Prefix() cobra.EnableCommandSorting = false cdc := app.MakeCodec() diff --git a/cmd/irisdebug/main.go b/cmd/irisdebug/main.go index fbccde2aa..cc2c502a3 100644 --- a/cmd/irisdebug/main.go +++ b/cmd/irisdebug/main.go @@ -20,11 +20,7 @@ import ( ) func init() { - config := sdk.GetConfig() - config.SetBech32PrefixForAccount(irisInit.Bech32PrefixAccAddr, irisInit.Bech32PrefixAccPub) - config.SetBech32PrefixForValidator(irisInit.Bech32PrefixValAddr, irisInit.Bech32PrefixValPub) - config.SetBech32PrefixForConsensusNode(irisInit.Bech32PrefixConsAddr, irisInit.Bech32PrefixConsPub) - config.Seal() + irisInit.InitBech32Prefix() rootCmd.AddCommand(txCmd) rootCmd.AddCommand(pubkeyCmd) diff --git a/cmd/irislcd/main.go b/cmd/irislcd/main.go index 7116f8668..7a3b9591d 100644 --- a/cmd/irislcd/main.go +++ b/cmd/irislcd/main.go @@ -1,7 +1,6 @@ package main import ( - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/irisnet/irishub/app" "github.com/irisnet/irishub/client/lcd" _ "github.com/irisnet/irishub/client/lcd/statik" @@ -21,12 +20,7 @@ var ( func main() { - config := sdk.GetConfig() - config.SetBech32PrefixForAccount(irisInit.Bech32PrefixAccAddr, irisInit.Bech32PrefixAccPub) - config.SetBech32PrefixForValidator(irisInit.Bech32PrefixValAddr, irisInit.Bech32PrefixValPub) - config.SetBech32PrefixForConsensusNode(irisInit.Bech32PrefixConsAddr, irisInit.Bech32PrefixConsPub) - config.Seal() - + irisInit.InitBech32Prefix() cobra.EnableCommandSorting = false cdc := app.MakeCodec() diff --git a/cmd/irismon/main.go b/cmd/irismon/main.go index bb100efd1..e090f1ae0 100644 --- a/cmd/irismon/main.go +++ b/cmd/irismon/main.go @@ -6,6 +6,7 @@ import ( "github.com/irisnet/irishub/tools/prometheus" "github.com/irisnet/irishub/app" "github.com/tendermint/tendermint/libs/cli" + irisInit "github.com/irisnet/irishub/init" ) func init() { @@ -18,6 +19,7 @@ func init() { var rootCmd *cobra.Command func main() { + irisInit.InitBech32Prefix() executor := cli.PrepareMainCmd(rootCmd, "IRIS", app.DefaultNodeHome) err := executor.Execute() if err != nil { diff --git a/init/prefix.go b/init/prefix.go index 3864afdd7..36d02ca92 100644 --- a/init/prefix.go +++ b/init/prefix.go @@ -1,5 +1,9 @@ package init +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + const ( // Bech32PrefixAccAddr defines the Bech32 prefix of an account's address Bech32PrefixAccAddr = "faa" @@ -13,4 +17,12 @@ const ( Bech32PrefixConsAddr = "fca" // Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key Bech32PrefixConsPub = "fcp" -) \ No newline at end of file +) + +func InitBech32Prefix() { + config := sdk.GetConfig() + config.SetBech32PrefixForAccount(Bech32PrefixAccAddr, Bech32PrefixAccPub) + config.SetBech32PrefixForValidator(Bech32PrefixValAddr, Bech32PrefixValPub) + config.SetBech32PrefixForConsensusNode(Bech32PrefixConsAddr, Bech32PrefixConsPub) + config.Seal() +} From a0ae11ac021524e5f8c795003ba6f4de2392e40e Mon Sep 17 00:00:00 2001 From: Raymond Date: Tue, 27 Nov 2018 10:16:26 +0800 Subject: [PATCH 15/18] release version 0.7.0 --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0695a848e..826022291 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,11 @@ ## 0.7.0 -*November 22th, 2018* +*November 27th, 2018* - Add broadcast command in bank -- Update iris.toml +- Impose upgrade proposal with restrictions +- Fix bech32 prefix error in irismon - Improve user documents ## 0.7.0-rc0 From 911b5a46e660336b93fad51b7ba64af80bece1db Mon Sep 17 00:00:00 2001 From: Raymond Date: Tue, 27 Nov 2018 11:18:08 +0800 Subject: [PATCH 16/18] update changelog for v0.7.0 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 826022291..15382ba8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ *November 27th, 2018* - Add broadcast command in bank -- Impose upgrade proposal with restrictions +- Impose governance proposal with restrictions - Fix bech32 prefix error in irismon - Improve user documents From 536c22e5a7b731dbe1b7e92b09028f7cf231dfcf Mon Sep 17 00:00:00 2001 From: zhjibi742626083 Date: Tue, 27 Nov 2018 11:37:43 +0800 Subject: [PATCH 17/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=A4=B4=E9=83=A8=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vuepress/override.styl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/.vuepress/override.styl diff --git a/docs/.vuepress/override.styl b/docs/.vuepress/override.styl new file mode 100644 index 000000000..92e33c381 --- /dev/null +++ b/docs/.vuepress/override.styl @@ -0,0 +1,15 @@ + +.navbar{ + min-width :1250px; +} +.navbar .links { + display : inline-block; + max-width : none!important; +} +.navbar .links .search-box.search-box{ + float : right; + margin-left :0.6rem; + } +.nav-links .nav-item{ + margin-left : 0.5rem; +} \ No newline at end of file From 752f79d59e0b5b782014d2658073686e7c6a2918 Mon Sep 17 00:00:00 2001 From: kidinamoto01 Date: Thu, 29 Nov 2018 10:12:22 +0800 Subject: [PATCH 18/18] fix the docs --- docs/get-started/Join-the-Testnet.md | 1 + docs/get-started/README.md | 1 + docs/get-started/Validator-Node.md | 30 ++++++++++++------------- docs/software/monitor.md | 6 ++--- docs/zh/get-started/Full-Node.md | 2 +- docs/zh/get-started/Join-the-Testnet.md | 13 ++++++----- docs/zh/get-started/README.md | 7 +++--- docs/zh/get-started/Validator-Node.md | 26 +++++++++------------ docs/zh/software/monitor.md | 6 ++--- 9 files changed, 46 insertions(+), 46 deletions(-) diff --git a/docs/get-started/Join-the-Testnet.md b/docs/get-started/Join-the-Testnet.md index f14ff42be..c6f311f90 100644 --- a/docs/get-started/Join-the-Testnet.md +++ b/docs/get-started/Join-the-Testnet.md @@ -39,6 +39,7 @@ A validator is under the risk of being attacked. You could follow this [guide](. ## Fuxi Incentivized Testnet IRIS foundation plans to reward all the testnet participants who took part in the testnet. In Fuxi-3001 testnet,the community members have finished the tasks and they will receive their rewards in genesis allocation. * Task List for Fuxi-4000: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-4000/README.md +* Results for Fuxi-4000 tasks: https://github.com/irisnet/testnets/issues/176 To get more people involved, IRIS foundation decides to send out more tasks in the latest iteration of testnet:Fuxi-5000. * Task List for Fuxi-5000: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-5000/README.md diff --git a/docs/get-started/README.md b/docs/get-started/README.md index f14ff42be..c6f311f90 100644 --- a/docs/get-started/README.md +++ b/docs/get-started/README.md @@ -39,6 +39,7 @@ A validator is under the risk of being attacked. You could follow this [guide](. ## Fuxi Incentivized Testnet IRIS foundation plans to reward all the testnet participants who took part in the testnet. In Fuxi-3001 testnet,the community members have finished the tasks and they will receive their rewards in genesis allocation. * Task List for Fuxi-4000: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-4000/README.md +* Results for Fuxi-4000 tasks: https://github.com/irisnet/testnets/issues/176 To get more people involved, IRIS foundation decides to send out more tasks in the latest iteration of testnet:Fuxi-5000. * Task List for Fuxi-5000: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-5000/README.md diff --git a/docs/get-started/Validator-Node.md b/docs/get-started/Validator-Node.md index f079481aa..dd443172b 100644 --- a/docs/get-started/Validator-Node.md +++ b/docs/get-started/Validator-Node.md @@ -57,34 +57,34 @@ You should also be able to see `catching_up` is `false`. You need to get the public key of your node before upgrade your node to a validator node. The public key of your node starts with `fvp`, it can be used to create a new validator by staking tokens. To understand more about the address encoding in IRISHub, -please read this [doc](Bech32-on-IRISnet.md) +please read this [doc](../features/basic-concepts/bech32-prefix.md) You can find your validator's pubkey by running: ``` -iris tendermint show_validator --home= +iris tendermint show-validator --home= ``` Example output: ``` -fvp1zcjduepqv7z2kgussh7ufe8e0prupwcm7l9jcn2fp90yeupaszmqjk73rjxq8yzw85 +fcp1zcjduepq9l2svsakh9946n42ljt0lxv0kpwrc4v9c2pnqhn9chnjmlvagansh7gfr7 ``` -Next, use the output as `` field for `iriscli stake create-validator` command: +Next, use the output as `` field for `iriscli stake create-validator` command following [this](../cli-client/stake/create-validator.md). : ``` -iriscli stake create-validator --amount=XXiris --pubkey= --moniker= --fee=0.05iris --gas=2000000 --chain-id=fuxi-4000 --node=http://localhost:26657 +iriscli stake create-validator --chain-id= --from= --fee=0.004iris --pubkey= --commission-max-change-rate=0.01 --commission-max-rate=0.2 --commission-rate=0.1 --amount=100iris --moniker= ``` Please note the **fee** can be the **decimal** of IRIS token, like `0.01iris`. And you could also use other coin-type like `iris-milli` -To read more about fee mechanism in IRISHub, go to this [doc](../modules/fee-token/Fee.md) +To read more about fee mechanism in IRISHub, go to this [doc](../) In this way, to stake 1IRIS, you need to do: ``` -iriscli stake create-validator --pubkey=pubkey --fee=0.05iris --gas=2000000 --from= --chain-id=fuxi-4000 --node=tcp://localhost:26657 --amount=1iris +iriscli stake create-validator --pubkey=pubkey --fee=0.05iris --gas=2000000 --from= --chain-id= --node=tcp://localhost:26657 --amount=1iris ``` -Don't forget the `fee` and `gas` field. To read more about coin-type in IRISHub, you should read [this](../zh/modules/coin/README.md) +Don't forget the `fee` and `gas` field. To read more about coin-type in IRISHub, you should read [this](../features/basic-concepts/coin-type.md) @@ -93,10 +93,10 @@ Don't forget the `fee` and `gas` field. To read more about coin-type in IRISHub View the validator's information with this command: ``` -iriscli stake validator --chain-id=fuxi-4000 --node=tcp://localhost:26657 +iriscli stake validator --chain-id= --node=tcp://localhost:26657 ``` -The `` is your account address that starts with 'faa1' +The `` is your account address that starts with 'fva1' ### Confirm Your Validator is Running @@ -112,22 +112,22 @@ You should also be able to see your power is above 0 if your bonded toke is in t ### Edit Validator Description -You can edit your validator's public description. This info is to identify your validator, and will be relied on by delegators to decide which validators to stake to. Make sure to provide input for every flag below, otherwise the field will default to empty (`--moniker`defaults to the machine name). +You can edit your validator's public description following [this](../cli-client/stake/edit-validator.md). This info is to identify your validator, and will be relied on by delegators to decide which validators to stake to. Make sure to provide input for every flag below, otherwise the field will default to empty (`--moniker`defaults to the machine name). You should put your name of your team in `details`. ``` -iriscli stake edit-validator --from= < name > --moniker="choose a moniker" --website="https://irisnet.org" --details="team" --chain-id=fuxi-4000 - --details="details"--node=tcp://localhost:26657 --fee=0.04iris --gas=2000000 +iriscli stake edit-validator --chain-id= --from= --fee=0.004iris --moniker= --details=
+ ``` ### View Validator Description View the validator's information with this command: ``` -iriscli stake validator --chain-id=fuxi-4000 +iriscli stake validator --chain-id= ``` ### Use IRISPlorer -You should also be able to see your validator on the [Explorer](https://testnet.irisplorer.io). You are looking for the `bech32` encoded `address` in the `~/.iris/config/priv_validator.json` file. +You should also be able to see your validator on the [Explorer](https://testnet.irisplorer.io). \ No newline at end of file diff --git a/docs/software/monitor.md b/docs/software/monitor.md index e1d5ed132..de5132826 100644 --- a/docs/software/monitor.md +++ b/docs/software/monitor.md @@ -8,7 +8,7 @@ Please refer to this [document](https://github.com/irisnet/irishub/blob/master/d ``` irismon --address=EAC535EC37EB3AE8D18C623BA4B4C8128BC082D2 \ --account-address=faa1nwpzlrs35nawthal6vz2rjr4k8xjvn7k8l63st \ ---chain-id=irishub-stage --node=http://localhost:26657 +--chain-id= --node=http://localhost:26657 ``` Parameters: @@ -29,11 +29,11 @@ You can visit [prometheus.yml](https://github.com/prometheus/prometheus/blob/mas Then edit `prometheus.yml` and add `jobs` : ```yaml - - job_name: fuxi-4000 + - job_name: fuxi-5000 static_configs: - targets: ['localhost:36660'] labels: - instance: fuxi-4000 + instance: fuxi-5000 ``` > Note:value of targets is ip:port which used by IRIS monitor diff --git a/docs/zh/get-started/Full-Node.md b/docs/zh/get-started/Full-Node.md index 405c08e9f..dbf312c48 100644 --- a/docs/zh/get-started/Full-Node.md +++ b/docs/zh/get-started/Full-Node.md @@ -84,7 +84,7 @@ kill -9 2. 重置iris ``` -iris unsafe_reset_all --home= +iris unsafe-reset-all --home= ``` 3. 重新启动 diff --git a/docs/zh/get-started/Join-the-Testnet.md b/docs/zh/get-started/Join-the-Testnet.md index 1450035cb..61057604a 100644 --- a/docs/zh/get-started/Join-the-Testnet.md +++ b/docs/zh/get-started/Join-the-Testnet.md @@ -8,7 +8,7 @@ IRIS Hub是在Cosmos生态中的区域性枢纽,提供iService服务 ### 第一步: 安装IRIShub -请根据以下[教程](Install-Iris.md) 在服务器上完成**Iris**的安装。 +请根据以下[教程](Install-the-Software.md) 在服务器上完成**Iris**的安装。 ### 第二步: 运行一个全节点 @@ -21,7 +21,7 @@ IRIS Hub是在Cosmos生态中的区域性枢纽,提供iService服务 ### 部署IRISHub Monitor监控 -请根据以下[链接](../tools/Deploy-IRIS-Monitor.md) 在服务器上部署一个Monitor监控。 +请根据以下[链接](../software/monitor.md) 在服务器上部署一个Monitor监控。 ### 如何成为一个验证人节点 @@ -34,18 +34,19 @@ IRIS Hub是在Cosmos生态中的区域性枢纽,提供iService服务 ### 部署哨兵节点 -验证人有遭受攻击的风险。你可以根据以下[教程](../validators/Setup-Sentry-Node.md)部署一个哨兵节点来保护验证人。 +验证人有遭受攻击的风险。你可以根据以下[教程](../software/sentry.md)部署一个哨兵节点来保护验证人。 ## Fuxi测试网激励计划 IRIS基金会通过推出测试网激励计划来鼓励更多的人加入到Fuxi测试网中。在Fuxi-3001中,很多社区成员完成了激励任务。 -Fuxi-4000 任务列表: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-4000/README.md +* Fuxi-4000 任务列表:https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-4000/README.md +* Fuxi-4000任务完成情况: https://github.com/irisnet/testnets/issues/176 -在Fuxi-4000测试网中, IRIS基金会决定推出更多的测试网激励计划。 +在Fuxi-5000测试网中, IRIS基金会决定推出更多的测试网激励计划。 -Fuxi-4000任务列表: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-5000/README_CN.md +Fuxi-5000任务列表: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-5000/README_CN.md ## 更多链接 diff --git a/docs/zh/get-started/README.md b/docs/zh/get-started/README.md index c3028d4a9..7fab5a487 100644 --- a/docs/zh/get-started/README.md +++ b/docs/zh/get-started/README.md @@ -40,12 +40,13 @@ IRIS Hub是在Cosmos生态中的区域性枢纽,提供iService服务 IRIS基金会通过推出测试网激励计划来鼓励更多的人加入到Fuxi测试网中。在Fuxi-3001中,很多社区成员完成了激励任务。 -Fuxi-4000 任务列表: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-4000/README.md +* Fuxi-4000 任务列表:https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-4000/README.md +* Fuxi-4000任务完成情况: https://github.com/irisnet/testnets/issues/176 -在Fuxi-4000测试网中, IRIS基金会决定推出更多的测试网激励计划。 +在Fuxi-5000测试网中, IRIS基金会决定推出更多的测试网激励计划。 -Fuxi-4000任务列表: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-5000/README_CN.md +* Fuxi-5000任务列表: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-5000/README_CN.md ## 更多链接 diff --git a/docs/zh/get-started/Validator-Node.md b/docs/zh/get-started/Validator-Node.md index d45a23218..8e421b4d6 100644 --- a/docs/zh/get-started/Validator-Node.md +++ b/docs/zh/get-started/Validator-Node.md @@ -1,6 +1,6 @@ # 运行一个验证人节点 -在配置验证人节点之前,请保证已经按照此[文档](Install-Iris.md)正确安装了**Iris** +在配置验证人节点之前,请保证已经按照此[文档](Install-the-Software.md)正确安装了**Iris** 在IRISHub枢纽中,验证人负责将交易打包并提交区块。成为一个验证人需要满足很多条件,不仅仅是技术和硬件上的投资。同时,因为只有在有限验证人的条件下,Tendermint才能发挥最大的作用。目前,我们将IRISHub枢纽的验证人上限定为100。也就是说只有前100个验证人能够获得奖励,而大部分IRIS持有者不会成为验证人而是通过委托的方式决定谁会成为验证人。 @@ -56,7 +56,7 @@ iriscli status --node=tcp://localhost:26657 ``` 若 `catching_up` 字段为 `false`那么你的节点就是同步的。 -你需要获取当前节点的公钥信息来执行以下操作,公钥信息以 `fvp`为首字节,想要了解更多的编码信息,请参考以下 [文档](Bech32-on-IRISnet.md) +你需要获取当前节点的公钥信息来执行以下操作,公钥信息以 `fvp`为首字节,想要了解更多的编码信息,请参考以下 [文档](../features/basic-concepts/bech32-prefix.md) 通过执行以下命令获得节点的公钥信息,公钥信息将以`fvp1`开头: @@ -65,19 +65,19 @@ iris tendermint show_validator --home= < IRIS-HOME > ``` 示例输出: ``` -fvp1zcjduepqv7z2kgussh7ufe8e0prupwcm7l9jcn2fp90yeupaszmqjk73rjxq8yzw85 +fcp1zcjduepq9l2svsakh9946n42ljt0lxv0kpwrc4v9c2pnqhn9chnjmlvagansh7gfr7 ``` 然后,使用以上输出作为`iriscli stake create-validator`命令的 `` 字段: ``` -iriscli stake create-validator --from= < name > --amount= < amount >iris --pubkey= < pubkey > --moniker= < moniker > --fee=0.05iris --gas=2000000 --chain-id=fuxi-4000 --node=http://localhost:26657 +iriscli stake create-validator --chain-id= --from= --fee=0.004iris --pubkey= --commission-max-change-rate=0.01 --commission-max-rate=0.2 --commission-rate=0.1 --amount=100iris --moniker= ``` -> 注意:**amount** 应为整数, **Fee** 字段可以使用小数,例如`0。01iris` 。 +> 注意:**amount** 应为整数, **Fee** 字段可以使用小数,例如`0.01iris` 。 -也就是说,如果你想要抵押1IRIS,你可以执行以下操作: +也就是说,如果你想要抵押100IRIS,你可以执行以下操作: ``` -iriscli stake create-validator --pubkey=pubkey --fee=0.04iris --gas=2000000 --from= < name > --chain-id=fuxi-4000 --node=tcp://localhost:26657 --amount=1iris +iriscli stake create-validator --chain-id= --from= --fee=0.004iris --pubkey= --commission-max-change-rate=0.01 --commission-max-rate=0.2 --commission-rate=0.1 --amount=100iris --moniker= ``` ### 查询验证人信息 @@ -85,10 +85,10 @@ iriscli stake create-validator --pubkey=pubkey --fee=0.04iris --gas=2000000 -- 你可以通过以下命令查询验证人的信息: ``` -iriscli stake validator < address-validator-operator > --chain-id=fuxi-4000 --node=tcp://localhost:26657 +iriscli stake validator {address-validator-operator} --chain-id={chain-id} --node=tcp://localhost:26657 ``` -请注意 `` 字段是以`faa1`为首字母。 +请注意 `{address-validator-operator}` 字段是以`fva1`为首字母。 ### 确认验证人是否在线 @@ -107,7 +107,7 @@ iriscli status --node=tcp://localhost:26657 你应该在`details`字段注明自定义的信息。 ``` -iriscli stake edit-validator --from= < name > --moniker="choose a moniker" --website="https://irisnet.org" --details="team" --chain-id=fuxi-4000 +iriscli stake edit-validator --from= {val-name} --moniker="choose a moniker" --website="https://irisnet.org" --details="team" --chain-id={chain-id} --details="details"--node=tcp://localhost:26657 --fee=0.04iris --gas=2000000 ``` ### 查询验证人信息 @@ -115,13 +115,9 @@ iriscli stake edit-validator --from= < name > --moniker="choose a moniker" --w 你可以通过以下命令查询验证人的信息: ``` -iriscli stake validator < address-validator-operator > --chain-id=fuxi-4000 +iriscli stake validator {address-validator-operator} --chain-id= ``` ### 使用浏览器:IRISPlorer 你可以通过[浏览器](https://testnet.irisplorer.io)确认验证人节点的运行状况。 - -### 部署IRISHub Monitor监控 - -请根据以下[链接](../../tools/Deploy-IRIS-Monitor.md) 部署一个Monitor监控验证人。 diff --git a/docs/zh/software/monitor.md b/docs/zh/software/monitor.md index 0edf5e241..6bf89c10b 100644 --- a/docs/zh/software/monitor.md +++ b/docs/zh/software/monitor.md @@ -10,7 +10,7 @@ ``` irismon --address=EAC535EC37EB3AE8D18C623BA4B4C8128BC082D2 \ --account-address=faa1nwpzlrs35nawthal6vz2rjr4k8xjvn7k8l63st \ ---chain-id=irishub-stage --node=http://localhost:36657 +--chain-id= --node=http://localhost:36657 ``` 参数说明: @@ -31,11 +31,11 @@ irismon --address=EAC535EC37EB3AE8D18C623BA4B4C8128BC082D2 \ 在配置文件 `prometheus.yml` 中添加以下 `jobs` : ```yaml - - job_name: fuxi-4000 + - job_name: fuxi-5000 static_configs: - targets: ['localhost:36660'] labels: - instance: fuxi-4000 + instance: fuxi-5000 ``` > Note:targets 配置项的值为 IRIS Monitor 启动后所占用的 ip 和 port。