Skip to content

Commit

Permalink
chore: reduce VotingPeriod to 1 week (#2627)
Browse files Browse the repository at this point in the history
Closes #2625

(cherry picked from commit 8e62d44)
  • Loading branch information
rootulp authored and mergify[bot] committed Oct 9, 2023
1 parent dd4b1c1 commit f319b15
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions app/default_overrides.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,10 @@ func (govModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage {
genState := govtypes.DefaultGenesisState()
day := time.Duration(time.Hour * 24)
oneWeek := day * 7
twoWeeks := oneWeek * 2

genState.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin(BondDenom, sdk.NewInt(1_000_000_000))) // 1000 TIA
genState.DepositParams.MaxDepositPeriod = &oneWeek
genState.VotingParams.VotingPeriod = &twoWeeks
genState.VotingParams.VotingPeriod = &oneWeek

return cdc.MustMarshalJSON(genState)
}
Expand Down
3 changes: 1 addition & 2 deletions app/default_overrides_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ func Test_newGovModule(t *testing.T) {
encCfg := encoding.MakeConfig(ModuleEncodingRegisters...)
day := time.Duration(time.Hour * 24)
oneWeek := day * 7
twoWeeks := oneWeek * 2

govModule := newGovModule()
raw := govModule.DefaultGenesis(encCfg.Codec)
Expand All @@ -31,5 +30,5 @@ func Test_newGovModule(t *testing.T) {

assert.Equal(t, want, govGenesisState.DepositParams.MinDeposit)
assert.Equal(t, oneWeek, *govGenesisState.DepositParams.MaxDepositPeriod)
assert.Equal(t, twoWeeks, *govGenesisState.VotingParams.VotingPeriod)
assert.Equal(t, oneWeek, *govGenesisState.VotingParams.VotingPeriod)
}
2 changes: 1 addition & 1 deletion specs/src/specs/params.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ are blocked by the `x/paramfilter` module.
| distribution.BonusProposerReward | 0 | Extra reward in the mint denomination for proposers based on the voting power included in the commit. | True |
| gov.DepositParams.MinDeposit | 1000000000utia (1000 TIA) | Minimum deposit for a proposal to enter voting period. | True |
| gov.DepositParams.MaxDepositPeriod | 1209600000000000 (1 week) | Maximum period for token holders to deposit on a proposal in nanoseconds. | True |
| gov.VotingParams.VotingPeriod | 604800000000000 (2 weeks) | Duration of the voting period in nanoseconds. | True |
| gov.VotingParams.VotingPeriod | 604800000000000 (1 week) | Duration of the voting period in nanoseconds. | True |
| gov.TallyParams.Quorum | 0.334 (33.4%) | Minimum percentage of total stake needed to vote for a result to be considered valid. | True |
| gov.TallyParams.Threshold | 0.50 (50%) | Minimum proportion of Yes votes for proposal to pass. | True |
| gov.TallyParams.VetoThreshold | 0.334 (33.4%) | Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. | True |
Expand Down

0 comments on commit f319b15

Please sign in to comment.