diff --git a/Makefile b/Makefile index 02d3b8a9a..8b703fce9 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ DB_BACKEND ?= goleveldb SGX_MODE ?= HW BRANCH ?= develop DEBUG ?= 0 -DOCKER_TAG ?= beta +DOCKER_TAG ?= alpha TM_SGX ?= true diff --git a/app/app.go b/app/app.go index fdf80e596..8470cf911 100644 --- a/app/app.go +++ b/app/app.go @@ -55,6 +55,7 @@ import ( v1_13 "github.com/scrtlabs/SecretNetwork/app/upgrades/v1.13" v1_14 "github.com/scrtlabs/SecretNetwork/app/upgrades/v1.14" v1_15 "github.com/scrtlabs/SecretNetwork/app/upgrades/v1.15" + v1_15_testnet_revert_proto_changes "github.com/scrtlabs/SecretNetwork/app/upgrades/v1.15-testnet-revert-proto-changes" v1_4 "github.com/scrtlabs/SecretNetwork/app/upgrades/v1.4" v1_5 "github.com/scrtlabs/SecretNetwork/app/upgrades/v1.5" v1_6 "github.com/scrtlabs/SecretNetwork/app/upgrades/v1.6" @@ -125,6 +126,7 @@ var ( v1_13.Upgrade, v1_14.Upgrade, v1_15.Upgrade, + v1_15_testnet_revert_proto_changes.Upgrade, } ) diff --git a/app/upgrades/v1.15-testnet-revert-proto-changes/upgrade.go b/app/upgrades/v1.15-testnet-revert-proto-changes/upgrade.go new file mode 100644 index 000000000..a43fabd88 --- /dev/null +++ b/app/upgrades/v1.15-testnet-revert-proto-changes/upgrade.go @@ -0,0 +1,39 @@ +package v1_15_testnet_revert_proto_changes + +import ( + "context" + "fmt" + "os" + + "cosmossdk.io/log" + store "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" + "github.com/cosmos/cosmos-sdk/types/module" + + "github.com/scrtlabs/SecretNetwork/app/keepers" + "github.com/scrtlabs/SecretNetwork/app/upgrades" +) + +const upgradeName = "v1.15-testnet-revert-proto-changes" + +var Upgrade = upgrades.Upgrade{ + UpgradeName: upgradeName, + CreateUpgradeHandler: createUpgradeHandler, + StoreUpgrades: store.StoreUpgrades{}, +} + +func createUpgradeHandler(mm *module.Manager, appKeepers *keepers.SecretAppKeepers, configurator module.Configurator, +) upgradetypes.UpgradeHandler { + return func(ctx context.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { + logger := log.NewLogger(os.Stderr) + logger.Info(` _ _ _____ _____ _____ _____ ______ `) + logger.Info(`| | | | __ \ / ____| __ \ /\ | __ \| ____|`) + logger.Info(`| | | | |__) | | __| |__) | / \ | | | | |__ `) + logger.Info(`| | | | ___/| | |_ | _ / / /\ \ | | | | __| `) + logger.Info(`| |__| | | | |__| | | \ \ / ____ \| |__| | |____ `) + logger.Info(` \____/|_| \_____|_| \_\/_/ \_\_____/|______|`) + + logger.Info(fmt.Sprintf("Running module migrations for %s...", upgradeName)) + return mm.RunMigrations(ctx, configurator, vm) + } +}