This gist provides instructions on how to migration from Ghostcloud on ComsosSDK 0.47 to Ghostcloud on CosmosSDK 0.50 (POA). The procedure assumes a cutover to a new chain running using Ghostcloud CosmosSDK 0.50 POA.
- Stop a running Ghostcloud 0.47 node and export the ghostcloud module state
where
# The `--log_level error` parameter IS IMPORTANT. Do not remove. ghostcloudd export --log_level error \ --height [HEIGHT] \ --for-zero-height \ --home [HOME_DIR] \ --modules-to-export ghostcloud | jq > gc-047-export.json
[HEIGHT]
is the latest blockchain height, e.g.,1234
, and[HOME_DIR]
is the home directory used by Ghostcloud to store its configuration, e.g.,~/.gc
. - Build Ghostcloud 0.50 POA
- Use the new 0.50 POA build to generate a new genesis file.
# See `script/test_node.sh` for an example on how merge existing data into the genesis file ghostcloudd init [MONIKER] --chain-id [CHAIN_ID] --default-denom=ugcx
- Merge exiting data into the new genesis file
jq -s '.[0] as $new | .[1] as $exp | $new | .app_state.ghostcloud = $exp.app_state.ghostcloud' ${HOME_DIR}/config/genesis.json gc-047-export.json > merged.json mv merged.json ${HOME_DIR}/config/genesis.json
- Validate the new genesis file
ghostcloudd genesis validate ${HOME_DIR}/config/genesis.json
- Finish the configuration and start the node!