diff --git a/PENDING.md b/PENDING.md index bb9ce719e7..36ad292fe3 100644 --- a/PENDING.md +++ b/PENDING.md @@ -60,6 +60,7 @@ CLI flag. ### SDK +* \#3753 Remove no-longer-used governance penalty parameter * \#3679 Consistent operators across Coins, DecCoins, Int, Dec replaced: Minus->Sub Plus->Add Div->Quo * [\#3665] Overhaul sdk.Uint type in preparation for Coins Int -> Uint migration. diff --git a/cmd/gaia/app/sim_test.go b/cmd/gaia/app/sim_test.go index 7e4d465fe6..fd3ef9804a 100644 --- a/cmd/gaia/app/sim_test.go +++ b/cmd/gaia/app/sim_test.go @@ -161,9 +161,8 @@ func appStateRandomizedFn(r *rand.Rand, accs []simulation.Account, genesisTimest VotingPeriod: vp, }, TallyParams: gov.TallyParams{ - Threshold: sdk.NewDecWithPrec(5, 1), - Veto: sdk.NewDecWithPrec(334, 3), - GovernancePenalty: sdk.NewDecWithPrec(1, 2), + Threshold: sdk.NewDecWithPrec(5, 1), + Veto: sdk.NewDecWithPrec(334, 3), }, } fmt.Printf("Selected randomly generated governance parameters:\n\t%+v\n", govGenesis) diff --git a/docs/spec/governance/01_concepts.md b/docs/spec/governance/01_concepts.md index 9dce635505..9c287d54fc 100644 --- a/docs/spec/governance/01_concepts.md +++ b/docs/spec/governance/01_concepts.md @@ -139,20 +139,7 @@ If a delegator does not vote, it will inherit its validator vote. ### Validator’s punishment for non-voting -Validators are required to vote on all proposals to ensure that results have -legitimacy. Voting is part of validators' directives and failure to do it will -result in a penalty. - -If a validator’s address is not in the list of addresses that voted on a -proposal and the vote is closed (i.e. `MinDeposit` was reached and `Voting -period` is over), then the validator will automatically be partially slashed by -`GovernancePenalty`. - -*Note: Need to define values for `GovernancePenalty`* - -**Exception:** If a proposal is accepted via the special condition of having a ratio of `Yes` votes to `InitTotalVotingPower` that exceeds 2:3, validators cannot be punished for not having voted on it. -That is because the proposal will close as soon as the ratio exceeds 2:3, -making it mechanically impossible for some validators to vote on it. +At present, validators are not punished for failing to vote. ### Governance address diff --git a/docs/spec/governance/02_state.md b/docs/spec/governance/02_state.md index 75af3cf22c..4a2fd08d1d 100644 --- a/docs/spec/governance/02_state.md +++ b/docs/spec/governance/02_state.md @@ -25,7 +25,6 @@ type TallyParams struct { Quorum sdk.Dec // Minimum percentage of stake that needs to vote for a proposal to be considered valid Threshold sdk.Dec // Minimum proportion of Yes votes for proposal to pass. Initial value: 0.5 Veto sdk.Dec // Minimum proportion of Veto votes to Total votes ratio for proposal to be vetoed. Initial value: 1/3 - GovernancePenalty sdk.Dec // Penalty if validator does not vote } ``` diff --git a/x/gov/genesis.go b/x/gov/genesis.go index 957381d590..6426f30df7 100644 --- a/x/gov/genesis.go +++ b/x/gov/genesis.go @@ -58,10 +58,9 @@ func DefaultGenesisState() GenesisState { VotingPeriod: DefaultPeriod, }, TallyParams: TallyParams{ - Quorum: sdk.NewDecWithPrec(334, 3), - Threshold: sdk.NewDecWithPrec(5, 1), - Veto: sdk.NewDecWithPrec(334, 3), - GovernancePenalty: sdk.NewDecWithPrec(1, 2), + Quorum: sdk.NewDecWithPrec(334, 3), + Threshold: sdk.NewDecWithPrec(5, 1), + Veto: sdk.NewDecWithPrec(334, 3), }, } } @@ -93,12 +92,6 @@ func ValidateGenesis(data GenesisState) error { veto.String()) } - govPenalty := data.TallyParams.GovernancePenalty - if govPenalty.IsNegative() || govPenalty.GT(sdk.OneDec()) { - return fmt.Errorf("Governance vote veto threshold should be positive and less or equal to one, is %s", - govPenalty.String()) - } - if data.DepositParams.MaxDepositPeriod > data.VotingParams.VotingPeriod { return fmt.Errorf("Governance deposit period should be less than or equal to the voting period (%ds), is %ds", data.VotingParams.VotingPeriod, data.DepositParams.MaxDepositPeriod) diff --git a/x/gov/params.go b/x/gov/params.go index 54601c7a62..ed0fa5ea4c 100644 --- a/x/gov/params.go +++ b/x/gov/params.go @@ -26,19 +26,17 @@ func (dp DepositParams) Equal(dp2 DepositParams) bool { // Param around Tallying votes in governance type TallyParams struct { - Quorum sdk.Dec `json:"quorum"` // Minimum percentage of total stake needed to vote for a result to be considered valid - Threshold sdk.Dec `json:"threshold"` // Minimum propotion of Yes votes for proposal to pass. Initial value: 0.5 - Veto sdk.Dec `json:"veto"` // Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Initial value: 1/3 - GovernancePenalty sdk.Dec `json:"governance_penalty"` // Penalty if validator does not vote + Quorum sdk.Dec `json:"quorum"` // Minimum percentage of total stake needed to vote for a result to be considered valid + Threshold sdk.Dec `json:"threshold"` // Minimum propotion of Yes votes for proposal to pass. Initial value: 0.5 + Veto sdk.Dec `json:"veto"` // Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Initial value: 1/3 } func (tp TallyParams) String() string { return fmt.Sprintf(`Tally Params: Quorum: %s Threshold: %s - Veto: %s - Governance Penalty: %s`, tp.Quorum, - tp.Threshold, tp.Veto, tp.GovernancePenalty) + Veto: %s`, + tp.Quorum, tp.Threshold, tp.Veto) } // Param around Voting in governance