-
Notifications
You must be signed in to change notification settings - Fork 39
Creating a release
PoisonPhang edited this page Sep 13, 2023
·
10 revisions
In the document below, replace VERSION with your version, such as v0.10.0
- Write upgrade handler
uniond/app/upgrades/VERSION
- Add upgrade to
uniond/app/upgrades.go
- Create PR and merge it into main
Before the release is deployed to validators and an upgrade is proposed, the release should be tested via our e2e test suite.
The upgrade from genesis test will ensure that, starting from the testnet genesis, all of our upgrades can be successfully applied to the network.
To ensure the latest upgrade is also tested, open e2e/upgrades.nix
and append a call to upgradeTo
to the end of the upgrade-from-genesis
script.
These calls are in the form of:
${upgradeTo "v$MAJOR.$MINOR.$PATCH" $HEIGHT}
For example:
${upgradeTo "v0.10.0" 20}
It's suggested to have 10 blocks between each upgrade.
- Create
release-VERSION
branch from main - On that branch, create tag
VERSION-rc1
with bodyVERSION-rc1
. Push that tag
- Add the new uniond version here: https://github.com/unionlabs/union/blob/68eec5926d7c50e3c1d78ab87c4af4b09b2806d6/flake.nix#L60
- Add it to the bundle here: https://github.com/unionlabs/union/blob/68eec5926d7c50e3c1d78ab87c4af4b09b2806d6/unionvisor/unionvisor.nix#L41
- Do
GIT_LFS_SKIP_SMUDGE=1 nix flake lock --update-input v0_10_0
wherev0_10_0
is your version - Create a PR to add the new version to the
bundle-testnet
and merge it
- Use
nixos rebuild-switch
in order to upgrade the Unionvisor version on your remote validator (example:GIT_LFS_SKIP_SMUDGE=1 nixos-rebuild switch --flake .#testnet-validator --target-host union-testnet.cor.systems -L
- Wait for the deployment to be complete
- Creating the
proposal-VERSION.json
./uniond tx gov draft-proposal --node https://rpc.0xc0dejug.uno:443
- Change it so that it matches the following structure, as the default is incorrect:
{
"messages": [
{
"@type": "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade",
"authority": "union10d07y265gmmuvt4z0w9aw880jnsr700js4jdcz",
"plan": {
"name": "VERSION",
"height": "300",
"info": "VERSION"
}
}
],
"deposit": "15000000muno",
"title": "VERSION",
"summary": "Upgrade to VERSION"
}
Make sure that height
is current height + 250 blocks
- Submit the proposal:
./uniond tx gov submit-proposal ./proposal-v0.10.0.json --from MONIKER --node https://rpc.0xc0dejug.uno:443
- Let everyone vote on the proposal:
./uniond tx gov vote 400 yes --from MONIKER --chain-id union-testnet-3 --node https://rpc.0xc0dejug.uno:443
- Where 400 should be the proposal # of the upgrade
Now wait until the upgrade is done