From 581bf3aae2f797859de027fe9cffa609d96ca13c Mon Sep 17 00:00:00 2001 From: yihuang Date: Thu, 22 Sep 2022 16:16:17 +0800 Subject: [PATCH] Problem: new iavl indexes migration is slow and not optional (#714) * Problem: new iavl indexes migration is slow and not optional Closes: #712 Solution: - Integrate the option introduced in cosmos-sdk * Update CHANGELOG.md Signed-off-by: yihuang Signed-off-by: yihuang --- CHANGELOG.md | 4 ++++ cmd/cronosd/cmd/root.go | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3928cfab3..faf327b3ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - [cronos#719](https://github.com/crypto-org-chain/cronos/pull/719) Fix `eth_call` for legacy blocks (backport #713). +### Improvements + +- [cronos#720](https://github.com/crypto-org-chain/cronos/pull/720) Add option `iavl-disable-fastnode` to disable iavl fastnode indexing migration (backport #714). + *Sep 20, 2022* ## v0.9.0-beta3 diff --git a/cmd/cronosd/cmd/root.go b/cmd/cronosd/cmd/root.go index 1066ae8bbe..7a38867f15 100644 --- a/cmd/cronosd/cmd/root.go +++ b/cmd/cronosd/cmd/root.go @@ -211,9 +211,6 @@ type appCreator struct { encCfg params.EncodingConfig } -// missing flag from cosmos-sdk -const flagIAVLCacheSize = "iavl-cache-size" - // newApp is an AppCreator func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application { var cache sdk.MultiStorePersistentCache @@ -269,7 +266,8 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a baseapp.SetTrace(cast.ToBool(appOpts.Get(server.FlagTrace))), baseapp.SetIndexEvents(cast.ToStringSlice(appOpts.Get(server.FlagIndexEvents))), baseapp.SetSnapshot(snapshotStore, snapshotOptions), - baseapp.SetIAVLCacheSize(cast.ToInt(appOpts.Get(flagIAVLCacheSize))), + baseapp.SetIAVLCacheSize(cast.ToInt(appOpts.Get(server.FlagIAVLCacheSize))), + baseapp.SetIAVLDisableFastNode(cast.ToBool(appOpts.Get(server.FlagIAVLFastNode))), ) }