Skip to content

Instantly share code, notes, and snippets.

@fmorency
Last active May 17, 2024 15:10
Show Gist options
  • Save fmorency/8042310d09861497da698cf2b5cd4dc2 to your computer and use it in GitHub Desktop.
Save fmorency/8042310d09861497da698cf2b5cd4dc2 to your computer and use it in GitHub Desktop.
POA Software Upgrade

Create an unsigned transaction file upgrade.json containing

{
  "body": {
    "messages": [
      {
        "@type": "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade",
        "authority": "[POA_ADMIN_ADDRESS]",
        "plan": {
          "name": "[UPGRADE_NAME]",
          "time": "0001-01-01T00:00:00Z",
          "height": "[UPGRADE_BLOCK_HEIGHT]",
          "info": "{}",
          "upgraded_client_state": null
        }
      }
    ],
    "memo": "",
    "timeout_height": "0",
    "extension_options": [],
    "non_critical_extension_options": []
  },
  "auth_info": {
    "signer_infos": [],
    "fee": {
      "amount": [],
      "gas_limit": "200000",
      "payer": "",
      "granter": ""
    },
    "tip": null
  },
  "signatures": []
  }
}

where [POA_ADMIN_ADDRESS] is the POA administrator address, [UPGRADE_NAME] is the name of the upgrade plan, e.g., v1-to-v2, and [UPGRADE_BLOCK_HEIGHT] is the block height at which to apply the upgrade.

Sign the transaction using the POA Admin account (TODO: instructions for then the POA Admin account is a group)

manifestd tx sign upgrade.json --from poa-admin > upgrade_signed.json

and broadcast the transaction

manifestd tx broadcast upgrade_signed.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment