Merge pull request #1690 from cosmos/release/v0.22.0
update params for x/gov and default config
This commit is contained in:
commit
972b8f5d6d
16
CHANGELOG.md
16
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*
|
||||
|
|
|
@ -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.
|
||||
}
|
||||
|
||||
if conf == nil {
|
||||
conf, err = tcmd.ParseConfig()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -128,18 +128,24 @@ func (keeper Keeper) activateVotingPeriod(ctx sdk.Context, proposal Proposal) {
|
|||
// =====================================================
|
||||
// Procedures
|
||||
|
||||
var (
|
||||
defaultMinDeposit int64 = 10
|
||||
defaultMaxDepositPeriod int64 = 10000
|
||||
defaultVotingPeriod int64 = 10000
|
||||
)
|
||||
|
||||
// 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", defaultMinDeposit)},
|
||||
MaxDepositPeriod: defaultMaxDepositPeriod,
|
||||
}
|
||||
}
|
||||
|
||||
// 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: defaultVotingPeriod,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,13 @@ import (
|
|||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
|
||||
// overwrite defaults for testing
|
||||
func init() {
|
||||
defaultMinDeposit = 10
|
||||
defaultMaxDepositPeriod = 200
|
||||
defaultVotingPeriod = 200
|
||||
}
|
||||
|
||||
func TestGetSetProposal(t *testing.T) {
|
||||
mapp, keeper, _, _, _, _ := getMockApp(t, 0)
|
||||
mapp.BeginBlock(abci.RequestBeginBlock{})
|
||||
|
|
|
@ -60,7 +60,7 @@ type TextProposal struct {
|
|||
Description string `json:"description"` // Description of the proposal
|
||||
ProposalType ProposalKind `json:"proposal_type"` // Type of proposal. Initial set {PlainTextProposal, SoftwareUpgradeProposal}
|
||||
|
||||
Status ProposalStatus `json:"string"` // Status of the Proposal {Pending, Active, Passed, Rejected}
|
||||
Status ProposalStatus `json:"proposal_status"` // Status of the Proposal {Pending, Active, Passed, Rejected}
|
||||
|
||||
SubmitBlock int64 `json:"submit_block"` // Height of the block where TxGovSubmitProposal was included
|
||||
TotalDeposit sdk.Coins `json:"total_deposit"` // Current deposit on this proposal. Initial value is set at InitialDeposit
|
||||
|
@ -184,7 +184,7 @@ func (pt ProposalKind) Format(s fmt.State, verb rune) {
|
|||
case 's':
|
||||
s.Write([]byte(fmt.Sprintf("%s", pt.String())))
|
||||
default:
|
||||
s.Write([]byte(fmt.Sprintf("%v", pt)))
|
||||
s.Write([]byte(fmt.Sprintf("%v", byte(pt))))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -283,6 +283,6 @@ func (status ProposalStatus) Format(s fmt.State, verb rune) {
|
|||
case 's':
|
||||
s.Write([]byte(fmt.Sprintf("%s", status.String())))
|
||||
default:
|
||||
s.Write([]byte(fmt.Sprintf("%v", status)))
|
||||
s.Write([]byte(fmt.Sprintf("%v", byte(status))))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue