mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-26 00:05:18 +00:00
parent
536049500f
commit
cd2827dbe7
@ -28,7 +28,7 @@ In the event that the upgrade does not succeed, validators and operators must do
|
|||||||
|
|
||||||
### Before the upgrade
|
### Before the upgrade
|
||||||
|
|
||||||
Kava Labs will submit a `SoftwareUpgradeProposal` that specifies the exact block _height_ at which the chain should shut down. This height will correspond to approximately 13:00 UTG on August 30th. Once the proposal passes, the chain will shutdown automatically at the specified height and does not require manual intervention by validators.
|
Kava Labs will submit a `SoftwareUpgradeProposal` that specifies the exact block _height_ at which the chain should shut down. This height will correspond to approximately 13:00 UTC on August 30th. Once the proposal passes, the chain will shutdown automatically at the specified height and does not require manual intervention by validators.
|
||||||
|
|
||||||
### On the day of the upgrade
|
### On the day of the upgrade
|
||||||
|
|
||||||
|
107
migrate/v0_15/migrate_cn.md
Normal file
107
migrate/v0_15/migrate_cn.md
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
# kava-8 Upgrade Instructions 升级指南
|
||||||
|
|
||||||
|
> This document is provided to assist Chinese speaking validators upgrade, but might not be updated as fast, and might not be the most current version. When in doubt, consult the English version
|
||||||
|
> 本文档用于帮助说中文的验证节点升级,但可能不是最新的版本。如有疑问,请查阅英文版
|
||||||
|
|
||||||
|
## Software Version and Key Dates 软件版本和关键日期
|
||||||
|
|
||||||
|
- We will be upgrading from chain-id "kava-7" to chain-id "kava-8".
|
||||||
|
- 将升级 chain-id 从"kava-7"到"kava-8"。
|
||||||
|
- The version of Kava for kava-8 is [TODO: version]
|
||||||
|
- The kava-7 chain will be shutdown with a `SoftwareUpgradeProposal` that activates at approximately 13:00 UTC on August, 30 2021.
|
||||||
|
- kava-7 链将通过 `SoftwareUpgradeProposal` 关闭,该 `SoftwareUpgradeProposal` 在 2021 年 8 月 30 日大约 13:00 UTC 激活。
|
||||||
|
- kava-8 genesis time is set to August 30th, 2021 at 15:00 UTC.
|
||||||
|
- kava-8 创世块设置为 2021 年 8 月 30 日 15:00 UTC。
|
||||||
|
- The version of cosmos-sdk for kava-8 is v0.39.3.
|
||||||
|
- kava-8 的 cosmos-sdk 版本为 v0.39.3。
|
||||||
|
- The version of tendermint for kava-8 v0.33.9.
|
||||||
|
- kava-8 的 tendermint 版本为 v0.33.9。
|
||||||
|
- The minimum version of golang for kava-8 is 1.13+, 1.15+ has been tested and is recommended.
|
||||||
|
- kava-8 的 golang 最低版本为 1.13+。 版本 1.15+ 已经过测试,推荐使用。
|
||||||
|
|
||||||
|
### Risks 风险
|
||||||
|
|
||||||
|
As a validator, performing the upgrade procedure on your consensus nodes carries a heightened risk of double-signing and being slashed. The most important piece of this procedure is verifying your software version and genesis file hash before starting your validator and signing.
|
||||||
|
作为验证者,在您的共识节点上执行升级程序会增加两种风险:双签名被削减。此过程中最重要的部分是在启动验证节点和签名之前确保您的软件版本和创世文件哈希无错。
|
||||||
|
|
||||||
|
The riskiest thing a validator can do is discover that they made a mistake and repeat the upgrade procedure again during the network startup. If you discover a mistake in the process, the best thing to do is wait for the network to start before correcting it. If the network is halted and you have started with a different genesis file than the expected one, seek advice from a Kava developer before resetting your validator.
|
||||||
|
验证者能做的最危险的事情是发现自己犯了错误并在网络启动期间再次重复升级程序。如果您在此过程中发现错误,最好的做法是等待网络启动后再进行更正。如果网络停止运行并且您开始使用的创世文件与预期的不同,请在重置验证节点之前向 Kava 开发人员寻求建议。
|
||||||
|
|
||||||
|
### Recovery 恢复
|
||||||
|
|
||||||
|
Prior to exporting kava-7 state, validators are encouraged to take a full data snapshot at the export height before proceeding. Snap-shotting depends heavily on infrastructure, but generally this can be done by backing up the .kvd and .kvcli directories.
|
||||||
|
在导出 kava-7 状态之前,建议验证者在导出区块的高度获取完整的数据快照。数据快照基于节点基础设施,但通常可以通过备份 .kvd 和 .kvcli 目录来完成。
|
||||||
|
|
||||||
|
It is critically important to back-up the .kvd/data/priv_validator_state.json file after stopping your kvd process. This file is updated every block as your validator participates in consensus rounds. It is a critical file needed to prevent double-signing, in case the upgrade fails and the previous chain needs to be restarted.
|
||||||
|
很重要的是,在停止 kvd 程序之后,必须备份 .kvd/data/priv_validator_state.json 文件。当您的验证者参与共识轮次时,此文件会在每个区块更新。 万一升级失败并需要重新启动之前的链,它是防止双签的关键文件。
|
||||||
|
|
||||||
|
In the event that the upgrade does not succeed, validators and operators must downgrade back to v0.14.2 of the Kava software and restore to their latest snapshot before restarting their nodes.
|
||||||
|
如果升级不成功,验证者和节点操作者必须降级回 Kava 软件的 v0.14.2 并在重新启动节点之前恢复到最后的快照。
|
||||||
|
|
||||||
|
## Upgrade Procedure 升级流程
|
||||||
|
|
||||||
|
### Before the upgrade 升级前
|
||||||
|
|
||||||
|
Kava Labs will submit a `SoftwareUpgradeProposal` that specifies the exact block _height_ at which the chain should shut down. This height will correspond to approximately 13:00 UTC on August 30th. Once the proposal passes, the chain will shutdown automatically at the specified height and does not require manual intervention by validators.
|
||||||
|
Kava Labs 将提交一个“SoftwareUpgradeProposal”,该消息会指定关闭链的确切区块高度。这个高度将对应于 8 月 30 日大约 13:00 UTC。一旦提案通过,链将在指定高度自动关闭,不需要验证者的任何人工操作。
|
||||||
|
|
||||||
|
### On the day of the upgrade 升级当天
|
||||||
|
|
||||||
|
**The kava chain is expected to halt at 13:00 UTC, and restart with new software at 15:00 UTC August 30th. Do not stop your node and begin the upgrade before 13:00UTC on August 30th, or you may go offline and be unable to recover until after the upgrade!**
|
||||||
|
|
||||||
|
**kava 链预计将在 13:00 UTC 停止,并在 8 月 30 日 15:00 UTC 重新启动新版本。 8 月 30 日 13:00 UTC 之前不要提前停止您的节点并开始升级,否则您可能会下线,直到升级后才能恢复!**
|
||||||
|
|
||||||
|
Kava developers will update this PR with the final block number when it is reached. **Make sure the kvd process is stopped before proceeding and that you have backed up your validator**. Failure to backup your validator could make it impossible to restart your node if the upgrade fails.
|
||||||
|
Kava 开发人员将在达到最终区块编号时更新此文件。 **确保在继续之前 kvd 程序已停止并且您已经备份了您的验证节点**。如果升级失败,如果没有备份过验证节点可能会导致无法重新启动节点。
|
||||||
|
|
||||||
|
1. Export State (this **MUST** be done using **v0.14.3**, previous v0.14.x versions will not produce the same genesis hash!)
|
||||||
|
导出状态(这个**必须**使用**v0.14.3**完成,以前的 v0.14.x 版本不会产生相同的创世哈希!)
|
||||||
|
|
||||||
|
```sh
|
||||||
|
kvd export --for-zero-height --height PLACEHOLDER > export-genesis.json
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note:** This can take a while!
|
||||||
|
**注:** 这可能需要一段时间!
|
||||||
|
|
||||||
|
2. Update to kava-8 更新到 kava-8
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# in the `kava` folder 在kava文件夹中
|
||||||
|
git pull
|
||||||
|
git checkout [TODO: version]
|
||||||
|
make install
|
||||||
|
|
||||||
|
# verify versions 确保版本无错
|
||||||
|
kvd version --long
|
||||||
|
# name: kava
|
||||||
|
# server_name: kvd
|
||||||
|
# client_name: kvcli
|
||||||
|
# version: [TODO: version]
|
||||||
|
# commit: PLACEHOLDER
|
||||||
|
# build_tags: netgo,ledger
|
||||||
|
# go: go version go1.15.8 linux/amd64
|
||||||
|
|
||||||
|
|
||||||
|
# Migrate genesis state 迁移创世状态
|
||||||
|
kvd migrate export-genesis.json > genesis.json
|
||||||
|
|
||||||
|
# Verify output of genesis migration 验证创世迁移的输出
|
||||||
|
kvd validate-genesis genesis.json # should say it's valid 应该说它是合法的
|
||||||
|
jq -S -c -M '' genesis.json | shasum -a 256
|
||||||
|
# PLACEHOLDER
|
||||||
|
|
||||||
|
# Restart node with migrated genesis state 重新启动具有迁移的创世状态的节点
|
||||||
|
cp genesis.json ~/.kvd/config/genesis.json
|
||||||
|
kvd unsafe-reset-all
|
||||||
|
|
||||||
|
# Restart node - 重启节点
|
||||||
|
# ! Be sure to remove --halt-time flag if it is set in systemd/docker 如果在 systemd/docker 中设置了 --halt-time 标志,请删除它
|
||||||
|
kvd start
|
||||||
|
```
|
||||||
|
|
||||||
|
### Coordination 协调
|
||||||
|
|
||||||
|
If the kava-8 chain does not launch by August 30, 2021 at 19:00 UTC, the launch should be considered a failure and validators should refer to the [rollback](./rollback.md) instructions to restart the previous kava-7 chain. In the event of launch failure, coordination will occur in the [Kava discord](https://discord.com/invite/kQzh3Uv).
|
||||||
|
|
||||||
|
如果 kava-8 链在 2021 年 8 月 30 日 19:00 UTC 之前没有启动,则升级应被视为失败,验证者应参考 [rollback](./rollback.md) 指令重新启动之前的 kava- 7 链。如果升级失败,将在[Kava discord](https://discord.com/invite/kQzh3Uv)中进行协调。
|
@ -14,7 +14,7 @@ If you don't have the backup priv_validator_state.json file, you will not have d
|
|||||||
|
|
||||||
1. Copy the contents of your backup data directory back to the $KVD_HOME/data directory. By default this is ~/.kvd/data.
|
1. Copy the contents of your backup data directory back to the $KVD_HOME/data directory. By default this is ~/.kvd/data.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
# Assumes backup is stored in "backup" directory
|
# Assumes backup is stored in "backup" directory
|
||||||
rm -rf ~/.kvd/data
|
rm -rf ~/.kvd/data
|
||||||
mv backup/.kvd/data ~/.kvd/data
|
mv backup/.kvd/data ~/.kvd/data
|
||||||
@ -22,7 +22,7 @@ mv backup/.kvd/data ~/.kvd/data
|
|||||||
|
|
||||||
2. Install the previous version of kava
|
2. Install the previous version of kava
|
||||||
|
|
||||||
```
|
```sh
|
||||||
# from kava directory
|
# from kava directory
|
||||||
git checkout v0.14.2
|
git checkout v0.14.2
|
||||||
make install
|
make install
|
||||||
@ -33,7 +33,7 @@ kvd version --long
|
|||||||
|
|
||||||
3. Restart kvd process
|
3. Restart kvd process
|
||||||
|
|
||||||
```
|
```sh
|
||||||
### be sure to remove --halt-time flag if it is set
|
### be sure to remove --halt-time flag if it is set
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
sudo systemctl restart kvd
|
sudo systemctl restart kvd
|
||||||
|
51
migrate/v0_15/rollback_cn.md
Normal file
51
migrate/v0_15/rollback_cn.md
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
# Kava-8 Rollback Instructions
|
||||||
|
|
||||||
|
> This document is provided to assist Chinese speaking validators upgrade, but might not be updated as fast, and might not be the most current version. When in doubt, consult the English version
|
||||||
|
> 本文档用于帮助说中文的验证节点升级,但可能不是最新的版本。如有疑问,请查阅英文版
|
||||||
|
|
||||||
|
In the event that the kava-8 relaunch is unsuccessful, we will restart the kava-7 chain using the last known state.
|
||||||
|
如果 kava-8 的升级失败,我们将使用最后一个区块链状态重新启动 kava-7 链。
|
||||||
|
|
||||||
|
In order to restore the previous chain, the following data must be recovered by validators:
|
||||||
|
为了恢复之前的链,验证者必须恢复以下数据:
|
||||||
|
|
||||||
|
- The database that contains the state of the previous chain (in ~/.kvd/data by default)
|
||||||
|
- 包含之前链状态的数据库(默认在 ~/.kvd/data 中)
|
||||||
|
- The priv_validator_state.json file of the validator (in ~/.kvd/data by default)
|
||||||
|
- 验证节点的 priv_validator_state.json 文件(默认在 ~/.kvd/data 中)
|
||||||
|
|
||||||
|
If you don't have the database data, the Kava developer team or another validator will share a copy of the database via Amazon s3 or a similar service. You will be able to download a copy of the data and verify it before starting your node.
|
||||||
|
如果您没有数据库数据,Kava 开发团队或其他验证者将通过 Amazon s3 或类似服务共享数据库副本。您将能够下载数据副本并在启动节点之前对其进行验证。
|
||||||
|
|
||||||
|
If you don't have the backup priv_validator_state.json file, you will not have double sign protection on the first block. If this is the case, it's best to consult in the validator discord before starting your node.
|
||||||
|
如果您没有备份 priv_validator_state.json 文件,您将在新链的第一个区块不会有双签保护。如果是这种情况,最好在启动节点之前在 discord 里咨询其他验证者。
|
||||||
|
|
||||||
|
## Restoring state procedure 恢复状态过程
|
||||||
|
|
||||||
|
1. Copy the contents of your backup data directory back to the $KVD_HOME/data directory. By default this is ~/.kvd/data.
|
||||||
|
将备份数据目录的内容复制回 $KVD_HOME/data 目录。默认情况下,这是 ~/.kvd/data。
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# Assumes backup is stored in "backup" directory 假设备份存储在“备份”目录中:
|
||||||
|
rm -rf ~/.kvd/data
|
||||||
|
mv backup/.kvd/data ~/.kvd/data
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Install the previous version of kava 安装之前版本的 kava
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# from kava directory 在kava目录里
|
||||||
|
git checkout v0.14.2
|
||||||
|
make install
|
||||||
|
|
||||||
|
## verify version 验证版本
|
||||||
|
kvd version --long
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Restart kvd process
|
||||||
|
|
||||||
|
```sh
|
||||||
|
### be sure to remove --halt-time flag if it is set 如果设置了 --halt-time 标志,请删除它
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl restart kvd
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user