From 8f453eaa04bc7fe06527a2a60b720d3998a6dc41 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Mon, 16 Jul 2018 17:43:10 +0100 Subject: [PATCH] update params for x/gov and default config --- CHANGELOG.md | 16 ++++++++++++++++ server/util.go | 17 +++++++++++------ x/gov/keeper.go | 6 +++--- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2915450c2f..3690f5b747 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## 0.22.0 + +*July 16th, 2018* + +BREAKING CHANGES +* [x/gov] Increase VotingPeriod, DepositPeriod, and MinDeposit + +IMPROVEMENTS +* [gaiad] Default config updates: + - `timeout_commit=5000` so blocks only made every 5s + - `prof_listen_addr=localhost:6060` so profile server is on by default + - `p2p.send_rate` and `p2p.recv_rate` increases 10x (~5MB/s) + +BUG FIXES +* [server] Fix to actually overwrite default tendermint config + ## 0.21.1 *July 14th, 2018* diff --git a/server/util.go b/server/util.go index 1e6ed06c98..51547d116b 100644 --- a/server/util.go +++ b/server/util.go @@ -77,16 +77,21 @@ func interceptLoadConfig() (conf *cfg.Config, err error) { rootDir := tmpConf.RootDir configFilePath := filepath.Join(rootDir, "config/config.toml") // Intercept only if the file doesn't already exist + if _, err := os.Stat(configFilePath); os.IsNotExist(err) { // the following parse config is needed to create directories - sdkDefaultConfig, _ := tcmd.ParseConfig() - sdkDefaultConfig.ProfListenAddress = "prof_laddr=localhost:6060" - sdkDefaultConfig.P2P.RecvRate = 5120000 - sdkDefaultConfig.P2P.SendRate = 5120000 - cfg.WriteConfigFile(configFilePath, sdkDefaultConfig) + conf, _ = tcmd.ParseConfig() + conf.ProfListenAddress = "localhost:6060" + conf.P2P.RecvRate = 5120000 + conf.P2P.SendRate = 5120000 + conf.Consensus.TimeoutCommit = 5000 + cfg.WriteConfigFile(configFilePath, conf) // Fall through, just so that its parsed into memory. } - conf, err = tcmd.ParseConfig() + + if conf == nil { + conf, err = tcmd.ParseConfig() + } return } diff --git a/x/gov/keeper.go b/x/gov/keeper.go index b60404b8ce..ea3b47b96f 100644 --- a/x/gov/keeper.go +++ b/x/gov/keeper.go @@ -131,15 +131,15 @@ func (keeper Keeper) activateVotingPeriod(ctx sdk.Context, proposal Proposal) { // Gets procedure from store. TODO: move to global param store and allow for updating of this func (keeper Keeper) GetDepositProcedure() DepositProcedure { return DepositProcedure{ - MinDeposit: sdk.Coins{sdk.NewCoin("steak", 10)}, - MaxDepositPeriod: 200, + MinDeposit: sdk.Coins{sdk.NewCoin("steak", 100)}, + MaxDepositPeriod: 10000, } } // Gets procedure from store. TODO: move to global param store and allow for updating of this func (keeper Keeper) GetVotingProcedure() VotingProcedure { return VotingProcedure{ - VotingPeriod: 200, + VotingPeriod: 10000, } }