Skip to content

Commit

Permalink
chore: change default iavl-cache-size (#666)
Browse files Browse the repository at this point in the history
* chore: change default `iavl-cache-size`

Signed-off-by: zemyblue <zemyblue@gmail.com>

* chore: update changelog

Signed-off-by: zemyblue <zemyblue@gmail.com>

* Apply suggestions from code review

apply feedback

Co-authored-by: Youngtaek Yoon <noreply@yoon.anonaddy.me>

Signed-off-by: zemyblue <zemyblue@gmail.com>
Co-authored-by: Youngtaek Yoon <noreply@yoon.anonaddy.me>
  • Loading branch information
zemyblue and 0Tech authored Sep 8, 2022
1 parent f85b89d commit 96c29e1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (x/token) [\#599](https://github.com/line/lbm-sdk/pull/599) fix the order of events
* (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

### Breaking Changes
* (proto) [\#564](https://github.com/line/lbm-sdk/pull/564) change gRPC path to original cosmos path
Expand Down
2 changes: 1 addition & 1 deletion server/config/toml.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ inter-block-cache = {{ .BaseConfig.InterBlockCache }}
# InterBlockCacheSize is the maximum bytes size of the inter-block cache.
inter-block-cache-size = {{ .BaseConfig.InterBlockCacheSize }}
# IAVLCacheSize is the maximum bytes size of iavl node cache
# IAVLCacheSize is the maximum units size of iavl node cache (1 unit is 128 bytes)
iavl-cache-size = {{ .BaseConfig.IAVLCacheSize }}
# IndexEvents defines the set of events in the form {eventType}.{attributeKey},
Expand Down
2 changes: 1 addition & 1 deletion server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ is performed. Note, when enabled, gRPC will also be automatically enabled.
cmd.Flags().Uint64(FlagHaltTime, 0, "Minimum block time (in Unix seconds) at which to gracefully halt the chain and shutdown the node")
cmd.Flags().Bool(FlagInterBlockCache, true, "Enable inter-block caching")
cmd.Flags().Int(FlagInterBlockCacheSize, cache.DefaultCommitKVStoreCacheSize, "The maximum bytes size of the inter-block cache")
cmd.Flags().Int(FlagIAVLCacheSize, iavl.DefaultIAVLCacheSize, "The maximum bytes size of the iavl node cache")
cmd.Flags().Int(FlagIAVLCacheSize, iavl.DefaultIAVLCacheSize, "The maximum units size of the iavl node cache (1 unit is 128 bytes).")
cmd.Flags().String(flagCPUProfile, "", "Enable CPU profiling and write to the provided file")
cmd.Flags().Bool(FlagTrace, false, "Provide full stack traces for errors in ABCI Log")
cmd.Flags().String(FlagPruning, storetypes.PruningOptionDefault, "Pruning strategy (default|nothing|everything|custom)")
Expand Down
4 changes: 3 additions & 1 deletion store/iavl/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import (
)

const (
DefaultIAVLCacheSize = 1024 * 1024 * 100
// DefaultIAVLCacheSize is default Iavl cache units size. 1 unit is 128 byte
// default 128MB
DefaultIAVLCacheSize = 1024 * 1024
)

var (
Expand Down

0 comments on commit 96c29e1

Please sign in to comment.