Skip to content

Commit

Permalink
Chinese translation (#3098)
Browse files Browse the repository at this point in the history
* add: simplified Chinese translation
  • Loading branch information
aurexav authored and quentinlesceller committed Nov 26, 2019
1 parent f07a897 commit 0c6c464
Show file tree
Hide file tree
Showing 38 changed files with 537 additions and 88 deletions.
2 changes: 1 addition & 1 deletion doc/build.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Grin - Build, Configuration, and Running

*Read this in other languages: [Español](build_ES.md), [Korean](build_KR.md), [日本語](build_JP.md).*
*Read this in other languages: [Español](build_ES.md), [Korean](build_KR.md), [日本語](build_JP.md), [简体中文](build_ZH-CN.md).*

## Supported Platforms

Expand Down
2 changes: 2 additions & 0 deletions doc/build_ES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Grin - Compilación, configuración y ejecución

*Lea esto en otros idiomas: [English](build.md), [日本語](build_JP.md), [Korean](build_KR.md), [简体中文](build_ZH-CN.md).*

## Plataformas soportadas

En un largo plazo, es probable que la mayoría de las plataformas sean compatibles en cierta medida.
Expand Down
2 changes: 1 addition & 1 deletion doc/build_JP.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# grin - ビルド、設定、動作確認

*Read this in other languages: [Español](build_ES.md), [Korean](build_KR.md), [日本語](build_JP.md).*
*この文章を他の言語で読む: [English](build.md), [Español](build_ES.md), [Korean](build_KR.md), [简体中文](build_ZH-CN.md).*

## 動作環境

Expand Down
2 changes: 1 addition & 1 deletion doc/build_KR.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Grin - Build, Configuration, and Running

*다른 언어로 되어있는 문서를 읽으려면:[에스파냐어](build_ES.md).
*다른 언어로 되어있는 문서를 읽으려면: [English](build.md), [Español](build_ES.md), [日本語](build_JP.md), [简体中文](build_ZH-CN.md).*

## 지원하는 플랫폼들에 대해서

Expand Down
126 changes: 126 additions & 0 deletions doc/build_ZH-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Grin - 构建,配置和运行

*阅读其它语言版本: [English](build.md), [Español](build_ES.md), [日本語](build_JP.md), [Korean](build_KR.md).*

## 支持的平台

从长远来看,大多数平台都可能会得到一定程度的支持。Grin 的编写语言 `rust` 已为大多数平台建立了目标。

到目前为止进度:

* Linux x86\_64 and macOS [grin + 挖矿 + 部署]
* 暂时不支持 Windows 10 [部分 grin。暂时不支持挖矿。希望得到帮助!]

## 要求

* rust 1.34+ (使用 [rustup]((https://www.rustup.rs/))- i.e. `curl https://sh.rustup.rs -sSf | sh; source $HOME/.cargo/env`)
* 如果已经安装过了 rust,只需要运行 `rustup update` 升级版本
* clang
* ncurses 和 libs (ncurses, ncursesw5)
* zlib libs (zlib1g-dev or zlib-devel)
* pkg-config
* libssl-dev
* linux-headers (有报告指出在 Alpine linux 上是必需的)
* llvm

对于基于 Debian 的发行版(Debian,Ubuntu,Mint 等),一行就可以搞定(rust 的安装除外):

```sh
apt install build-essential cmake git libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev pkg-config libssl-dev llvm
```

macOS 用户:

```sh
xcode-select --install
brew install --with-toolchain llvm
brew install pkg-config
brew install openssl
```

## 构建步骤

```sh
git clone https://github.com/mimblewimble/grin.git
cd grin
cargo build --release
```

Grin也可以在 debug 模式下构建(不带 `--release` 参数,或是使用 `--debug``--verbose` 参数),但是由于加密的开销很大,这将影响快速同步的性能。

## 构建错误

详见 [故障排除](https://github.com/mimblewimble/docs/wiki/Troubleshooting)

## 构建得到了什么?

成功的构建可以提供给您:

* `target/release/grin` - grin 主要的二进制文件

默认情况下,grin 创建和使用的所有数据,配置和日志文件都位于隐藏的 `~/.grin` 目录中(位于用户主目录下)。
您可以通过编辑文件 `~/.grin/main/grin-server.toml` 来修改所有配置。

也可以让 grin 在当前目录中创建其数据文件。只需要运行

```sh
grin server config
```

它将在当前目录中生成一个 `grin-server.toml` 文件,该文件已预先配置为使用当前目录中的所有数据。
在包含 `grin-server.toml` 文件所在的目录下运行 grin 将使用该文件中的配置,而不是默认的 `~/.grin/main/grin-server.toml`

在测试时,将 grin 二进制文件放在您的 `PATH` 中,如下所示:

```sh
export PATH=`pwd`/target/release:$PATH
```

假设您从 Grin 安装的根目录运行。

然后您可以直接运行 `grin`(尝试使用 `grin help` 获得更多选项)。

## 配置

Grin 尝试使用合理的默认值运行,并且可以通过 `grin-server.toml` 文件进行进一步配置。
该文件是在首次运行时由 grin 生成的,并且包含有关每个可用选项的文档。

虽然建议您通过 `grin-server.toml` 配置 grin 服务器,但也可以提供命令行开关以覆盖文件中的任何设置。

有关 grin 命令及其开关的帮助,请尝试:

```sh
grin help
grin wallet --help
grin client --help
```

## Docker

```sh
docker build -t grin -f etc/Dockerfile .
```
对于 floonet, 使用 `etc/Dockerfile.floonet` 代替

您可以绑定安装您的 grin 缓存以在容器中运行。

```sh
docker run -it -d -v $HOME/.grin:/root/.grin grin
```
如果您更喜欢使用名为 volume 的 docker,则可以传递 `-v dotgrin: /root/.grin` 以替换。
使用命名卷在创建卷时会复制默认配置。

## 跨平台构建

Rust(cargo)可以在许多平台上构建 grin,因此从理论上讲,可以在低功耗设备上运行 `grin` 作为验证节点。要在 x86 Linux 平台上交叉编译 `grin` 并生成 ARM 二进制文件,例如,为一个 Raspberry Pi。

## 使用 grin

Wiki页面 [Wallet User Guide](https://github.com/mimblewimble/docs/wiki/Wallet-User-Guide) 和链接页面提供了有关我们提供的功能,故障排除等更多信息。

## 在 Grin 中挖矿

请注意,针对 Grin 的所有挖矿功能已移至一个名为 [grin-miner](https://github.com/mimblewimble/grin-miner) 的独立软件包中。
一旦您的 Grin 代码节点启动并运行,就可以通过针对正在运行的 Grin 节点构建并运行 grin-miner 开始挖矿。

为了使 grin-miner 能够与您的 grin 节点进行通信,请确保在您的 `grin-server.toml` 配置文件中有 `enable_stratum_server = true`,并且您正在运行钱包监听器(`grin wallet listen`)。
2 changes: 2 additions & 0 deletions doc/code_structure.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Grin code structure

*Read this in other languages: [简体中文](code_structure_ZH-CN.md).*

Grin is built in [Rust](https://www.rust-lang.org/), a memory safe, compiled language. Performance critical parts like the Cuckoo mining algorithm are built as plugins, making it easy to swap between algorithm implementations for various hardware. Grin comes with CPU and experimental GPU support.

## Files in project root
Expand Down
64 changes: 64 additions & 0 deletions doc/code_structure_ZH-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Grin 代码结构

*阅读其它语言版本: [English](code_structure.md).*

Grin 使用 [Rust]https://www.rust-lang.org/)编写,这是一个内存安全的编译语言。诸如 Cuckoo 挖掘算法之类的性能关键部分都是作为插件构建的,因此可以轻松地在各种硬件的算法实现之间进行交换。Grin 带有 CPU 和实验性 GPU 支持。

## 项目根目录中的文件

List of files tracked in `git` and some files you'll create when you use grin.
`git` 中跟踪的文件列表以及使用 grin 时将创建的一些文件。

- [CODE_OF_CONDUCT](../CODE_OF_CONDUCT.md) - 如果您想参与到其中,该做些什么。取自 rust,并稍作修改。
- [CONTRIBUTING](../CONTRIBUTING.md) - 如何帮助并参与其中成为 grin 的一部分。
- [Cargo.toml](../Cargo.toml) 和 Cargo.lock(本地创建,**在 git 中)- 定义如何编译和构建项目代码。
- [LICENSE](../LICENSE) - Apache 2.0 license
- [README](../README.md) - 您应该阅读的第一个文档,同时它列出了包含更多详细信息的进阶阅读。
- [rustfmt.toml](../rustfmt.toml) - rustfmt 的配置文件。在提交**代码之前需要。

## 文件夹结构

在检查了 grin,构建和使用之后,这些是您的文件夹将会有以下内容:

- `api`\
可通过 REST 访问的 ApiEndpoints 代码。
- `chain`\
区块链实现,接受一个块(请参阅 pipe.rs)并将其添加到链中,或拒绝它。
- `config`\
用于处理配置的代码。
- `core`\
所有核心类型:哈希,块,输入,输出,以及如何对其进行序列化。核心挖掘算法等。
- `doc`\
所有文档。
- `servers`\
grin 服务的许多组成部分(adapters, lib, miner, seed, server, sync, types),包括挖矿服务器。
- `keychain`\
Code for working safely with keys and doing blinding.
- `p2p`\
所有点对点连接和与协议相关的逻辑(握手,块传播等)。
- `pool`\
交易池实现的代码。
- `server`\
在启动服务器之前,您[要创建的文件夹](build_ZH-CN.md):cd 到项目根目录;mkdir server;cd server;grin server start(或 run),它将创建一个子文件夹 .grin
- `.grin`
- `chain` - 具有区块链块和相关信息的数据库
- `peers` - 一个数据库,其中包含您连接的 Grin peers 节点的列表
- `txhashset` - 包含内核,范围证明和输出的文件夹,每个文件夹都有一个 pmmr_dat.bin 文件
- `src`\
构建 grin 可执行文件的代码。
- `store`\
数据存储 - Grin 在 LMDB(键值嵌入式数据存储)周围使用了接近零成本的 Rust 包装器。
- `target`\
在编译和构建过程完成之后,grin 的二进制文件所在的位置。
万一遇到麻烦,请参阅[troubleshooting](https://github.com/mimblewimble/docs/wiki/Troubleshooting)
- `util`\
底层 rust 工具。
- `wallet`\
简单的命令行钱包实现。将会创建:
- `wallet_data` - 储存您“输出”的数据库,一旦被确认并到期,就可以通过 [`grin wallet send`](wallet/usage.md) 命令来花费掉。(本地创建,**包含在 git 中)
- `wallet.seed` - 您的钱包种子。(本地创建,**包含在 git 中)

## grin 依赖

- [secp256k1](https://github.com/mimblewimble/rust-secp256k1-zkp)
libsecp256k1 的集成和 rust 绑定,还有一些更动等待更新。在 util/Cargo.toml 中被导入。
4 changes: 2 additions & 2 deletions doc/coinbase_maturity_KR.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ Grin은 동시에 출력 셋에 중복된 실행값(commitment)이 존재하는
아래와 같은 몇 가지가 이런 상황을 복잡하게 만듭니다.

1. 특히 빈 블록의 경우 두 블록이 동일한 보상을 받을 수 있습니다. 뿐만 아니라 거래 수수료가 있는 비어 있지 않은 블록의 경우에도 가능합니다.
2. 코인베이스 출력이 아닌 출력값이 코인베이스 출력과 동일한 값을 가질 수 있습니다.
3. 권장되진 않지만 마이너가 비밀키(private key)를 재사용 할 수 있습니다.
1. 코인베이스 출력이 아닌 출력값이 코인베이스 출력과 동일한 값을 가질 수 있습니다.
1. 권장되진 않지만 마이너가 비밀키(private key)를 재사용 할 수 있습니다.

Grin은 동시에 출력 셋에 중복된 실행값(commitment)이 존재하는 것을 허용하지 않습니다. 그러나 출력 셋은 특정 체인 분리(fork)의 상태에 따라 다릅니다.
같은 순간에 있는 서로 다른 체인에 중복 된 *동일한* 실행값(commitment)가 동시에 *존재할 수 있습니다*. 그리고 이러한 중복된 실행값은 다른 "lock height"를 가질 수 있습니다. 그리고 각각 다른 체인에서 이런 실행값들은 코인베이스 만기가 다 되어서 소비 할 수 있수도 있습니다.
Expand Down
2 changes: 1 addition & 1 deletion doc/contract_ideas.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Note that this requires both chains to support hash preimages: all Bitcoin scrip

(So far this is the same as the classic Bitcoin atomic swap by Tier Nolan [3]; the difference in locktimes is because during part of the protocol Igno can take his coins but I can't yet take mine, so I want to be sure he can't do this and simultaneously back out. This way ff he takes the coins, I can take mine, but if he backs out then I've long since backed out, and these are his only possibilities.)

2. Igno and I construct transactions that move the locked coins to their final destinations. We agree on the kernels and signature nonces, and in particular on signature challenges e and e'.
2. Igno and I construct transactions that move the locked coins to their final destinations. We agree on the kernels and signature nonces, and in particular on signature challenges e and e'.

3. Igno sends me a "conversion" keys sconv which satisfies

Expand Down
2 changes: 1 addition & 1 deletion doc/fast-sync.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Fast Sync

*Read this in other languages: [Español](fast-sync_ES.md), [Korean](fast-sync_KR.md).*
*Read this in other languages: [Español](fast-sync_ES.md), [Korean](fast-sync_KR.md), [简体中文](fast-sync_ZH-CN.md).*

In Grin, we call "sync" the process of synchronizing a new node or a node that
hasn't been keeping up with the chain for a while, and bringing it up to the
Expand Down
2 changes: 2 additions & 0 deletions doc/fast-sync_ES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Sincronización rápida

*Lea esto en otros idiomas: [English](fast-sync.md), [简体中文](fast-sync_ZH-CN.md), [Korean](fast-sync_KR.md).*

En Grin, llamamos "sync" al proceso de sincronizar un nuevo nodo o un nodo que no ha estado al día con la cadena durante un
tiempo, y llevarlo hasta el último bloque conocido. La Descarga Inicial de Bloques (o IBD) es usada a menudo por otras cadenas
de bloques, pero esto es problemático para Grin ya que típicamente no descarga bloques completos..
Expand Down
2 changes: 1 addition & 1 deletion doc/fast-sync_KR.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 빠른 동기화

*이 문서를 다른 언어로 읽으시려면: [에스파냐어](fast-sync_ES.md).*
*다른 언어로 되어있는 문서를 읽으려면: [English](fast-sync.md), [Español](fast-sync_ES.md), [简体中文](fast-sync_ZH-CN.md).*

Grin에서는 새로 네트워크에 참여하는 노드나 얼마 동안 체인을 따라 잡지 않은 노드(의 상태)를 알려진 최신 블록으로( 원문에서는 most-worked block 이라고 표현- 역자 주 ) 가져 오는 프로세스를 "동기화"라고 부릅니다. Initial Block Download (또는 IBD)는 다른 블록 체인에서 자주 사용되지만 빠른 동기화를 사용하는 Grin에서는 일반적으로 전체 블록을 다운로드하지 않으므로 문제가 됩니다.

Expand Down
15 changes: 15 additions & 0 deletions doc/fast-sync_ZH-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 快速同步

*阅读其它语言版本: [English](fast-sync.md), [Español](fast-sync_ES.md), [Korean](fast-sync_KR.md).*

在 Grin 中,我们把同步一个新节点或一段时间未跟上链的节点,并将其升级到最新的已知工作量最大的块的过程称为“同步”("sync")。 初始块下载(或 IBD)通常在其他区块链中被采用,但这对 Grin 来说这是有问题的,因为它通常不会下载完整的块。

简而言之,在 Grin 中的快速同步会执行以下操作:

1. 按照其他节点的建议,在最有效的链上按块下载所有块头(block header)。
1. 找到距链头(chain head)足够靠后的一个头(header)。这称为节点视界(node horizon),因为它是节点可以在不触发另一个新的完整同步的情况下在新分支上重组其链的最远位置。
1. 下载处于视界的完整状态,包括未花费(unspent)状态输出,范围证明(range proof)和内核数据(kernel data),以及所有相应的 MMR。这些其实只是一个大的 zip 文件。
1. 验证完整状态。
1. 从视界开始下载完整的块直到链头。

在本节的其余部分,我们将详细阐述每个步骤。
4 changes: 2 additions & 2 deletions doc/grin4bitcoiners.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
There are 3 main properties of Grin transactions that make them private:

1. There are no addresses.
2. There are no amounts.
3. 2 transactions, one spending the other, can be merged in a block to form only one, removing all intermediary information.
1. There are no amounts.
1. 2 transactions, one spending the other, can be merged in a block to form only one, removing all intermediary information.

The 2 first properties mean that all transactions are indistinguishable from one another. Unless you directly participated in the transaction, all inputs and outputs look like random pieces of data (in lingo, they're all random curve points).

Expand Down
4 changes: 2 additions & 2 deletions doc/grin4bitcoiners_KR.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
Grin 트랜잭션에는 트랜잭션을 프라이빗하게 만드는 3 가지 주요 속성이 있습니다.

1. 주소가 없습니다.
2. 금액은 없습니다.
3. 하나는 다른 트랜잭션을 사용하는 2 개의 트랜잭션을 하나의 블록으로 병합하여 모든 중간 정보를 제거 할 수 있습니다.
1. 금액은 없습니다.
1. 하나는 다른 트랜잭션을 사용하는 2 개의 트랜잭션을 하나의 블록으로 병합하여 모든 중간 정보를 제거 할 수 있습니다.

처음두 가지 속성은 모든 트랜잭션을 서로 구별 할 수 없음을 의미합니다. 거래에 직접 참여하지 않는 한 모든 입력과 출력은 임의의 데이터 조각처럼 보입니다 (말하자면 출력값과 입력값 모두 랜덤한 곡선 위의 점입니다).

Expand Down
4 changes: 2 additions & 2 deletions doc/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,8 @@ Generalizing, we conclude that the chain state (excluding headers) at any point
in time can be summarized by just these pieces of information:

1. The total amount of coins created by mining in the chain.
2. The complete set of unspent outputs.
3. The transactions kernels for each transaction.
1. The complete set of unspent outputs.
1. The transactions kernels for each transaction.

The first piece of information can be deduced just using the block
height (its distance from the genesis block). And both the unspent outputs and the
Expand Down
6 changes: 3 additions & 3 deletions doc/intro_DE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Einführung in Mimblewimble und Grin

*In anderen Sprachen lesen: [English](intro.md), [简体中文](intro_ZH-CN.md), [Español](intro_ES.md), [Nederlands](intro_NL.md), [Русский](intro_RU.md), [日本語](intro_JP.md), [Deutsch](intro_DE.md), [Portuguese](intro_PT-BR.md), [Korean](intro_KR.md)*
*In anderen Sprachen lesen: [English](intro.md), [Español](intro_ES.md), [Nederlands](intro_NL.md), [Русский](intro_RU.md), [日本語](intro_JP.md), [Deutsch](intro_DE.md), [Portuguese](intro_PT-BR.md), [Korean](intro_KR.md), [简体中文](intro_ZH-CN.md)*

Mimblewimble ist ein Blockchain-Format und Protokoll, welches auf starke kryptographische Primitiven setzt und dadurch äußerst gute Skalierbarkeit, Privatsphäre und Fungibilität bietet. Es befasst sich mit Lücken, die in fast allen gegenwärtigen Blockchainimplementierungen existieren.

Expand Down Expand Up @@ -275,8 +275,8 @@ Bezug nehmend auf den vorherigen Beispielblock, müssen die Outputs x1 und x2, a
Verallgemeinernd können wir schlussfolgern, dass der Chainstate (ausgenommen Header) zu jedem Zeitpunkt durch lediglich die folgenden Informationsstücke zusammengefasst werden kann:

1. Die Gesamtanzahl an Coins, die durch Mining in der Chain erstellt wurden.
2. Das komplette Set nicht verwendeter Outputs.
3. Die Transaktionskernel für jede Transaktion.
1. Das komplette Set nicht verwendeter Outputs.
1. Die Transaktionskernel für jede Transaktion.

Das erste Informationsstück kann nur mittels der Blockhöhe (seiner Distanz zum Genesisblock), abgeleitet werden. Beide nicht verwendeten Outputs und die Transaktionskernel sind höchst kompakt. Dies hat 2 wichtige Konsequenzen:

Expand Down
Loading

0 comments on commit 0c6c464

Please sign in to comment.