Skip to content

Commit

Permalink
Database stability improvements (#1154)
Browse files Browse the repository at this point in the history
* update sdk and iavl with database stability improvements

* changelog

* fmt

* upgrade iavl and sdk with smaller fast node cache size

Co-authored-by: Roman <[email protected]>
  • Loading branch information
p0mvn and p0mvn authored Mar 28, 2022
1 parent 89ca32f commit 63633b8
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 7 deletions.
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,37 @@ 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).

## [v7.1.0](https://github.com/osmosis-labs/osmosis/releases/tag/v7.1.0)

### 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
* [#1154](https://github.com/osmosis-labs/osmosis/pull/1154) Database stability improvements

### 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
* [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)

### Minor improvements & Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions app/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/osmosis-labs/osmosis/v7/app/params"
dbm "github.com/tendermint/tm-db"

pruningTypes "github.com/cosmos/cosmos-sdk/pruning/types"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
)
Expand All @@ -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{},
Expand Down
4 changes: 1 addition & 3 deletions cmd/osmosisd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)))),
)
}

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.20220327212402-9f71a993afdc
// 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-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
Expand Down
8 changes: 8 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -779,8 +779,16 @@ 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/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=
Expand Down

0 comments on commit 63633b8

Please sign in to comment.