Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(*): formatting docs with autocorrect #11

Merged
merged 2 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/intro/ha.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ make
## proxy(optional)

There are many options for the proxy, including load balancing such as nginx, slb, etc., but note that it needs to support websocket and custom http headers. Take nginx as an example here
install nginx https://www.nginx.com/resources/wiki/start/topics/tutorials/install
install nginx: https://www.nginx.com/resources/wiki/start/topics/tutorials/install

nginx config
nginx config:
```
user nginx;
worker_processes auto;
Expand Down
2 changes: 1 addition & 1 deletion docs/intro/join-a-cs.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ Initialize work space.
./dist/bin/venus-sector-manager daemon init
```

### Create a miner-idoptional
### Create a miner-id (optional)

Skip this step if you already have a miner-id.

Expand Down
2 changes: 1 addition & 1 deletion docs/ref/Venus-Worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ Running `./venus-sealer storage list`, the result is similar to the following

In venus-sealer, run the command ```venus-sealer sectors pledge``` to accumulate power. Run the command ```venus-sealer sectors list``` to check the status of sealing.

***Note: if the Rust code prompts permission error, you can add /var/tmp/filecoin-parents/tmp/bellman.gpu.lock/bellman.priority.lock and 777 permissions***
***Note: if the Rust code prompts permission error, you can add /var/tmp/filecoin-parents,/tmp/bellman.gpu.lock/bellman.priority.lock and 777 permissions***
4 changes: 2 additions & 2 deletions docs/zh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ footer: MIT Apache dual Licensed
<div class="features">
<div class="feature">
<h2>稳定&安全</h2>
<p>智子自2021年1月30日起持续同步Filecoin主网,历经多次迭代升级,为不同类型的用户提供稳定、安全的节点服务</p>
<p>智子自 2021 年 1 月 30 日起持续同步 Filecoin 主网,历经多次迭代升级,为不同类型的用户提供稳定、安全的节点服务</p>
</div>
<div class="feature">
<h2>高可用</h2>
Expand All @@ -18,6 +18,6 @@ footer: MIT Apache dual Licensed

<div class="feature">
<h2>大家的节点服务</h2>
<p>智子旨在为每个Filecoin生态系统参与者提供服务,通过智子的帐户管理功能就能够轻松管理SP、SC和Dapp等节点服务使用者</p>
<p>智子旨在为每个 Filecoin 生态系统参与者提供服务,通过智子的帐户管理功能就能够轻松管理 SP、SC 和 Dapp 等节点服务使用者</p>
</div>
</div>
32 changes: 16 additions & 16 deletions docs/zh/TODO.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
## 原则

&ensp;&ensp;基于目前的需要,先从重构guide和modules模块,让两块联动,形成比较易读的venus集群部署介绍.
&ensp;&ensp;基于目前的需要,先从重构 guide 和 modules 模块,让两块联动,形成比较易读的 venus 集群部署介绍。

- modules模块存储各组件的简介,将不相干的文档移到对应位置
- modules 模块存储各组件的简介,将不相干的文档移到对应位置

- guide和modules对于组件介绍存在很多重复的,只保留一份
- guide 和 modules 对于组件介绍存在很多重复的,只保留一份

- modules模块组件介绍老旧,超链接到项目的介绍文档,避免项目内更新后doc中不及时及重复劳动
- modules 模块组件介绍老旧,超链接到项目的介绍文档,避免项目内更新后 doc 中不及时及重复劳动

- guide将组件介绍,编译构建,部署文档独立
- guide 将组件介绍,编译构建部署文档独立

- guide模块增加QA模块,将venus discussion的问题以超链接方式统一到QA模块
- guide 模块增加 QA 模块,将 venus discussion 的问题以超链接方式统一到 QA 模块

- 部署模块尽量少一些设计的介绍,简明扼要,每个指定的操作尽量不涉及不相干的,以免造成误解
- 部署模块尽量少一些设计的介绍简明扼要每个指定的操作尽量不涉及不相干的以免造成误解

## TODO list

- [ ] modules模块
- [ ] modules 模块
- [ ] 引导页内容更新
- [ ] 不相关文档移走
- [ ] 文档命名一致
- [ ] 组件介绍匹配项目进度
- [x] 编译构建独立到一个文档
- [ ] 组件文档移除从项目中搬过来的内容,用超链接
- [ ] market和cluster模块的技术文档移到modules模块,
- [ ] 组件文档移除从项目中搬过来的内容用超链接
- [ ] market 和 cluster 模块的技术文档移到 modules 模块,

- [ ] guide模块
- [ ] guide 模块
- [ ] 将部署用到的基础知识单独形成文档
- [x] 编译构建超链接到对应文档
- [x] 增加部分组件的验证:怎么判断部署成功
- [x] 增加部分组件的验证怎么判断部署成功
- [ ] 目录结构调整
- [ ] market和cluster归属到链服务部署和独立组件部署文档
- [ ] .fil_withdraw_and_send.md.swp文件删除
- [ ] sealer文档放到单独的目录
- [ ] Troubleshooting-&-FAQ.md用超链接方式管理venus discussion
- [ ] market 和 cluster 归属到链服务部署和独立组件部署文档
- [ ] .fil_withdraw_and_send.md.swp 文件删除
- [ ] sealer 文档放到单独的目录
- [ ] Troubleshooting-&-FAQ.md 用超链接方式管理 venus discussion

- [ ] 移除没有价值或过时的文档
- [ ] 在很多模块中重复的内容整合
Expand Down
6 changes: 3 additions & 3 deletions docs/zh/about/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## 使命,愿景,价值观

- :exclamation:使命:建设Filecoin基础设施和工具,支持生态繁荣发展
- :earth_asia: 愿景:人人都能参与Filecoin生态
- :exclamation:使命:建设 Filecoin 基础设施和工具,支持生态繁荣发展
- :earth_asia: 愿景:人人都能参与 Filecoin 生态
- :yin_yang: 价值观:开放并且去信任

## 联系方式
Expand All @@ -16,4 +16,4 @@
- VenusHub: [venushub.io](venushub.io)
- Github: [venus](https://github.com/filecoin-project/venus)
- Social Media: [Twitter](https://twitter.com/venus_filecoin), [Wechat](https://mp.weixin.qq.com/s/p4_ch03QeMMXxPyakr_8XQ)
- 安全审计报告: [link](https://leastauthority.com/static/publications/LeastAuthority_Filecoin_Foundation_Venus_Final_Audit_Report.pdf)
- 安全审计报告[link](https://leastauthority.com/static/publications/LeastAuthority_Filecoin_Foundation_Venus_Final_Audit_Report.pdf)
56 changes: 28 additions & 28 deletions docs/zh/developer/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# 如何启动测试网络

> 本文以在 Ubuntu 系统部署2k网络为例
> 本文以在 Ubuntu 系统部署 2k 网络为例

:::warning

目前在 CentOS 系统存在问题, 具体请参考:[issue](https://github.com/filecoin-project/lotus/issues/7136)
目前在 CentOS 系统存在问题具体请参考:[issue](https://github.com/filecoin-project/lotus/issues/7136)

:::

Expand Down Expand Up @@ -51,13 +51,13 @@ $ ./venus seed pre-seal --sector-size 2048 --num-sectors 2
$ ./venus seed genesis new localnet.json
$ ./venus seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01000.json
```
> `seed pre-seal` 需要root权限,请在root用户下执行
> `seed pre-seal` 需要 root 权限,请在 root 用户下执行

- 启动venus
- 启动 venus
```sh
$ nohup ./venus daemon --make-genesis=devgen.car --genesis-template=localnet.json --network=2k --auth-url=http://127.0.0.1:8989 --auth-token=<venus-auth token> > venus.log 2>&1 &
```
> venus作为公共服务组件需要监听不同IP时需要修改配置文件 `.venus/config.json`
> venus 作为公共服务组件需要监听不同 IP 时需要修改配置文件 `.venus/config.json`
```bash
"apiAddress": "/ip4/0.0.0.0/tcp/3453",
```
Expand All @@ -79,24 +79,24 @@ $ ./venus chain head

### venus-message

&ensp;&ensp; venus-auth管理着其他venus模块使用的jwt令牌,以便它们在网络上安全地相互通信.为共享模块生成token
&ensp;&ensp; venus-auth 管理着其他 venus 模块使用的 jwt 令牌,以便它们在网络上安全地相互通信。为共享模块生成 token

```bash
# --perm specifies admin, sign, wirte or read permission of the token generated
$ ./venus-auth token gen --perm admin <SHARED>
<SHARED_ADMIN_AUTH_TOKEN>
```
> SHARED是token名,共享组件可以随便起。
> SHARED 是 token 名,共享组件可以随便起。

- 为矿工t01000和wallet生成token
- 为矿工 t01000 和 wallet 生成 token
```bash
$ ./venus-auth user add test
$ ./venus-auth user miner add test t01000
$ ./venus-auth token gen --perm write test
<USER_WRITE_AUTH_TOKEN>
```

查询token及user
查询 token 及 user
```bash
$ ./venus-auth user list
number: 1
Expand All @@ -123,12 +123,12 @@ nohup ./venus-messager run \
--db-type=sqlite \
> msg.log 2>&1 &
```
> db-type还支持mysql,配置如下:
> db-type 还支持 mysql,配置如下:
```bash
--db-type=mysql --mysql-dsn "<USER>:<PASSWORD>@(127.0.0.1:3306)/venus_messager?parseTime=true&loc=Local&readTimeout=10s&writeTimeout=10s"
```

2k网络4s出一个块,故需修改配置文件的WaitingChainHeadStableDuration为2s
2k 网络 4s 出一个块,故需修改配置文件的 WaitingChainHeadStableDuration 为 2s
```
# 默认是8s
[messageService]
Expand All @@ -145,7 +145,7 @@ nohup ./venus-messager run \
--slash-filter local
```

&ensp;&ensp; 此时没有启动venus-sealer,所以无法出块,因为获得出块权后需要计算证明,这个是venus-sealer负责的(管理所有的扇区永久存储),故暂时不启动venus-miner。
&ensp;&ensp; 此时没有启动 venus-sealer所以无法出块因为获得出块权后需要计算证明,这个是 venus-sealer 负责的 (管理所有的扇区永久存储),故暂时不启动 venus-miner。


## 创世节点
Expand All @@ -168,7 +168,7 @@ $ ./venus-wallet list
t3sjhgun7xcklmyga6x3c5sq6pbncdlmrjmepfz7ms4fuqimtk4fida37dhq7kpq3tn7nyu5hpnn7mtp3a7lia
```

设置接入venus-gateway,提供签名服务,这一步很重要,否则出块,消息等都没法签名,业务无法正常运行.
设置接入 venus-gateway,提供签名服务这一步很重要否则出块消息等都没法签名业务无法正常运行
```bash
# 修改`~/.venus_wallet/config.toml`
[APIRegisterHub]
Expand All @@ -177,12 +177,12 @@ Token = "<USER_WRITE_AUTH_TOKEN>"
# 矿工集群的别名,在venus-auth中注册
SupportAccounts = ["test"]
```
***保存后重启venus-wallet,需要unlock***
***保存后重启 venus-wallet,需要 unlock***
```bash
$ ./venus-wallet unlock
```

查看是否成功,在venus-gateway的日志中查询:
查看是否成功,在 venus-gateway 的日志中查询:
```bash
2021-08-05T10:01:07.665+0800 INFO event_stream walletevent/wallet_conn_mgr.go:89 add wallet connection {"channel": "58309445-87da-4160-831a-44e5236ab3c7", "walletName": "test", "addrs": ["t3sjhgun7xcklmyga6x3c5sq6pbncdlmrjmepfz7ms4fuqimtk4fida37dhq7kpq3tn7nyu5hpnn7mtp3a7lia"], "support": {"test":{}}, "signBytes": "6VzoKBejPzmFp/DvJzSO16s5SziYZKYjU2l2EkDUKy0="}
2021-08-05T10:01:07.666+0800 INFO event_stream walletevent/wallet_event.go:79 add new connections test 58309445-87da-4160-831a-44e5236ab3c7
Expand Down Expand Up @@ -210,7 +210,7 @@ $ ./venus-gateway wallet list
}
]
```
> 上面日志即表示wallet注册服务组件成功,可提供签名服务.
> 上面日志即表示 wallet 注册服务组件成功,可提供签名服务


### venus-sealer
Expand Down Expand Up @@ -256,7 +256,7 @@ Sectors:
Proving: 2
```

查看是不是在服务组件注册成功,gateway日志:
查看是不是在服务组件注册成功,gateway 日志:
```bash
2021-09-27T14:06:13.135+0800 INFO proof_stream proofevent/proof_event.go:71 add new connections 6295d403-275b-430e-a008-1b7491522d86 for miner t01000
```
Expand All @@ -267,13 +267,13 @@ t01000
```

- 开始出块
&ensp;&ensp; 这个时候我们就可以启动venus-miner了
&ensp;&ensp; 这个时候我们就可以启动 venus-miner 了
```
# run
nohup ./venus-miner run --nettype=2k --nosync > miner.log 2>& 1 &
```

启动时会从venus-auth请求当前已加入venus分布式矿池中的miner列表,可以根据命令查询:
启动时会从 venus-auth 请求当前已加入 venus 分布式矿池中的 miner 列表,可以根据命令查询
```
$ ./venus-miner address state
[
Expand All @@ -285,12 +285,12 @@ $ ./venus-miner address state
]
```

在venus-miner的运行过程中可以暂停或继续某个miner_id的出块:
在 venus-miner 的运行过程中可以暂停或继续某个 miner_id 的出块:
```
./venus-miner address stop/start f01000
```

查看venus-miner日志
查看 venus-miner 日志
```
2021-08-05T12:04:28.562+0800 INFO miner miner/minerwpp.go:88 GenerateWinningPoSt took 3.202841ms
2021-08-05T12:04:28.562+0800 INFO miner miner/warmup.go:94 winning PoSt warmup successful {"took": 0.00494326}
Expand Down Expand Up @@ -321,11 +321,11 @@ $ ./venus chain ls

## 普通节点

&ensp;&ensp; 普通节点和其他网络接入共享组件流程一致,可参考文档: https://venus.filecoin.io/guide/Using-venus-Shared-Modules.html#pre-requisites
&ensp;&ensp; 普通节点和其他网络接入共享组件流程一致可参考文档https://venus.filecoin.io/guide/Using-venus-Shared-Modules.html#pre-requisites

&ensp;&ensp; 唯一需要说明的是给普通节点钱包转账的问题:因为venus服务组件是限制Send消息的,而2k私网的原始fil在创世钱包里,故需要一个转账节点.
&ensp;&ensp; 唯一需要说明的是给普通节点钱包转账的问题:因为 venus 服务组件是限制 Send 消息的,而 2k 私网的原始 fil 在创世钱包里,故需要一个转账节点

- 启动一个venus节点,仅用于转账
- 启动一个 venus 节点,仅用于转账
```sh
nohup ./venus daemon --genesisfile=devgen.car --network=2k > venus.log 2>&1 &
```
Expand Down Expand Up @@ -366,22 +366,22 @@ $ ./venus wallet balance <wallet>
$ ./venus wallet default
$ ./venus wallet set-default <wallet>
```
> venus转账节点重启后也需要unlock,不然无法转账.
> venus 转账节点重启后也需要 unlock,不然无法转账

## 扇区封装

&ensp;&ensp; 和主网逻辑差不多,请查阅:[扇区封装](https://venus.filecoin.io/zh/guide/Using-venus-Shared-Modules.html#开始封装),需要注意的是:

1. 文档中init时没有添加storage,故如果要做扇区封装,先attach storage;
1. 文档中 init 时没有添加 storage,故如果要做扇区封装,先 attach storage;

2. 如果机器上同时运行看了别的占用gpu的程序,如多个venus-worker,需要用TMP_DIR指定不同路径,避免竞争锁。
2. 如果机器上同时运行看了别的占用 gpu 的程序,如多个 venus-worker,需要用 TMP_DIR 指定不同路径,避免竞争锁。

3. 第一个sector时没有生成/var/tmp/s-basic-unsealed-2048,需要手动执行拷贝命令:
```
cp <unsealed file> /var/tmp/s-basic-unsealed-2048
```

&ensp;&ensp; 测试结果: 2~8 是新做的Sector,已上链
&ensp;&ensp; 测试结果2~8 是新做的 Sector,已上链
```
$ ./venus-sealer sectors list
ID State OnChain Active Expiration Deals DealWeight
Expand Down
Loading