Remove GovernancePenalty
This commit is contained in:
parent
677ea0a541
commit
86a214f10c
|
@ -452,7 +452,7 @@
|
|||
version = "v0.12.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:23c49a2a0f3f8a8258982bbb1567d60d74253c18a454dbe4189126f7e94834e6"
|
||||
digest = "1:f94f468c7cd1fc3693ebc16011f26ec26538761cdcd182b3a28faa649a7d55e2"
|
||||
name = "github.com/tendermint/tendermint"
|
||||
packages = [
|
||||
"abci/client",
|
||||
|
@ -517,7 +517,7 @@
|
|||
"version",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "v0.27.0"
|
||||
revision = "v0.27.3"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:a7485b2a69f996923f9d3406a9a853fd8eb31818515e985a830d71f88f6a925b"
|
||||
|
@ -695,6 +695,7 @@
|
|||
"github.com/tendermint/tendermint/crypto/secp256k1",
|
||||
"github.com/tendermint/tendermint/crypto/tmhash",
|
||||
"github.com/tendermint/tendermint/crypto/xsalsa20symmetric",
|
||||
"github.com/tendermint/tendermint/libs/autofile",
|
||||
"github.com/tendermint/tendermint/libs/bech32",
|
||||
"github.com/tendermint/tendermint/libs/cli",
|
||||
"github.com/tendermint/tendermint/libs/cli/flags",
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
[[override]]
|
||||
name = "github.com/tendermint/tendermint"
|
||||
revision = "v0.27.0"
|
||||
revision = "v0.27.3"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/zondax/ledger-cosmos-go"
|
||||
|
|
|
@ -87,9 +87,8 @@ func appStateFn(r *rand.Rand, accs []simulation.Account) json.RawMessage {
|
|||
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)
|
||||
|
|
|
@ -52,10 +52,9 @@ func DefaultGenesisState() GenesisState {
|
|||
VotingPeriod: time.Duration(172800) * time.Second,
|
||||
},
|
||||
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),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -74,12 +73,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)
|
||||
|
|
|
@ -14,10 +14,9 @@ type DepositParams struct {
|
|||
|
||||
// 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
|
||||
}
|
||||
|
||||
// Param around Voting in governance
|
||||
|
|
Loading…
Reference in New Issue