Skip to content

Creating a release

cor edited this page Aug 31, 2023 · 10 revisions

In the document below, replace VERSION with your version, such as v0.10.0

Phase 1: Adding the upgrade to uniond

  1. Write upgrade handler uniond/app/upgrades/VERSION
  2. Add upgrade to uniond/app/upgrades.go
  3. Create PR and merge it into main

Phase 2: Release branch and the first release candidate

  1. Create release-VERSION branch from main
  2. On that branch, create tag VERSION-rc1 with body VERSION-rc1. Push that tag

Phase 3: Adding the release to bundle-testnet

  1. Add the new uniond version here: https://github.com/unionlabs/union/blob/68eec5926d7c50e3c1d78ab87c4af4b09b2806d6/flake.nix#L60
  2. Add it to the bundle here: https://github.com/unionlabs/union/blob/68eec5926d7c50e3c1d78ab87c4af4b09b2806d6/unionvisor/unionvisor.nix#L41
  3. Create a PR to add the new version to the bundle-testnet and merge it

Phase 4: Updating the validators

  1. Use nixos rebuild-switch in order to upgrade the Unionvisor version on your remote validator
  2. Wait for the deployment to be complete

Phase 5: On-chain upgrade proposal

  1. Creating the proposal-VERSION.json
  2. ./uniond tx gov draft-proposal --node https://rpc.0xc0dejug.uno:443
  3. Change it so that it matches the following structure, as the default is incorrect:
{
 "messages": [
  {
   "@type": "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade",
   "authority": "union10d07y265gmmuvt4z0w9aw880jnsr700js4jdcz",
   "plan": {
    "name": "v0.9.0",
    "height": "300",
    "info": "v0.9.0"
   }
  }
 ],
 "deposit": "15000000muno",
 "title": "v0.9.0",
 "summary": "Upgrade to v0.9.0"
}

Make sure that height is current height + 250 blocks

  1. Submit the proposal: ./uniond tx gov submit-proposal ./proposal-v0.10.0.json --from cor-systems --node https://rpc.0xc0dejug.uno:443
  2. Let everyone vote on the proposal: ./uniond tx gov vote 400 yes --from cor-systems --chain-id union-testnet-3 --node https://rpc.0xc0dejug.uno:443
    1. Where 400 should be the proposal # of the upgrade

Now wait until the upgrade is done