Skip to content

Commit

Permalink
Merge pull request #1 from irisnet/release0.7
Browse files Browse the repository at this point in the history
Release0.7
  • Loading branch information
kidinamoto01 committed Nov 23, 2018
2 parents 0c26e63 + fec014a commit f7801e3
Show file tree
Hide file tree
Showing 13 changed files with 496 additions and 17 deletions.
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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*
Expand Down
8 changes: 4 additions & 4 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 6 additions & 6 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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
Expand Down
103 changes: 103 additions & 0 deletions docs/software/cli-client.md
Original file line number Diff line number Diff line change
@@ -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.


109 changes: 109 additions & 0 deletions docs/software/node.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@

# 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": [
{
"denom": "iris-atto",
"amount": "150000000000000000000"
}
],
"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`.
Loading

0 comments on commit f7801e3

Please sign in to comment.