strangelove-ventures / poa

Cosmos Proof-of-Authority module for private & permissioned networks
https://strange.love
13 stars 6 forks source link

docs(guide): performing an upgrade #183

Open Reecepbcups opened 5 months ago

Reecepbcups commented 5 months ago

original from: https://gist.github.com/fmorency/8042310d09861497da698cf2b5cd4dc2

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.0.0, and [UPGRADE_BLOCK_HEIGHT] is the block height at which to apply the upgrade. This must be a block after the block of the uploaded Tx

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

appd tx tx sign upgrade.json --from poa-admin > upgrade_signed.json
appd tx broadcast upgrade_signed.json
fmorency commented 5 months ago

I confirm this also works when the POA Admin is a group.

See the E2E test at https://github.com/liftedinit/manifest-ledger/blob/5785a352dbb2b34e611227387af6fbfb5a3ed8f0/interchaintest/poa_group_test.go#L147-L161