From f0f00791cdebafd3b7cf6293f88e68435f837100 Mon Sep 17 00:00:00 2001 From: Aaron Kutch Date: Tue, 22 Aug 2023 14:57:01 -0500 Subject: [PATCH] Version 1.1.2 Fix that the treasury is actually subtracted from the staking supply --- app/app.go | 2 ++ app/upgrades/readme.md | 9 +++++---- app/upgrades/v1.1.2/upgrade.go | 16 ++++++++++++++++ tests/dockerfiles/chain_upgrade.dockerfile | 3 +-- 4 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 app/upgrades/v1.1.2/upgrade.go diff --git a/app/app.go b/app/app.go index 372df470..55eea47b 100644 --- a/app/app.go +++ b/app/app.go @@ -102,6 +102,7 @@ import ( v1_0_3_4 "github.com/onomyprotocol/onomy/app/upgrades/v1.0.3.4" v1_0_3_5 "github.com/onomyprotocol/onomy/app/upgrades/v1.0.3.5" v1_1_1 "github.com/onomyprotocol/onomy/app/upgrades/v1.1.1" + v1_1_2 "github.com/onomyprotocol/onomy/app/upgrades/v1.1.2" "github.com/onomyprotocol/onomy/docs" "github.com/onomyprotocol/onomy/x/dao" daoclient "github.com/onomyprotocol/onomy/x/dao/client" @@ -800,6 +801,7 @@ func (app *OnomyApp) setupUpgradeHandlers() { return app.mm.RunMigrations(ctx, app.configurator, fromVM) }, ) + app.UpgradeKeeper.SetUpgradeHandler(v1_1_2.Name, v1_1_2.UpgradeHandler) upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk() if err != nil { diff --git a/app/upgrades/readme.md b/app/upgrades/readme.md index 57794207..62ba0625 100644 --- a/app/upgrades/readme.md +++ b/app/upgrades/readme.md @@ -4,8 +4,9 @@ This folder contains sub-folders for every chain upgrade. ## Version History -- v1.0.1 - IBC integration fix -- v1.0.3 - Hyperinflation fix -- v1.0.3.4 - OIP 6 Undelegate DAO from all validators -- v1.0.3.5 - OIP 6 Patch Subtract DAO Treasury from Staking Supply +- v1.1.2 - Fix that the treasury is actually subtracted from the staking supply - v1.1.1 - Removal of Gravity module and addition of provider module +- v1.0.3.5 - OIP 6 Patch Subtract DAO Treasury from Staking Supply +- v1.0.3.4 - OIP 6 Undelegate DAO from all validators +- v1.0.3 - Hyperinflation fix +- v1.0.1 - IBC integration fix diff --git a/app/upgrades/v1.1.2/upgrade.go b/app/upgrades/v1.1.2/upgrade.go new file mode 100644 index 00000000..08ee82dd --- /dev/null +++ b/app/upgrades/v1.1.2/upgrade.go @@ -0,0 +1,16 @@ +// Package v1_1_2 is contains chain upgrade of the corresponding version. +package v1_1_2 //nolint:revive,stylecheck // app version + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" +) + +// Name is migration name. +const Name = "v1.1.2" + +// UpgradeHandler is an x/upgrade handler. +func UpgradeHandler(_ sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { + return vm, nil +} diff --git a/tests/dockerfiles/chain_upgrade.dockerfile b/tests/dockerfiles/chain_upgrade.dockerfile index 5f5a75a2..0db5dc9f 100644 --- a/tests/dockerfiles/chain_upgrade.dockerfile +++ b/tests/dockerfiles/chain_upgrade.dockerfile @@ -8,8 +8,7 @@ ENV DAEMON_HOME="/root/.onomy" # the previous version ENV ONOMY_CURRENT_VERSION=v1.1.1 # the version that currently is implemented by this repository's state -# TODO this is currently the same because we removed support for the gravity module from onomy_tests -ENV ONOMY_UPGRADE_VERSION=v1.1.1 +ENV ONOMY_UPGRADE_VERSION=v1.1.2 ENV ONOMY_UPGRADE_DIR_NAME=$ONOMY_UPGRADE_VERSION # note that one has to go under `genesis/` and the other under `upgrades/`