Skip to content

Commit

Permalink
Merge pull request irisnet#2 from kidinamoto01/master
Browse files Browse the repository at this point in the history
Add gentx instructions
  • Loading branch information
Haifeng Xi authored Feb 12, 2019
2 parents a74924f + 2b2ca7d commit 1be5c03
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fuxi-reward-claims/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ You could also use in-browser signing from <https://keybase.io/sign> to do this
5. Submit your signature

Save your signature in a file named as [github-user-name]-[keybase fingerprint].txt,
For example,GitHub user [irisnetvalidator](https://github.com/irisnetvalidator) , its keybase id is `6763B2C7947A9363`.
For example,GitHub user [irisnetvalidator](https://github.com/irisnetvalidator) , its keybase fingerprint is `6763B2C7947A9363`.
Its submission should be 'irisnetvalidator-6763B2C7947A9363.txt'.

Then, submit your file as 'claim file' under `sig-files` folder by PR.
Expand Down
2 changes: 1 addition & 1 deletion fuxi-reward-claims/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ keybase pgp sign -m "iaa1mmsm487rqkgktl2qgrjad0z3yaf9n8t5pkp33m"
5. 提交签名信息

你需要将以上返回内容保存早 [github-user-name]-[keybase fingerprint].txt,
例如,GitHub用户 [irisnetvalidator](https://github.com/irisnetvalidator) , 它的keybase id是 `6763B2C7947A9363`.
例如,GitHub用户 [irisnetvalidator](https://github.com/irisnetvalidator) , 它的keybase fingerprint `6763B2C7947A9363`.
因此,它的提交文件名应该是:'irisnetvalidator-6763B2C7947A9363.txt'.

然后请以PR的方式提交你的`claim file``sig-files`文件夹下.
Expand Down
48 changes: 47 additions & 1 deletion gentx/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
# Betanet gentx files
To be included in IRIS Betanet's genesis block, a validator operator must submit a gentx file under this folder. The file should be named as [betanet moniker]-[keybase fingerprint].gentx.

## Requirement

You must have follow this [doc](https://github.com/irisnet/irishub/blob/master/docs/get-started/Install-the-Software.md) to install the `mainnet` version of **Iris**.

## Step 1: Create your own account

First you need to create a account as the corresponding validator operator for yourself, you should use the address for
claiming [testnet rewards](https://github.com/irisnet/betanet/blob/master/fuxi-reward-claims/README.md)


## Step 2: Initialize your node

Initialize your node with `chain-id=irishub`. Please note that your monniker could be customized.

```bash
iris init --home={path_to_iris_home} --chain-id=irishub --moniker={node-name}
```

This command will create the genesis& config files in the home directory.


## Step 3: Execute `gentx` command

```bash
iris gentx --amount=XXXiris --home={path_to_iris_home} --name={key_name} --ip={sentry_node_ip}
```
This commond will generate the transaction in the directory:{path_to_iris_home}/config/gentx
Create the `CreateValidator` transaction and sign the transaction by the validator operator account you just created
The default commission data is:
* delegation amount: XXXiris
* commission rate: 0.1
* commission max rate: 0.2
* commission max change rate: 0.01

You could also change these metrics.

> Please note the amount is what you want to self-delegate, this amount could not be bigger than your balance in genesis file
> IP is your sentry node's public IP
## Step 4: Sumbit your gentx.json
Save your gentx file as [github-user-name]-[keybase fingerprint].json,
For example,GitHub user [irisnetvalidator](https://github.com/irisnetvalidator), its keybase fingerprint is `6763B2C7947A9363`.
Its submission should be 'irisnetvalidator-6763B2C7947A9363.json'.

Submit your json file to `https://github.com/irisnet/betanet/gentx/betanet-gentx` by creating a pull request.

After the team has verified all the gen-tx transactions, we will publish the final genesis file.
53 changes: 53 additions & 0 deletions gentx/README_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 参与Betanet的Genesis文件生成

## 前提条件

每个希望成为验证人的参与者确保按照以下[文档](https://github.com/irisnet/irishub/blob/master/docs/zh/get-started/Install-the-Software.md) 安装了mainnet版本的软件:**iris**


## Step 1: 创建账户


首先如果你没有现成的账户,或者忘记了原有账户的密码,那么你就需要为自己创建对应的验证人账户。该账户也是你用来[获取测试网奖励](https://github.com/irisnet/betanet/blob/master/fuxi-reward-claims/README_CN.md)的账户。


## Step 2: 初始化节点

初始化节点的`chain-id=irishub``moniker`字段可以自定义
```bash
iris init --home={path_to_iris_home} --chain-id=irishub --moniker=node-name
```
该命令会在home目录下创建相应genesis&config文件

## Step 3: 执行gentx交易

执行gentx交易,并使用刚才创建的验证人账户对交易进行签名
```bash
iris gentx --amount=XXXiris --home={path_to_iris_home} --name={key_name} --ip={sentry_node_ip}
```
这个命令将把交易的结果存储在如下目录:{path_to_your_home}/config/gentx
gentx包含一个签名后的 `CreateValidator` 交易,这个交易将为验证人设置如下默认参数:
* delegation amount: XXXiris
* commission rate: 0.1
* commission max rate: 0.2
* commission max change rate: 0.01

commission相关参数也可根据需要进行修改。

> 请注意此处的amount为self-delegate的数量, 该数目不应该大于你的账户在genesis文件中的账户余额
> 请把IP字段填为哨兵节点的IP
生成的gentx.json文件存放在目录下:{path_to_your_home}/config/gentx

## Step 4: 提交gentx文件

将上述提到的json文件保存为[github-user-name]-[keybase fingerprint].json

例如,GitHub用户 [irisnetvalidator](https://github.com/irisnetvalidator),它的keybase fingerprint是 `6763B2C7947A9363`.
因此,它的提交文件名应该是:'irisnetvalidator-6763B2C7947A9363.json'.


通过提交pull request将json文件提交到`https://github.com/irisnet/betanet/gentx/betanet-gentx` 目录下

在确认所有的gentx文件有效后,团队将公布最终的genesis文件

1 change: 1 addition & 0 deletions gentx/betanet-gentx/irisnetvalidator-6763B2C7947A9363.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type":"irishub/bank/StdTx","value":{"msg":[{"type":"irishub/stake/MsgCreateValidator","value":{"Description":{"moniker":"test","identity":"","website":"","details":""},"Commission":{"rate":"0.1000000000","max_rate":"0.2000000000","max_change_rate":"0.0100000000"},"delegator_address":"iaa125z8tnz9rekxfwjwtyaddjrfwswaym38yfrsl2","validator_address":"iva125z8tnz9rekxfwjwtyaddjrfwswaym383cflzd","pubkey":{"type":"tendermint/PubKeyEd25519","value":"ivIebNq4rhr5fhHc1dD/YYhOZdS5B1TR//yj6PfrmWo="},"delegation":{"denom":"iris-atto","amount":"10000000000000000000"}}}],"fee":{"amount":null,"gas":"20000"},"signatures":[{"pub_key":{"type":"tendermint/PubKeySecp256k1","value":"AwJoDpkz5q/+EDR7yVMwEIFR/jdtt+EDrAvx5KQrPvBc"},"signature":"HSvPC7frFkT0VQWwCrhMnFbys6lQVlQMauwq5ppgulA5ufzhYzmY7+1PmENyl12wwcRuhNg49AyZdEcThm2Zaw==","account_number":"0","sequence":"0"}],"memo":"[email protected]:26656"}}

0 comments on commit 1be5c03

Please sign in to comment.