From 5032f87d9bee1dfd0a14c88b92ea86d0d8ba0bce Mon Sep 17 00:00:00 2001 From: mbreithecker Date: Mon, 25 Sep 2023 11:07:41 +0200 Subject: [PATCH 1/3] chore: tidy + changelog --- CHANGELOG.md | 5 ++--- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 542ddc98..5606ef3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,12 +14,11 @@ An '!' indicates a state machine breaking change. -## [v1.4.0](https://github.com/KYVENetwork/chain/releases/tag/v1.4.0) - 2023-09-12 +## [Unreleased] ### Improvements -- (deps) [#33](https://github.com/KYVENetwork/chain/pull/33) Upgrade Cosmos SDK to [v0.47.5](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.5) ([`v0.47.5-kyve`](https://github.com/KYVENetwork/cosmos-sdk/releases/tag/v0.47.5-kyve)). -- [#35](https://github.com/KYVENetwork/chain/pull/35) Use [interchaintest](https://github.com/strangelove-ventures/interchaintest) to test chain upgrades. +- (deps) [#33](https://github.com/KYVENetwork/chain/pull/33) Upgrade Cosmos SDK to [v0.47.5](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.5) ([`v0.47.5-kyve`](https://github.com/KYVENetwork/cosmos-sdk/releases/tag/v0.47.5-kyve-rc0)). ## [v1.3.1](https://github.com/KYVENetwork/chain/releases/tag/v1.3.1) - 2023-08-02 diff --git a/go.mod b/go.mod index 83b559a6..5c5bc07b 100644 --- a/go.mod +++ b/go.mod @@ -318,7 +318,7 @@ require ( replace ( // use kyve flavored cosmos/cosmos-sdk - github.com/cosmos/cosmos-sdk => github.com/KYVENetwork/cosmos-sdk v0.47.4-0.20230912091353-d2c627552db3 + github.com/cosmos/cosmos-sdk => github.com/KYVENetwork/cosmos-sdk v0.47.5-kyve-rc0 // use cosmos flavored gogo/protobuf // https://github.com/cosmos/cosmos-sdk/issues/8469 diff --git a/go.sum b/go.sum index 4e024564..855e70e7 100644 --- a/go.sum +++ b/go.sum @@ -242,8 +242,8 @@ github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rW github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 h1:+r1rSv4gvYn0wmRjC8X7IAzX8QezqtFV9m0MUHFJgts= github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0/go.mod h1:b3g59n2Y+T5xmcxJL+UEG2f8cQploZm1mR/v6BW0mU0= -github.com/KYVENetwork/cosmos-sdk v0.47.4-0.20230912091353-d2c627552db3 h1:yAUoqAFdx2Hw6OFiUXiisE/vNSNmVYzBrgbNAmkYO8A= -github.com/KYVENetwork/cosmos-sdk v0.47.4-0.20230912091353-d2c627552db3/go.mod h1:EHwCeN9IXonsjKcjpS12MqeStdZvIdxt3VYXhus3G3c= +github.com/KYVENetwork/cosmos-sdk v0.47.5-kyve-rc0 h1:FmlzQ31pUpd+PgDnUPR9cxNL0GdBCAOLlevhnrvS05Y= +github.com/KYVENetwork/cosmos-sdk v0.47.5-kyve-rc0/go.mod h1:EHwCeN9IXonsjKcjpS12MqeStdZvIdxt3VYXhus3G3c= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= From 50ace695d3173ca7670349d5e81c832914a14acd Mon Sep 17 00:00:00 2001 From: mbreithecker Date: Tue, 26 Sep 2023 12:35:33 +0200 Subject: [PATCH 2/3] chore: change default team-constants to mainnet ones. --- x/team/types/types.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/team/types/types.go b/x/team/types/types.go index 62ad3767..2ff5a778 100644 --- a/x/team/types/types.go +++ b/x/team/types/types.go @@ -43,8 +43,8 @@ type VestingStatus struct { var ( TEAM_FOUNDATION_STRING = "kyve1u7ukf2nv6v5j5y2yqprm8yqruue2rlmrkx4xgq" TEAM_BCP_STRING = "kyve1ruxaec07ca3dh0amkzxjap7av3xjt5vjgnd424" - TEAM_ALLOCATION_STRING = "165000000000000000" - TGE_STRING = "2023-02-01T10:34:15" + TEAM_ALLOCATION_STRING = "165000000000000" + TGE_STRING = "2023-03-14T14:03:14" ) // Convert passed build variables (string) to the corresponding int values From b6be2355dfa9a27c7b0e5415f15e3c1f22b2556b Mon Sep 17 00:00:00 2001 From: mbreithecker Date: Tue, 26 Sep 2023 12:35:57 +0200 Subject: [PATCH 3/3] fix: param upgrade migration --- app/upgrades/v1_4/upgrade.go | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/app/upgrades/v1_4/upgrade.go b/app/upgrades/v1_4/upgrade.go index 0568535e..25014a7d 100644 --- a/app/upgrades/v1_4/upgrade.go +++ b/app/upgrades/v1_4/upgrade.go @@ -5,6 +5,15 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + authTypes "github.com/cosmos/cosmos-sdk/x/auth/types" + bankTypes "github.com/cosmos/cosmos-sdk/x/bank/types" + crisisTypes "github.com/cosmos/cosmos-sdk/x/crisis/types" + distributionTypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + govTypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + mintTypes "github.com/cosmos/cosmos-sdk/x/mint/types" + paramsTypes "github.com/cosmos/cosmos-sdk/x/params/types" + slashingTypes "github.com/cosmos/cosmos-sdk/x/slashing/types" + stakingTypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/cosmos/ibc-go/v7/modules/core/exported" ibcTmMigrations "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint/migrations" @@ -19,7 +28,6 @@ import ( // Params paramsKeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" - paramsTypes "github.com/cosmos/cosmos-sdk/x/params/types" // Upgrade upgradeTypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) @@ -38,13 +46,37 @@ func CreateUpgradeHandler( logger := ctx.Logger().With("upgrade", UpgradeName) logger.Info("Run v1.4 upgrade") - var err error + distributionSpace, _ := paramsKeeper.GetSubspace("distribution") + distributionSpace.WithKeyTable(distributionTypes.ParamKeyTable()) + + stakingSpace, _ := paramsKeeper.GetSubspace("staking") + stakingSpace.WithKeyTable(stakingTypes.ParamKeyTable()) + + authSpace, _ := paramsKeeper.GetSubspace("auth") + authSpace.WithKeyTable(authTypes.ParamKeyTable()) + + bankSpace, _ := paramsKeeper.GetSubspace("bank") + bankSpace.WithKeyTable(bankTypes.ParamKeyTable()) + + crisisSpace, _ := paramsKeeper.GetSubspace("crisis") + crisisSpace.WithKeyTable(crisisTypes.ParamKeyTable()) + + govSpace, _ := paramsKeeper.GetSubspace("gov") + govSpace.WithKeyTable(govTypes.ParamKeyTable()) + + mintSpace, _ := paramsKeeper.GetSubspace("mint") + mintSpace.WithKeyTable(mintTypes.ParamKeyTable()) + + slashingSpace, _ := paramsKeeper.GetSubspace("slashing") + slashingSpace.WithKeyTable(slashingTypes.ParamKeyTable()) // Migrate consensus parameters from x/params to dedicated x/consensus module. baseAppSubspace := paramsKeeper.Subspace(baseapp.Paramspace). WithKeyTable(paramsTypes.ConsensusParamsKeyTable()) baseapp.MigrateParams(ctx, baseAppSubspace, &consensusKeeper) + var err error + // ibc-go v7.0 to v7.1 upgrade // explicitly update the IBC 02-client params, adding the localhost client type params := ibcKeeper.ClientKeeper.GetParams(ctx)