导出状态
使用以下命令导出状态:--for-zero-height 标志:
手动迁移状态
如果你希望手动迁移状态,例如用于本地测试。请注意,对于常规链升级,不需要手动执行状态迁移。 将状态导出为 json 文件后,你可以用new_genesis.json 替换旧的 genesis.json。
migrate 命令,将某个给定版本迁移到下一个版本(例如:v0.X.X 到 v1.X.X):
Export State
Export state with:--for-zero-height flag:
Manually Migrate State
If you want to migrate state manually, e.g. for local testing purpose. Note that for regular chain upgrades, a manual state migration is not required. After exporting your state into a json file, you can replace the oldgenesis.json with new_genesis.json.
migrate command to migrate from a given version to the next one (eg: v0.X.X to v1.X.X):