From aacd8725655d43871ee24ab2b255df3d6a4c5609 Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 24 May 2022 12:38:48 -0400 Subject: [PATCH 1/6] chore: upgrade sdk with app version fix for state-sync --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 40a05f68865..675632ee331 100644 --- a/go.mod +++ b/go.mod @@ -272,7 +272,7 @@ replace ( // branch: v0.27.0.rc3-osmo, current tag: v0.27.0.rc3-osmo github.com/CosmWasm/wasmd => github.com/osmosis-labs/wasmd v0.27.0-rc2.0.20220517191021-59051aa18d58 // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk v0.45.0x-osmo-v7 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220517190359-30ebc413ddff + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220524162204-830f277f8259 // Use Osmosis fast iavl github.com/cosmos/iavl => github.com/osmosis-labs/iavl v0.17.3-osmo-v7 // use cosmos-compatible protobufs diff --git a/go.sum b/go.sum index 49538c6b7c4..be81fce9ae8 100644 --- a/go.sum +++ b/go.sum @@ -1024,8 +1024,8 @@ github.com/ory/dockertest/v3 v3.8.1 h1:vU/8d1We4qIad2YM0kOwRVtnyue7ExvacPiw1yDm1 github.com/ory/dockertest/v3 v3.8.1/go.mod h1:wSRQ3wmkz+uSARYMk7kVJFDBGm8x5gSxIhI7NDc+BAQ= github.com/osmosis-labs/bech32-ibc v0.3.0-rc1 h1:frHKHEdPfzoK2iMF2GeWKudLLzUXz+6GJcdZ/TMcs2k= github.com/osmosis-labs/bech32-ibc v0.3.0-rc1/go.mod h1:X5/FZHMPL+B3ufuVyY2/koxVjd4hIwyTLjYP1DZwppQ= -github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220517190359-30ebc413ddff h1:GwNR/GMCSfZsllKo0ZX/tE+sucumAA5K96M7bteZzKI= -github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220517190359-30ebc413ddff/go.mod h1:pMiEr6WR7drhXAXK1FOdAKPazWCi7b+WOyWOF4O0OXY= +github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220524162204-830f277f8259 h1:myaa05LG9MtkqvE9jErU0qWZPENOwc7kiqmFLeG3cTs= +github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220524162204-830f277f8259/go.mod h1:pMiEr6WR7drhXAXK1FOdAKPazWCi7b+WOyWOF4O0OXY= github.com/osmosis-labs/iavl v0.17.3-osmo-v7 h1:6KcADC/WhL7yDmNQxUIJt2XmzNt4FfRmq9gRke45w74= github.com/osmosis-labs/iavl v0.17.3-osmo-v7/go.mod h1:lJEOIlsd3sVO0JDyXWIXa9/Ur5FBscP26zJx0KxHjto= github.com/osmosis-labs/wasmd v0.27.0-rc2.0.20220517191021-59051aa18d58 h1:15l3Iss2oCGCeJRi2g3CuCnqmEjpAr3Le7cDnoN/LS0= From 39621ddcba5d4350ef5b6cc6ad67539b1d5ddccd Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 24 May 2022 19:31:01 -0400 Subject: [PATCH 2/6] update upgrade handler to set the app version --- app/upgrades/v9/upgrades.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/upgrades/v9/upgrades.go b/app/upgrades/v9/upgrades.go index 37f891b618a..af741cd3ae9 100644 --- a/app/upgrades/v9/upgrades.go +++ b/app/upgrades/v9/upgrades.go @@ -8,12 +8,19 @@ import ( "github.com/osmosis-labs/osmosis/v7/app/keepers" ) +const preUpgradeAppVersion = 8 + func CreateUpgradeHandler( mm *module.Manager, configurator module.Configurator, keepers *keepers.AppKeepers, ) upgradetypes.UpgradeHandler { return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { + // We set the app version to pre-upgrade because it will be incremented by one + // After the upgrade is applied by the handler. + if err := keepers.UpgradeKeeper.SetAppVersion(ctx, preUpgradeAppVersion); err != nil { + return nil, err + } ExecuteProp214(ctx, keepers.GAMMKeeper) return mm.RunMigrations(ctx, configurator, vm) } From 828efbbc35e99f7b4168d48a987cf812cf13b0ef Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 24 May 2022 19:33:44 -0400 Subject: [PATCH 3/6] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 651c47d29cf..c2b9feab5c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +* [#1570](https://github.com/osmosis-labs/osmosis/pull/1570) upgrade sdk with app version fix for state-sync * [#1554](https://github.com/osmosis-labs/osmosis/pull/1554) local dev environment * [#1535](https://github.com/osmosis-labs/osmosis/pull/1535) upgrade wasmd to v0.27.0.rc3-osmo and ibc-go to v3 * [#1435] `x/tokenfactory` create denom fee for spam resistance From c735b0dd20673c04afaa5d2f2c61ea421fdfc12c Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 24 May 2022 19:35:52 -0400 Subject: [PATCH 4/6] typo --- app/upgrades/v9/upgrades.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/upgrades/v9/upgrades.go b/app/upgrades/v9/upgrades.go index af741cd3ae9..d755f458a41 100644 --- a/app/upgrades/v9/upgrades.go +++ b/app/upgrades/v9/upgrades.go @@ -17,7 +17,7 @@ func CreateUpgradeHandler( ) upgradetypes.UpgradeHandler { return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { // We set the app version to pre-upgrade because it will be incremented by one - // After the upgrade is applied by the handler. + // after the upgrade is applied by the handler. if err := keepers.UpgradeKeeper.SetAppVersion(ctx, preUpgradeAppVersion); err != nil { return nil, err } From a515fb9869ea579c1614b51c6d70bfb1cac6eb24 Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Wed, 25 May 2022 03:05:55 +0200 Subject: [PATCH 5/6] Update app/upgrades/v9/upgrades.go --- app/upgrades/v9/upgrades.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/upgrades/v9/upgrades.go b/app/upgrades/v9/upgrades.go index ce4de4bf70f..94a60d0935f 100644 --- a/app/upgrades/v9/upgrades.go +++ b/app/upgrades/v9/upgrades.go @@ -30,7 +30,7 @@ func CreateUpgradeHandler( return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { ExecuteProp214(ctx, keepers.GAMMKeeper) - // We set the app version to pre-upgrade because it will be incremented by one + // We set the app version to pre-upgrade because it will be incremented by one // after the upgrade is applied by the handler. if err := keepers.UpgradeKeeper.SetAppVersion(ctx, preUpgradeAppVersion); err != nil { return nil, err From d95ea3132ebf5bcb5776553fb8ced148dfaedcd2 Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Wed, 25 May 2022 03:06:08 +0200 Subject: [PATCH 6/6] Update app/upgrades/v9/upgrades.go --- app/upgrades/v9/upgrades.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/upgrades/v9/upgrades.go b/app/upgrades/v9/upgrades.go index 94a60d0935f..773ca2437de 100644 --- a/app/upgrades/v9/upgrades.go +++ b/app/upgrades/v9/upgrades.go @@ -30,7 +30,7 @@ func CreateUpgradeHandler( return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { ExecuteProp214(ctx, keepers.GAMMKeeper) - // We set the app version to pre-upgrade because it will be incremented by one + // We set the app version to pre-upgrade because it will be incremented by one // after the upgrade is applied by the handler. if err := keepers.UpgradeKeeper.SetAppVersion(ctx, preUpgradeAppVersion); err != nil { return nil, err