Skip to content

Commit

Permalink
Update kms document
Browse files Browse the repository at this point in the history
  • Loading branch information
chengwenxi committed May 20, 2019
1 parent bd2c745 commit 5d9dc4d
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 159 deletions.
34 changes: 28 additions & 6 deletions docs/software/kms/kms.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

## What is a KMS?

Please refer to [kms](https://github.com/irisnet/kms).
Please refer to [kms](https://github.com/tendermint/kms).

## Building

Detailed build instructions can be found [here](https://github.com/irisnet/kms#installation).
Detailed build instructions can be found [here](https://github.com/tendermint/kms#installation).

::: tip
When compiling the KMS, ensure you have enabled the applicable features:
Expand All @@ -19,15 +19,37 @@ When compiling the KMS, ensure you have enabled the applicable features:

## Configuration

If you want to enable KMS, you need to edit `priv_validator_laddr` in your `~/.iris/config/config.toml` file first. E.g.:
[tendermint/kms](https://github.com/tendermint/kms) supports all blockchains built on [tendermint](https://github.com/tendermint/tendermint) consensus engine, including IRIShub.

If you want to enable KMS, you need to edit `priv_validator_laddr` in your `<iris_home>/config/config.toml` file first. E.g.:

```text
# TCP or UNIX socket address for Tendermint to listen on for
# connections from an external PrivValidator process
priv_validator_laddr = "localhost:26658"
```

The KMS provides different alternatives
You can download the [example config file](https://github.com/tendermint/kms/blob/master/tmkms.toml.example) with support for IRIShub, you just have to edit it as follows:

- Edit `addr` to point to your `iris` instance.
- Adjust `chain-id` to match your `<iris_home>/config/genesis.json` settings.
- Edit `auth` to authorize access to your yubihsm.
- Edit `keys` to determine which pubkey you will be using.

Then start tmkms:
```bash
tmkms start
```

A KMS can be configured in various ways:

### Using a YubiHSM
Detailed information on how to setup a KMS with YubiHSM2 can be found [here](https://github.com/tendermint/kms/blob/master/README.yubihsm.md).

If you want to import IRIShub private_key that already exists, you can:
```bash
tmkms yubihsm keys import <iris_home>/config/priv_validator.json -i <id>
```

- [Using a CPU-based signer](kms_cpu.md)
- [Using a YubiHSM](kms_yubihsm.md)
### Using a Ledger device running the Tendermint app
- [Using a Ledger device running the Tendermint Validator app](kms_ledger.md)
73 changes: 0 additions & 73 deletions docs/software/kms/kms_yubihsm.md

This file was deleted.

35 changes: 28 additions & 7 deletions docs/zh/software/kms/kms.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

## 什么是KMS?

请参阅[kms](https://github.com/irisnet/kms).
请参阅[kms](https://github.com/tendermint/kms).

## 构建

可以在[这里](https://github.com/irisnet/kms#installation)找到详细的构建说明。
可以在[这里](https://github.com/tendermint/kms#installation)找到详细的构建说明。

::: tip
在编译KMS的时候, 确保您已启用适用的功能
Expand All @@ -17,17 +17,38 @@
| YubiHSM | ```cargo build --features yubihsm``` |
| Ledger+Tendermint App | ```cargo build --features ledgertm``` |

## Configuration
## 配置

如果要启用KMS首先需要在`~/.iris/config/config.toml`文件中编辑`priv_validator_laddr`例如
[tendermint/kms](https://github.com/tendermint/kms)支持所有基于[tendermint](https://github.com/tendermint/tendermint)共识引擎构建的区块链,包括IRIShub。

如果要启用KMS首先需要在`<iris_home>/config/config.toml`文件中编辑`priv_validator_laddr`例如
```text
# TCP or UNIX socket address for Tendermint to listen on for
# connections from an external PrivValidator process
Priv_validator_laddr = "localhost:26658"
```

KMS提供了不同的选择
你可以下载[示例配置文件](https://github.com/tendermint/kms/blob/master/tmkms.toml.example),其中包含对IRIShub的支持,你只需要做如下修改:

- 编辑 `addr` 指向你的 `iris` 实例
- 调整 `chain-id` 以匹配你的 `<iris_home>/config/genesis.json` 设置
- 编辑 `auth` 以授权访问你的yubihsm
- 编辑 `keys` 确定您将使用哪个pubkey

然后启动tmkms:
```bash
tmkms start
```

KMS提供了多种选择

### 使用YubiHSM
有关如何使用YubiHSM2设置KMS的更多信息请参阅[此处](https://github.com/tendermint/kms/blob/master/README.yubihsm.md)。

如果要导入已存在的IRIShub private_key可以
```bash
tmkms yubihsm keys import <iris_home>/config/priv_validator.json -i <id>
```

- [Using a CPU-based signer](kms_cpu.md)
- [Using a YubiHSM](kms_yubihsm.md)
### 使用运行Tendermint app的ledger设备
- [Using a Ledger device running the Tendermint Validator app](kms_ledger.md)
73 changes: 0 additions & 73 deletions docs/zh/software/kms/kms_yubihsm.md

This file was deleted.

0 comments on commit 5d9dc4d

Please sign in to comment.