From 110175234c178bede073f99029cf91b058524f11 Mon Sep 17 00:00:00 2001 From: Roman Date: Sat, 26 Mar 2022 17:25:10 +0000 Subject: [PATCH 1/4] update sdk and iavl with database stability improvements --- CHANGELOG.md | 26 ++++++++++++++++++++++++++ app/config.go | 4 ++-- cmd/osmosisd/cmd/root.go | 4 +--- go.mod | 4 ++-- go.sum | 4 ++++ 5 files changed, 35 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c34f46730a6..6763b3d14ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,32 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Minor improvements & Bug Fixes + +* [#1052](https://github.com/osmosis-labs/osmosis/pull/1052) Eugen/cherry pick superfluid test scaffolding updates +* [#1070](https://github.com/osmosis-labs/osmosis/pull/1070) Test improvisation for Superfluid +* [#1084](https://github.com/osmosis-labs/osmosis/pull/1084) Superfluid Misc: Improve grpc_query +* [#1081](https://github.com/osmosis-labs/osmosis/pull/1081) Genesis upgrade and add invariant cherry pick +* [#1088](https://github.com/osmosis-labs/osmosis/pull/1088) Genesis import export check for superfluid +* [#1101](https://github.com/osmosis-labs/osmosis/pull/1101) Minor PR adding some code comments + +### SDK fork updates + +* [sdk-#136](https://github.com/osmosis-labs/iavl/pull/136) add after validator slash hook +* [sdk-#137](https://github.com/osmosis-labs/iavl/pull/137) backport feat: Modify grpc gateway to be concurrent +* [sdk-#146](https://github.com/osmosis-labs/cosmos-sdk/pull/146) extra logs during commit +* [sdk-#151](https://github.com/osmosis-labs/cosmos-sdk/pull/151) fix logs related to store keys and commit hash +* [sdk-#140](https://github.com/osmosis-labs/cosmos-sdk/pull/140) refactor: snapshot and pruning functionality +* [sdk-#156](https://github.com/osmosis-labs/cosmos-sdk/pull/156) feat: implement querying for commit hash and proofs +* [sdk-#155](https://github.com/osmosis-labs/cosmos-sdk/pull/155) fix: commit info data race + +### IAVL fork updates + +* [iavl-35](https://github.com/osmosis-labs/iavl/pull/35) avoid clearing fast node cache during pruning +* [iavl-36](https://github.com/osmosis-labs/iavl/pull/36) fix data race related to VersionExists + ## [v7.0.4](https://github.com/osmosis-labs/osmosis/releases/tag/v7.0.4) ### Minor improvements & Bug Fixes diff --git a/app/config.go b/app/config.go index 4e9fa1b551a..aaf5172d725 100644 --- a/app/config.go +++ b/app/config.go @@ -13,7 +13,7 @@ import ( dbm "github.com/tendermint/tm-db" servertypes "github.com/cosmos/cosmos-sdk/server/types" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + pruningTypes "github.com/cosmos/cosmos-sdk/pruning/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) @@ -39,7 +39,7 @@ func DefaultConfig() network.Config { AccountTokens: sdk.TokensFromConsensusPower(1000, sdk.DefaultPowerReduction), StakingTokens: sdk.TokensFromConsensusPower(500, sdk.DefaultPowerReduction), BondedTokens: sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction), - PruningStrategy: storetypes.PruningOptionNothing, + PruningStrategy: pruningTypes.PruningOptionNothing, CleanupDir: true, SigningAlgo: string(hd.Secp256k1Type), KeyringOptions: []keyring.Option{}, diff --git a/cmd/osmosisd/cmd/root.go b/cmd/osmosisd/cmd/root.go index 5c8731bfbae..247b4d8c009 100644 --- a/cmd/osmosisd/cmd/root.go +++ b/cmd/osmosisd/cmd/root.go @@ -277,9 +277,7 @@ func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts serverty baseapp.SetInterBlockCache(cache), baseapp.SetTrace(cast.ToBool(appOpts.Get(server.FlagTrace))), baseapp.SetIndexEvents(cast.ToStringSlice(appOpts.Get(server.FlagIndexEvents))), - baseapp.SetSnapshotStore(snapshotStore), - baseapp.SetSnapshotInterval(cast.ToUint64(appOpts.Get(server.FlagStateSyncSnapshotInterval))), - baseapp.SetSnapshotKeepRecent(cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent))), + baseapp.SetSnapshot(snapshotStore, sdk.NewSnapshotOptions(cast.ToUint64(appOpts.Get(server.FlagStateSyncSnapshotInterval)), cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent)))), ) } diff --git a/go.mod b/go.mod index fa22032b741..8d844375593 100644 --- a/go.mod +++ b/go.mod @@ -129,9 +129,9 @@ replace ( // branch: v0.22.0-osmo-v7, current tag: v0.22.0-osmo-v7.2.0 github.com/CosmWasm/wasmd => github.com/osmosis-labs/wasmd v0.22.0-osmo-v7.2 // 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.20220311195527-87988f9e28b1 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220326154344-d53f1ddaa691 // Use Osmosis fast iavl - github.com/cosmos/iavl => github.com/osmosis-labs/iavl v0.17.3-osmo-v5 + github.com/cosmos/iavl => github.com/osmosis-labs/iavl v0.17.3-osmo-v6 // Use osmosis fork of ibc-go github.com/cosmos/ibc-go/v2 => github.com/osmosis-labs/ibc-go/v2 v2.0.2-osmo // use cosmos-compatible protobufs diff --git a/go.sum b/go.sum index 35dc7e46930..c14579ae7bf 100644 --- a/go.sum +++ b/go.sum @@ -779,8 +779,12 @@ github.com/osmosis-labs/bech32-ibc v0.2.0-rc2 h1:7xy1pLtNiF2KaRSkolayZf4z3OfCJsO github.com/osmosis-labs/bech32-ibc v0.2.0-rc2/go.mod h1:0JCaioRNOVUiw7c3MngmKACnumaQ2sjPenXCnwxCttI= github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220311195527-87988f9e28b1 h1:cKcaMdiUZiZsQcQ2BL5Ta2OkhcWOri3HQe9lcoHypmA= github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220311195527-87988f9e28b1/go.mod h1:7hy9bXGNkZVlq7MtejLafgPRuTnidBkyBnTEaMCj6Jc= +github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220326154344-d53f1ddaa691 h1:umGyhsY/4OB1e0AUMMA5kxXxR82Rup7sHwgJb83aFhQ= +github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220326154344-d53f1ddaa691/go.mod h1:NiV/Dd/KAnBD2LFWGbBRFjDdhetWvEn0iRqtEffXGqU= github.com/osmosis-labs/iavl v0.17.3-osmo-v5 h1:B6Saw2AK0StgfSSgi2rUc5B8MDa1vV1nGJUyYM7THus= github.com/osmosis-labs/iavl v0.17.3-osmo-v5/go.mod h1:lJEOIlsd3sVO0JDyXWIXa9/Ur5FBscP26zJx0KxHjto= +github.com/osmosis-labs/iavl v0.17.3-osmo-v6 h1:xM/ESKmbyS7hx6Ye4xSitLbofSVw+/j3MhGTZr4aFxE= +github.com/osmosis-labs/iavl v0.17.3-osmo-v6/go.mod h1:lJEOIlsd3sVO0JDyXWIXa9/Ur5FBscP26zJx0KxHjto= github.com/osmosis-labs/ibc-go/v2 v2.0.2-osmo h1:XyYyDTjPIu7qX2nhQp9mboj7Pa9FEnjg1RXw73Ctv5U= github.com/osmosis-labs/ibc-go/v2 v2.0.2-osmo/go.mod h1:XUmW7wmubCRhIEAGtMGS+5IjiSSmcAwihoN/yPGd6Kk= github.com/osmosis-labs/wasmd v0.22.0-osmo-alpha-0 h1:605q+qoaMULEEy3XDjQVAobbnDGG/IU68rwoXqpMnSA= From 1847fe99e87c7e399722455dcb4d809323b06753 Mon Sep 17 00:00:00 2001 From: Roman Date: Sat, 26 Mar 2022 17:30:40 +0000 Subject: [PATCH 2/4] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6763b3d14ac..34d17fcb235 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#1081](https://github.com/osmosis-labs/osmosis/pull/1081) Genesis upgrade and add invariant cherry pick * [#1088](https://github.com/osmosis-labs/osmosis/pull/1088) Genesis import export check for superfluid * [#1101](https://github.com/osmosis-labs/osmosis/pull/1101) Minor PR adding some code comments +* [#1154](https://github.com/osmosis-labs/osmosis/pull/1154) Database stability improvements ### SDK fork updates From 298a892e157c3700ea4e08aee6aaa1a46c8f9700 Mon Sep 17 00:00:00 2001 From: Roman Date: Sat, 26 Mar 2022 17:31:59 +0000 Subject: [PATCH 3/4] fmt --- app/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config.go b/app/config.go index aaf5172d725..e01429b754e 100644 --- a/app/config.go +++ b/app/config.go @@ -12,8 +12,8 @@ import ( "github.com/osmosis-labs/osmosis/v7/app/params" dbm "github.com/tendermint/tm-db" - servertypes "github.com/cosmos/cosmos-sdk/server/types" pruningTypes "github.com/cosmos/cosmos-sdk/pruning/types" + servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) From c0937aac0e4165dd1a652f57d3db0de9370aaf4d Mon Sep 17 00:00:00 2001 From: Roman Date: Sun, 27 Mar 2022 14:30:47 -0700 Subject: [PATCH 4/4] upgrade iavl and sdk with smaller fast node cache size --- CHANGELOG.md | 6 +++++- go.mod | 4 ++-- go.sum | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34d17fcb235..6ce664025ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,7 +39,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## [v7.1.0](https://github.com/osmosis-labs/osmosis/releases/tag/v7.1.0) ### Minor improvements & Bug Fixes @@ -60,11 +60,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [sdk-#140](https://github.com/osmosis-labs/cosmos-sdk/pull/140) refactor: snapshot and pruning functionality * [sdk-#156](https://github.com/osmosis-labs/cosmos-sdk/pull/156) feat: implement querying for commit hash and proofs * [sdk-#155](https://github.com/osmosis-labs/cosmos-sdk/pull/155) fix: commit info data race +* [sdk-#158](https://github.com/osmosis-labs/cosmos-sdk/pull/158) Fixes the go race tests +* [sdk-#160](https://github.com/osmosis-labs/cosmos-sdk/pull/160) increase setupBaseAppWithSnapshots timeout to 90 seconds +* [sdk-#161](https://github.com/osmosis-labs/cosmos-sdk/pull/155) upgrade iavl to v0.17.3-osmo-v7 with lowered fast node cache size ### IAVL fork updates * [iavl-35](https://github.com/osmosis-labs/iavl/pull/35) avoid clearing fast node cache during pruning * [iavl-36](https://github.com/osmosis-labs/iavl/pull/36) fix data race related to VersionExists +* [iavl-37](https://github.com/osmosis-labs/iavl/pull/36) hardcode fast node cache size to 100k ## [v7.0.4](https://github.com/osmosis-labs/osmosis/releases/tag/v7.0.4) diff --git a/go.mod b/go.mod index 8d844375593..dbdb2eca7c5 100644 --- a/go.mod +++ b/go.mod @@ -129,9 +129,9 @@ replace ( // branch: v0.22.0-osmo-v7, current tag: v0.22.0-osmo-v7.2.0 github.com/CosmWasm/wasmd => github.com/osmosis-labs/wasmd v0.22.0-osmo-v7.2 // 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.20220326154344-d53f1ddaa691 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220327212402-9f71a993afdc // Use Osmosis fast iavl - github.com/cosmos/iavl => github.com/osmosis-labs/iavl v0.17.3-osmo-v6 + github.com/cosmos/iavl => github.com/osmosis-labs/iavl v0.17.3-osmo-v7 // Use osmosis fork of ibc-go github.com/cosmos/ibc-go/v2 => github.com/osmosis-labs/ibc-go/v2 v2.0.2-osmo // use cosmos-compatible protobufs diff --git a/go.sum b/go.sum index c14579ae7bf..aba9ee91408 100644 --- a/go.sum +++ b/go.sum @@ -781,10 +781,14 @@ github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220311195527-87988f9e28b1 h1:cKca github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220311195527-87988f9e28b1/go.mod h1:7hy9bXGNkZVlq7MtejLafgPRuTnidBkyBnTEaMCj6Jc= github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220326154344-d53f1ddaa691 h1:umGyhsY/4OB1e0AUMMA5kxXxR82Rup7sHwgJb83aFhQ= github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220326154344-d53f1ddaa691/go.mod h1:NiV/Dd/KAnBD2LFWGbBRFjDdhetWvEn0iRqtEffXGqU= +github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220327212402-9f71a993afdc h1:fHyJmBbaDaC5Df4eOVL5/FSvMHGrKkSnX8/nvLD1484= +github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220327212402-9f71a993afdc/go.mod h1:ta913SL8leI7QWslwlEVm8yoOzuIzD455Dpjnnazll8= github.com/osmosis-labs/iavl v0.17.3-osmo-v5 h1:B6Saw2AK0StgfSSgi2rUc5B8MDa1vV1nGJUyYM7THus= github.com/osmosis-labs/iavl v0.17.3-osmo-v5/go.mod h1:lJEOIlsd3sVO0JDyXWIXa9/Ur5FBscP26zJx0KxHjto= github.com/osmosis-labs/iavl v0.17.3-osmo-v6 h1:xM/ESKmbyS7hx6Ye4xSitLbofSVw+/j3MhGTZr4aFxE= github.com/osmosis-labs/iavl v0.17.3-osmo-v6/go.mod h1:lJEOIlsd3sVO0JDyXWIXa9/Ur5FBscP26zJx0KxHjto= +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/ibc-go/v2 v2.0.2-osmo h1:XyYyDTjPIu7qX2nhQp9mboj7Pa9FEnjg1RXw73Ctv5U= github.com/osmosis-labs/ibc-go/v2 v2.0.2-osmo/go.mod h1:XUmW7wmubCRhIEAGtMGS+5IjiSSmcAwihoN/yPGd6Kk= github.com/osmosis-labs/wasmd v0.22.0-osmo-alpha-0 h1:605q+qoaMULEEy3XDjQVAobbnDGG/IU68rwoXqpMnSA=