From 8e311133664583abe80d80a3fb7eba78762e43d0 Mon Sep 17 00:00:00 2001 From: zemyblue Date: Tue, 20 Sep 2022 20:31:17 +0900 Subject: [PATCH 1/3] fix: the bug not setting `iavl-cache-size` value of the `app.toml` and change `DefaultIAVLCacheSize` Signed-off-by: zemyblue --- simapp/simd/cmd/root.go | 1 + store/iavl/store.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/simapp/simd/cmd/root.go b/simapp/simd/cmd/root.go index 76e92c969a..8a34475e52 100644 --- a/simapp/simd/cmd/root.go +++ b/simapp/simd/cmd/root.go @@ -282,6 +282,7 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a baseapp.SetInterBlockCache(cache), baseapp.SetTrace(cast.ToBool(appOpts.Get(server.FlagTrace))), baseapp.SetIndexEvents(cast.ToStringSlice(appOpts.Get(server.FlagIndexEvents))), + baseapp.SetIAVLCacheSize(cast.ToInt(appOpts.Get(server.FlagIAVLCacheSize))), baseapp.SetSnapshotStore(snapshotStore), baseapp.SetSnapshotInterval(cast.ToUint64(appOpts.Get(server.FlagStateSyncSnapshotInterval))), baseapp.SetSnapshotKeepRecent(cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent))), diff --git a/store/iavl/store.go b/store/iavl/store.go index cbb11590ac..8fb3674072 100644 --- a/store/iavl/store.go +++ b/store/iavl/store.go @@ -24,8 +24,8 @@ import ( const ( // DefaultIAVLCacheSize is default Iavl cache units size. 1 unit is 128 byte - // default 128MB - DefaultIAVLCacheSize = 1024 * 1024 + // default 64MB + DefaultIAVLCacheSize = 1024 * 512 ) var ( From 2a04ab306d078fc8b61e336076590be761de0719 Mon Sep 17 00:00:00 2001 From: zemyblue Date: Tue, 20 Sep 2022 21:00:53 +0900 Subject: [PATCH 2/3] chore: add more warning descriptions Signed-off-by: zemyblue --- server/config/toml.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/config/toml.go b/server/config/toml.go index edf6753ec5..3143dfbe8d 100644 --- a/server/config/toml.go +++ b/server/config/toml.go @@ -67,6 +67,8 @@ inter-block-cache = {{ .BaseConfig.InterBlockCache }} inter-block-cache-size = {{ .BaseConfig.InterBlockCacheSize }} # IAVLCacheSize is the maximum units size of iavl node cache (1 unit is 128 bytes) +# This iavl cache size is just one store cache size, and the store exists for each modules. +# So be careful that all iavl cache size are difference from this iavl cache size value. iavl-cache-size = {{ .BaseConfig.IAVLCacheSize }} # IndexEvents defines the set of events in the form {eventType}.{attributeKey}, From fc4d8078ab19983bd316775b93f5cb57e66db706 Mon Sep 17 00:00:00 2001 From: zemyblue Date: Tue, 20 Sep 2022 21:18:05 +0900 Subject: [PATCH 3/3] chore: add changelog Signed-off-by: zemyblue --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb12c5e7fd..0b82501aef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,6 +85,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/wasm) [\#640](https://github.com/line/lbm-sdk/pull/640) remove legacy codes of wasm * (amino) [\#635](https://github.com/line/lbm-sdk/pull/635) change some minor things that haven't been fixed in #549 * (store) [\#666](https://github.com/line/lbm-sdk/pull/666) change default `iavl-cache-size` and description +* (simapp) [\#679](https://github.com/line/lbm-sdk/pull/679) fix the bug not setting `iavl-cache-size` value of `app.toml` ### Breaking Changes * (proto) [\#564](https://github.com/line/lbm-sdk/pull/564) change gRPC path to original cosmos path