Skip to content

Instantly share code, notes, and snippets.

@fmorency
Last active August 13, 2025 19:45
Show Gist options
  • Save fmorency/97c8ab23aeef8fb850b8a717eaa6f91e to your computer and use it in GitHub Desktop.
Save fmorency/97c8ab23aeef8fb850b8a717eaa6f91e to your computer and use it in GitHub Desktop.
Ghostcloud 0.47 to 0.50-POA

Ghostcloud Migration Guide

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.

  1. Stop a running Ghostcloud 0.47 node and export the ghostcloud module state
    # 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
    where [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.
  2. Build Ghostcloud 0.50 POA
  3. 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
  4. 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
  5. Validate the new genesis file
    ghostcloudd genesis validate ${HOME_DIR}/config/genesis.json
  6. Finish the configuration and start the node!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment