From 135891d684648a652e317fab5208216992078b29 Mon Sep 17 00:00:00 2001 From: Chirag <56735482+Chirag018@users.noreply.github.com> Date: Sun, 8 Oct 2023 01:02:01 +0530 Subject: [PATCH 1/5] fix: increase MinDeposit from 1K to 10K TIA Closes #2629 --- app/default_overrides.go | 2 +- app/default_overrides_test.go | 2 +- specs/src/specs/params.md | 2 +- test/util/testnode/genesis_options.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/default_overrides.go b/app/default_overrides.go index dfc065e1c4..f9461352ce 100644 --- a/app/default_overrides.go +++ b/app/default_overrides.go @@ -162,7 +162,7 @@ func (govModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { oneWeek := day * 7 twoWeeks := oneWeek * 2 - genState.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin(BondDenom, sdk.NewInt(1_000_000_000))) // 1000 TIA + genState.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin(BondDenom, sdk.NewInt(10_000_000_000))) // 10000 TIA genState.DepositParams.MaxDepositPeriod = &oneWeek genState.VotingParams.VotingPeriod = &twoWeeks diff --git a/app/default_overrides_test.go b/app/default_overrides_test.go index ec9e155a28..f0e369f3d4 100644 --- a/app/default_overrides_test.go +++ b/app/default_overrides_test.go @@ -26,7 +26,7 @@ func Test_newGovModule(t *testing.T) { want := []types.Coin{{ Denom: BondDenom, - Amount: types.NewInt(1000000000), + Amount: types.NewInt(10000000000), }} assert.Equal(t, want, govGenesisState.DepositParams.MinDeposit) diff --git a/specs/src/specs/params.md b/specs/src/specs/params.md index 71fc28d0ea..740fa20039 100644 --- a/specs/src/specs/params.md +++ b/specs/src/specs/params.md @@ -31,7 +31,7 @@ are blocked by the `x/paramfilter` module. | distribution.WithdrawAddrEnabled | true | Enables delegators to withdraw funds to a different address. | True | | distribution.BaseProposerReward | 0 | Reward in the mint demonination for proposing a block. | True | | 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.MinDeposit | 100000000000utia (10000 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.TallyParams.Quorum | 0.334 (33.4%) | Minimum percentage of total stake needed to vote for a result to be considered valid. | True | diff --git a/test/util/testnode/genesis_options.go b/test/util/testnode/genesis_options.go index f18894d7fb..86051b0245 100644 --- a/test/util/testnode/genesis_options.go +++ b/test/util/testnode/genesis_options.go @@ -34,7 +34,7 @@ func SetBlobParams(codec codec.Codec, params blobtypes.Params) GenesisOption { func ImmediateProposals(codec codec.Codec) GenesisOption { return func(state map[string]json.RawMessage) map[string]json.RawMessage { gs := v1.DefaultGenesisState() - gs.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin(app.BondDenom, sdk.NewInt(1))) + gs.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin(app.BondDenom, sdk.NewInt(10))) gs.TallyParams.Quorum = "0.000001" gs.TallyParams.Threshold = "0.000001" vp := time.Second * 5 From 693c854e0ac716beaa5527fd98dcba4c6bba139e Mon Sep 17 00:00:00 2001 From: Chirag <56735482+Chirag018@users.noreply.github.com> Date: Mon, 9 Oct 2023 21:27:16 +0530 Subject: [PATCH 2/5] readability changes --- app/default_overrides.go | 2 +- specs/src/specs/params.md | 2 +- test/util/testnode/genesis_options.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/default_overrides.go b/app/default_overrides.go index f9461352ce..f2927cb289 100644 --- a/app/default_overrides.go +++ b/app/default_overrides.go @@ -162,7 +162,7 @@ func (govModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { oneWeek := day * 7 twoWeeks := oneWeek * 2 - genState.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin(BondDenom, sdk.NewInt(10_000_000_000))) // 10000 TIA + genState.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin(BondDenom, sdk.NewInt(100_000_000_000))) // 10,000 TIA genState.DepositParams.MaxDepositPeriod = &oneWeek genState.VotingParams.VotingPeriod = &twoWeeks diff --git a/specs/src/specs/params.md b/specs/src/specs/params.md index 740fa20039..c041078054 100644 --- a/specs/src/specs/params.md +++ b/specs/src/specs/params.md @@ -31,7 +31,7 @@ are blocked by the `x/paramfilter` module. | distribution.WithdrawAddrEnabled | true | Enables delegators to withdraw funds to a different address. | True | | distribution.BaseProposerReward | 0 | Reward in the mint demonination for proposing a block. | True | | distribution.BonusProposerReward | 0 | Extra reward in the mint denomination for proposers based on the voting power included in the commit. | True | -| gov.DepositParams.MinDeposit | 100000000000utia (10000 TIA) | Minimum deposit for a proposal to enter voting period. | True | +| gov.DepositParams.MinDeposit | 100_000_000_000 utia (10,000 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.TallyParams.Quorum | 0.334 (33.4%) | Minimum percentage of total stake needed to vote for a result to be considered valid. | True | diff --git a/test/util/testnode/genesis_options.go b/test/util/testnode/genesis_options.go index 86051b0245..f18894d7fb 100644 --- a/test/util/testnode/genesis_options.go +++ b/test/util/testnode/genesis_options.go @@ -34,7 +34,7 @@ func SetBlobParams(codec codec.Codec, params blobtypes.Params) GenesisOption { func ImmediateProposals(codec codec.Codec) GenesisOption { return func(state map[string]json.RawMessage) map[string]json.RawMessage { gs := v1.DefaultGenesisState() - gs.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin(app.BondDenom, sdk.NewInt(10))) + gs.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin(app.BondDenom, sdk.NewInt(1))) gs.TallyParams.Quorum = "0.000001" gs.TallyParams.Threshold = "0.000001" vp := time.Second * 5 From 43be7072ce01218d7ae03bcab8f458a74338f14d Mon Sep 17 00:00:00 2001 From: Chirag <56735482+Chirag018@users.noreply.github.com> Date: Tue, 10 Oct 2023 20:11:53 +0530 Subject: [PATCH 3/5] nit & blocking changes --- app/default_overrides.go | 2 +- app/default_overrides_test.go | 2 +- specs/src/specs/params.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/default_overrides.go b/app/default_overrides.go index f2927cb289..376f55dc53 100644 --- a/app/default_overrides.go +++ b/app/default_overrides.go @@ -162,7 +162,7 @@ func (govModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { oneWeek := day * 7 twoWeeks := oneWeek * 2 - genState.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin(BondDenom, sdk.NewInt(100_000_000_000))) // 10,000 TIA + genState.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin(BondDenom, sdk.NewInt(10_000_000_000))) // 10,000 TIA genState.DepositParams.MaxDepositPeriod = &oneWeek genState.VotingParams.VotingPeriod = &twoWeeks diff --git a/app/default_overrides_test.go b/app/default_overrides_test.go index f0e369f3d4..da086c8e6f 100644 --- a/app/default_overrides_test.go +++ b/app/default_overrides_test.go @@ -26,7 +26,7 @@ func Test_newGovModule(t *testing.T) { want := []types.Coin{{ Denom: BondDenom, - Amount: types.NewInt(10000000000), + Amount: types.NewInt(10_000_000_000), }} assert.Equal(t, want, govGenesisState.DepositParams.MinDeposit) diff --git a/specs/src/specs/params.md b/specs/src/specs/params.md index c041078054..4564a76018 100644 --- a/specs/src/specs/params.md +++ b/specs/src/specs/params.md @@ -31,7 +31,7 @@ are blocked by the `x/paramfilter` module. | distribution.WithdrawAddrEnabled | true | Enables delegators to withdraw funds to a different address. | True | | distribution.BaseProposerReward | 0 | Reward in the mint demonination for proposing a block. | True | | distribution.BonusProposerReward | 0 | Extra reward in the mint denomination for proposers based on the voting power included in the commit. | True | -| gov.DepositParams.MinDeposit | 100_000_000_000 utia (10,000 TIA) | Minimum deposit for a proposal to enter voting period. | True | +| gov.DepositParams.MinDeposit | 10_000_000_000 utia (10,000 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.TallyParams.Quorum | 0.334 (33.4%) | Minimum percentage of total stake needed to vote for a result to be considered valid. | True | From 1209c36c32a17d91a7be1e14bb2129e9d96f97b5 Mon Sep 17 00:00:00 2001 From: Chirag <56735482+Chirag018@users.noreply.github.com> Date: Tue, 10 Oct 2023 20:17:55 +0530 Subject: [PATCH 4/5] Update params.md --- specs/src/specs/params.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/src/specs/params.md b/specs/src/specs/params.md index 59610059ce..a85fd55688 100644 --- a/specs/src/specs/params.md +++ b/specs/src/specs/params.md @@ -31,7 +31,7 @@ are blocked by the `x/paramfilter` module. | distribution.WithdrawAddrEnabled | true | Enables delegators to withdraw funds to a different address. | True | | distribution.BaseProposerReward | 0 | Reward in the mint demonination for proposing a block. | True | | 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.MinDeposit | 1_000_000_000 utia (1000 TIA) | Minimum deposit for a proposal to enter voting period. | True | | gov.DepositParams.MaxDepositPeriod | 604800000000000 (1 week) | Maximum period for token holders to deposit on a proposal in nanoseconds. | True | | gov.VotingParams.VotingPeriod | 1209600000000000 (2 weeks) | 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 | From ae49230ae4f6bcb693fbd1f47721655fc1d27ba6 Mon Sep 17 00:00:00 2001 From: Chirag <56735482+Chirag018@users.noreply.github.com> Date: Tue, 10 Oct 2023 23:43:44 +0530 Subject: [PATCH 5/5] Update params.md --- specs/src/specs/params.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/src/specs/params.md b/specs/src/specs/params.md index a85fd55688..9e094741ce 100644 --- a/specs/src/specs/params.md +++ b/specs/src/specs/params.md @@ -31,9 +31,9 @@ are blocked by the `x/paramfilter` module. | distribution.WithdrawAddrEnabled | true | Enables delegators to withdraw funds to a different address. | True | | distribution.BaseProposerReward | 0 | Reward in the mint demonination for proposing a block. | True | | distribution.BonusProposerReward | 0 | Extra reward in the mint denomination for proposers based on the voting power included in the commit. | True | -| gov.DepositParams.MinDeposit | 1_000_000_000 utia (1000 TIA) | Minimum deposit for a proposal to enter voting period. | True | +| gov.DepositParams.MinDeposit | 10_000_000_000 utia (10,000 TIA) | Minimum deposit for a proposal to enter voting period. | True | | gov.DepositParams.MaxDepositPeriod | 604800000000000 (1 week) | Maximum period for token holders to deposit on a proposal in nanoseconds. | True | -| gov.VotingParams.VotingPeriod | 1209600000000000 (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 |