Skip to content

Commit

Permalink
Merge pull request #397 from filecoin-project/chore/update-upgrade-do…
Browse files Browse the repository at this point in the history
…c-of-nv21

doc: update doc of nv21 upgrade
  • Loading branch information
simlecode committed Dec 11, 2023
2 parents 377a4de + b849870 commit a0c4ead
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 9 deletions.
22 changes: 18 additions & 4 deletions docs/operation/nv21-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
Product | tag | commit
---|---|---
sophon-auth | v1.14.0 | 7caadbc
venus | v1.14.0 | 45058a7
venus | v1.14.2 | 9204048
sophon-messager | v1.14.0 | e5f8371
soohon-gateway | v1.14.0 | 1adf038
venus-wallet | v1.14.0 | b478cd0
sophon-miner | v1.14.0 | 9ca976c
droplet | v2.10.0 | 6daf168
damocles-manager | v0.9.0 | 9f87e20
damocles-worker | v0.9.0 | 9f87e20
damocles-manager | v0.9.2 | f3c5400
damocles-worker | v0.9.2 | f3c5400



### Recommended Upgrade Sequence
Expand Down Expand Up @@ -71,6 +72,17 @@ Compile: First `make dist-clean` and then `make`, this can prevent problems caus
**If `~/.venus` exists and you need to import a snapshot, you need to delete the `~/.venus/version` file first before importing the snapshot**
:::

```
The memory consumption of migration depends on the CPUs used. You can set the limit of CPU by environment variable (`VENUS_MIGRATION_MAX_WORKER_COUNT=n`), to avoid use out of memory.
Recommended value of `VENUS_MIGRATION_MAX_WORKER_COUNT`:
48G VENUS_MIGRATION_MAX_WORKER_COUNT=13
64G VENUS_MIGRATION_MAX_WORKER_COUNT=18
96G VENUS_MIGRATION_MAX_WORKER_COUNT=24
The migration of update
```

1. Check whether the vk file is complete after upgrading

2. After the upgrade, execute the command `./venus state network-info`, and then check whether the `UpgradeWatermelonHeight` is normal through the log:
Expand Down Expand Up @@ -225,7 +237,9 @@ Dependency:
- damocles-manager

Precautions:
Translation:

- It is recommended to perform program updates after all tasks have been done and there are no ongoing tasks. If an update is required during the task on going, the sealing thread may get stuck in the 'SyntheticPoRepNeeded' state. In such cases, resetting the task status to 'PCSubmitted' can resolve the issue. You can use the following command: `damocles-manager util worker resume <worker name> <thread index> PCSubmitted`.
- The new proof type `SyntheticPoRep` uses a new proof parameter file. If `SyntheticPoRep` is enabled, it is best to prepare new proof parameters in advance. **Failing to do so may cause SyntheticPoRep deadlock**.

---
Expand All @@ -242,4 +256,4 @@ Upgrade result verification steps:

### Database changes

1. Add `id` field to droplet `storage_deals` table ==> `ALTER TABLE storage_deals ADD id varchar(128)`
1. Add `id` field to droplet `storage_deals` table ==> `ALTER TABLE storage_deals ADD id varchar(128)`
20 changes: 15 additions & 5 deletions docs/zh/operation/nv21-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@
组件名|tag|commit
---|---|---
sophon-auth | v1.14.0 | 7caadbc
venus | v1.14.0 | 45058a7
venus | v1.14.2 | 9204048
sophon-messager | v1.14.0 | e5f8371
soohon-gateway | v1.14.0 | 1adf038
venus-wallet | v1.14.0 | b478cd0
sophon-miner | v1.14.0 | 9ca976c
droplet | v2.10.0 | 6daf168
damocles-manager | v0.9.0 | 9f87e20
damocles-worker | v0.9.0 | 9f87e20

damocles-manager | v0.9.2 | f3c5400
damocles-worker | v0.9.2 | f3c5400

### 升级顺序

Expand Down Expand Up @@ -62,6 +61,16 @@ damocles-worker | v0.9.0 | 9f87e20
编译:先 `make dist-clean``make`,这样可以防止未能正常升级 `filecoin-ffi` 而带来的问题
**如果 `~/.venus` 存在且需要导入快照,需要先删除 `~/.venus/version` 文件再导入快照**

```
本次升级 migration(actor迁移)使用的CPU越多,消耗的内存也越多,所以需要限制CPU使用的数量。
在 venus 中可以通过环境变量(VENUS_MIGRATION_MAX_WORKER_COUN)来控制 migration 使用的CPU数量,
例子:export VENUS_MIGRATION_MAX_WORKER_COUNT=13。以下是对于不同机器内存时,建议设置 VENUS_MIGRATION_MAX_WORKER_COUNT 的数量:
48G VENUS_MIGRATION_MAX_WORKER_COUNT=13
64G VENUS_MIGRATION_MAX_WORKER_COUNT=18
96G VENUS_MIGRATION_MAX_WORKER_COUNT=24
```

1. 升级后检查vk文件是否完整

2. 升级后执行命令 `./venus state network-info`,然后检查通过日志检查 UpgradeWatermelonHeight 是否正常:
Expand Down Expand Up @@ -185,6 +194,7 @@ damocles-worker | v0.9.0 | 9f87e20
依赖升级组件: damocles-manager

注意事项:
- 建议等封装完所有的任务之后, 没有正在进行的的封装任务时, 进行程序更新。如果需要再封装进行的过程中进行更新的话,封装线程可能会卡在 `SyntheticPoRepNeeded` 状态。这个时候重置任务的状态为 `PCSubmitted` 即可:`damocles-manager util worker resume <worker name> <thread index> PCSubmitted`
- 新的证明类型 SyntheticPoRep 会使用新的证明参数文件。 如果启用 SyntheticPoRep 最好提前准备好新的证明参数,**证明参数有问题可能会导致 SyntheticPoRep 死锁**

---
Expand All @@ -201,4 +211,4 @@ damocles-worker | v0.9.0 | 9f87e20

### 数据库变更

1. droplet `storage_deals` 表增加 `id` 字段 ==> `ALTER TABLE storage_deals ADD id varchar(128)`
1. droplet `storage_deals` 表增加 `id` 字段 ==> `ALTER TABLE storage_deals ADD id varchar(128)`

0 comments on commit a0c4ead

Please sign in to comment.