diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js
index 6c6861377..928aa2c11 100644
--- a/docs/.vuepress/config.js
+++ b/docs/.vuepress/config.js
@@ -38,7 +38,7 @@ module.exports = {
'/zh/': {
lang: 'zh-CN',
title: '启明星',
- description: 'Venus是完全兼容Filecoin分布式存储网络的一个go版本代码实现',
+ description: 'GO语言实现的Filecoin分布式存储网络',
}
},
themeConfig: {
@@ -141,36 +141,58 @@ module.exports = {
title: '启明星',
description: 'Venus is a Go implementation of the Filecoin Distributed Storage Network.',
nav: [
+ {
+ text: '快速上手',
+ link: '/zh/guide/'
+ },
+ {
+ text: '启明星模块',
+ link: '/zh/modules/'
+ },
+ {
+ text: '进阶',
+ link: '/zh/advanced/'
+ },
+ {
+ text: '孵化器',
+ link: '/zh/incubation/'
+ }
],
sidebar: {
- '/zh/': [
+ '/zh/guide/': [
{
title: '快速上手',
- collapsable: true,
+ collapsable: false,
children: [
+ ['', '启明星概要'],
['How-To-Deploy-MingPool.md', '如何部署矿池'],
- // ['Using-venus-Shared-Modules.md', '如何加入矿池'],
+ ['Using-venus-Shared-Modules.md', '如何加入矿池'],
['Venus-replace-lotus.md', '从Lotus迁移到Venus'],
['chain.md', '链维护'],
['How-To-Connect-Network.md', '加入不同网络'],
['How-To-Contribute-Docs.md', '贡献文档']
]
- },
+ }
+ ],
+ '/zh/modules/': [
{
- title: '模块',
- collapsable: true,
+ title: '启明星模块',
+ collapsable: false,
children: [
+ ['', 'Venus daemon'],
['How to use venus messager.md', 'Venus messager'],
['How-To-Use-Wallet-In-Venus.md', 'Venus wallet'],
// ['Venus-wallet.md', 'Venus wallet'],
['Venus-Worker.md', 'Venus worker'],
]
- },
+ }
+ ],
+ '/zh/advanced/': [
{
title: '进阶',
- collapsable: true,
+ collapsable: false,
children: [
- ['Commands.md', 'CLI命令'],
+ ['', 'CLI命令'],
['Tips-Running-In-China.md', '中国部署提示'],
['Multisig-Wallet.md', '多签钱包'],
['venus_load_balancing.md', '负载均衡'],
@@ -178,6 +200,16 @@ module.exports = {
['How-To-Setup_2knet.md', '本地2k开发网络'],
]
}
+ ],
+ '/zh/incubation/': [
+ {
+ title: '孵化器',
+ collapsable: false,
+ children: [
+ ['', '如何部署矿池'],
+ ['Using-venus-Shared-Modules.md', '如何加入矿池'],
+ ]
+ }
]
}
}
diff --git a/docs/zh/images/getting-started-node-diagram.png b/docs/.vuepress/public/getting-started-node-diagram.png
similarity index 100%
rename from docs/zh/images/getting-started-node-diagram.png
rename to docs/.vuepress/public/getting-started-node-diagram.png
diff --git a/docs/zh/images/lotus-cluster-1.png b/docs/.vuepress/public/lotus-cluster-1.png
similarity index 100%
rename from docs/zh/images/lotus-cluster-1.png
rename to docs/.vuepress/public/lotus-cluster-1.png
diff --git a/docs/zh/images/lotus-cluster-2.png b/docs/.vuepress/public/lotus-cluster-2.png
similarity index 100%
rename from docs/zh/images/lotus-cluster-2.png
rename to docs/.vuepress/public/lotus-cluster-2.png
diff --git a/docs/zh/images/venus-cluster.png b/docs/.vuepress/public/venus-cluster.png
similarity index 100%
rename from docs/zh/images/venus-cluster.png
rename to docs/.vuepress/public/venus-cluster.png
diff --git a/docs/zh/images/venus-replace-lotus-cluster-1.png b/docs/.vuepress/public/venus-replace-lotus-cluster-1.png
similarity index 100%
rename from docs/zh/images/venus-replace-lotus-cluster-1.png
rename to docs/.vuepress/public/venus-replace-lotus-cluster-1.png
diff --git a/docs/zh/images/venus-replace-lotus-cluster-2.png b/docs/.vuepress/public/venus-replace-lotus-cluster-2.png
similarity index 100%
rename from docs/zh/images/venus-replace-lotus-cluster-2.png
rename to docs/.vuepress/public/venus-replace-lotus-cluster-2.png
diff --git a/docs/guide/README.md b/docs/guide/README.md
index 253271b72..606cf1b79 100644
--- a/docs/guide/README.md
+++ b/docs/guide/README.md
@@ -1,5 +1,3 @@
-# Overview of Venus
-
## Preface
Multiple interoperable software implementations are required on the same blockchain. Each implementation has its own set of security issues, but they are not all the same . Therefore, launching cryptocurrency networks with multiple implementations can reduce the catastrophic errors. Venus is one of the implementations of Filecoin network.
diff --git a/docs/guide/Venus-replace-lotus.md b/docs/guide/Venus-replace-lotus.md
index a5f19f923..26b47c1d0 100644
--- a/docs/guide/Venus-replace-lotus.md
+++ b/docs/guide/Venus-replace-lotus.md
@@ -58,11 +58,11 @@ The shared moduler of the Venus service include: [venus](https://github.com/file
* Replace lotus-miner with venus-sealer and restart the service. For deployment of venus-sealer, please refer to [How-To-Deploy-MingPool](How-To-Deploy-MingPool.md)。
Lotus cluster process before replacement
-![lotus-cluster-1](../zh/images/lotus-cluster-1.png)
+![lotus-cluster-1](/lotus-cluster-1.png)
Venus cluster process after replacement
-![venus-replace-lotus-cluster-1](../zh/images/venus-replace-lotus-cluster-1.png)
+![venus-replace-lotus-cluster-1](/venus-replace-lotus-cluster-1.png)
##### Scheme 2: customized lotus-miner moduler replacement
@@ -73,8 +73,8 @@ Because of the fact that the miners have modified the lotus-miner code, if they
* Miners can develop related tools by themselves, or wait for Venus developers to launch related tools and developer documents.
Lotus cluster process before replacement
-![lotus-cluster-2](../images/lotus-cluster-2.png)
+![lotus-cluster-2](/lotus-cluster-2.png)
Venus cluster process after replacement
-![venus-replace-lotus-cluster-2](../images/venus-replace-lotus-cluster-2.png)
+![venus-replace-lotus-cluster-2](/venus-replace-lotus-cluster-2.png)
diff --git a/docs/mine/hardware-requirements.md b/docs/mine/hardware-requirements.md
index adc2c19cb..50cfe8d7a 100644
--- a/docs/mine/hardware-requirements.md
+++ b/docs/mine/hardware-requirements.md
@@ -63,4 +63,4 @@ As mentioned, the Miners have to perform operations of different nature which di
## About hardware requirements
-The above requirements will not increase in the presumable future, and money spent on hardware should provide users with many years of reliable service, paying for themselves several times over.
+The above requirements will not increase in the presumable future, and money spent on hardware should provide users with many years of reliable service, paying for themselves several times over.
\ No newline at end of file
diff --git a/docs/mine/how-mining-works.md b/docs/mine/how-mining-works.md
index 142d2e0d3..6a82ef8bd 100644
--- a/docs/mine/how-mining-works.md
+++ b/docs/mine/how-mining-works.md
@@ -38,4 +38,4 @@ Each Filecoin miner has an associated _power_ value in the network that is propo
Additionally, miners submit storage proofs regularly to the chain. This enables them to obtain _storage fees_ from the clients that have made deals with them.
-Additional details about this can be found in the [mining rewards](mining-rewards.md) section.
+Additional details about this can be found in the [mining rewards](mining-rewards.md) section.
\ No newline at end of file
diff --git a/docs/mine/mining-architectures.md b/docs/mine/mining-architectures.md
index 69dc469ed..525c559c3 100644
--- a/docs/mine/mining-architectures.md
+++ b/docs/mine/mining-architectures.md
@@ -24,4 +24,4 @@ A PDF is available for download [here](https://filecoin.io/vintage/mining-hardwa
| -------------------- | ----------------------------- | -------------------------- | ---------- | --------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| Storage miner + Node | AMD Epyc 7402 (24 cores) | Nvidia Quadro RTX 6000 | 128-256GB | Unspecified | 1x venus
1x venus-miner | The miner delegates sealing functions to the workers below. |
| PC1 workers | AMD Epyc 7F32 DP/UP (8 cores) | - | 128-256GiB | 6 x 1-2TiB SSD scratch disk | 6x venus-worker | Runs 6 Venus seal workers in parallel for PreCommit1 phase only. |
-| PC2, Commit workers | AMD Epyc 7402 (24 cores) | 2 x Nvidia Quadro RTX 6000 | 256GiB | 2-4TiB SSD scratch disk(s) | 1x venus-worker (PC2)
1x venus-worker (Commit) | One worker dedicated to PreCommit2 and another to the Commit phase |
+| PC2, Commit workers | AMD Epyc 7402 (24 cores) | 2 x Nvidia Quadro RTX 6000 | 256GiB | 2-4TiB SSD scratch disk(s) | 1x venus-worker (PC2)
1x venus-worker (Commit) | One worker dedicated to PreCommit2 and another to the Commit phase |
\ No newline at end of file
diff --git a/docs/mine/mining-rewards.md b/docs/mine/mining-rewards.md
index 554c1ccec..d512c5ed6 100644
--- a/docs/mine/mining-rewards.md
+++ b/docs/mine/mining-rewards.md
@@ -30,4 +30,4 @@ To further incentivize the storage of "useful" data over simple capacity commitm
## Retrieval fees
-Retrieval fees are paid incrementally using _payment channels_ as the retrieval deals are fulfilled (by sending portions of the data to the cl. This happens off-chain.
+Retrieval fees are paid incrementally using _payment channels_ as the retrieval deals are fulfilled (by sending portions of the data to the cl. This happens off-chain.
\ No newline at end of file
diff --git a/docs/mine/slashing.md b/docs/mine/slashing.md
index 57a23b492..6321c3b4a 100644
--- a/docs/mine/slashing.md
+++ b/docs/mine/slashing.md
@@ -20,4 +20,4 @@ This term encompasses a broader set of penalties which are to be paid by miners
## Consensus fault slashing
-This penalty is incurred when committing consensus faults. This penalty is applied to miners that have acted maliciously against the network's consensus functionality.
+This penalty is incurred when committing consensus faults. This penalty is applied to miners that have acted maliciously against the network's consensus functionality.
\ No newline at end of file
diff --git a/docs/mine/venus/gpus.md b/docs/mine/venus/gpus.md
index 2d806f493..4f886a142 100644
--- a/docs/mine/venus/gpus.md
+++ b/docs/mine/venus/gpus.md
@@ -38,4 +38,4 @@ First, to watch GPU utilization run `nvtop` in one terminal, then in a separate
./Venus-bench sealing --sector-size=2KiB
```
-This process uses a fair amount of GPU, and generally takes ~4 minutes to complete. If you do not see any activity in nvtop from venus during the entire process, it is likely something is misconfigured with your GPU.
+This process uses a fair amount of GPU, and generally takes ~4 minutes to complete. If you do not see any activity in nvtop from venus during the entire process, it is likely something is misconfigured with your GPU.
\ No newline at end of file
diff --git a/docs/mine/venus/message-pool.md b/docs/mine/venus/message-pool.md
index b19c6309b..077c0cfc7 100644
--- a/docs/mine/venus/message-pool.md
+++ b/docs/mine/venus/message-pool.md
@@ -83,4 +83,4 @@ The _GasLimit_ should not be changed under normal circumstances. For instruction
```sh
venus mpool replace --help
-```
+```
\ No newline at end of file
diff --git a/docs/mine/venus/miner-addresses.md b/docs/mine/venus/miner-addresses.md
index 9af79702b..f695662ae 100644
--- a/docs/mine/venus/miner-addresses.md
+++ b/docs/mine/venus/miner-addresses.md
@@ -203,4 +203,4 @@ venus-miner actor withdraw
::: tip
The owner's address will need to be available in the Venus node and have enough funds to pay for the gas for this transaction. Cold addresses will need to be temporally imported for the operation to succeed.
-:::
+:::
\ No newline at end of file
diff --git a/docs/mine/venus/sealer-configuration.md b/docs/mine/venus/sealer-configuration.md
index f1a9e7816..126672655 100644
--- a/docs/mine/venus/sealer-configuration.md
+++ b/docs/mine/venus/sealer-configuration.md
@@ -30,4 +30,4 @@ For any configuration changes to take effect, the miner must be restarted.
Timeout = "30s"
```
-Configure `RemoteListenAddress` to the value that a different node would have to use to reach this API. Usually it is the miner's IP address and API port, but depending on your setup (proxies, public IPs etc.), it might be a different IP.
+Configure `RemoteListenAddress` to the value that a different node would have to use to reach this API. Usually it is the miner's IP address and API port, but depending on your setup (proxies, public IPs etc.), it might be a different IP.
\ No newline at end of file
diff --git a/docs/modules/How-To-Use-Messager.md b/docs/modules/How-To-Use-Messager.md
index c2d244a1f..2c1a37688 100644
--- a/docs/modules/How-To-Use-Messager.md
+++ b/docs/modules/How-To-Use-Messager.md
@@ -2,7 +2,7 @@
messager is a component used to manage local messages, with the purpose of saving address messages, managing message status, and controlling the frequency of push messages.
-[TOC]
+[[TOC]]
## Getting start
diff --git a/docs/zh/README.md b/docs/zh/README.md
new file mode 100644
index 000000000..3b708d782
--- /dev/null
+++ b/docs/zh/README.md
@@ -0,0 +1,23 @@
+---
+home: true
+heroImage: /assets/venus-hero-logo.png
+actionText: 快速上手 →
+actionLink: /zh/guide/
+footer: MIT Apache dual Licensed
+---
+
+
+
+
安全
+
使用我们多样的安全功能保护您的私钥和存储服务。
+
+
+
易用
+
模块化组件和更少的运维投入,让您更快上手。
+
+
+
+
矿池
+
与其他存储提供商共享基础服务,释放您的真正潜力!
+
+
\ No newline at end of file
diff --git a/docs/zh/advanced/README.md b/docs/zh/advanced/README.md
index cbd8834e6..55ef8de2c 100644
--- a/docs/zh/advanced/README.md
+++ b/docs/zh/advanced/README.md
@@ -1,4 +1,368 @@
----
-layout: RedirectTutorial
----
+# CLI命令行
+可以在你的终端运行 `venus --help` ,以获得完整的可用命令列表。
+
+```
+ START RUNNING FILECOIN
+ venus config [] - Get and set filecoin config values
+ venus daemon - Start a long-running daemon process
+ venus wallet - Manage your filecoin wallets
+
+ VIEW DATA STRUCTURES
+ venus chain - Inspect the filecoin blockchain
+ venus sync - Inspect the filecoin Sync
+ venus dag - Interact with IPLD DAG objects
+ venus show - Get human-readable representations of filecoin objects
+
+ NETWORK COMMANDS
+ venus swarm - Interact with the swarm
+ venus drand - retrieve drand randomness
+
+ MESSAGE COMMANDS
+ venus send - Send message
+ venus mpool - Manage the message pool
+
+ State COMMANDS
+ venus state wait-msg - Wait for a message to appear on chain
+ venus state search-msg - Search to see whether a message has appeared on chain
+ venus state power - Query network or miner power
+ venus state sectors - Query the sector set of a miner
+ venus state active-sectors - Query the active sector set of a miner
+ venus state sector - Get miner sector info
+ venus state get-actor - Print actor information
+ venus state lookup - Find corresponding ID address
+ venus state sector-size - Look up miners sector size
+ venus state get-deal - View on-chain deal info
+ venus state miner-info - Retrieve miner information
+ venus state network-version - MReturns the network version
+ venus state list-actor - list all actors
+
+ TOOL COMMANDS
+ venus inspect - Show info about the venus node
+ venus leb128 - Leb128 cli encode/decode
+ venus log - Interact with the daemon event log output
+ venus protocol - Show protocol parameter details
+ venus version - Show venus version information
+ venus seed - Seal sectors for genesis miner
+```
+
+
+# 常用命令
+
+# 启动主网节点
+
+ ```sh
+ ./venus daemon
+ ```
+
+## 查询链状态
+
+1. 获取当前tipset的head信息
+
+ ```sh
+ ./venus chain head
+
+ {
+ "Height": 449124,
+ "ParentWeight": "9725370313",
+ "Cids": [
+ {
+ "/": "bafy2bzacectt2udhaow37r53dfpnq6o3edvf5iswbpk77bcfiuce4xn5zkc3g"
+ },
+ {
+ "/": "bafy2bzacebjintkddt24xdqvma3xwqurp6bahdhqxvwc54kqvuxbi3tiy2rig"
+ },
+ {
+ "/": "bafy2bzaceczumkmzgjfasc4cpb2cqkhhv5eqgf2ikzgwgmw5554bgguivykf6"
+ },
+ {
+ "/": "bafy2bzacebd5jt744qsoi5pieisxme2xtmdgmlylma2wgbbu2vmrp3bjlflq2"
+ },
+ {
+ "/": "bafy2bzacedl3fvcvybsukh4odytkz2fxemrr2rln7t75oqj2wkj7yg2vohl3g"
+ }
+ ],
+ "Timestamp": "2021-01-28 04:42:00"
+ }
+ ```
+
+2. 最近的tipset的信息列表
+ ```sh
+ ./venus chain ls
+ [
+ .......
+ {
+ "Height": 449115,
+ "Timestamp": "2021-01-28 04:37:30",
+ "Blocks": [
+ {
+ "Cid": {
+ "/": "bafy2bzaceb2xn4hnnovksfeqjrig44bgxow5ixuymlo75nnftjad2mufzzjjw"
+ },
+ "Miner": "t0112667"
+ },
+ {
+ "Cid": {
+ "/": "bafy2bzacecoswf32ayvdhotbp3pcgabq6q34c5czqscugb5lfcig26igbkem2"
+ },
+ "Miner": "t030347"
+ },
+ {
+ "Cid": {
+ "/": "bafy2bzacedo3xucwhpz3ndralqbrgzmbzxvkj23btp46tppby2vadyovvtux6"
+ },
+ "Miner": "t03176"
+ },
+ {
+ "Cid": {
+ "/": "bafy2bzacecrnceor3dj3zixrizqkgcivxrevy7jkzh5wolgp7kok7cimcsoyu"
+ },
+ "Miner": "t089228"
+ },
+ {
+ "Cid": {
+ "/": "bafy2bzaceas2qb642iagyc2konpf3bdykw7kryv245dvsmuboikanj35ymes4"
+ },
+ "Miner": "t023152"
+ }
+ ]
+ }
+ ]
+ ```
+
+3. 设置tipset的head
+
+ ```sh
+ ./venus chain set-head bafy2bzaceckeg7onfhua5jf4xrnrzt2erix5pibjov2r4vvdhcih6oql7vm24 bafy2bzacedt74pgv2rk7iddptz2nz4kfcsoccqnrb4q7mbluof6puw5iccqms
+ ```
+
+## 钱包命令
+
+1. 创建地址
+
+ ```sh
+ ./venus wallet new
+ ```
+
+2. 地址列表
+
+ ```sh
+ ./venus wallet ls
+
+ Address Balance Nonce Default
+ f1nixbb3trp2mujzf5z7mguidthwo4levnldy4s4a 0 FIL 0
+ f1ytd5blzi3y2nsupqzye6ogpaphow3lljii3zkdi 0 FIL 0
+ f3qmxlwlzmvvn6vwo73jhuzjufmo65lrdwecxcmd7poyv5yex5hqngvo26sqjzzdge4vj3yxmwn5x24igremna 0 FIL 0 X
+ f3rjuxqnsjk7wuuzf3rqwsfxpbmqp23dn6ik5vyow2ntw5sgdxyijh7cfbujbmwtzdpii6ikunumez55jcxbbq 0 FIL 0
+ ```
+
+3. 设置默认地址
+
+ ```sh
+ ./venus wallet set-default f3qmxlwlzmvvn6vwo73jhuzjufmo65lrdwecxcmd7poyv5yex5hqngvo26sqjzzdge4vj3yxmwn5x24igremna
+ ```
+
+4. 获取默认地址
+
+ ```sh
+ ./venus wallet default
+ ```
+
+5. 导出/导入地址,兼容lotus私钥格式
+
+ ```sh
+ ./venus wallet import
+ ./venus wallet export
+ ```
+
+6. 查询地址余额
+
+ ```sh
+ ./venus wallet balance f3rjuxqnsjk7wuuzf3rqwsfxpbmqp23dn6ik5vyow2ntw5sgdxyijh7cfbujbmwtzdpii6ikunumez55jcxbbq
+ 0 FIL
+ ```
+
+7. 设置钱包密码
+
+ ```sh
+ ./venus wallet set-password
+ ```
+
+8. 锁定与解锁钱包
+
+ ```sh
+ ./venus wallet lock
+ ./venus wallet unlock
+ ```
+
+## 同步命令
+
+1. 查询同步状态
+
+ ```sh
+ ./venus sync status
+
+ Syncing:
+ SyncTarget: 1
+ Base: 450231 { bafy2bzaceby6aq4obp5pjgjsxtyneqgsrcou4tgx2rsgqptoxgb4pyxh4asae bafy2bzacebancasvojeszwqnfvexlmn52vgcq7ns45nnwzixr67dzsel2kolu bafy2bzaced37mxrstmq2ij4x3szso446fodutq4jaarns6n2vdijeem2k44be bafy2bzacebtxektwn3mndyhpwnj6rkhnf6mfnfa2fyds4jv2xxb3nukuy26d6 bafy2bzacedmjrn42yzfl4yzuzn66ir33exrjxotahtets7btjfm4x36rdcsgu }
+ Target: 450239 { bafy2bzaceb6ulfdjeak6uaxrsd62jobtuilee4wkk3bj5ta4qfi7ll52tbyrm bafy2bzacebkbsyo2hp4qgrsfgzjz5qvyrgfz6n6nsq6kfxvw7s4s66yfynpwi }
+ Current: 450232 { bafy2bzacedwjdxb5jx5wo4zwg7emwfhbw34bvs3hvo362r3um25nisdakrl7g bafy2bzaced4jq6hx56o4symynuwqhlhf4kzo3qdqofeilizzflejvgjjr2bmq }
+ Status: syncing
+ Err:
+
+ SyncTarget: 2
+ Base: 450231 { bafy2bzaceby6aq4obp5pjgjsxtyneqgsrcou4tgx2rsgqptoxgb4pyxh4asae bafy2bzacebancasvojeszwqnfvexlmn52vgcq7ns45nnwzixr67dzsel2kolu bafy2bzaced37mxrstmq2ij4x3szso446fodutq4jaarns6n2vdijeem2k44be bafy2bzacebtxektwn3mndyhpwnj6rkhnf6mfnfa2fyds4jv2xxb3nukuy26d6 bafy2bzacedmjrn42yzfl4yzuzn66ir33exrjxotahtets7btjfm4x36rdcsgu }
+ Target: 450238 { bafy2bzacebtf2l5y34acbfnie6ilvvhxj5gyrnknnygintqzqkoxcsnmmuado bafy2bzacedswqjogt57cf7q22ebbrnbw3qygxd6q3z6vhm74b6tyzqjlrvox4 bafy2bzacecrv2kxpvuocgrtfjlot3da57655zbvrcu2reuospak3vdxa3u7v2 bafy2bzacecahv6twxmeihivncobqadfm7xyh3gvnrpjhs47i7537er7uyeote }
+ Current: 450233 { bafy2bzaceb4ybtg3p63fd7hvrajj5cw7oi52ie3zj2r3apxvod4u4e3y3svac bafy2bzacecmasydskhxrcrdih6na4qxpcdpavj6d5wydgft7ba574mx57ij76 bafy2bzacedrxgj2cjq537zoe24qhzizkx5ix4g7rpzbjl73qfm4ldom2kt7pq bafy2bzaceat2eg6ujh2qmlwwvna5qmntbayquvesvik55jfbrfkcgugcl6dmq bafy2bzaceawwc3hp3b5bl2a3gjmvehxytqvxtabtwosj77lnbcmu5ln4gh77u bafy2bzaceabwkrifkce2rraystlg2ouxudklyd2b3pmck2ineguidz4r3x35o bafy2bzacebfxvqczftyzoxosdrlxylhupurmovpqhympe6anukleg2z7emmbo bafy2bzaceb2bbk4ykijqz7em4zgag5eikvqzierp6mevw2bytnj4xrbb2dthc }
+ Status: syncing
+ Err:
+
+ SyncTarget: 3
+ Base: 450231 { bafy2bzaceby6aq4obp5pjgjsxtyneqgsrcou4tgx2rsgqptoxgb4pyxh4asae bafy2bzacebancasvojeszwqnfvexlmn52vgcq7ns45nnwzixr67dzsel2kolu bafy2bzaced37mxrstmq2ij4x3szso446fodutq4jaarns6n2vdijeem2k44be bafy2bzacebtxektwn3mndyhpwnj6rkhnf6mfnfa2fyds4jv2xxb3nukuy26d6 bafy2bzacedmjrn42yzfl4yzuzn66ir33exrjxotahtets7btjfm4x36rdcsgu }
+ Target: 450237 { bafy2bzaceavndy2pgdjpacapy4gs6pszbvxssvwrnw4uydnne4boowvyjlzjm bafy2bzacedutkurnrzna3hctqwxkrghhy6ufkanonfbq54cjcaoquoss4galy bafy2bzaced477xs5udb2r2xkomt6webzmjcwvy257bhpvgxrq6v573o66ywsy bafy2bzaceddjcr45kqhrwikemn7lfuhe5k3cqhhebrrzucsemv4bbxh755hx4 }
+ Current: 450233 { bafy2bzaceb4ybtg3p63fd7hvrajj5cw7oi52ie3zj2r3apxvod4u4e3y3svac bafy2bzacecmasydskhxrcrdih6na4qxpcdpavj6d5wydgft7ba574mx57ij76 bafy2bzacedrxgj2cjq537zoe24qhzizkx5ix4g7rpzbjl73qfm4ldom2kt7pq bafy2bzaceat2eg6ujh2qmlwwvna5qmntbayquvesvik55jfbrfkcgugcl6dmq bafy2bzaceawwc3hp3b5bl2a3gjmvehxytqvxtabtwosj77lnbcmu5ln4gh77u bafy2bzaceabwkrifkce2rraystlg2ouxudklyd2b3pmck2ineguidz4r3x35o bafy2bzacebfxvqczftyzoxosdrlxylhupurmovpqhympe6anukleg2z7emmbo bafy2bzaceb2bbk4ykijqz7em4zgag5eikvqzierp6mevw2bytnj4xrbb2dthc }
+ Status: syncing
+ Err:
+
+ Waiting:
+ SyncTarget: 4
+ Base: 450231 { bafy2bzaceby6aq4obp5pjgjsxtyneqgsrcou4tgx2rsgqptoxgb4pyxh4asae bafy2bzacebancasvojeszwqnfvexlmn52vgcq7ns45nnwzixr67dzsel2kolu bafy2bzaced37mxrstmq2ij4x3szso446fodutq4jaarns6n2vdijeem2k44be bafy2bzacebtxektwn3mndyhpwnj6rkhnf6mfnfa2fyds4jv2xxb3nukuy26d6 bafy2bzacedmjrn42yzfl4yzuzn66ir33exrjxotahtets7btjfm4x36rdcsgu }
+ Target: 450239 { bafy2bzaceb6ulfdjeak6uaxrsd62jobtuilee4wkk3bj5ta4qfi7ll52tbyrm bafy2bzacebkbsyo2hp4qgrsfgzjz5qvyrgfz6n6nsq6kfxvw7s4s66yfynpwi bafy2bzacebca26ouxt6tv32ul46457zftb5ozy6lmeejtrw2w5srb4zgnflou }
+ Current:
+ Status: wait
+ Err:
+
+ History:
+ ```
+
+2. 设置同步次数
+
+ ```sh
+ ./venus sync set-concurrent 1
+ ```
+
+## 网络命令
+
+1. 打印本地节点信息
+
+ ```sh
+ ./venus swarm id
+
+ {
+ "Addresses": [
+ "/ip4/192.168.1.151/tcp/6000/p2p/QmTBY16KjbJifqrepWriHNaSVxBJRKg63G8hJrAZAstCQt",
+ "/ip4/127.0.0.1/tcp/6000/p2p/QmTBY16KjbJifqrepWriHNaSVxBJRKg63G8hJrAZAstCQt"
+ ],
+ "ID": "QmTBY16KjbJifqrepWriHNaSVxBJRKg63G8hJrAZAstCQt"
+ }
+ ```
+
+2. 查询已连接的对方节点
+ ```sh
+ ./venus swarm peers
+
+ {
+ "Peers": [
+ {
+ "Addr": "/ip4/101.206.156.202/tcp/23151",
+ "Peer": "12D3KooWNhc5Rzgc1c8p9kvBVhrLUB4ZZniwnpi4yQd1WVf952tp",
+ "Latency": "",
+ "Muxer": "",
+ "Streams": null
+ },
+ {
+ "Addr": "/ip4/103.40.249.175/tcp/12350",
+ "Peer": "12D3KooWNfUzbXzVXqLV9pEubVenJoQHkWtkrR3aSvwyoXc7Kpys",
+ "Latency": "",
+ "Muxer": "",
+ "Streams": null
+ }
+ }
+ ```
+
+3. 连接到其他节点
+
+ ```
+ ./venus swarm connect /ip4/192.168.1.151/tcp/6000/p2p/QmTBY16KjbJifqrepWriHNaSVxBJRKg63G8hJrAZAstCQt
+ ```
+
+## 查询actor状态
+
+1. 获取actor信息
+
+ ```sh
+ ./venus get-actor f02438
+
+ {
+ "Address": "f02438",
+ "Balance": "659448.801619331229682404 FIL",
+ "Nonce": 0,
+ "Code": "bafkqaetgnfwc6mrpon2g64tbm5sw22lomvza (fil/2/storageminer)",
+ "Head": "bafy2bzacedexilt4kyzffmagjwpyenct5eddn7cazfjquz4v7b3b4czitn3au"
+ }
+ ```
+
+2. 查询矿工信息
+
+ ```sh
+ ./venus state miner-info f02438
+
+ Available Balance: 8867.856318782083445622 FIL
+ Owner: f077316
+ Worker: f0117055
+ Control 0: f0117046
+ Control 1: f0117042
+ Control 2: f0117040
+ PeerID: 12D3KooWMrDPhKaMeJFenXRFd4Rb9Zt111CBY7uY6AoZ93MTbLHw
+ Multiaddrs: /ip4/47.115.10.99/tcp/14567
+ Consensus Fault End: -1
+ SectorSize: 32 GiB (34359738368)
+ Byte Power: 35.78 PiB / 2.143 EiB (1.6305%)
+ Actual Power: 35.8 Pi / 2.14 Ei (1.6302%)
+
+ Proving Period Start: 447666 (21 hours 36 minutes ago)
+ ```
+
+3. 获取矿工的扇区信息
+
+ ```sh
+ ./venus state sector f02438 100001
+
+ SectorNumber: 100001
+ SealProof: 3
+ SealedCID: bagboea4b5abcaps45jsrklqqa3dw26jd7rybpzwsneapwvx6s4pqludkhie3hflh
+ DealIDs: []
+
+ Activation: 898 (22 weeks 2 days ago)
+ Expiration: 1553585 (in 1 year 2 weeks)
+
+ DealWeight: 0
+ VerifiedDealWeight: 0
+ InitialPledge: 0.99999998430674944 FIL
+ ExpectedDayReward: 0.503660272286038996 FIL
+ ExpectedStoragePledge: 1.42807706338520528 FIL
+
+ Deadline: 0
+ Partition: 0
+ ```
+
+4. 通过id搜索消息
+
+ ```sh
+ ./venus state search-msg bafy2bzaceckluouswlxpaujhihar4yngk3dx6daqbjfoyolbfvlelwgapmzxg
+
+ message was executed in tipset: [bafy2bzacebek5gtutmhdvt5rpt6s2k7exk2ve2tj3f2h36nswnw7ehbbmirec bafy2bzaceaem7ljdwxl3eqncy7r7cc3225sx24g6oyzbsf4p7pavcxasuzcs2 bafy2bzacecty4e55ryfjmdjc24jwp2iwobk6pqk4mrsmsjdjtpchsizyervqe bafy2bzacecbldsf73ekzxqsgxawupwhx4cm5xvy6qp43ne5qkss42xvnfjcic bafy2bzaceajgyz6y26fbhsirnrizdt4yt55374abobm5lzugl3eik3yd23afk]
+ Exit Code: 0
+ Gas Used: 13133828
+ ```
+
+5. 等待消息id的结果
+
+ ```sh
+ ./venus state wait-msg bafy2bzaceanbalwsqc5fetxcdfamfovlpkdjd2s5eje4bwsaxnrrbyswjv5g4
+
+ message was executed in tipset: [bafy2bzacebek5gtutmhdvt5rpt6s2k7exk2ve2tj3f2h36nswnw7ehbbmirec bafy2bzaceaem7ljdwxl3eqncy7r7cc3225sx24g6oyzbsf4p7pavcxasuzcs2 bafy2bzacecty4e55ryfjmdjc24jwp2iwobk6pqk4mrsmsjdjtpchsizyervqe bafy2bzacecbldsf73ekzxqsgxawupwhx4cm5xvy6qp43ne5qkss42xvnfjcic bafy2bzaceajgyz6y26fbhsirnrizdt4yt55374abobm5lzugl3eik3yd23afk]
+ Exit Code: 0
+ Gas Used: 44152257
+ Return:
+ ```
diff --git a/docs/zh/guide/How-To-Deploy-MingPool.md b/docs/zh/guide/How-To-Deploy-MingPool.md
index 35363b312..e83762835 100644
--- a/docs/zh/guide/How-To-Deploy-MingPool.md
+++ b/docs/zh/guide/How-To-Deploy-MingPool.md
@@ -2,7 +2,7 @@
Venus是Filecoin分布式矿池的实现方案之一,系统集群组件包括:Venus,Venus-auth,Venus-miner,Venus-wallet,Venus-messager,Venus-sealer。从概念上理解其中Venus、Venus-auth、Venus-miner、Venus-wallet、Venus-messager具备可共用性(即程序可被多个矿工身份使用,在保证效率的情况下使硬件,软件资源得到充分利用),而Venus-sealer、Venus-worker、Venus-wallet主要用于积累算力。Venus-wallet属于可选组件,基于部署情况的安全性考量,Venus-wallet可以共享使用,也可以本地部署。本篇文档为nerpda测试网络下的集群部署。
-![venus-cluster](../images/venus-cluster.png)
+![venus-cluster](/venus-cluster.png)
# Venus集群部署(基于nerpa测试网)
diff --git a/docs/zh/guide/README.md b/docs/zh/guide/README.md
index 253271b72..1e753ee74 100644
--- a/docs/zh/guide/README.md
+++ b/docs/zh/guide/README.md
@@ -1,54 +1,47 @@
-# Overview of Venus
+## 前言
-## Preface
+在同一条区块链上需要具有多个互操作的软件实现,每个实现都有自己的安全问题集,但是所有实现不尽相同,因此,启动具有多种实现方式的加密货币网络可降低发生灾难性错误的可能性,Venus正是Filecoin的实现之一。
-Multiple interoperable software implementations are required on the same blockchain. Each implementation has its own set of security issues, but they are not all the same . Therefore, launching cryptocurrency networks with multiple implementations can reduce the catastrophic errors. Venus is one of the implementations of Filecoin network.
+Venus代指Filecoin的通用实现之一,venus则代指Venus的组件之一。Venus致力于帮助中小矿工能够更加简单的加入到Filecoin生态网络建设中。
-Venus (Capital V) refers to one of the general implementations of Filecoin, while venus (v in lowercase) refers to one of the components of Venus. Venus is committed to helping small and medium-sized miners join in the Filecoin ecosystem network with a lower barrier.
+目前Venus通过venus、venus-sealer、venus-miner、venus-wallet、venus-messager、venus-auth组件,已经实现了Filecoin分布式矿池的支持,未来,Venus将持续完善自身,并共同推进开源的Filecoin开发与生态的发展。
-Now Venus has realized the support for distributed mine pool of Filecoin through components like venus, venus-sealer, venus-miner, venus-wallet, venus-messager and venus-auth. In the future, Venus will continue its evolvement and jointly promote the open source development of Filecoin ecosystem.
+## 为什么我们要这样做
-## Why are we doing this
+2020年6月,Protocol Lab发起了关于由社区后续维护go-filecoin的RFP,IPFSForce随后申请并获得了维护权。10月,go-filecoin更名为Venus,我们继续推进对Venus项目的维护工作。
-In June 2020, Protocol Lab launched an RFP to continue the maintenance of go-filecoin by a new community, and IPFSForce applied for and successfully got the project. In October, We renamed go-filecoin as Venus, and continued the maintenance of Venus Project.
+在重新保持维护之前,Venus是一个严重缺乏维护的项目。协议和组件上,vm/mpool/chain/rpc虽然都有了,但是全都存在不同程度的问题,我们用了三个多月的时间,逐渐修复很多协议层、代码层,、性能的问题,使得Venus完成了与Lotus的互操作,让使用Venus的节点可以正常的在网络上运行。后续我们又逐渐的让Venus支持了Calibration、Nerpa、2k网络。
-Before IPFSForce’s application, maintenance is seriously lacking in Venus project. . In terms of protocols and components, vm,mpool, chain, rpc are all available, but all of them have different problems. It takes us more than three months to gradually fix protocol layer, code layer, and problematic fuctions, making Venus complete the interoperability with Lotus, so that the nodes using Venus can run smoothly on the network. And then we let Venus support calibration, Nerpa and 2K networks.
+完成以上工作后,我们着手于Venus的开发方向。
-After completing the above work, we start to set the direction of Venus development.
+我们的设计是让Venus向矿池的发展角度去支持,最初的设计是从“如何扩展单一矿工”思考,这个方向存在理论上的可行性,但是最大的问题在于Filecoin独特的证明机制。因为Filecoin网络的矿工必须周期性的提交‘时空证明’,而为了生成证明,矿工必须读取一整个partition的数据,如果sector极其分散的分布到不同的地方,通过公网读取,则不是一个可执行的方案。
-We plan to let Venus support the development of mining pool. At the start, we decide to realize the expansion from a single miner. It is technically feasible, but the biggest problem is caused by the mechanism of Filecoin proofs. Miners in the Filecoin network have to submit the PoSt periodically, and in order to generate the proof, they need to read the data of a whole partition. If all sectors are distributed in different places, to read the data through the public network will be too time-consuming.
+后来我们通过数次的设计与修改,最终产生了现在的方案,就是分布式矿池。分布式矿池并非体现在单一矿工,而是将分布式的概念体现在多矿工的管理,这更像一个矿工联合体。
-After that, through several times of re-design and modification, we finally realize the current plan, as a distributed mining pool. Distributed mine pool will not completely in charge with any single miner, but managed by multiple miners, which is more like a miner union.
+Venus分布式矿池在外部的体现和传统的分布式矿池是相似的。在存储资源上体现在地域分布性,只要有网络可以访问的地方,都可以使节点接入到Venus矿池;在出块的角度上,因为Filecoin按算力比例来计算出块机率,所以分散的计算和整体的计算的最终结果应该是相同:***n1/p+ n2/p+n3/p......= (n1+n2+n3+.....)/p***,这在算法的基础上提供了理论基础。
-The external features of Venus distributed mining pool are similar to other pools. Miners can store their resources in distributed geographic nodes. As long as there is a place accessible to the network, the miner can create a node accessible to Venus mine pool; The probability of earning the block reward is proportional to the amount of storage the miner contributes to the Filecoin network, and the final result of separate calculation and overall calculation should be the same: ***n1/p+ n2/p+n3/p......= (n1+n2+n3+.....)/p***, which provides a theoretical basis on the algorithm.
+在真实数据存储检索上,矿工可以通过venus统一入口接入网络或者自主接入。设计中,venus会在获得矿工允许的条件下,按照数据的访问需求来选择合适的节点存储数据,使得数据更贴近真实的使用场景。
-On the storage and retrieval of real data, miners can access the network through the venus unified entrance or by themselves. In the design and with the permission from miners, venus will select the appropriate node to store data according to specific requirements, so that the data is closer to the real scenario.
+1. ***数据存储***:支持组件共享,存储会逐渐迁移到MySQL,通过一些高可用的方案保证Venus的元数据安全。
+2. ***共享组件***:支持高可用,保证服务的质量,减少矿工的时间成本与维护成本,这使得矿工能够更容易加入到矿池生态中。现在的挖矿活动专业性很强,而实现Filecoin利用闲散存储资源的梦想则不可避免需要降低参与门槛,才能吸引更多的参与者进来。
+3. ***聚集出块权***:矿工能够将资源整合在一起,互相帮助打包消息,这样可以避免小矿工的消息无人打包的困境。
+4. ***提升Filecoin网络的吞吐量***:如果同一高度存在多个区块,venus-miner能够保证每个区块中的消息都是不同的,而如果各自出块,消息则很可能大量重复。
+5. ***提升消息的稳定性***:挖矿活动中的消息可以和节点分开,由venus-messager来管理,venus-messager会跟踪链的最新状态来设置一个相对合理的预估的gas参数,同时也支持用户自己设置一个消息参数。
+6. ***提升数据访问速度***:目前的Filecoin网络更多的还是存储,但是作为一个存储服务,最终需要对外输出检索服务才能实现根本价值。如果有足够多的矿工使用Venus,那么Venus在真实数据的处理上就有更多的可能,比如数据的分布,Venus可以将数据分布到距离客户最近的一些矿工节点,这样可以提高客户的访问速度;比如一些公有数据可以把这些数据尽可能的分散到更多的节点上,保障在任意位置的访问都有效,这可以大大提升IPFS网络的效能,进一步实现IPFS Web3.0的梦想。
-1. ***Data storage***: component sharing is supported, and the storage will be gradually migrated to MySQL to ensure the metadata security of Venus through some highly available solutions.
-
-2. ***Shared components***: support high availability, ensure the quality of service, reduce the time cost and maintenance cost of miners, which make it easier for miners to join the mining pool. Nowadays, mining is a high-tech activity, but to realize Filecoin's goal to get the utmost out of storage resources, it is inevitable to lower the threshold to attract more participants.
-
-3. ***Combine the right for more block rewards***: miners can integrate resources together and help each other pack messages, so as to avoid the situation of small miners that no one can pack messages.
-
-4. ***Improve the TPS of Filecoin network***: if there are multiple blocks at the same height, venus-miner can ensure that the messages in each block are different, as the avoidance of highly-repeated messages when blocks are separated.
-
-5. ***Improve the stability of messages***: messages in mining activities can be separated from nodes and managed by venus-messager, which can track the latest state of the chain to set a relatively reasonable estimated gas parameter, and also supports users to set a message parameter themselves.
+## venus如何工作
-6. ***Improve the speed of data access***: the current Filecoin network is more like a pool which is merely for data storage, but as a complete data service, it also needs data retrieval to realize its real value. With sufficient miner users, Venus has more chances to promote the real data application. For example, for data distribution, Venus can distribute the data to some miners' nodes nearest to the customers, which can improve the access speed; some public data can distribute these data to more nodes as much as possible to ensure that access at any location is effective, which can greatly improve the performance of IPFS network and further realize the goal of IPFS, as one of Web3.0 solutions.
+### 架构
-## How Venus works
+Venus架构设计中包括venus、venus-miner、venus-sealer、venus-messager、venus-wallet、venus-auth,以及在计划中的venus-market。在经典的架构中venus、venus-miner、venus-auth、venus-messager、venus-market是作为公共组件存在,venus-sealer、venus-wallet作为本地组件存在。
-### Architecture
+公共组件可以有服务商或者多个矿工联合建立,而矿工只需要在本地运行venus-sealer、venus-worker、venus-wallet即可。实际上Venus的所有组件都是面向协议的,如果矿工有足够的技术实力,也可以把公共组件的全部或者部分部署在本地,这样矿工可以更灵活的部署。
-Venus architecture includes venus, venus-miner, venus-sealer, venus-messager, venus-wallet, venus-auth, and venus-market which is still in design. In the classic architecture, venus, venus-miner, venus-auth, venus-messager and venus-market are public components, and venus-sealer and venus-wallet are local components.
+下图是我们设想中的一个典型的应用场景
-Public components can be established by service providers or by multiple miners, and miners only need to run venus-sealer, venus-worker and venus-wallet locally. In fact, all components of Venus are protocol oriented. If miners have sufficient technology, they can also deploy all or part of the public components locally, so the deployment can be more flexible.
+![](/venus-cluster.png)
-The following figure is a typical application scenario in our design.
-
-![./zh/images/venus-arch.png](../images/venus-cluster.png)
-
-The following contents show the relationship between components, which are similar in function, but with more powerful expanded functions in details and uses.
+下列内容表示了组件间的对应关系,功能上有一定的相似,细节和用法上有更多强大的功能扩充。
* venus-auth --> token authentication service extend lotus jwt
* venus-miner --> lotus-miner block produce part
@@ -60,65 +53,64 @@ The following contents show the relationship between components, which are simil
### venus-auth
-venus-auth is a component used for authorization. In a typical deployment environment, venus-auth is used to provide authorization services to venus, venus-miner and venus-messager. Local nodes need to be authorized to have access to the shared components. Based on the authorization, venus-auth will expand its functions, such as security control, including access restriction and blacklist.
+venus-auth是用于授权的组件,在典型的部署环境下venus-auth用于给venus、venus-miner、venus-messager提供授权服务,每个本地的节点访问共享组件都要经过授权,后续会在这个基础上进行功能扩充,做一些安全方面的控制,比如访问限流、黑名单。
### venus
-venus is similar to lotus-daemon, which is used to realize all nodes. venus is connected to the Filecoin blockchain network to provide data support for Venus. venus can be used as an ordinary node. It has all the necessary functions of blockchain nodes, such as chain, mpool and wallet. The APIs of venus are almost compatible with those of lotus (you can mention the issue of incompatible APIs). On venus, you can create private keys, query assets, transfer funds, etc. In a typical deployment environment, venus only provides data query service on the basic chain without private key restoration. The block data needed by slashfilter is stored in the database, and the node itself is stateless. In this case, venus node can realize its high availability through nginx reverse proxy.
+venus类似lotus-daemon, 用于实现全节点,venus接入Filecoin区块链网络,为Venus提供数据支持。可以把venus当作普通节点来使用,它具有区块链节点必备的所有功能,如chain、 mpool、wallet。venus的接口和lotus基本兼容(如果存在不兼容的接口,可以提issue),你可以在venus上创建私钥、查询资产、转账等等。在典型部署环境里,venus仅仅提供基础链上数据查询服务,本身不保存私钥。slashfilter所需要的区块数据,存储到数据库里,节点本身是无状态的,这样通过nginx反向代理后就可以实现venus节点的高可用。
-There are some differences between nodes of venus and lotus:
+venus节点自身有一些区别与lotus的地方:
-1. External signature is supported in the API of creating block (pr will be proposed to lotus later).
-2. The API of message selection supports the selection of multiple batches of messages at the same time, which is used to select messages when multiple miners get the block rewards.
-3. Support the centralized authorization access to venus-auth.
+1. 创建区块的接口中支持了外部签名(后续会向lotus提pr)
+2. 消息选择的接口支持同时选择多个批次的消息,用于多矿工出块时选择消息。
+3. 支持venus-auth的的中心访问授权
-Therefore, if you are interested in the mixed deployment of venus / lotus, you need to use our Venus project which is compatible to Venus or pick your own CCS.
+因此如果对venus/lotus混合部署感兴趣,需要使用我们维护的lotus兼容venus的项目,或自行pick代码编译。
### venus-miner
-The function of venus-miner is to combine the rights of block rewards. The program can configure the location of multiple miners and their sealers and wallets, and generate blocks for these miners at the same time. venus-miner has the following features:
+venus-miner的作用是聚集出块权,该程序可以配置多个矿工及其sealer、钱包的位置,同时为这些矿工来生成区块。venus-miner有以下特点:
-1. 1.Separate data: because the process of generating blocks needs to access data, and miner's sealer may be heterogeneous, but now most miners will use their own codes, so there is a problem about how to access these data to realize joint mining. By venus-miner’s independence on the storage organization mode and completing the proofs by miners, no matter how the miner's sealer organizes the storage, as long as the Computeproof API is implemented, venus-miner can generate the proof through it.
-2. Separate private key: when calculating random numbers and signature blocks, all operations about private key are accessed through remote wallet, which can improve the security of mining activities.
-3. Improve miners' income and TPS: when the miner who uses venus-miner rto get multiple (> 1) rights of block rewards in a period, venus-miner will try to select different messages from the message pool for packaging, which can somehow improve the speed of these messages on the chain, and make the block get more probable premium.
+1. 分离数据:由于生成区块的过程需要访问数据,并且矿工的sealer可能是异构的,但目前多数矿工会使用自己定制的代码,那么要实现联合挖矿就存在如何访问到这些数据的问题。通过隔断venus-miner对存储组织方式的依赖,通过让证明在矿工侧完成,无论矿工的sealer如何组织存储,只要实现了**ComputeProof**接口,venus-miner就可以通过这个接口来生成证明。
+2. 分离私钥:计算随机数及签名区块的过程中,所有涉及到私钥的操作都通过远程钱包的方式来访问,这样可以提升挖矿活动的安全性。
+3. 提高矿工收入和网络TPS:当venus-miner负责的矿工在一个周期获得多个(>1)出块权,venus-miner会尽量从消息池中选择不同的消息进行打包,这样一定程度上可以提升消息上链的速度,同时使该出块可能获得更多的小费奖励(Premium)。
### venus-messager
-The goal of venus-messager is to help messages on chain more efficiently, and to flexibly control the timing of messages on chain to reduce gas consumption and control the data traffic, etc. It includes remote wallet management, address management and message management.
-
-1. Wallet management: venus-messager connects multiple wallets and scans these addresses into the list.
-2. Address management: the major purpose is to manage the nonce value to ensure that the value can be assigned in the correct order.
-3. Message management: it is divided into three parts, namely "message receiving and saving", "message selection and pushing" and "tracking the status of message on the chain".
+venus-messager组件的目标是更好的帮助消息上链,并能够灵活的控制消息上链的时机,减少gas消耗,流量控制等。其中包括远程钱包管理、地址管理、消息管理。
-In terms of functions:
+1. 钱包管理:venus-messager连接多个钱包,并将这些地址扫描到列表里。
+2. 地址管理:主要是管理nonce值,保证nonce值能够按照正确的顺序分配。
+3. 消息管理:消息管理分成三个部分,分别是“消息接收和保存”、“消息选择及推送”“消息上链状态的追踪”。
-1. Support remote wallet: one messager supports multiple wallets to manage their message separately.
-2. Support local storage of SQLite and remote storage of MySQL for more secure and stable storage.
-3. Dynamic Fill: gas related parameters and nonce are to be filled out when sending a message on chain according to gas and push policy, to make sure the gas-estimation and other setting are valid.
-4. Maintain message status, including whether the message is chained and replaced and save the results of the execution.
-5. Multi-point message delivery (directly to the blockchain network with libp2p, push to the node by Mpool API), to make sure that messages are propagated over the network.
-6. Flexible config includes gas estimate, msg push strategy, etc.
+从功能性上来说:
+1. 远程钱包支持:一个venus-messager支持多个钱包,分别管理自己的message。
+2. 支持sqlite本地存储和mysql远程存储:存储更加安全稳定。
+3. 动态填充:根据gas和push策略,在链上发送消息时,需要填写gas相关参数和nonce,以确保gas估算和其他设置有效。
+4. 维护消息状态:包括消息是否被链接和替换,保存执行结果。
+5. 多点消息传递(通过libp2p直接到区块链网络,通过Mpool API推送到节点):确保消息在网络上传播。
+6. 灵活配置:包括gas估算、消息推送策略等。
### venus-wallet
-venus-wallet is a remote wallet, which can support both Lotus and Venus in terms of protocols. In a typical deployment environment, this component is deployed locally by miners, and the security of assets is guaranteed by certain policy configuration. venus-wallet has the following features:
+venus-wallet是一个远程钱包,协议上能够同时支持lotus和venus。在典型的部署环境中,这个组件由矿工部署在本地,并通过一定的策略配置保证资产的安全。venus-wallet有以下功能特点:
-1. Private key management module: currently it supports the private key management of asymmetric algorithms BLS and SECP, and it can generate random private key, and uses aes128 to encrypt and store the private key symmetrically whilst supports the private key to sign the data.
-2. Signature verification: each signature type has its verification policy, which ensures that the signer won't do deceits the wallet through non-credible signature type.
-3. Signature tactics module: for the Lotus and Venus implementation of Filecoin, the module is created to manage 10 existing data structures and more than 60 signature types in message data structure, and configure various combination methods on demand to bind private key signature rules, and then integrate several different private key signature rules and authorize them to external components for further usage.
+1. 私钥管理模块:目前支持非对称算法BLS和SECP的私钥管理,能够生成随机私钥,并运用aes128对私钥进行对称加密存储,同时支持私钥对数据进行签名。
+2. 签名验证:每种签名类型都有对应验证策略,保证了签名方不能在签名类型上欺骗钱包。
+3. 签名策略模块:针对Filecoin的Lotus及Venus实现,对存在的数10种数据结构以及message数据结构中的60余种签名类型进行统一管理,按需配置各种组合方式绑定私钥签名规则,而后可以将数种不同的私钥签名规则组成一个整体,授权于外部组件使用。
### venus-sealer + venus-worker
-venus-sealer continues the basic features of the mining part of lotus. We separate the mining related code from the sealer to form venus-sealer. The differences are:
+venus-sealer基本延续lotus的挖矿部分, 我们把sealer中和挖矿相关的代码剥离出来形成venus-sealer,两个项目的区别在于:
-1. Access to the messager system, and all messages are managed in the messager.
-2. Storage is separated from the badger, and SQLite is used to save metadata, sector state, machine information, scheduling and related results. In the future, MySQL storage will be further supported to ensure data security.
+1. 接入了messager系统,所有的消息都是在messager中进行管理.
+2. 存储脱离badger,使用sqlite保存(元数据,sector状态机系信息,调度及其结果),后续会进一步支持mysql存储,保证数据的安全性。
-## Some ideas for the future
+## 未来的一些构想
-The following plans mainly focus on:
-1. Follow up the latest Filecoin network.
-2. Start the venus-market project and improve the entire venus system.
-3. Optimize venus-sealer scheduling mode and storage (in planning).
-4. Improve the availability of components, continuously test components, fix some potential problems, ensure the stability and security of component services, and simplify the deployment mode.
-5. Optimize the log system to facilitate problem query and tracking.
\ No newline at end of file
+后续的计划主要集中在:
+1. 持续跟进最新的Filecoin区块链网络。
+2. 启动venus-market项目,完善整个Venus系统。
+3. 优化venus-sealer调度方式及存储相关(思考中)。
+4. 提升组件可用性,持续测试组件,修复一些潜在的问题,保证组件服务的稳定与安全,简化部署方式。
+5. 优化日志系统,便于问题查询追踪。
\ No newline at end of file
diff --git a/docs/zh/guide/Using-venus-Shared-Modules.md b/docs/zh/guide/Using-venus-Shared-Modules.md
index e0963066f..c737b24f9 100644
--- a/docs/zh/guide/Using-venus-Shared-Modules.md
+++ b/docs/zh/guide/Using-venus-Shared-Modules.md
@@ -33,7 +33,7 @@ Depending on its role in a mining cluster, modules could be loosely broken down
Diagram below illustrates how venus modules interacts with one and another.
-![venus-cluster](../images/venus-cluster.png)
+![venus-cluster](/venus-cluster.png)
## Hardware requirements
diff --git a/docs/zh/guide/Venus-replace-lotus.md b/docs/zh/guide/Venus-replace-lotus.md
index 4eea2b503..1e76116d3 100644
--- a/docs/zh/guide/Venus-replace-lotus.md
+++ b/docs/zh/guide/Venus-replace-lotus.md
@@ -58,11 +58,11 @@ Venus服务的共享组件包括:[venus](https://github.com/filecoin-project/v
* 用venus-sealer替换lotus-miner后重启服务,venus-sealer的部署请参考 [How-To-Deploy-MingPool](How-To-Deploy-MingPool.md)。
替换前Lotus集群流程
-![lotus-cluster-1](../images/lotus-cluster-1.png)
+![lotus-cluster-1](/lotus-cluster-1.png)
替换后Venus集群流程
-![venus-replace-lotus-cluster-1](../images/venus-replace-lotus-cluster-1.png)
+![venus-replace-lotus-cluster-1](/venus-replace-lotus-cluster-1.png)
##### 方案2: 定制化lotus-miner组件替换
@@ -73,8 +73,8 @@ Venus服务的共享组件包括:[venus](https://github.com/filecoin-project/v
* 矿工可以自己做相关工具的开发,或者等待Venus开发者后续推出相关工具及开发者文档。
替换前Lotus集群流程
-![lotus-cluster-2](../images/lotus-cluster-2.png)
+![lotus-cluster-2](/lotus-cluster-2.png)
替换后Venus集群流程
-![venus-replace-lotus-cluster-2](../images/venus-replace-lotus-cluster-2.png)
+![venus-replace-lotus-cluster-2](/venus-replace-lotus-cluster-2.png)
diff --git a/docs/zh/images/BE-home.png b/docs/zh/images/BE-home.png
deleted file mode 100644
index ee6090b2d..000000000
Binary files a/docs/zh/images/BE-home.png and /dev/null differ
diff --git a/docs/zh/images/BE-one-block.png b/docs/zh/images/BE-one-block.png
deleted file mode 100644
index 5ae42bd1b..000000000
Binary files a/docs/zh/images/BE-one-block.png and /dev/null differ
diff --git a/docs/zh/images/api_config.png b/docs/zh/images/api_config.png
deleted file mode 100644
index f545cee3d..000000000
Binary files a/docs/zh/images/api_config.png and /dev/null differ
diff --git a/docs/zh/images/mining_pool.jpg b/docs/zh/images/mining_pool.jpg
deleted file mode 100644
index d0cba338a..000000000
Binary files a/docs/zh/images/mining_pool.jpg and /dev/null differ
diff --git a/docs/zh/incubation/README.md b/docs/zh/incubation/README.md
index 34420557f..e83762835 100644
--- a/docs/zh/incubation/README.md
+++ b/docs/zh/incubation/README.md
@@ -1,443 +1,337 @@
-# Table of Contents
+# Venus集群组件介绍
+Venus是Filecoin分布式矿池的实现方案之一,系统集群组件包括:Venus,Venus-auth,Venus-miner,Venus-wallet,Venus-messager,Venus-sealer。从概念上理解其中Venus、Venus-auth、Venus-miner、Venus-wallet、Venus-messager具备可共用性(即程序可被多个矿工身份使用,在保证效率的情况下使硬件,软件资源得到充分利用),而Venus-sealer、Venus-worker、Venus-wallet主要用于积累算力。Venus-wallet属于可选组件,基于部署情况的安全性考量,Venus-wallet可以共享使用,也可以本地部署。本篇文档为nerpda测试网络下的集群部署。
-[[TOC]]
-## Background
+![venus-cluster](/venus-cluster.png)
+# Venus集群部署(基于nerpa测试网)
-Starting filecoin mining could be a daunting task given not only the large initial hardware and filecoin collateral [investment](https://filscan.io/calculator) but also the entailing operation commitment. With ideas of security, ease of use and distributed mining pool in mind, Venus implementation of filecoin will help miners turn, what community say, [a full time job](https://filecoinproject.slack.com/archives/CEGN061C5/p1610810730117900?thread_ts=1610809298.116800&cid=CEGN061C5) into a serious hobby. Hope this tutorial will get you started mining in no time!
-## How mining works
+| 程序 | 服务器 | 类型 | 作用 |
+| -------------- | ------- | ------ | -------------------------------------------------------------------------------------------- |
+| Venus-auth | \ | 共享 | Venus-auth 用于统一授权,当矿工组件访问共享组件的时候需要使用此服务注册生成的token |
+| Venus-gateway | \ | 共享 | 桥接部分接口调用 |
+| Venus | \ | 共享 | Filecoin节点数据同步 |
+| Venus-messager | \ | 共享 | 管理集群中的消息,保证消息上链,控制消息流量,重试等。可对接多个钱包,针对这些钱包做消息管理 |
+| Venus-miner | \ | 共享 | 打包出块消息,可配置多个矿工,会自行计算矿工出块情况,并通过远程访问Venus-sealer获取数据证明 |
+| Venus-wallet | \ | 共享 | 钱包管理,数据签名 |
+| Venus-sealer | \ | 非共享 | 数据封装 |
-There are two ways of getting started with mining using Venus.
-1. Deploy minimum hardware and gain access to a publicly hosted shared venus modules. (See [this](https://venus.filecoin.io/Using-venus-Shared-Modules.html) tutorial to learn more)
-2. Deploy all required hardware and venus modules by yourself. (The rest of this tutorial will walk you through this way of deploying venus mining operation)
+Tips:
+ - 以下所有`<>`都是需替换参数,根据自己的实际情况替换
+ - 具体版本请自行使用git checkout选择
+ - 环境依赖:
+ - golang ^1.15
+ - go env -w GOPROXY=https://goproxy.io,direct
+ - go env -w GO111MODULE=on
+ - git
-After following the rest of the trutorial and successful deployment, you can start pledging sectors, grow power and evantually obtain block rewards through your contribution to the network's storage capacity!
-## Introducing venus modules
-
-Depending on its role in a mining cluster, modules could be loosely broken down into two category: shared and independent. Shared modules could be thought as the plumbings of what you need to start sealing sectors. Most of the dealings with the blockchain like chain synchronizations, sending messages, winning a block and etc are handled by the shared modules. The idea is that many miners could all use a set of shared modules, thus reducing overhead in maintainence. Independent modules handles sealing and proving of your sectors, where you will be spend most of your time if you choose to use a publicly hosted shared venus modules. Note also that venus-wallet module could be deployed as either shared or independent.
-
-| name | role | shared/independent |
-| ------------------------------------------------------------ | ----------------------------------------------------- | ------------------ |
-| [venus](https://github.com/filecoin-project/venus) | daemon for chain interactions | shared |
-| [venus-miner](https://github.com/filecoin-project/venus-miner) | block winning and proving | shared |
-| [venus-messager](https://github.com/filecoin-project/venus-messager) | chain message management | shared |
-| [venus-auth](https://github.com/filecoin-project/venus-auth) | utility for authorized use of shared modules | shared |
-| [venus-gateway](https://github.com/ipfs-force-community/venus-gateway) | utility for controlled access point of shared modules | shared |
-| [venus-wallet](https://github.com/filecoin-project/venus-wallet) | addresses/keys management | shared/independent |
-| [venus-sealer](https://github.com/filecoin-project/venus-sealer), [venus-worker](https://github.com/filecoin-project/venus-sealer) | job scheduling, sealing and proving | independent |
-
-## Mining architecture
-
-Diagram below illustrates how venus modules interacts with one and another.
-
-![venus-cluster](../images/venus-cluster.png)
-## Hardware requirements
-
-Learn more about hardware requirements [here](https://docs.filecoin.io/mine/mining-architectures/#protocol-labs-example-architecture).
-
-## Pre-requisites
-
-Before diving into deployment of your mining operation, please make sure you go through the following steps.
-
-:::warning
-
-It is recommended that you test your setup in nerpa or calibration network before deploying on mainnet.
-
-:::
-
-### Setup your permanent storage
-
-Choose a network file system that you are familiar with (NFS for example) and deploy your storage cluster.
-
-### Software dependencies
-
-You will need the following software installed before running venus.
-
-#### Build tools
-
-Ubuntu/Debian:
-
-```shell
-sudo apt install mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y && sudo apt upgrade -y
-```
-
-CentOS:
-
-```bash
-sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm; sudo yum install -y git gcc bzr jq pkgconfig clang llvm mesa-libGL-devel opencl-headers ocl-icd ocl-icd-devel hwloc-devel
-```
-
-#### Go
-
-To build venus, you need a working installation of [Go 1.16 or higher](https://golang.org/dl/).
-
-```bash
-wget -c https://golang.org/dl/go1.16.2.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local
-```
-
-Add `/usr/local/go/bin` to your path and setup `Go` env. For most Linux distributions you can run something like:
-
-```bash
-echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc && source ~/.bashrc
-# setup go env
-go env -w GOPROXY=https://goproxy.io,direct
-go env -w GO111MODULE=on
-```
-
-See the [official Golang installation instructions](https://golang.org/doc/install) if you get stuck.
-
-## Install venus-auth
-Download and compile the source code of venus-auth.
+# 云上组件搭建
+## 1. Venus-auth Install
+### 编译并启动
```shell script
$ git clone https://github.com/filecoin-project/venus-auth.git
-$ cd venus-auth
-$ git checkout
-$ make
-$ nohup ./venus-auth > auth.log 2>&1 &
-```
-:::tip
-
-Default config file for Venus-auth is located at `~/.venus-auth/config.toml`.
-:::
-
-:::tip Logs
+$ cd venus-auth
-Log defaults printing to console. InfluxDB is supported through configuration.
+$ make
-:::
+$ nohup ./venus-auth > auth.log 2>&1 &
-### Using MySQL (Optional)
+```
+- Venus-auth服务默认配置文件目录为 ~/.venus-auth/config.toml
+- 存储方案默认为badger内嵌kv数据库,也支持MYSQL存储,需要自行修改配置文件后启动。
+- log存储默为控制台打印,同时支持influxDB存储
-MySQL 5.7 or above is supported and can be used as a substitute for the dedault Badger key-value database. To use MySQL database, modify the db section of the config.
+#### MYSQL存储启动(可选)
+Tips: MYSQL支持5.7以上官方版本(如云平台MYSQL默认设置各有不同,请自己结合云平台修改配置,否则可能会出现 “ Specified key was too long; max key length is 767 bytes ”)
+##### 修改Venus-auth config中的db设置
```shell script
$ vim ~/.venus-auth/config.toml
-# Data source configuration item
+# 数据源配置项
[db]
# support: badger (default), mysql
# the mysql DDL is in the script package
type = "mysql"
# The following parameters apply to MySQL
-DSN = ":@(127.0.0.1:3306)/venus_auth?parseTime=true&loc=Local&charset=utf8mb4&collation=utf8mb4_unicode_ci&readTimeout=10s&writeTimeout=10s"
+DSN = "root:111111@(127.0.0.1:3306)/venus_auth?parseTime=true&loc=Local&charset=utf8mb4&collation=utf8mb4_unicode_ci&readTimeout=10s&writeTimeout=10s"
# conns 1500 concurrent
maxOpenConns = 64
maxIdleConns = 128
maxLifeTime = "120s"
maxIdleTime = "30s"
-```
-Restart venus-auth for the configuration to take into effect.
+```
+- 启动
```shell script
-$ ps -ef | grep auth
-$ kill
$ nohup ./venus-auth > auth.log 2>&1 &
```
-### Token gerneration
-
-venus-auth manages [jwt](https://jwt.io/) tokens used by other venus modules for them to talk to each other securely on the network.
-
-Generate tokens for shared modules.
-
-```bash
-# --perm specifies admin, sign, wirte or read permission of the token generated
-$ ./venus-auth genToken --perm admin
-
-```
-
-Generate tokens for independent modules. Tokens can be logically grouped by `` as individual miner joining the mining pool.
+### 注册生成云上组件互相访问需要的token
```shell script
-$ ./venus-auth addUser --name
-$ ./venus-auth genToken --perm write
-
-$ ./venus-auth genToken --perm read
-
+$ ./venus-auth genToken --perm admin admin
+
```
-:::tip
-
-Use `./venus-auth addUser ` to logically group different tokens.
-
-:::
+- `` 格式统一为 JWT token
+- 这些token之后会被各个程序使用,用以对集群接入组件做验证
+- `--perm`为RPC2.0接口访问权限限制
+- miner,messager,sealer,推荐标记为程序名,若存在多个相同程序要加入集群,可以使用“程序名+标记符”。
-## Install venus-gateway
+## 2. Venus-gateway Install
-Download and compile the source code of venus-gateway.
-
-```bash
+```shell script
$ git clone https://github.com/ipfs-force-community/venus-gateway.git
$ cd venus-gateway
-$ git checkout
-$ go mod tidy
$ make
-```
-Start venus-gateway.
-
-```bash
-$ ./venus-gateway \
---listen /ip4/0.0.0.0/tcp/45132 \
-run \
-# Use either a http or https url
---auth-url \
-> venus-gateway.log 2>&1 &
+$ nohup ./venus-gateway --listen /ip4/0.0.0.0/tcp/45132 run --auth-url http://:8989 > gateway.log 2>&1 &
```
-## Install venus daemon
-
-Download and compile the source code of venus.
-
+## 3. Venus install
+### 安装编译环境
+```shell script
+sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm; sudo yum install -y git gcc bzr jq pkgconfig clang llvm mesa-libGL-devel opencl-headers ocl-icd ocl-icd-devel hwloc-devel
+```
+### 编译并启动
```shell script
$ git clone https://github.com/filecoin-project/venus.git
+
$ cd venus
-$ git checkout
+
$ make deps
+
$ make
-```
-Start venus daemon for chain synchronization. Use `--network` to specify the network venus is connecting to.
-```bash
+# 启动venus daemon 设置网络与Venus-auth的地址
+# 启动成功后tail -f venus.log 可以看到数据同步的log
+# 这里需要等待一段时间
$ nohup ./venus daemon --network nerpa \
---authURL \
+--authURL http://:8989 \
> venus.log 2>&1 &
```
+- `--authURL` 为设置Venus-auth监听http地址
-:::tip
-
-Use `tail -f venus.log` to check if there is any errors during sychronization.
-
-:::
-
-### Grant access to venus daemon
-
-By default, venus daemon only respond to local access. Change the following configuration to allow access from other addresses.
+### 修改IPV4监听地址
+目前程序启动后默认监听地址为`127.0.0.1:3453`,对于跨服务器集群,需要修改监听策略,可以通过`lsof -i:3453` 查询到进程后,Kill掉进程,修改IPV4策略后重启
```shell script
vim ~/.venus/config.json
-```
-
-Change `apiAddress` from `/ip4/127.0.0.1/tcp/3453` to `/ip4/0.0.0.0/tcp/3453`. Save and close the config file.
-
-```json
-{
- "api": {
- "venusAuthURL": "http://192.168.5.62:8989",
- "apiAddress": "/ip4/0.0.0.0/tcp/3453",
- "accessControlAllowOrigin": [
- "http://localhost:8080",
- "https://localhost:8080",
- "http://127.0.0.1:8080",
- "https://127.0.0.1:8080"
- ],
- "accessControlAllowCredentials": false,
- "accessControlAllowMethods": [
- "GET",
- "POST",
- "PUT"
- ]
- },
-```
-Restart venus daemon for the config to take into effects.
+# 做如下操作,修改为监听所有本机IPV4地址:
+# replace api.apiAddress from
+# "/ip4/127.0.0.1/tcp/3453" to "/ip4/0.0.0.0/tcp/3453"
-```bash
-$ ps -ef | grep venus
-$ kill
+# 修改完毕后重启服务:
$ nohup ./venus daemon --network nerpa \
---authURL \
-> venus.log 2>&1
+--authURL http://:8989 \
+> venus.log 2>&1 &
```
-## Install venus-wallet
-
-Download and compile the source code of venus-wallet.
-
+## 4. Venus-messager install
+### 编译并启动
```shell script
-$ git clone https://github.com/filecoin-project/venus-wallet.git
-$ cd venus-wallet
-$ git checkout
-$ make
-```
+$ git clone https://github.com/filecoin-project/venus-messager.git
-Start venus-wallet.
+$ cd venus-messager
-```bash
-$ nohup ./venus-wallet run > wallet.log 2>&1 &
-```
+$ make deps
-Set password for venus-wallet
+$ make
+
+# 启动venus-message 进程
+$ nohup ./venus-messager run \
+--auth-url=http://:8989 \
+--node-url /ip4//tcp/3453 \
+--gateway-url /ip4//tcp/3453 \
+--auth-token \
+--db-type mysql \
+--mysql-dsn "root:111111@tcp(127.0.0.1:3306)/cali_venus?parseTime=true&loc=Local&readTimeout=10s&writeTimeout=10s" \
+> msg.log 2>&1 &
-```shell script
-# Set lock and unlock password
-$ ./venus-wallet setpwd
-Password:******
-Enter Password again:******
```
-:::warning
+- `--auth-url` 为设置Venus-auth监听地址
+- `--node-url` 为Venus监听地址
+- `--gateway-url` 为gateway监听地址
+- `--auth-token` 为在venus-auth中生成的管理员token,用于和Venus通信时的身份验证
-Make sure you properly backup the password you just set.
+## 5. Venus-miner install
-:::
+### 编译并启动
-Generate addresses for later use.
+```shell script
+$ git clone https://github.com/filecoin-project/venus-miner.git
-```bash
-$ ./venus-wallet new bls
-
-$ ./venus-wallet new bls
-
-```
+$ cd venus-miner
-:::tip
+$ make nerpanet
-If you are testing on Nerpa or Calibration, you have to fund all your addresses with test coins from faucets. For nerpa, use this [faucet](https://faucet.nerpa.interplanetary.dev/funds.html). For calibration, use this [faucet](https://faucet.calibration.fildev.network/funds.html).
+# 初始化环境配置
+$ ./venus-miner init --api /ip4//tcp/3453 --token
-:::
+# 启动miner
+$ nohup ./venus-miner run >>miner.log 2>& 1 &
-Change `[APIRegisterHub]` section of `~/.venus_wallet/config.toml` using the token you generated with venus-auth.
-```toml
-[APIRegisterHub]
-RegisterAPI = ["/ip4//tcp/45132"]
-Token = ""
-SupportAccounts = [""]
-```
-Restart venus-wallet so that the changes takes into effect.
+$ ./venus-miner address add \
+--addr \
+--sealer-listen-api /ip4//tcp/2345/http \
+--sealer-token \
+--wallet-listen-api /ip4//tcp/5678/http \
+--wallet-token
-```bash
-# grep [PID] of venus-wallet process
-$ ps -ef | grep wallet
-# kill the process and restart
-$ kill [PID]
-$ nohup ./venus-wallet run > wallet.log 2>&1 &
-```
+# print
+add miner: { {...}}
-## Install venus-messager
-Download and compile the source code of venus-messager.
+# 查询miner状态
+$ ./venus-miner address state
+# print
+[
+ {
+ "Addr": "",
+ "IsMining": true,
+ "Err": ""
+ }
+]
-```shell script
-$ git clone https://github.com/filecoin-project/venus-messager.git
-$ cd venus-messager
-$ git checkout
-$ make deps
-$ make
-```
-Start venus-messager. Note that `--auth-url`, `--node-url` and `--auth-token` are for venus-messager to be aware of other venus modules and be properly authenticated.
+# 如果IsMining为false
+# 需要执行
+$ ./venus-miner address start
-```bash
-$ nohup ./venus-messager run \
---auth-url= \
---node-url /ip4//tcp/3453 \
---gateway-url=/ip4//tcp/45132 \
---auth-token \
---db-type mysql \
---mysql-dsn ":@(127.0.0.1:3306)/venus_messager?parseTime=true&loc=Local&readTimeout=10s&writeTimeout=10s" \
-> msg.log 2>&1 &
+# 因为miner支持多矿工
+# 可以通过以下指令查看所有关联矿工
+# 对于矿工的启停可以自行安排
+$ ./venus-miner address list
```
+- ``在Venus-sealer install部分查看
+- ``为Venus-sealer节点JWT token,切换到对应服务器后`cat ~/.venussealer/token`可获得
+- `` 为设置Venus-wallet中获得的接口授权JWT token,查看Venus-wallet install中``处可查看token如何获得
-:::tip
-If no database related params are specified, venus-messager will default to use sqlite.
-:::
-## Install venus-miner
+# 本地组件搭建
-Download and compile the source code of venus-miner.
+## 准备工作
+云上组件需要增加接入的矿工sealer和钱包生成token. 矿工只有凭借这个token才能访问云上的服务。 收钱矿工需要为自己起一个别名, 这里以jimmy为例子。在venus-auth中加入这个矿工,并为矿工生成token
```shell script
-$ git clone https://github.com/filecoin-project/venus-miner.git
-$ cd venus-miner
-$ git checkout
-$ make
+$ venus-auth addUser --name jimmy --miner f0<>
+$ venus-auth genToken --perm write jimmy
+
```
-Initialize venus-miner.
-
-```bash
-$ ./venus-miner init
-# For nettype, choose from mainnet, nerpanet, debug, 2k, calibnet
---nettype nerpanet
---auth-api \
---token \
---gateway-api /ip4//tcp/45132
---api /ip4//tcp/3453 \
+
+## 1. Venus-wallet install
+### 编译并启动
+```shell script
+$ git clone https://github.com/filecoin-project/venus-wallet.git
+
+$ cd venus-wallet
+
+# 编译
+$ make
+
+# 启动
+$ nohup ./venus-wallet run > wallet.log 2>&1 &
```
-Run venus-miner.
+### 设置密码并创建钱包
+> 此处创建了2个BLS钱包,用于之后的Venus-sealer初始化
+```shell script
+# 设置加解锁密码
+$ ./venus-wallet setpwd
+Password:******
+Enter Password again:******
-```bash
-$ nohup ./venus-miner run >>miner.log 2>& 1 &
+# 生成BLS地址
+$ ./venus-wallet new bls
+
+$ ./venus-wallet new bls
+
```
+- `` 为86位长度地址
+#### 注意
+新生成的`` ``需要到https://faucet.nerpa.interplanetary.dev/funds.html中预充balance后才能在链上生成actor。
-### Miner management
+### 修改配置文件并重启
-Once a miner, venus-sealer with proper miner id, connected to your shared modules. You can query the status of said miner id by the following.
+```toml
+# Default config:
+[API]
+ ListenAddress = "/ip4/0.0.0.0/tcp/5678/http"
-```bash
-$ ./venus-miner address state
-[
- {
- "Addr": "",
- "IsMining": true,
- "Err": null
- }
-]
-```
+[DB]
+ Conn = "/root/.venus_wallet/keystore.sqlit"
+ Type = "sqlite"
+ DebugMode = true
-If `IsMining` of your miner is `false`, you can run the following command to start the miner id.
+[JWT]
+ Token = "65794a68624763694f694a49557a49314e694973496e523563434936496b705856434a392e65794a42624778766479493657794a795a57466b4969776964334a70644755694c434a7a615764754969776959575274615734695858302e7a534c6755446565514e6473716f666179415235445a6f4b4f48787742566855364c635636716154586663"
+ Secret = "96d3bbf96ee0151a0495146bccd4825e81e12c24ed8307456a286066a610d52d"
-```bash
-$ ./venus-miner address start
-```
+[Factor]
+ ScryptN = 262144
+ ScryptP = 1
-List all miner ids that have connected to venus-miner.
+[Strategy]
+ Level = 0
+ NodeURL = ""
-```bash
-$ ./venus-miner address list
+[APIRegisterHub] //修改此处 上面勿动
+RegisterAPI = ["/ip4//tcp/45132"]
+Token = ""
+SupportAccounts = ["jimmy"]
```
-## Install venus-sealer
-
-Download and compile the source code of venus-miner.
+## 2. Venus-sealer install
+### 编译并启动(sealer单程序只能绑定一个矿工)
```shell script
$ git clone https://github.com/filecoin-project/venus-sealer.git
+
$ cd venus-sealer
-$ git checkout
+
$ make deps
+
$ make
```
-
-#### Initialize sealer with a new miner id
-
-If you don't have a miner id yet, run the following command to initialize sealer.
-
+#### 初始化新矿工(2选1)
```shell script
$ nohup ./venus-sealer init \
---worker \
---owner \
-# Choose between 32G or 64G for mainnet
+--worker \
+--owner \
--sector-size 512M \
-# Choose from nerpa, calibration. Leave out --network for mainet?
--network nerpa \
-# Addresses of different shared venus modules
---node-url /ip4//tcp/3453 \
---messager-url /ip4//tcp/3453 \
---gateway-url /ip4//tcp/3453 \
---auth-token \
-# Flags sealer to not storing any sealed sectors on the machine it runs on
+--node-url /ip4//tcp/3453 \
+--messager-url /ip4//tcp/3453 \
+--gateway-url /ip4//tcp/3453 \
+--auth-token \
--no-local-storage \
+--wallet-name testminer \
> sealer.log 2>&1 &
-# Expect output close to the following
+```
+
+#### 初始化已存在矿工(2选1)
+> 不需要指定`--sector-size`
+```shell script
+$ ./venus-sealer init \
+--actor \
+--network nerpa \
+--node-url /ip4//tcp/3453 \
+--messager-url /ip4//tcp/3453 \
+--gateway-url /ip4//tcp/3453 \
+--auth-token \
+--no-local-storage \
+--wallet-name testminer
+
+# 查看日志等待消息上链注册actor地址
2021-04-25T18:41:31.925+0800 INFO main venus-sealer/init.go:182 Checking if repo exists
2021-04-25T18:41:31.926+0800 INFO main venus-sealer/init.go:217 Checking full node version
2021-04-25T18:41:31.927+0800 INFO main venus-sealer/init.go:233 Initializing repo
@@ -445,70 +339,68 @@ $ nohup ./venus-sealer init \
2021-04-25T18:41:32.082+0800 INFO main venus-sealer/init.go:485 Pushed CreateMiner message: aaf489f9-af4b-4e4b-9084-018d43f05b7e
2021-04-25T18:41:32.082+0800 INFO main venus-sealer/init.go:486 Waiting for confirmation
2021-04-25T18:46:32.088+0800 INFO main venus-sealer/init.go:502 New miners address is: t01640 (t2cxzf7xvrqo3froqn2xgdqjdbydhkcrgakj7j3ma)
-# miner id on nerpa and calibration starts with "t", while miner id on mainnet starts with "f"
2021-04-25T18:46:32.088+0800 INFO main venus-sealer/init.go:381 Created new miner: t01640
2021-04-25T18:46:32.089+0800 INFO main venus-sealer/init.go:302 Sealer successfully created, you can now start it with 'venus-sealer run'
-```
-
-#### Initialize sealer with an existing miner id
-
-If you already have a miner id, run the following command to initialize sealer.
-
-```shell script
-$ ./venus-sealer init \
---actor \
-# Choose from nerpa, calibration. Leave out --network for mainet?
---network nerpa \
-# Config for different shared venus modules
---node-url /ip4//tcp/3453 \
---messager-url /ip4//tcp/3453 \
---gateway-url /ip4//tcp/3453 \
---auth-token \
-# Flags sealer to not store any sealed sectors on the machine it runs on
---no-local-storage \
-> sealer.log 2>&1 &
-# Expect output close to the following
-2021-06-07T04:15:49.170+0800 INFO main venus-sealer/init.go:193 Checking if repo exists
-2021-06-07T04:15:49.170+0800 INFO main venus-sealer/init.go:205 Checking full node version
-2021-06-07T04:15:49.174+0800 INFO main venus-sealer/init.go:221 Initializing repo
-2021-06-07T04:15:49.175+0800 INFO main venus-sealer/init.go:334 Initializing libp2p identity
-2021-06-07T04:15:49.181+0800 INFO main venus-sealer/init.go:406 Created new miner: t02105
-2021-06-07T04:15:49.181+0800 INFO main venus-sealer/init.go:290 Sealer successfully created, you can now start it with 'venus-sealer run'
```
-### Start pledging
+- `` `` 为Venus-wallet中创建的BLS钱包地址,注意这2个钱包地址都需要有balance
+- ``为Venus-auth中注册的sealer
+- ``为绝对路径
-Run venus-sealer.
+#### 启动sealer并执行sector封装
```shell script
$ nohup ./venus-sealer run >> sealer.log 2>&1 &
-```
-:::tip
+# 指定存储目录(可选)
+# 因为指定了--no-local-storage
+# 所以需要指定sealer存储目录
+$ ./venus-sealer storage attach --init --store --seal
-If you are running sealer for the 1st time, it will start to download proof parameters, which may take quite some time. If you are located in China, follow the tips [here](https://venus.filecoin.io/Tips-Running-In-China.html) to speed up the process.
+# 执行sector封装,这个命令只支持单次
+# 可以通过crontab 做定时任务,也可以自行编写策略脚本执行
+$ ./venus-sealer sectors pledge
-:::
+# 查看sector列表
+$ ./venus-sealer sectors list
-Attach permanent storage to sealer.
+# 查看actor地址
+# 这里为
+$ ./venus-sealer info
-```bash
-$ ./venus-sealer storage attach --init --store --seal
+Chain: [sync ok] [basefee 100 aFIL]
+Sealer: (512 MiB sectors)
+Power: 0 / 15 Ti (0.0000%)
+ Raw: 0 B / 1.5 TiB (0.0000%)
+ Committed: 3 GiB
+ Proving: 0 B
+Below minimum power threshold, no blocks will be won
+Sealer Balance: 383.869 FIL
+ PreCommit: 0
+ Pledge: 93.75 mFIL
+ Vesting: 0
+ Available: 383.775 FIL
+Market Balance: 0
+ Locked: 0
+ Available: 0
+Worker Balance: 1000 FIL
+Total Spendable: 1383.775 FIL
```
-Pledge a single sector.
-```bash
-$ ./venus-sealer sectors pledge
-```
+## 7. 问题相关
-Check ongoing sealing job.
+1. go mod 出先如下问题
-```bash
-$ ./venus-sealer sealing
-```
+```shell script
+SECURITY ERROR
+This download does NOT match an earlier download recorded in go.sum.
+The bits may have been replaced on the origin server, or an attacker may
+have intercepted the download attempt.
-## Questions?
-Find us on [Slack](https://filecoinproject.slack.com/archives/CEHHJNJS3)!
+# 解决方案
+go clean -modcache
+go mod tidy
+```
diff --git a/docs/zh/incubation/Using-venus-Shared-Modules.md b/docs/zh/incubation/Using-venus-Shared-Modules.md
index e0963066f..c737b24f9 100644
--- a/docs/zh/incubation/Using-venus-Shared-Modules.md
+++ b/docs/zh/incubation/Using-venus-Shared-Modules.md
@@ -33,7 +33,7 @@ Depending on its role in a mining cluster, modules could be loosely broken down
Diagram below illustrates how venus modules interacts with one and another.
-![venus-cluster](../images/venus-cluster.png)
+![venus-cluster](/venus-cluster.png)
## Hardware requirements
diff --git a/docs/zh/mine/hardware-requirements.md b/docs/zh/mine/hardware-requirements.md
index f7497eb61..50cfe8d7a 100644
--- a/docs/zh/mine/hardware-requirements.md
+++ b/docs/zh/mine/hardware-requirements.md
@@ -60,6 +60,7 @@ As mentioned, the Miners have to perform operations of different nature which di
| Proving _WindowPoSt_ | Yes (all cores, when no GPU) | Yes | - | _WindowPoSts_ must be submitted in 30 minute windows. When no GPU available, the more CPU cores the faster |
| Proving _WinningPoSt_ | Yes | No | - | _WinningPoSt_ is a less intensive computation. Must be completed in a 25 seconds window. |
+
## About hardware requirements
-The above requirements will not increase in the presumable future, and money spent on hardware should provide users with many years of reliable service, paying for themselves several times over.
+The above requirements will not increase in the presumable future, and money spent on hardware should provide users with many years of reliable service, paying for themselves several times over.
\ No newline at end of file
diff --git a/docs/zh/mine/how-mining-works.md b/docs/zh/mine/how-mining-works.md
index 142d2e0d3..6a82ef8bd 100644
--- a/docs/zh/mine/how-mining-works.md
+++ b/docs/zh/mine/how-mining-works.md
@@ -38,4 +38,4 @@ Each Filecoin miner has an associated _power_ value in the network that is propo
Additionally, miners submit storage proofs regularly to the chain. This enables them to obtain _storage fees_ from the clients that have made deals with them.
-Additional details about this can be found in the [mining rewards](mining-rewards.md) section.
+Additional details about this can be found in the [mining rewards](mining-rewards.md) section.
\ No newline at end of file
diff --git a/docs/zh/mine/mining-architectures.md b/docs/zh/mine/mining-architectures.md
index 69dc469ed..525c559c3 100644
--- a/docs/zh/mine/mining-architectures.md
+++ b/docs/zh/mine/mining-architectures.md
@@ -24,4 +24,4 @@ A PDF is available for download [here](https://filecoin.io/vintage/mining-hardwa
| -------------------- | ----------------------------- | -------------------------- | ---------- | --------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| Storage miner + Node | AMD Epyc 7402 (24 cores) | Nvidia Quadro RTX 6000 | 128-256GB | Unspecified | 1x venus
1x venus-miner | The miner delegates sealing functions to the workers below. |
| PC1 workers | AMD Epyc 7F32 DP/UP (8 cores) | - | 128-256GiB | 6 x 1-2TiB SSD scratch disk | 6x venus-worker | Runs 6 Venus seal workers in parallel for PreCommit1 phase only. |
-| PC2, Commit workers | AMD Epyc 7402 (24 cores) | 2 x Nvidia Quadro RTX 6000 | 256GiB | 2-4TiB SSD scratch disk(s) | 1x venus-worker (PC2)
1x venus-worker (Commit) | One worker dedicated to PreCommit2 and another to the Commit phase |
+| PC2, Commit workers | AMD Epyc 7402 (24 cores) | 2 x Nvidia Quadro RTX 6000 | 256GiB | 2-4TiB SSD scratch disk(s) | 1x venus-worker (PC2)
1x venus-worker (Commit) | One worker dedicated to PreCommit2 and another to the Commit phase |
\ No newline at end of file
diff --git a/docs/zh/mine/mining-rewards.md b/docs/zh/mine/mining-rewards.md
index 554c1ccec..d512c5ed6 100644
--- a/docs/zh/mine/mining-rewards.md
+++ b/docs/zh/mine/mining-rewards.md
@@ -30,4 +30,4 @@ To further incentivize the storage of "useful" data over simple capacity commitm
## Retrieval fees
-Retrieval fees are paid incrementally using _payment channels_ as the retrieval deals are fulfilled (by sending portions of the data to the cl. This happens off-chain.
+Retrieval fees are paid incrementally using _payment channels_ as the retrieval deals are fulfilled (by sending portions of the data to the cl. This happens off-chain.
\ No newline at end of file
diff --git a/docs/zh/mine/slashing.md b/docs/zh/mine/slashing.md
index 57a23b492..6321c3b4a 100644
--- a/docs/zh/mine/slashing.md
+++ b/docs/zh/mine/slashing.md
@@ -20,4 +20,4 @@ This term encompasses a broader set of penalties which are to be paid by miners
## Consensus fault slashing
-This penalty is incurred when committing consensus faults. This penalty is applied to miners that have acted maliciously against the network's consensus functionality.
+This penalty is incurred when committing consensus faults. This penalty is applied to miners that have acted maliciously against the network's consensus functionality.
\ No newline at end of file
diff --git a/docs/zh/mine/venus/gpus.md b/docs/zh/mine/venus/gpus.md
index 2d806f493..4f886a142 100644
--- a/docs/zh/mine/venus/gpus.md
+++ b/docs/zh/mine/venus/gpus.md
@@ -38,4 +38,4 @@ First, to watch GPU utilization run `nvtop` in one terminal, then in a separate
./Venus-bench sealing --sector-size=2KiB
```
-This process uses a fair amount of GPU, and generally takes ~4 minutes to complete. If you do not see any activity in nvtop from venus during the entire process, it is likely something is misconfigured with your GPU.
+This process uses a fair amount of GPU, and generally takes ~4 minutes to complete. If you do not see any activity in nvtop from venus during the entire process, it is likely something is misconfigured with your GPU.
\ No newline at end of file
diff --git a/docs/zh/mine/venus/message-pool.md b/docs/zh/mine/venus/message-pool.md
index b19c6309b..077c0cfc7 100644
--- a/docs/zh/mine/venus/message-pool.md
+++ b/docs/zh/mine/venus/message-pool.md
@@ -83,4 +83,4 @@ The _GasLimit_ should not be changed under normal circumstances. For instruction
```sh
venus mpool replace --help
-```
+```
\ No newline at end of file
diff --git a/docs/zh/mine/venus/miner-addresses.md b/docs/zh/mine/venus/miner-addresses.md
index 9af79702b..f695662ae 100644
--- a/docs/zh/mine/venus/miner-addresses.md
+++ b/docs/zh/mine/venus/miner-addresses.md
@@ -203,4 +203,4 @@ venus-miner actor withdraw
::: tip
The owner's address will need to be available in the Venus node and have enough funds to pay for the gas for this transaction. Cold addresses will need to be temporally imported for the operation to succeed.
-:::
+:::
\ No newline at end of file
diff --git a/docs/zh/mine/venus/sealer-configuration.md b/docs/zh/mine/venus/sealer-configuration.md
index f1a9e7816..126672655 100644
--- a/docs/zh/mine/venus/sealer-configuration.md
+++ b/docs/zh/mine/venus/sealer-configuration.md
@@ -30,4 +30,4 @@ For any configuration changes to take effect, the miner must be restarted.
Timeout = "30s"
```
-Configure `RemoteListenAddress` to the value that a different node would have to use to reach this API. Usually it is the miner's IP address and API port, but depending on your setup (proxies, public IPs etc.), it might be a different IP.
+Configure `RemoteListenAddress` to the value that a different node would have to use to reach this API. Usually it is the miner's IP address and API port, but depending on your setup (proxies, public IPs etc.), it might be a different IP.
\ No newline at end of file
diff --git a/docs/zh/modules/README.md b/docs/zh/modules/README.md
index 90f43b0ae..1baa314bd 100644
--- a/docs/zh/modules/README.md
+++ b/docs/zh/modules/README.md
@@ -1,170 +1,83 @@
-# Getting started
+# 入门
-This is a step-by-step guide for installing and running a Filecoin node connected to the testnet on your local machine.
+这是安装和运行Filecoin节点并连接到本地机器测试网络的指南。后续教程将解释如何 [挖取Filecoin](Mining-Filecoin).
-## Table of contents
+## 目录
-- [Getting started](#getting-started)
- - [Table of contents](#table-of-contents)
- - [Minimal requirements](#minimal-requirements)
- - [Installing Go](#installing-go)
- - [Installing Rustup](#installing-rustup)
- - [Install system dependencies](#install-system-dependencies)
- - [Linux](#linux)
- - [MacOS](#macos)
- - [XCode Command Line Tools](#xcode-command-line-tools)
- - [Install Homebrew](#install-homebrew)
- - [Installing dependencies](#installing-dependencies)
- - [Building Filecoin and running tests](#building-filecoin-and-running-tests)
- - [Start running Filecoin](#start-running-filecoin)
- - [Wait for chain sync](#wait-for-chain-sync)
- - [Viewing network information](#viewing-network-information)
+- [入门](#getting-started)
+ - [目录](#table-of-contents)
+ - [系统要求](#system-requirements)
+ - [安装依赖项和系统配置](#installing-dependencies-and-system-configuration)
+ - [安装Go](#installing-go)
+ - [安装依赖项](#installing-dependencies)
+ - [构建和运行测试](#building-filecoin-and-running-tests)
+ - [开始运行Filecoin](#start-running-filecoin)
+ - [从Filecoin水龙头获取FIL](#get-fil-from-the-filecoin-faucet)
+ - [等待链同步](#wait-for-chain-sync)
+ - [查看网络信息](#viewing-network-information)
-## Minimal requirements
+### 系统要求
-To run a Lotus node, your computer must have:
+Venus可以在大多数GNU/Linux和MacOS系统上构建和运行。尚不支持Windows。
-- macOS or Linux installed. Windows is not yet supported.
-- 8-core CPU and 32 GiB RAM. Models with support for _Intel SHA Extensions_ (AMD since Zen microarchitecture, or Intel since Ice Lake) will significantly speed things up.
-- Enough space to store the current Lotus chain (preferably on an SSD storage medium). The chain grows at approximately 12 GiB per week. The chain can be also [synced from trusted state snapshots and compacted](../guide/Chain.md).
+验证节点可以在大多数具有至少8GB RAM的系统上运行。挖矿节点需要大量的RAM和GPU资源,这取决于正在使用的扇区配置。
-#### Installing Go
+### 安装依赖项和系统配置
-The build process for `venus` requires [Go](https://golang.org/doc/install) >= v1.16.
-
-> Installing Go for the first time? We recommend [this tutorial](https://www.ardanlabs.com/blog/2016/05/installing-go-and-your-workspace.html) which includes environment setup.
-
-Due to the use of `cgo` in `venus`, a C compiler is required to build it whether a prebuilt library is being used or it is compiled from source. To use `gcc` (e.g. `export CC=gcc`), v7.4.0 or higher is required.
-
-The build process will download a static library containing the [Filecoin proofs implementation](https://github.com/filecoin-project/rust-fil-proofs) (which is written in Rust).
-
-> **NOTICE:** To build proofs from source, (1) a Rust development environment must be installed and (2) the environment variable `FFI_BUILD_FROM_SOURCE=1` must be set. More information can be found in [filecoin-ffi](https://github.com/filecoin-project/filecoin-ffi).
-
-#### Installing Rustup
-
-Lotus needs [rustup](https://rustup.rs). The easiest way to install it is:
+Clone“venus”git库并输入:
```sh
-curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
+mkdir -p /path/to/filecoin-project
+git clone https://github.com/filecoin-project/venus.git /path/to/filecoin-project/venus
```
-:::tip
-Make sure your `$PATH` variable is correctly configured after the rustup installation so that `cargo` and `rustc` are found in their rustup-configured locations.
-:::
-
-
-#### Install system dependencies
-
-##### Linux
+#### 安装Go
-Arch:
+'venus'的构建过程需要 [Go](https://golang.org/doc/install) >= v1.13。
-```bash
-sudo pacman -Syu opencl-icd-loader gcc git bzr jq pkg-config opencl-icd-loader opencl-headers hwloc
-```
+> 第一次安装Go?我们推荐 [这个教程](https://www.ardanlabs.com/blog/2016/05/installing-go-and-your-workspace.html) 其中包括环境设置。
-Ubuntu/Debian:
+由于`venus`中使用了`cgo`,因此无论是使用预构建库还是从源代码处编译,都需要一个C编译器来构建它。要使用 `gcc` (例如`export CC=gcc`),需要v7.4.0或更高版本。
-```bash
-sudo apt install mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y && sudo apt upgrade -y
-```
+构建过程将下载一个静态库,其中包含[Filecoin Proof的实现](https://github.com/filecoin-project/rust-fil-proofs) (用Rust写的)。
-Fedora:
+> **注意:** 要从源代码生成证明,(1)必须安装Rust开发环境,(2)必须设置环境变量 `FFI_BUILD_FROM_SOURCE=1` 更多信息可在[filecoin-ffi](https://github.com/filecoin-project/filecoin-ffi)中找到。
-```bash
-sudo dnf -y install gcc make git bzr jq pkgconfig mesa-libOpenCL mesa-libOpenCL-devel opencl-headers ocl-icd ocl-icd-devel clang llvm wget hwloc libhwloc-dev
-```
+#### 安装依赖项
-OpenSUSE:
+1. 加载所有Git子模块:
-```bash
-sudo zypper in gcc git jq make libOpenCL1 opencl-headers ocl-icd-devel clang llvm hwloc && sudo ln -s /usr/lib64/libOpenCL.so.1 /usr/lib64/libOpenCL.so
+```sh
+git submodule update --init --recursive
```
-Amazon Linux 2:
+2. 初始化生成依赖项:
-```bash
-sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm; sudo yum install -y git gcc bzr jq pkgconfig clang llvm mesa-libGL-devel opencl-headers ocl-icd ocl-icd-devel hwloc-devel
+```sh
+make deps
```
-##### MacOS
-
-These instructions are specific to macOS. If you are installing Lotus on a Linux distribution, head over to the [Linux section](#linux).
-
-### XCode Command Line Tools
-
-Lotus requires that X-Code CLI tools be installed before building the Lotus binaries.
-
-1. Check if you already have the XCode Command Line Tools installed via the CLI, run:
+ > **注意:** 第一次`deps` 启动可能**慢**,因为很大的参数文件要么下载,要么在 `/var/tmp/filecoin-proof-parameters`中本地生成。要有耐心,以后会更快。
- ```sh
- xcode-select -p
- ```
+### 构建和运行测试
- If this command returns a path, you can move on to the [next step](#install-homebrew). Otherwise, to install via the CLI, run:
-
- ```sh
- xcode-select --install
- ```
-
-1. To update, run:
-
- ```sh
- sudo rm -rf /Library/Developer/CommandLineTools
- xcode-select --install
- ```
-
-### Install Homebrew
-
-We recommend that MacOS users use [Homebrew](https://brew.sh) to install each of the necessary packages.
-
-1. Use the command `brew install` to install the following packages:
-
- ```sh
- brew install go bzr jq pkg-config rustup hwloc
- ```
-
-#### Installing dependencies
-
-2. Clone the `venus` git repository and enter it:
-
- ```sh
- mkdir -p /path/to/filecoin-project
- git clone https://github.com/filecoin-project/venus.git /path/to/filecoin-project/venus
- ```
-
-3. Load all the Git submodules:
-
- ```sh
- git submodule update --init --recursive
- ```
-
-4. Initialize the build dependencies:
-
- ```sh
- make deps
- ```
-
- > **NOTICE:** The first `deps` start up can be **slow**, as very large parameter files are either downloaded or generated locally in `/var/tmp/filecoin-proof-parameters`. Have patience; future runs will be faster.
-
-### Building Filecoin and running tests
+1. 构建二进制文件:
+```sh
+make
+```
-1. Build the binary:
- ```sh
- make
- ```
+2. 运行单元测试:
-2. Run the unit tests:
- ```sh
- go run ./build test
- ```
+```sh
+go run ./build test
+```
-3. Optionally, building and tests can be combined:
- ```sh
- go run ./build best
- ```
+3. 或者可以将构建和测试结合起来:
+```sh
+go run ./build best
+```
-Other handy build commands include:
+其他方便的构建命令包括:
```sh
# Check the code for style and correctness issues
@@ -183,55 +96,93 @@ go run ./build test -race
go run ./build all
```
-> **NOTICE:** Any flag passed to `go run ./build test` (e.g. `-cover`) will be passed on to `go test`.
+> **注意:** 传递给 `go run ./build test` 的任何标志(例如 `-cover`) 都将传递给 `go test`。
-## Start running Filecoin
+**对于构建中的所有问题**, 请参阅 [故障排除](https://go.filecoin.io/venus-tutorial/Troubleshooting-&-FAQ.html) 文档内容。
-1. If `venus` has been run on the system before, remove existing Filecoin repo (**this will delete all previous filecoin data**):
- ```sh
- rm -rf ~/.venus
- ```
+## 开始运行Filecoin
-2. Start the venus daemon:
- ```sh
- venus daemon
- ```
+1. 如果以前在系统上运行过`venus` ,请删除现有的Filecoin repo(**这将删除所有以前的Filecoin数据**):
+```sh
+rm -rf ~/.venus
+```
+
+2. 启动venus守护进程:
+```sh
+venus daemon
+```
-This should return "My peer ID is ``", where `` is a long [CID](https://github.com/filecoin-project/specs/blob/master/definitions.md#cid) string starting with "Qm".
+这应该返回“我的peerID是``” , 其中 `` 是一个长的 [CID](https://github.com/filecoin-project/specs/blob/master/definitions.md#cid) ,是以“Qm”开头的字符串。
-1. Print a list of bootstrap node addresses:
- ```sh
- venus config bootstrap.addresses
- ```
+1. 打印启动节点地址列表:
+```sh
+venus config bootstrap.addresses
+```
-2. Choose any address from the list you just printed, and connect to it (Automatic peer discovery and connection coming soon.):
- ```sh
- venus swarm connect
- ```
-
- > **NOTICE:** This can be **slow** the first time. The filecoin node needs a large parameter file for proofs, stored in `/tmp/filecoin-proof-parameters`. It is usually generated by the `deps` build step. If these files are missing they will be regenerated, which can take up to an hour. We are working on a better solution.
+2. 从刚打印的列表中选择任意地址,并连接到该地址(peer自动的发现和连接即将到来):
+```sh
+venus swarm connect
+```
+
+ > **注意:** 第一次可能较**慢**。filecoin节点需要一个大参数文件来进行校对,存储在 `/tmp/filecoin-proof-parameters`中。它通常由 `deps`构建步骤生成。如果这些文件丢失,它们将被重新生成,这可能需要一个小时。我们正在研究更好的解决办法。
+
+3. 检查节点的连接:
+```sh
+venus swarm peers # list addresses of peers to which you're connected
+```
-3. Check the node's connectivity:
- ```sh
- venus swarm peers # list addresses of peers to which you're connected
- ```
+该节点现在应该连接到一些peer,并将开始下载和验证区块链。
-The node should now be connected to some peers and will begin downloading and validating the blockchain.
+🎉 哇哦!您现在正在运行Filecoin节点并连接到网络。这是一个基础节点的结构:
+![单个节点及其组件的示意图](/getting-started-node-diagram.png)
+ > **注意:** 守护进程现在正在自己的终端中无限期运行 (`Ctrl + C` 退出)。要运行其他`venus` 命令,请打开第二个终端选项卡或窗口 (在Mac上是 `Cmd + T`)。
- > **NOTICE:** The daemon is now running indefinitely in its own Terminal (`Ctrl + C` to quit). To run other `venus` commands, open a second Terminal tab or window (`Cmd + T` on Mac)._
+_需要帮助吗?请参阅 [疑难解答和常见问题](Troubleshooting-&-FAQ) 或 [在 Matrix chat的 #fil-dev ](https://riot.im/app/#/room/#fil-dev:matrix.org)._
-_Need help? See [Troubleshooting & FAQ](../guide/Troubleshooting-&-FAQ) or [#fil-dev on Matrix chat](https://riot.im/app/#/room/#fil-dev:matrix.org).
-## Wait for chain sync
-🎉 Congratulations, you're now connected to Filecoin! The daemon is now busy syncing and validating the existing blockchain, which can take awhile -- hours or even days depending on network age and activity.
+## 从Filecoin水龙头获取FIL
+
+**一旦你的链完成同步**, 你将可以使用水龙头获得filecoin代币(FIL)。在Filecoin节点可以参与市场之前需要一些启动文件,客户需要在他们的帐户中输入FIL,以便与矿工进行存储交易。矿工在最初向网络抵押存储时使用FIL作为抵押品。
+
+在早期测试中,可以从Filecoin水龙头获得模拟的测试FIL。“水龙头”之所以得名,是因为它能把FIL发放到那些把钱包放在它下面的人。使用模拟的测试FIL可以对市场动态进行初步测试,而无需任何真实资金。
+
+FIL的所有余额都存放在钱包里。新创建节点时,它将有一个余额为0 FIL的Filecoin钱包。
+
+1. 检索您的钱包地址:
+```sh
+venus wallet ls
+```
+
+2. 输出的应该是一个长的字母数字字符串。转到testnet的 [水龙头](https://faucet.testnet.filecoin.io) 并提交那个钱包地址。要花一分钟才能把钱放进钱包。
+
+ * 或者你可以从命令行触发水龙头:
+```sh
+export WALLET_ADDR=`venus wallet ls` # fetch your wallet address into a handy variable
+MESSAGE_CID=`curl -X POST -F "address=${WALLET_ADDR}" "https://faucet.testnet.filecoin.io/send"`
+```
+
+3. 水龙头将提供消息CID。如果链已与网络同步,则此消息应在大约30秒内处理。可以运行以下命令以等待确认:
+
+```sh
+venus state wait-msg ${MESSAGE_CID}
+```
+
+4. 通过检查钱包余额验证FIL是否已转入钱包中:
+
+```sh
+venus wallet balance ${WALLET_ADDR}
+```
+
+## 等待链同步
+🎉 恭喜,您现在已连接到Filecoin!守护进程现在正忙于同步和验证现有的区块链,这可能需要一段时间---数小时甚至数天,具体取决于网络时间和活动。
-During this initial sync time ther will be intense activity on one CPU core. Find out what the current block height is first by visiting the [network stats page](https://stats.testnet.filecoin.io) then observe the nodes syncing progress:
+在同步初期,一个CPU内核上会有激烈的活动。首先通过访问 [网络统计页](https://stats.testnet.filecoin.io) 了解当前块的高度,然后观察节点同步进度:
```sh
venus sync status
````
-## Viewing network information
+## 查看网络信息
-There are a few visualisation tools to help users understand what is happening within the Filecoin network, such as the official [network stats](http://stats.testnet.filecoin.io/) page as well as the community-managed block explorers [filscan.io](https://filscan.io), [filscout.io](https://filscout.io), and [filfox.io](https://filfox.io/).
+有一些可视化工具可以帮助用户了解Filecoin网络中正在发生的事情,例如官方的 [网络统计页面](http://stats.testnet.filecoin.io/) 以及社区管理的区块浏览器 [filscan.io](https://filscan.io)。