diff --git a/simd/cmd/root.go b/simd/cmd/root.go index a6cbda031419..b33a660c87e3 100644 --- a/simd/cmd/root.go +++ b/simd/cmd/root.go @@ -98,8 +98,25 @@ func initAppConfig() (string, interface{}) { WASM WASMConfig `mapstructure:"wasm"` } + // Optionally allow the chain developer to overwrite the SDK's default + // server config. + srvCfg := serverconfig.DefaultConfig() + // The SDK's default minimum gas price is set to "" (empty value) inside + // app.toml. If left empty by validators, the node will halt on startup. + // However, the chain developer can set a default app.toml value for their + // validators here. + // + // In summary: + // - if you leave srvCfg.MinGasPrices = "", all validators MUST tweak their + // own app.toml config, + // - if you set srvCfg.MinGasPrices non-empty, validators CAN tweak their + // own app.toml to override, or use this default value. + // + // In simapp, we set the min gas prices to 0. + srvCfg.MinGasPrices = "0stake" + customAppConfig := CustomAppConfig{ - Config: *serverconfig.DefaultConfig(), + Config: *srvCfg, WASM: WASMConfig{ LruSize: 1, QueryGasLimit: 300000, @@ -207,7 +224,7 @@ type appCreator struct { encCfg params.EncodingConfig } -// newApp is an AppCreator +// 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