diff --git a/proto/atomone/gov/v1/genesis.proto b/proto/atomone/gov/v1/genesis.proto index 5fdfa6cb3..29e78e27c 100644 --- a/proto/atomone/gov/v1/genesis.proto +++ b/proto/atomone/gov/v1/genesis.proto @@ -37,4 +37,7 @@ message GenesisState { // last updated value for the dynamic min deposit LastMinDeposit last_min_deposit = 10; + + // last updated value for the dynamic min initial deposit + LastMinDeposit last_min_initial_deposit = 11; } diff --git a/proto/atomone/gov/v1/gov.proto b/proto/atomone/gov/v1/gov.proto index 75f2d1950..b50e2ed9f 100644 --- a/proto/atomone/gov/v1/gov.proto +++ b/proto/atomone/gov/v1/gov.proto @@ -246,6 +246,33 @@ message MinDepositThrottler { uint64 sensitivity_target_distance = 6; } +message MinInitialDepositThrottler { + // Floor value for the minimum initial deposit required for a proposal to enter the deposit period. + repeated cosmos.base.v1beta1.Coin floor_value = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; + + // Duration that dictates after how long the dynamic minimum deposit should be recalculated + // for time-based updates. + google.protobuf.Duration update_period = 2 [(gogoproto.stdduration) = true]; + + // The number of proposals in deposit period the dynamic minimum initial deposit should target. + uint64 target_proposals = 3; + + // The ratio of increase for the minimum initial deposit when the number of proposals + // in deposit period exceeds the target by 1. + string increase_ratio = 4 [(cosmos_proto.scalar) = "cosmos.Dec"]; + + // The ratio of decrease for the minimum initial deposit when the number of proposals + // in deposit period is 1 less than the target. + string decrease_ratio = 5 [(cosmos_proto.scalar) = "cosmos.Dec"]; + + // A positive integer representing the sensitivity of the dynamic minimum initial + // deposit increase/decrease to the distance from the target number of proposals + // in deposit period. The higher the number, the lower the sensitivity. A value + // of 1 represents the highest sensitivity. + uint64 sensitivity_target_distance = 6; +} + // Params defines the parameters for the x/gov module. // // Since: cosmos-sdk 0.47 @@ -275,7 +302,7 @@ message Params { string threshold = 5 [(cosmos_proto.scalar) = "cosmos.Dec"]; // The ratio representing the proportion of the deposit value that must be paid at proposal submission. - string min_initial_deposit_ratio = 7 [(cosmos_proto.scalar) = "cosmos.Dec"]; + string min_initial_deposit_ratio = 7 [(cosmos_proto.scalar) = "cosmos.Dec", deprecated = true ]; // burn deposits if a proposal does not meet quorum bool burn_vote_quorum = 13; @@ -317,4 +344,6 @@ message Params { uint64 quorum_check_count = 22; MinDepositThrottler min_deposit_throttler = 23; + + MinInitialDepositThrottler min_initial_deposit_throttler = 24; } diff --git a/proto/atomone/gov/v1/query.proto b/proto/atomone/gov/v1/query.proto index 233932b74..3c7b274d6 100644 --- a/proto/atomone/gov/v1/query.proto +++ b/proto/atomone/gov/v1/query.proto @@ -69,6 +69,12 @@ service Query { rpc MinDeposit(QueryMinDepositRequest) returns (QueryMinDepositResponse) { option (google.api.http).get = "/atomone/gov/v1/mindeposit"; } + + // MinInitialDeposit queries the minimum initial deposit + // currently required for a proposal to be submitted. + rpc MinInitialDeposit(QueryMinInitialDepositRequest) returns (QueryMinInitialDepositResponse) { + option (google.api.http).get = "/atomone/gov/v1/mininitialdeposit"; + } } // QueryConstitutionRequest is the request type for the Query/Constitution RPC method @@ -226,3 +232,12 @@ message QueryMinDepositResponse { // min_deposit defines the minimum deposit required for a proposal to enter voting period. repeated cosmos.base.v1beta1.Coin min_deposit = 1 [ (gogoproto.nullable) = false]; } + +// QueryMinInitialDepositRequest is the request type for the Query/MinInitialDeposit RPC method. +message QueryMinInitialDepositRequest {} + +// QueryMinInitialDepositResponse is the response type for the Query/MinInitialDeposit RPC method. +message QueryMinInitialDepositResponse { + // min_initial_deposit defines the minimum initial deposit required for a proposal to be submitted. + repeated cosmos.base.v1beta1.Coin min_initial_deposit = 1 [ (gogoproto.nullable) = false]; +} diff --git a/tests/e2e/genesis.go b/tests/e2e/genesis.go index cbf766c00..7b388567b 100644 --- a/tests/e2e/genesis.go +++ b/tests/e2e/genesis.go @@ -167,6 +167,7 @@ func modifyGenesis(path, moniker, amountStr string, addrAll []sdk.AccAddress, de // Refactor to separate method amnt := sdk.NewInt(10000) + initialDepositAmnt := sdk.NewInt(100) quorum, _ := sdk.NewDecFromStr("0.000000000000000001") threshold, _ := sdk.NewDecFromStr("0.000000000000000001") lawQuorum, _ := sdk.NewDecFromStr("0.000000000000000001") @@ -184,13 +185,15 @@ func modifyGenesis(path, moniker, amountStr string, addrAll []sdk.AccAddress, de votingPeriod, quorum.String(), threshold.String(), amendmentsQuorum.String(), amendmentsThreshold.String(), lawQuorum.String(), lawThreshold.String(), - sdk.ZeroDec().String(), + // sdk.ZeroDec().String(), false, false, govv1.DefaultMinDepositRatio.String(), govv1.DefaultQuorumTimeout, govv1.DefaultMaxVotingPeriodExtension, govv1.DefaultQuorumCheckCount, sdk.NewCoins(sdk.NewCoin(denom, amnt)), govv1.DefaultMinDepositUpdatePeriod, govv1.DefaultMinDepositSensitivityTargetDistance, govv1.DefaultMinDepositIncreaseRatio.String(), govv1.DefaultMinDepositDecreaseRatio.String(), - govv1.DefaultTargetActiveProposals, + govv1.DefaultTargetActiveProposals, sdk.NewCoins(sdk.NewCoin(denom, initialDepositAmnt)), govv1.DefaultMinInitialDepositUpdatePeriod, + govv1.DefaultMinInitialDepositSensitivityTargetDistance, govv1.DefaultMinInitialDepositIncreaseRatio.String(), + govv1.DefaultMinInitialDepositDecreaseRatio.String(), govv1.DefaultTargetProposalsInDepositPeriod, ), ) govGenState.Constitution = "This is a test constitution" diff --git a/x/gov/abci.go b/x/gov/abci.go index f47a4b4ec..091e1f647 100644 --- a/x/gov/abci.go +++ b/x/gov/abci.go @@ -39,6 +39,8 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) { keeper.DeleteAndBurnDeposits(ctx, proposal.Id) // burn the deposit if proposal got removed without getting 100% of the proposal } + keeper.DecrementInactiveProposalsNumber(ctx) + // called when proposal become inactive keeper.Hooks().AfterProposalFailedMinDeposit(ctx, proposal.Id) diff --git a/x/gov/abci_test.go b/x/gov/abci_test.go index 33249c550..cfbeffcf8 100644 --- a/x/gov/abci_test.go +++ b/x/gov/abci_test.go @@ -71,12 +71,16 @@ func TestTickExpiredDepositPeriod(t *testing.T) { newHeader.Time = ctx.BlockHeader().Time.Add(*suite.GovKeeper.GetParams(ctx).MaxDepositPeriod) ctx = ctx.WithBlockHeader(newHeader) + require.EqualValues(t, 1, suite.GovKeeper.GetInactiveProposalsNumber(ctx)) + inactiveQueue = suite.GovKeeper.InactiveProposalQueueIterator(ctx, ctx.BlockHeader().Time) require.True(t, inactiveQueue.Valid()) inactiveQueue.Close() gov.EndBlocker(ctx, suite.GovKeeper) + require.EqualValues(t, 0, suite.GovKeeper.GetInactiveProposalsNumber(ctx)) + inactiveQueue = suite.GovKeeper.InactiveProposalQueueIterator(ctx, ctx.BlockHeader().Time) require.False(t, inactiveQueue.Valid()) inactiveQueue.Close() @@ -123,6 +127,8 @@ func TestTickMultipleExpiredDepositPeriod(t *testing.T) { require.False(t, inactiveQueue.Valid()) inactiveQueue.Close() + require.EqualValues(t, 1, suite.GovKeeper.GetInactiveProposalsNumber(ctx)) + newProposalMsg2, err := v1.NewMsgSubmitProposal( []sdk.Msg{mkTestLegacyContent(t)}, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}, @@ -145,6 +151,8 @@ func TestTickMultipleExpiredDepositPeriod(t *testing.T) { require.True(t, inactiveQueue.Valid()) inactiveQueue.Close() + require.EqualValues(t, 2, suite.GovKeeper.GetInactiveProposalsNumber(ctx)) + gov.EndBlocker(ctx, suite.GovKeeper) inactiveQueue = suite.GovKeeper.InactiveProposalQueueIterator(ctx, ctx.BlockHeader().Time) @@ -159,8 +167,12 @@ func TestTickMultipleExpiredDepositPeriod(t *testing.T) { require.True(t, inactiveQueue.Valid()) inactiveQueue.Close() + require.EqualValues(t, 1, suite.GovKeeper.GetInactiveProposalsNumber(ctx)) + gov.EndBlocker(ctx, suite.GovKeeper) + require.EqualValues(t, 0, suite.GovKeeper.GetInactiveProposalsNumber(ctx)) + inactiveQueue = suite.GovKeeper.InactiveProposalQueueIterator(ctx, ctx.BlockHeader().Time) require.False(t, inactiveQueue.Valid()) inactiveQueue.Close() @@ -212,6 +224,8 @@ func TestTickPassedDepositPeriod(t *testing.T) { require.False(t, inactiveQueue.Valid()) inactiveQueue.Close() + require.EqualValues(t, 1, suite.GovKeeper.GetInactiveProposalsNumber(ctx)) + newDepositMsg := v1.NewMsgDeposit(addrs[1], proposalID, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}) res1, err := govMsgSvr.Deposit(sdk.WrapSDKContext(ctx), newDepositMsg) @@ -221,6 +235,9 @@ func TestTickPassedDepositPeriod(t *testing.T) { activeQueue = suite.GovKeeper.ActiveProposalQueueIterator(ctx, ctx.BlockHeader().Time) require.False(t, activeQueue.Valid()) activeQueue.Close() + + require.EqualValues(t, 1, suite.GovKeeper.GetInactiveProposalsNumber(ctx)) + require.EqualValues(t, 0, suite.GovKeeper.GetActiveProposalsNumber(ctx)) } func TestTickPassedVotingPeriod(t *testing.T) { diff --git a/x/gov/client/cli/query.go b/x/gov/client/cli/query.go index 6713c5571..32fb1cebd 100644 --- a/x/gov/client/cli/query.go +++ b/x/gov/client/cli/query.go @@ -41,6 +41,7 @@ func GetQueryCmd() *cobra.Command { GetCmdQueryTally(), GetCmdConstitution(), GetCmdQueryMinDeposit(), + GetCmdQueryMinInitialDeposit(), ) return govQueryCmd @@ -709,3 +710,35 @@ $ %s query gov min-deposit }, } } + +// GetCmdQueryMinInitialDeposit implements the query min initial deposit command. +func GetCmdQueryMinInitialDeposit() *cobra.Command { + return &cobra.Command{ + Use: "min-initial-deposit", + Args: cobra.ExactArgs(0), + Short: "Query the minimum initial deposit needed for a proposal to enter deposit period", + Long: strings.TrimSpace( + fmt.Sprintf(`Query the minimum initial deposit needed for a proposal to enter deposit period. + +Example: +$ %s query gov min-initial-deposit +`, + version.AppName, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + queryClient := v1.NewQueryClient(clientCtx) + + resp, err := queryClient.MinInitialDeposit(cmd.Context(), &v1.QueryMinInitialDepositRequest{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(resp) + }, + } +} diff --git a/x/gov/client/cli/query_test.go b/x/gov/client/cli/query_test.go index 68bd901cf..e9cb499cd 100644 --- a/x/gov/client/cli/query_test.go +++ b/x/gov/client/cli/query_test.go @@ -406,3 +406,63 @@ func (s *CLITestSuite) TestCmdGetConstitution() { }) } } + +func (s *CLITestSuite) TestCmdQueryMinDeposit() { + testCases := []struct { + name string + args []string + expCmdOutput string + }{ + { + "query min deposit", + []string{}, + "", + }, + { + "query min deposit (json output)", + []string{ + fmt.Sprintf("--%s=json", flags.FlagOutput), + }, + "--output=json", + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + cmd := cli.GetCmdQueryMinDeposit() + cmd.SetArgs(tc.args) + s.Require().Contains(fmt.Sprint(cmd), strings.TrimSpace(tc.expCmdOutput)) + }) + } +} + +func (s *CLITestSuite) TestCmdQueryMinInitialDeposit() { + testCases := []struct { + name string + args []string + expCmdOutput string + }{ + { + "query min initial deposit", + []string{}, + "", + }, + { + "query min initial deposit (json output)", + []string{ + fmt.Sprintf("--%s=json", flags.FlagOutput), + }, + "--output=json", + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + cmd := cli.GetCmdQueryMinInitialDeposit() + cmd.SetArgs(tc.args) + s.Require().Contains(fmt.Sprint(cmd), strings.TrimSpace(tc.expCmdOutput)) + }) + } +} diff --git a/x/gov/genesis.go b/x/gov/genesis.go index b66ccc6b5..d14a83787 100644 --- a/x/gov/genesis.go +++ b/x/gov/genesis.go @@ -83,6 +83,12 @@ func InitGenesis(ctx sdk.Context, ak types.AccountKeeper, bk types.BankKeeper, k } else { k.SetLastMinDeposit(ctx, data.Params.MinDepositThrottler.FloorValue, ctx.BlockTime()) } + + if data.LastMinInitialDeposit != nil { + k.SetLastMinInitialDeposit(ctx, data.LastMinInitialDeposit.Value, *data.LastMinInitialDeposit.Time) + } else { + k.SetLastMinInitialDeposit(ctx, data.Params.MinInitialDepositThrottler.FloorValue, ctx.BlockTime()) + } } // ExportGenesis - output genesis parameters @@ -108,13 +114,19 @@ func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *v1.GenesisState { Time: &blockTime, } + lastMinInitialDeposit := v1.LastMinDeposit{ + Value: k.GetMinInitialDeposit(ctx), + Time: &blockTime, + } + return &v1.GenesisState{ - StartingProposalId: startingProposalID, - Deposits: proposalsDeposits, - Votes: proposalsVotes, - Proposals: proposals, - Params: ¶ms, - Constitution: constitution, - LastMinDeposit: &lastMinDeposit, + StartingProposalId: startingProposalID, + Deposits: proposalsDeposits, + Votes: proposalsVotes, + Proposals: proposals, + Params: ¶ms, + Constitution: constitution, + LastMinDeposit: &lastMinDeposit, + LastMinInitialDeposit: &lastMinInitialDeposit, } } diff --git a/x/gov/genesis_test.go b/x/gov/genesis_test.go index 679ebc115..32460c356 100644 --- a/x/gov/genesis_test.go +++ b/x/gov/genesis_test.go @@ -31,6 +31,10 @@ func TestImportExportQueues_ErrorUnconsistentState(t *testing.T) { Value: sdk.NewCoins(expectedGenState.Params.MinDepositThrottler.FloorValue...), Time: &time.Time{}, } + expectedGenState.LastMinInitialDeposit = &v1.LastMinDeposit{ + Value: expectedGenState.Params.MinInitialDepositThrottler.FloorValue, + Time: &time.Time{}, + } require.Panics(t, func() { gov.InitGenesis(ctx, suite.AccountKeeper, suite.BankKeeper, suite.GovKeeper, &v1.GenesisState{ Deposits: v1.Deposits{ @@ -59,6 +63,9 @@ func TestInitGenesis(t *testing.T) { MinDepositThrottler: &v1.MinDepositThrottler{ FloorValue: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(42))), }, + MinInitialDepositThrottler: &v1.MinInitialDepositThrottler{ + FloorValue: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(42))), + }, } quorumTimeout = time.Hour * 20 paramsWithQuorumCheckEnabled = &v1.Params{ @@ -67,6 +74,9 @@ func TestInitGenesis(t *testing.T) { MinDepositThrottler: &v1.MinDepositThrottler{ FloorValue: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(42))), }, + MinInitialDepositThrottler: &v1.MinInitialDepositThrottler{ + FloorValue: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(42))), + }, } depositAmount = sdk.Coins{ @@ -175,6 +185,9 @@ func TestInitGenesis(t *testing.T) { lmdCoins, lmdTime := s.GovKeeper.GetLastMinDeposit(ctx) assert.EqualValues(t, p.MinDepositThrottler.FloorValue, lmdCoins) assert.Equal(t, ctx.BlockTime(), lmdTime) + lmidCoins, lmidTime := s.GovKeeper.GetLastMinInitialDeposit(ctx) + assert.EqualValues(t, p.MinInitialDepositThrottler.FloorValue, lmidCoins) + assert.Equal(t, ctx.BlockTime(), lmidTime) }, }, { @@ -193,6 +206,22 @@ func TestInitGenesis(t *testing.T) { assert.Equal(t, utcTime, lmdTime) }, }, + { + name: "ok: genesis with last min initial deposit", + genesis: v1.GenesisState{ + Params: params, + LastMinInitialDeposit: &v1.LastMinDeposit{ + Value: sdk.NewCoins(sdk.NewInt64Coin("xxx", 1)), + Time: &utcTime, + }, + }, + assert: func(t *testing.T, ctx sdk.Context, s suite) { + t.Helper() + lmidCoins, lmidTime := s.GovKeeper.GetLastMinInitialDeposit(ctx) + assert.EqualValues(t, sdk.NewCoins(sdk.NewInt64Coin("xxx", 1)), lmidCoins) + assert.Equal(t, utcTime, lmidTime) + }, + }, { name: "fail: genesis with deposits but module balance is not equal to total deposits", moduleBalance: depositAmount, diff --git a/x/gov/keeper/deposit.go b/x/gov/keeper/deposit.go index dec086d1e..b501ec997 100644 --- a/x/gov/keeper/deposit.go +++ b/x/gov/keeper/deposit.go @@ -110,7 +110,7 @@ func (keeper Keeper) IterateDeposits(ctx sdk.Context, proposalID uint64, cb func // AddDeposit adds or updates a deposit of a specific depositor on a specific proposal. // Activates voting period when appropriate and returns true in that case, else returns false. -func (keeper Keeper) AddDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress, depositAmount sdk.Coins) (bool, error) { +func (keeper Keeper) AddDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress, depositAmount sdk.Coins, skipMinDepositRatioCheck bool) (bool, error) { // Checks to see if proposal exists proposal, ok := keeper.GetProposal(ctx, proposalID) if !ok { @@ -122,7 +122,6 @@ func (keeper Keeper) AddDeposit(ctx sdk.Context, proposalID uint64, depositorAdd return false, sdkerrors.Wrapf(types.ErrInactiveProposal, "%d", proposalID) } - skipMinDepositRatioCheck := false minDeposit := keeper.GetMinDeposit(ctx) // Check if deposit has already sufficient total funds to transition the proposal into the voting period // perhaps because the min deposit was lowered in the meantime. If so, the minDepositRatio check is skipped, @@ -238,23 +237,25 @@ func (keeper Keeper) RefundAndDeleteDeposits(ctx sdk.Context, proposalID uint64) // the deposit parameters. Returns nil on success, error otherwise. func (keeper Keeper) validateInitialDeposit(ctx sdk.Context, initialDeposit sdk.Coins) error { if !initialDeposit.IsValid() || initialDeposit.IsAnyNegative() { - return sdkerrors.Wrapf(sdkerrors1.ErrInvalidCoins, initialDeposit.String()) + return sdkerrors.Wrapf(sdkerrors1.ErrInvalidCoins, "%s", initialDeposit.String()) } - params := keeper.GetParams(ctx) - minInitialDepositRatio, err := sdk.NewDecFromStr(params.MinInitialDepositRatio) - if err != nil { - return err - } - if minInitialDepositRatio.IsZero() { - return nil - } - minDepositCoins := keeper.GetMinDeposit(ctx) - for i := range minDepositCoins { - minDepositCoins[i].Amount = sdk.NewDecFromInt(minDepositCoins[i].Amount).Mul(minInitialDepositRatio).RoundInt() - } - if !initialDeposit.IsAllGTE(minDepositCoins) { - return sdkerrors.Wrapf(types.ErrMinDepositTooSmall, "was (%s), need (%s)", initialDeposit, minDepositCoins) + // params := keeper.GetParams(ctx) + // minInitialDepositRatio, err := sdk.NewDecFromStr(params.MinInitialDepositRatio) + // if err != nil { + // return err + // } + // if minInitialDepositRatio.IsZero() { + // return nil + // } + // minDepositCoins := keeper.GetMinDeposit(ctx) + // for i := range minDepositCoins { + // minDepositCoins[i].Amount = sdk.NewDecFromInt(minDepositCoins[i].Amount).Mul(minInitialDepositRatio).RoundInt() + // } + + minInitialDepositCoins := keeper.GetMinInitialDeposit(ctx) + if !initialDeposit.IsAllGTE(minInitialDepositCoins) { + return sdkerrors.Wrapf(types.ErrMinDepositTooSmall, "was (%s), need (%s)", initialDeposit, minInitialDepositCoins) } return nil } diff --git a/x/gov/keeper/deposit_test.go b/x/gov/keeper/deposit_test.go index 10f7275af..b3a0aac6d 100644 --- a/x/gov/keeper/deposit_test.go +++ b/x/gov/keeper/deposit_test.go @@ -3,6 +3,7 @@ package keeper_test import ( "testing" + "cosmossdk.io/math" "github.com/stretchr/testify/require" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" @@ -43,7 +44,7 @@ func TestDeposits(t *testing.T) { require.Nil(t, proposal.VotingStartTime) // Check first deposit - votingStarted, err := govKeeper.AddDeposit(ctx, proposalID, TestAddrs[0], fourStake) + votingStarted, err := govKeeper.AddDeposit(ctx, proposalID, TestAddrs[0], fourStake, false) require.NoError(t, err) require.False(t, votingStarted) deposit, found = govKeeper.GetDeposit(ctx, proposalID, TestAddrs[0]) @@ -56,7 +57,7 @@ func TestDeposits(t *testing.T) { require.Equal(t, addr0Initial.Sub(fourStake...), bankKeeper.GetAllBalances(ctx, TestAddrs[0])) // Check a second deposit from same address - votingStarted, err = govKeeper.AddDeposit(ctx, proposalID, TestAddrs[0], fiveStake) + votingStarted, err = govKeeper.AddDeposit(ctx, proposalID, TestAddrs[0], fiveStake, false) require.NoError(t, err) require.False(t, votingStarted) deposit, found = govKeeper.GetDeposit(ctx, proposalID, TestAddrs[0]) @@ -69,7 +70,7 @@ func TestDeposits(t *testing.T) { require.Equal(t, addr0Initial.Sub(fourStake...).Sub(fiveStake...), bankKeeper.GetAllBalances(ctx, TestAddrs[0])) // Check third deposit from a new address - votingStarted, err = govKeeper.AddDeposit(ctx, proposalID, TestAddrs[1], fourStake) + votingStarted, err = govKeeper.AddDeposit(ctx, proposalID, TestAddrs[1], fourStake, false) require.NoError(t, err) require.True(t, votingStarted) deposit, found = govKeeper.GetDeposit(ctx, proposalID, TestAddrs[1]) @@ -110,7 +111,7 @@ func TestDeposits(t *testing.T) { proposal, err = govKeeper.SubmitProposal(ctx, tp, "", "title", "description", TestAddrs[0]) require.NoError(t, err) proposalID = proposal.Id - _, err = govKeeper.AddDeposit(ctx, proposalID, TestAddrs[0], fourStake) + _, err = govKeeper.AddDeposit(ctx, proposalID, TestAddrs[0], fourStake, false) require.NoError(t, err) govKeeper.DeleteAndBurnDeposits(ctx, proposalID) deposits = govKeeper.GetDeposits(ctx, proposalID) @@ -199,7 +200,12 @@ func TestValidateInitialDeposit(t *testing.T) { params := v1.DefaultParams() params.MinDepositThrottler.FloorValue = tc.minDeposit - params.MinInitialDepositRatio = sdk.NewDec(tc.minInitialDepositPercent).Quo(sdk.NewDec(100)).String() + // params.MinInitialDepositRatio = sdk.NewDec(tc.minInitialDepositPercent).Quo(sdk.NewDec(100)).String() + minInitialDepositFloor := sdk.NewCoins() + for _, coin := range tc.minDeposit { + minInitialDepositFloor = minInitialDepositFloor.Add(sdk.NewCoin(coin.Denom, sdk.NewDec(tc.minInitialDepositPercent).Quo(math.LegacyDec(sdk.NewDec(100))).MulInt(coin.Amount).TruncateInt())) + } + params.MinInitialDepositThrottler.FloorValue = minInitialDepositFloor govKeeper.SetParams(ctx, params) @@ -282,7 +288,7 @@ func TestDepositAmount(t *testing.T) { require.NoError(t, err) proposalID := proposal.Id - _, err = govKeeper.AddDeposit(ctx, proposalID, testAddrs[0], tc.deposit) + _, err = govKeeper.AddDeposit(ctx, proposalID, testAddrs[0], tc.deposit, false) if tc.err != "" { require.Error(t, err) require.Equal(t, tc.err, err.Error()) diff --git a/x/gov/keeper/grpc_query.go b/x/gov/keeper/grpc_query.go index 3faeb0a14..9335d4d85 100644 --- a/x/gov/keeper/grpc_query.go +++ b/x/gov/keeper/grpc_query.go @@ -299,6 +299,14 @@ func (q Keeper) MinDeposit(c context.Context, req *v1.QueryMinDepositRequest) (* return &v1.QueryMinDepositResponse{MinDeposit: minDeposit}, nil } +// MinInitialDeposit returns the minimum deposit required for a proposal to be submitted +func (q Keeper) MinInitialDeposit(c context.Context, req *v1.QueryMinInitialDepositRequest) (*v1.QueryMinInitialDepositResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + minInitialDeposit := q.GetMinInitialDeposit(ctx) + + return &v1.QueryMinInitialDepositResponse{MinInitialDeposit: minInitialDeposit}, nil +} + var _ v1beta1.QueryServer = legacyQueryServer{} type legacyQueryServer struct { diff --git a/x/gov/keeper/hooks_test.go b/x/gov/keeper/hooks_test.go index 734ace13d..6bee6458f 100644 --- a/x/gov/keeper/hooks_test.go +++ b/x/gov/keeper/hooks_test.go @@ -79,7 +79,7 @@ func TestHooks(t *testing.T) { p2, err := govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r")) require.NoError(t, err) - activated, err := govKeeper.AddDeposit(ctx, p2.Id, addrs[0], minDeposit) + activated, err := govKeeper.AddDeposit(ctx, p2.Id, addrs[0], minDeposit, false) require.True(t, activated) require.NoError(t, err) require.True(t, govHooksReceiver.AfterProposalDepositValid) diff --git a/x/gov/keeper/min_initial_deposit.go b/x/gov/keeper/min_initial_deposit.go new file mode 100644 index 000000000..f85d2b540 --- /dev/null +++ b/x/gov/keeper/min_initial_deposit.go @@ -0,0 +1,148 @@ +package keeper + +import ( + "time" + + "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/atomone-hub/atomone/x/gov/types" + v1 "github.com/atomone-hub/atomone/x/gov/types/v1" +) + +// GetInactiveProposalsNumber gets the number of inactive proposals +func (keeper Keeper) GetInactiveProposalsNumber(ctx sdk.Context) (inactiveProposalsNumber uint64) { + store := ctx.KVStore(keeper.storeKey) + bz := store.Get(types.InactiveProposalsNumberKey) + if bz == nil { + return 0 + } + + inactiveProposalsNumber = types.GetInactiveProposalsNumberFromBytes(bz) + return inactiveProposalsNumber +} + +// SetInactiveProposalsNumber sets the new number of inactive proposals to the store +func (keeper Keeper) SetInactiveProposalsNumber(ctx sdk.Context, inactiveProposalsNumber uint64) { + store := ctx.KVStore(keeper.storeKey) + store.Set(types.InactiveProposalsNumberKey, types.GetInactiveProposalsNumberBytes(inactiveProposalsNumber)) +} + +// IncrementInactiveProposalsNumber increments the number of inactive proposals by one +func (keeper Keeper) IncrementInactiveProposalsNumber(ctx sdk.Context) { + inactiveProposalsNumber := keeper.GetInactiveProposalsNumber(ctx) + 1 + keeper.SetInactiveProposalsNumber(ctx, inactiveProposalsNumber) + + currMinInitialDeposit := keeper.GetMinInitialDeposit(ctx) + keeper.SetLastMinInitialDeposit(ctx, currMinInitialDeposit, ctx.BlockTime()) +} + +// DecrementInactiveProposalsNumber decrements the number of inactive proposals by one +func (keeper Keeper) DecrementInactiveProposalsNumber(ctx sdk.Context) { + currentInactiveProposalsNumber := keeper.GetInactiveProposalsNumber(ctx) + if currentInactiveProposalsNumber > 0 { + inactiveProposalsNumber := currentInactiveProposalsNumber - 1 + keeper.SetInactiveProposalsNumber(ctx, inactiveProposalsNumber) + } else { + panic("number of inactive proposals should never be negative") + } + + currMinInitialDeposit := keeper.GetMinInitialDeposit(ctx) + keeper.SetLastMinInitialDeposit(ctx, currMinInitialDeposit, ctx.BlockTime()) +} + +// SetLastMinInitialDeposit updates the last min initial deposit and last min +// initial deposit time. +// Used to record these values the last time the number of inactive proposals changed +func (keeper Keeper) SetLastMinInitialDeposit(ctx sdk.Context, minInitialDeposit sdk.Coins, timeStamp time.Time) { + store := ctx.KVStore(keeper.storeKey) + lastMinInitialDeposit := v1.LastMinDeposit{ + Value: minInitialDeposit, + Time: &timeStamp, + } + bz := keeper.cdc.MustMarshal(&lastMinInitialDeposit) + store.Set(types.LastMinInitialDepositKey, bz) +} + +// GetLastMinInitialDeposit returns the last min initial deposit and the time it was set +func (keeper Keeper) GetLastMinInitialDeposit(ctx sdk.Context) (sdk.Coins, time.Time) { + store := ctx.KVStore(keeper.storeKey) + bz := store.Get(types.LastMinInitialDepositKey) + if bz == nil { + return sdk.Coins{}, time.Time{} + } + var lastMinInitialDeposit v1.LastMinDeposit + keeper.cdc.MustUnmarshal(bz, &lastMinInitialDeposit) + return lastMinInitialDeposit.Value, *lastMinInitialDeposit.Time +} + +// GetMinInitialDeposit returns the (dynamic) minimum initial deposit currently required for +// proposal submission +func (keeper Keeper) GetMinInitialDeposit(ctx sdk.Context) sdk.Coins { + params := keeper.GetParams(ctx) + minInitialDepositFloor := sdk.Coins(params.MinInitialDepositThrottler.FloorValue) + tick := params.MinInitialDepositThrottler.UpdatePeriod + targetInactiveProposals := math.NewIntFromUint64(params.MinInitialDepositThrottler.TargetProposals) + k := params.MinInitialDepositThrottler.SensitivityTargetDistance + var a sdk.Dec + + numInactiveProposals := math.NewIntFromUint64(keeper.GetInactiveProposalsNumber(ctx)) + lastMinInitialDeposit, lastMinInitialDepositTime := keeper.GetLastMinInitialDeposit(ctx) + // get number of ticks passed since last update + ticksPassed := ctx.BlockTime().Sub(lastMinInitialDepositTime).Nanoseconds() / tick.Nanoseconds() + + if numInactiveProposals.GT(targetInactiveProposals) { + a = sdk.MustNewDecFromStr(params.MinInitialDepositThrottler.IncreaseRatio) + } else { + a = sdk.MustNewDecFromStr(params.MinInitialDepositThrottler.DecreaseRatio) + } + + distance := numInactiveProposals.Sub(targetInactiveProposals) + percChange := math.LegacyOneDec() + if !distance.IsZero() { + b, err := distance.ToLegacyDec().ApproxRoot(k) + if err != nil { + // in case of error bypass the sensitivity, i.e. assume k = 1 + b = distance.ToLegacyDec() + } + c := a.Mul(b) + percChange = percChange.Add(c) + } + if ticksPassed != 0 { + percChange = percChange.Power(uint64(ticksPassed)) + } + + minInitialDeposit := sdk.Coins{} + minInitialDepositFloorDenomsSeen := make(map[string]bool) + for _, lastMinInitialDepositCoin := range lastMinInitialDeposit { + minInitialDepositFloorCoinAmt := minInitialDepositFloor.AmountOf(lastMinInitialDepositCoin.Denom) + if minInitialDepositFloorCoinAmt.IsZero() { + // minInitialDepositFloor was changed and this coin was removed, + // reflect this also in the current min initial deposit, + // i.e. remove this coin + continue + } + minInitialDepositFloorDenomsSeen[lastMinInitialDepositCoin.Denom] = true + minInitialDepositCoinAmt := lastMinInitialDepositCoin.Amount.ToLegacyDec().Mul(percChange).TruncateInt() + if minInitialDepositCoinAmt.LT(minInitialDepositFloorCoinAmt) { + minInitialDeposit = append(minInitialDeposit, sdk.NewCoin(lastMinInitialDepositCoin.Denom, minInitialDepositFloorCoinAmt)) + } else { + minInitialDeposit = append(minInitialDeposit, sdk.NewCoin(lastMinInitialDepositCoin.Denom, minInitialDepositCoinAmt)) + } + } + + // make sure any new denoms in minInitialDepositFloor are added to minInitialDeposit + for _, minInitialDepositFloorCoin := range minInitialDepositFloor { + if _, seen := minInitialDepositFloorDenomsSeen[minInitialDepositFloorCoin.Denom]; !seen { + minInitialDepositCoinAmt := minInitialDepositFloorCoin.Amount.ToLegacyDec().Mul(percChange).TruncateInt() + if minInitialDepositCoinAmt.LT(minInitialDepositFloorCoin.Amount) { + minInitialDeposit = append(minInitialDeposit, minInitialDepositFloorCoin) + } else { + minInitialDeposit = append(minInitialDeposit, sdk.NewCoin(minInitialDepositFloorCoin.Denom, minInitialDepositCoinAmt)) + } + } + } + + return minInitialDeposit +} diff --git a/x/gov/keeper/min_initial_deposit_test.go b/x/gov/keeper/min_initial_deposit_test.go new file mode 100644 index 000000000..23f2a0cf2 --- /dev/null +++ b/x/gov/keeper/min_initial_deposit_test.go @@ -0,0 +1,173 @@ +package keeper_test + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/atomone-hub/atomone/x/gov/keeper" + v1 "github.com/atomone-hub/atomone/x/gov/types/v1" +) + +func TestInactiveProposalNumber(t *testing.T) { + assert := assert.New(t) + k, _, _, ctx := setupGovKeeper(t) + + assert.EqualValues(0, k.GetInactiveProposalsNumber(ctx)) + + k.IncrementInactiveProposalsNumber(ctx) + k.IncrementInactiveProposalsNumber(ctx) + assert.EqualValues(2, k.GetInactiveProposalsNumber(ctx)) + + k.DecrementInactiveProposalsNumber(ctx) + assert.EqualValues(1, k.GetInactiveProposalsNumber(ctx)) + + k.SetInactiveProposalsNumber(ctx, 42) + assert.EqualValues(42, k.GetInactiveProposalsNumber(ctx)) +} + +func TestGetMinInitialDeposit(t *testing.T) { + var ( + minInitialDepositFloor = v1.DefaultMinInitialDepositFloor + minInitialDepositFloorX2 = minInitialDepositFloor.MulInt(sdk.NewInt(2)) + updatePeriod = v1.DefaultMinInitialDepositUpdatePeriod + N = v1.DefaultTargetProposalsInDepositPeriod + + minInitialDepositTimeFromTicks = func(ticks int) time.Time { + return time.Now().Add(-updatePeriod*time.Duration(ticks) - time.Minute) + } + ) + tests := []struct { + name string + setup func(sdk.Context, *keeper.Keeper) + expectedMinInitialDeposit string + }{ + { + name: "initial case no setup : expectedMinInitialDeposit=minInitialDepositFloor", + expectedMinInitialDeposit: minInitialDepositFloor.String(), + }, + { + name: "n=N-1 lastMinInitialDeposit=minInitialDepositFloor ticksPassed=0 : expectedMinInitialDeposit=minInitialDepositFloor", + setup: func(ctx sdk.Context, k *keeper.Keeper) { + k.SetInactiveProposalsNumber(ctx, 0) + k.SetLastMinInitialDeposit(ctx, minInitialDepositFloor, minInitialDepositTimeFromTicks(0)) + }, + expectedMinInitialDeposit: minInitialDepositFloor.String(), + }, + { + name: "n=N lastMinInitialDeposit=minInitialDepositFloor ticksPassed=0 : expectedMinInitialDeposit=minInitialDepositFloor", + setup: func(ctx sdk.Context, k *keeper.Keeper) { + k.SetInactiveProposalsNumber(ctx, N) + k.SetLastMinInitialDeposit(ctx, minInitialDepositFloor, minInitialDepositTimeFromTicks(0)) + }, + expectedMinInitialDeposit: minInitialDepositFloor.String(), + }, + { + name: "n=N+1 lastMinInitialDeposit=minInitialDepositFloor ticksPassed=0 : expectedMinInitialDeposit>minInitialDepositFloor", + setup: func(ctx sdk.Context, k *keeper.Keeper) { + k.SetInactiveProposalsNumber(ctx, N+1) + k.SetLastMinInitialDeposit(ctx, minInitialDepositFloor, minInitialDepositTimeFromTicks(0)) + }, + expectedMinInitialDeposit: "101000stake", + }, + { + name: "n=N+1 lastMinInitialDeposit=otherCoins ticksPassed=0 : expectedMinInitialDeposit>minInitialDepositFloor", + setup: func(ctx sdk.Context, k *keeper.Keeper) { + k.SetInactiveProposalsNumber(ctx, N+1) + k.SetLastMinInitialDeposit(ctx, sdk.NewCoins( + sdk.NewInt64Coin("xxx", 1_000_000_000), + ), + minInitialDepositTimeFromTicks(0), + ) + }, + expectedMinInitialDeposit: "101000stake", + }, + { + name: "n=N-1 lastMinInitialDeposit=minInitialDepositFloor*2 ticksPassed=0 : minInitialDepositlastMinInitialDeposit*2", + setup: func(ctx sdk.Context, k *keeper.Keeper) { + k.SetInactiveProposalsNumber(ctx, N+1) + k.SetLastMinInitialDeposit(ctx, minInitialDepositFloorX2, minInitialDepositTimeFromTicks(0)) + }, + expectedMinInitialDeposit: "202000stake", + }, + { + name: "n=N-1 lastMinInitialDeposit=minInitialDepositFloor*2 ticksPassed=1 : expectedMinInitialDepositlastMinInitialDeposit*2", + setup: func(ctx sdk.Context, k *keeper.Keeper) { + k.SetInactiveProposalsNumber(ctx, N+1) + k.SetLastMinInitialDeposit(ctx, minInitialDepositFloorX2, minInitialDepositTimeFromTicks(1)) + }, + expectedMinInitialDeposit: "202000stake", + }, + { + name: "n=N-1 lastMinInitialDeposit=minInitialDepositFloor*2 ticksPassed=2 : expectedMinInitialDeposit 0 { // add proposal to quorum check queue diff --git a/x/gov/simulation/genesis.go b/x/gov/simulation/genesis.go index 8c43c81c4..809fe3728 100644 --- a/x/gov/simulation/genesis.go +++ b/x/gov/simulation/genesis.go @@ -20,22 +20,28 @@ import ( // Simulation parameter constants const ( - DepositParamsMinDeposit = "deposit_params_min_deposit" - DepositParamsDepositPeriod = "deposit_params_deposit_period" - DepositMinInitialRatio = "deposit_params_min_initial_ratio" - VotingParamsVotingPeriod = "voting_params_voting_period" - TallyParamsQuorum = "tally_params_quorum" - TallyParamsThreshold = "tally_params_threshold" - TallyParamsConstitutionAmendmentQuorum = "tally_params_constitution_amendment_quorum" - TallyParamsConstitutionAmendmentThreshold = "tally_params_constitution_amendment_threshold" - TallyParamsLawQuorum = "tally_params_law_quorum" - TallyParamsLawThreshold = "tally_params_law_threshold" - DepositParamsMinDepositFloor = "deposit_params_min_deposit_floor" - DepositParamsMinDepositUpdatePeriod = "deposit_params_min_deposit_update_period" - DepositParamsMinDepositSensitivityTargetDistance = "deposit_params_min_deposit_sensitivity_target_distance" - DepositParamsMinDepositIncreaseRatio = "deposit_params_min_deposit_increase_ratio" - DepositParamsMinDepositDecreaseRatio = "deposit_params_min_deposit_decrease_ratio" - TallyParamsTargetActiveProposals = "tally_params_target_active_proposals" + DepositParamsMinDeposit = "deposit_params_min_deposit" + DepositParamsDepositPeriod = "deposit_params_deposit_period" + // DepositMinInitialRatio = "deposit_params_min_initial_ratio" + VotingParamsVotingPeriod = "voting_params_voting_period" + TallyParamsQuorum = "tally_params_quorum" + TallyParamsThreshold = "tally_params_threshold" + TallyParamsConstitutionAmendmentQuorum = "tally_params_constitution_amendment_quorum" + TallyParamsConstitutionAmendmentThreshold = "tally_params_constitution_amendment_threshold" + TallyParamsLawQuorum = "tally_params_law_quorum" + TallyParamsLawThreshold = "tally_params_law_threshold" + DepositParamsMinDepositFloor = "deposit_params_min_deposit_floor" + DepositParamsMinDepositUpdatePeriod = "deposit_params_min_deposit_update_period" + DepositParamsMinDepositSensitivityTargetDistance = "deposit_params_min_deposit_sensitivity_target_distance" + DepositParamsMinDepositIncreaseRatio = "deposit_params_min_deposit_increase_ratio" + DepositParamsMinDepositDecreaseRatio = "deposit_params_min_deposit_decrease_ratio" + DepositParamsTargetActiveProposals = "deposit_params_target_active_proposals" + DepositParamsMinInitialDepositFloor = "deposit_params_min_initial_deposit_floor" + DepositParamsMinInitialDepositUpdatePeriod = "deposit_params_min_initial_deposit_update_period" + DepositParamsMinInitialDepositSensitivityTargetDistance = "deposit_params_min_initial_deposit_sensitivity_target_distance" + DepositParamsMinInitialDepositIncreaseRatio = "deposit_params_min_initial_deposit_increase_ratio" + DepositParamsMinInitialDepositDecreaseRatio = "deposit_params_min_initial_deposit_decrease_ratio" + DepositParamsMinInitialDepositTargetProposals = "deposit_params_min_initial_deposit_target_proposals" // NOTE: backport from v50 MinDepositRatio = "min_deposit_ratio" @@ -118,12 +124,31 @@ func GenDepositParamsMinDepositSensitivityTargetDistance(r *rand.Rand) uint64 { } // GenDepositParamsMinDepositChangeRatio returns randomized DepositParamsMinDepositChangeRatio -func GenDepositParamsMinDepositChangeRatio(r *rand.Rand) sdk.Dec { - return sdk.NewDecWithPrec(int64(simulation.RandIntBetween(r, 0, 100)), 2).Quo(sdk.NewDec(100)) +func GenDepositParamsMinDepositChangeRatio(r *rand.Rand, max, prec int) sdk.Dec { + return sdk.NewDecWithPrec(int64(simulation.RandIntBetween(r, 0, max)), int64(prec)) } -// GenTallyParamsTargetActiveProposals returns randomized TallyParamsTargetActiveProposals -func GenTallyParamsTargetActiveProposals(r *rand.Rand) uint64 { +// GenDepositParamsTargetActiveProposals returns randomized DepositParamsTargetActiveProposals +func GenDepositParamsTargetActiveProposals(r *rand.Rand) uint64 { + return uint64(simulation.RandIntBetween(r, 1, 100)) +} + +// GenDepositParamsMinInitialDepositUpdatePeriod returns randomized DepositParamsMinInitialDepositUpdatePeriod +func GenDepositParamsMinInitialDepositUpdatePeriod(r *rand.Rand, depositPeriod time.Duration) time.Duration { + return time.Duration(simulation.RandIntBetween(r, 1, int(depositPeriod.Seconds()))) * time.Second +} + +// GenDepositParamsMinInitialDepositSensitivityTargetDistance returns randomized DepositParamsMinInitialDepositSensitivityTargetDistance +func GenDepositParamsMinInitialDepositSensitivityTargetDistance(r *rand.Rand) uint64 { + return uint64(simulation.RandIntBetween(r, 1, 10)) +} + +// GenDepositParamsMinInitialDepositChangeRatio returns randomized DepositParamsMinInitialDepositChangeRatio +func GenDepositParamsMinInitialDepositChangeRatio(r *rand.Rand, max, prec int) sdk.Dec { + return sdk.NewDecWithPrec(int64(simulation.RandIntBetween(r, 0, max)), int64(prec)) +} + +func GenDepositParamsMinInitialDepositTargetProposals(r *rand.Rand) uint64 { return uint64(simulation.RandIntBetween(r, 1, 100)) } @@ -143,11 +168,11 @@ func RandomizedGenState(simState *module.SimulationState) { func(r *rand.Rand) { depositPeriod = GenDepositParamsDepositPeriod(r) }, ) - var minInitialDepositRatio sdk.Dec - simState.AppParams.GetOrGenerate( - simState.Cdc, DepositMinInitialRatio, &minInitialDepositRatio, simState.Rand, - func(r *rand.Rand) { minInitialDepositRatio = GenDepositMinInitialDepositRatio(r) }, - ) + // var minInitialDepositRatio sdk.Dec + // simState.AppParams.GetOrGenerate( + // simState.Cdc, DepositMinInitialRatio, &minInitialDepositRatio, simState.Rand, + // func(r *rand.Rand) { minInitialDepositRatio = GenDepositMinInitialDepositRatio(r) }, + // ) var votingPeriod time.Duration simState.AppParams.GetOrGenerate( @@ -228,24 +253,87 @@ func RandomizedGenState(simState *module.SimulationState) { var minDepositIncreaseRatio sdk.Dec simState.AppParams.GetOrGenerate( simState.Cdc, DepositParamsMinDepositIncreaseRatio, &minDepositIncreaseRatio, simState.Rand, - func(r *rand.Rand) { minDepositIncreaseRatio = GenDepositParamsMinDepositChangeRatio(r) }, + func(r *rand.Rand) { minDepositIncreaseRatio = GenDepositParamsMinDepositChangeRatio(r, 300, 3) }, ) var minDepositDecreaseRatio sdk.Dec simState.AppParams.GetOrGenerate( simState.Cdc, DepositParamsMinDepositDecreaseRatio, &minDepositDecreaseRatio, simState.Rand, - func(r *rand.Rand) { minDepositDecreaseRatio = GenDepositParamsMinDepositChangeRatio(r) }, + func(r *rand.Rand) { + minDepositDecreaseRatio = GenDepositParamsMinDepositChangeRatio(r, + int(minDepositIncreaseRatio.MulInt64(1000).QuoInt64(2).TruncateInt64()), 3) + }, ) var targetActiveProposals uint64 simState.AppParams.GetOrGenerate( - simState.Cdc, TallyParamsTargetActiveProposals, &targetActiveProposals, simState.Rand, - func(r *rand.Rand) { targetActiveProposals = GenTallyParamsTargetActiveProposals(r) }, + simState.Cdc, DepositParamsTargetActiveProposals, &targetActiveProposals, simState.Rand, + func(r *rand.Rand) { targetActiveProposals = GenDepositParamsTargetActiveProposals(r) }, + ) + + var minInitialDepositFloor sdk.Coins + simState.AppParams.GetOrGenerate( + simState.Cdc, DepositParamsMinInitialDepositFloor, &minInitialDepositFloor, simState.Rand, + func(r *rand.Rand) { + ratio := GenDepositMinInitialDepositRatio(r) + minInitialDepositFloor = sdk.NewCoins() + for _, coin := range minDepositFloor { + minInitialDepositFloor = append(minInitialDepositFloor, sdk.NewCoin(coin.Denom, ratio.MulInt(coin.Amount).TruncateInt())) + } + }, + ) + + var minInitialDepositUpdatePeriod time.Duration + simState.AppParams.GetOrGenerate( + simState.Cdc, DepositParamsMinInitialDepositUpdatePeriod, &minInitialDepositUpdatePeriod, simState.Rand, + func(r *rand.Rand) { + minInitialDepositUpdatePeriod = GenDepositParamsMinInitialDepositUpdatePeriod(r, depositPeriod) + }, + ) + + var minInitialDepositSensitivityTargetDistance uint64 + simState.AppParams.GetOrGenerate( + simState.Cdc, DepositParamsMinInitialDepositSensitivityTargetDistance, &minInitialDepositSensitivityTargetDistance, simState.Rand, + func(r *rand.Rand) { + minInitialDepositSensitivityTargetDistance = GenDepositParamsMinInitialDepositSensitivityTargetDistance(r) + }, + ) + + var minInitialDepositIncreaseRatio sdk.Dec + simState.AppParams.GetOrGenerate( + simState.Cdc, DepositParamsMinInitialDepositIncreaseRatio, &minInitialDepositIncreaseRatio, simState.Rand, + func(r *rand.Rand) { + minInitialDepositIncreaseRatio = GenDepositParamsMinInitialDepositChangeRatio(r, 300, 3) + }, + ) + + var minInitialDepositDecreaseRatio sdk.Dec + simState.AppParams.GetOrGenerate( + simState.Cdc, DepositParamsMinInitialDepositDecreaseRatio, &minInitialDepositDecreaseRatio, simState.Rand, + func(r *rand.Rand) { + minInitialDepositDecreaseRatio = GenDepositParamsMinInitialDepositChangeRatio(r, + int(minInitialDepositIncreaseRatio.MulInt64(1000).QuoInt64(2).TruncateInt64()), 3) + }, + ) + + var minInitialDepositTargetProposals uint64 + simState.AppParams.GetOrGenerate( + simState.Cdc, DepositParamsMinInitialDepositTargetProposals, &minInitialDepositTargetProposals, simState.Rand, + func(r *rand.Rand) { + minInitialDepositTargetProposals = GenDepositParamsMinInitialDepositTargetProposals(r) + }, ) govGenesis := v1.NewGenesisState( startingProposalID, - v1.NewParams(depositPeriod, votingPeriod, quorum.String(), threshold.String(), amendmentsQuorum.String(), amendmentsThreshold.String(), lawQuorum.String(), lawThreshold.String(), minInitialDepositRatio.String(), simState.Rand.Intn(2) == 0, simState.Rand.Intn(2) == 0, minDepositRatio.String(), quorumTimout, maxVotingPeriodExtension, quorumCheckCount, minDepositFloor, minDepositUpdatePeriod, minDepositSensitivityTargetDistance, minDepositIncreaseRatio.String(), minDepositDecreaseRatio.String(), targetActiveProposals), + v1.NewParams(depositPeriod, votingPeriod, quorum.String(), threshold.String(), amendmentsQuorum.String(), + amendmentsThreshold.String(), lawQuorum.String(), lawThreshold.String(), // minInitialDepositRatio.String(), + simState.Rand.Intn(2) == 0, simState.Rand.Intn(2) == 0, minDepositRatio.String(), quorumTimout, + maxVotingPeriodExtension, quorumCheckCount, minDepositFloor, minDepositUpdatePeriod, + minDepositSensitivityTargetDistance, minDepositIncreaseRatio.String(), minDepositDecreaseRatio.String(), + targetActiveProposals, minInitialDepositFloor, minInitialDepositUpdatePeriod, + minInitialDepositSensitivityTargetDistance, minInitialDepositIncreaseRatio.String(), + minInitialDepositDecreaseRatio.String(), minInitialDepositTargetProposals), ) bz, err := json.MarshalIndent(&govGenesis, "", " ") diff --git a/x/gov/simulation/genesis_test.go b/x/gov/simulation/genesis_test.go index 3c7c4d324..d9c0c6b73 100644 --- a/x/gov/simulation/genesis_test.go +++ b/x/gov/simulation/genesis_test.go @@ -4,6 +4,7 @@ import ( "encoding/json" "math/rand" "testing" + "time" "github.com/stretchr/testify/require" @@ -45,33 +46,53 @@ func TestRandomizedGenState(t *testing.T) { simState.Cdc.MustUnmarshalJSON(simState.GenState[types.ModuleName], &govGenesis) const ( - tallyQuorum = "0.311000000000000000" - tallyThreshold = "0.562000000000000000" - amendmentQuorum = "0.534000000000000000" - amendmentThreshold = "0.833000000000000000" - lawQuorum = "0.404000000000000000" - lawThreshold = "0.566000000000000000" - minInitialDepositDec = "0.060000000000000000" + tallyQuorum = "0.294000000000000000" + tallyThreshold = "0.611000000000000000" + amendmentQuorum = "0.568000000000000000" + amendmentThreshold = "0.933000000000000000" + lawQuorum = "0.540000000000000000" + lawThreshold = "0.931000000000000000" + ) + + var ( + minDepositUpdatePeriod = time.Duration(67011000000000) + minInitialDepositUpdatePeriod = time.Duration(66992000000000) ) require.Equal(t, []sdk.Coin{}, govGenesis.Params.MinDeposit) require.Equal(t, "52h44m19s", govGenesis.Params.MaxDepositPeriod.String()) - require.Equal(t, float64(148296), govGenesis.Params.VotingPeriod.Seconds()) + require.Equal(t, float64(278770), govGenesis.Params.VotingPeriod.Seconds()) require.Equal(t, tallyQuorum, govGenesis.Params.Quorum) require.Equal(t, tallyThreshold, govGenesis.Params.Threshold) require.Equal(t, amendmentQuorum, govGenesis.Params.ConstitutionAmendmentQuorum) require.Equal(t, amendmentThreshold, govGenesis.Params.ConstitutionAmendmentThreshold) require.Equal(t, lawQuorum, govGenesis.Params.LawQuorum) require.Equal(t, lawThreshold, govGenesis.Params.LawThreshold) - require.Equal(t, minInitialDepositDec, govGenesis.Params.MinInitialDepositRatio) - require.Equal(t, "18h44m26s", govGenesis.Params.QuorumTimeout.String()) - require.Equal(t, "60h55m33s", govGenesis.Params.MaxVotingPeriodExtension.String()) - require.Equal(t, uint64(26), govGenesis.Params.QuorumCheckCount) + require.Equal(t, "", govGenesis.Params.MinInitialDepositRatio) + require.Equal(t, "26h19m52s", govGenesis.Params.QuorumTimeout.String()) + require.Equal(t, "120h29m51s", govGenesis.Params.MaxVotingPeriodExtension.String()) + require.Equal(t, uint64(17), govGenesis.Params.QuorumCheckCount) require.Equal(t, uint64(0x28), govGenesis.StartingProposalId) require.Equal(t, []*v1.Deposit{}, govGenesis.Deposits) require.Equal(t, []*v1.Vote{}, govGenesis.Votes) require.Equal(t, []*v1.Proposal{}, govGenesis.Proposals) require.Equal(t, "", govGenesis.Constitution) + require.Equal(t, v1.MinDepositThrottler{ + FloorValue: sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(915))), + UpdatePeriod: &minDepositUpdatePeriod, + TargetActiveProposals: 10, + SensitivityTargetDistance: 1, + IncreaseRatio: "0.128000000000000000", + DecreaseRatio: "0.018000000000000000", + }, *govGenesis.Params.MinDepositThrottler) + require.Equal(t, v1.MinInitialDepositThrottler{ + FloorValue: sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(805))), + UpdatePeriod: &minInitialDepositUpdatePeriod, + TargetProposals: 23, + SensitivityTargetDistance: 2, + IncreaseRatio: "0.090000000000000000", + DecreaseRatio: "0.030000000000000000", + }, *govGenesis.Params.MinInitialDepositThrottler) } // TestRandomizedGenState tests abnormal scenarios of applying RandomizedGenState. diff --git a/x/gov/simulation/operations.go b/x/gov/simulation/operations.go index 62755232a..6ebd12927 100644 --- a/x/gov/simulation/operations.go +++ b/x/gov/simulation/operations.go @@ -463,17 +463,20 @@ func randomDeposit( minAmount := sdk.ZeroInt() if useMinAmount { - minDepositPercent, err := sdk.NewDecFromStr(params.MinInitialDepositRatio) + // minDepositPercent, err := sdk.NewDecFromStr(params.MinInitialDepositRatio) + // if err != nil { + // return nil, false, err + // } + // minAmount = sdk.NewDecFromInt(minDepositAmount).Mul(minDepositPercent).TruncateInt() + minAmount = k.GetMinInitialDeposit(ctx)[denomIndex].Amount + } + + amount := sdk.ZeroInt() + if minDepositAmount.Sub(minAmount).GTE(sdk.OneInt()) { + amount, err = simtypes.RandPositiveInt(r, minDepositAmount.Sub(minAmount)) if err != nil { return nil, false, err } - - minAmount = sdk.NewDecFromInt(minDepositAmount).Mul(minDepositPercent).TruncateInt() - } - - amount, err := simtypes.RandPositiveInt(r, minDepositAmount.Sub(minAmount)) - if err != nil { - return nil, false, err } amount = amount.Add(minAmount) diff --git a/x/gov/simulation/operations_test.go b/x/gov/simulation/operations_test.go index 7a4877898..179a8be49 100644 --- a/x/gov/simulation/operations_test.go +++ b/x/gov/simulation/operations_test.go @@ -155,7 +155,7 @@ func TestSimulateMsgSubmitProposal(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Proposer) require.NotEqual(t, len(msg.InitialDeposit), 0) - require.Equal(t, "1682907stake", msg.InitialDeposit[0].String()) + require.Equal(t, "1982907stake", msg.InitialDeposit[0].String()) require.Equal(t, simulation.TypeMsgSubmitProposal, sdk.MsgTypeURL(&msg)) } @@ -185,7 +185,7 @@ func TestSimulateMsgSubmitLegacyProposal(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, "cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.Proposer) require.NotEqual(t, len(msg.InitialDeposit), 0) - require.Equal(t, "8058033stake", msg.InitialDeposit[0].String()) + require.Equal(t, "8358033stake", msg.InitialDeposit[0].String()) require.Equal(t, "title-3: ZBSpYuLyYggwexjxusrBqDOTtGTOWeLrQKjLxzIivHSlcxgdXhhuTSkuxKGLwQvuyNhYFmBZHeAerqyNEUzXPFGkqEGqiQWIXnku", msg.Messages[0].GetCachedValue().(*v1.MsgExecLegacyContent).Content.GetCachedValue().(v1beta1.Content).GetTitle()) require.Equal(t, "description-3: NJWzHdBNpAXKJPHWQdrGYcAHSctgVlqwqHoLfHsXUdStwfefw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StPadhsESlERnKhpEPsfDxNvxqcOyIulaCkmPdambLHvGhTZzysvqFauEgkFRItPfvisehFmoBhQqmkfbHVsgfHXDPJVyhwPllQpuYLRYvGodxKjkarnSNgsXoKEMlaSKxKdcVgvOkuLcfLFfdtXGTclqfPOfeoVLbqcjcXCUEBgAGplrkgsmIEhWRZLlGPGCwKWRaCKMkBHTAcypUrYjWwCLtOPVygMwMANGoQwFnCqFrUGMCRZUGJKTZIGPyldsifauoMnJPLTcDHmilcmahlqOELaAUYDBuzsVywnDQfwRLGIWozYaOAilMBcObErwgTDNGWnwQMUgFFSKtPDMEoEQCTKVREqrXZSGLqwTMcxHfWotDllNkIJPMbXzjDVjPOOjCFuIvTyhXKLyhUScOXvYthRXpPfKwMhptXaxIxgqBoUqzrWbaoLTVpQoottZyPFfNOoMioXHRuFwMRYUiKvcWPkrayyTLOCFJlAyslDameIuqVAuxErqFPEWIScKpBORIuZqoXlZuTvAjEdlEWDODFRregDTqGNoFBIHxvimmIZwLfFyKUfEWAnNBdtdzDmTPXtpHRGdIbuucfTjOygZsTxPjfweXhSUkMhPjMaxKlMIJMOXcnQfyzeOcbWwNbeH", msg.Messages[0].GetCachedValue().(*v1.MsgExecLegacyContent).Content.GetCachedValue().(v1beta1.Content).GetDescription()) require.Equal(t, "gov", msg.Route()) @@ -263,6 +263,7 @@ func TestSimulateMsgVote(t *testing.T) { proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, submitTime, submitTime.Add(*depositPeriod), "", "text proposal", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r")) require.NoError(t, err) + suite.GovKeeper.IncrementInactiveProposalsNumber(ctx) suite.GovKeeper.ActivateVotingPeriod(ctx, proposal) // begin a new block @@ -307,6 +308,7 @@ func TestSimulateMsgVoteWeighted(t *testing.T) { proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, submitTime, submitTime.Add(*depositPeriod), "", "text proposal", "test", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r")) require.NoError(t, err) + suite.GovKeeper.IncrementInactiveProposalsNumber(ctx) suite.GovKeeper.ActivateVotingPeriod(ctx, proposal) // begin a new block diff --git a/x/gov/types/keys.go b/x/gov/types/keys.go index cf3bab945..7784b25cf 100644 --- a/x/gov/types/keys.go +++ b/x/gov/types/keys.go @@ -47,6 +47,8 @@ var ( QuorumCheckQueuePrefix = []byte{0x05} ActiveProposalsNumberKey = []byte{0x06} LastMinDepositKey = []byte{0x07} + InactiveProposalsNumberKey = []byte{0x08} + LastMinInitialDepositKey = []byte{0x09} DepositsKeyPrefix = []byte{0x10} @@ -125,6 +127,18 @@ func GetActiveProposalsNumberFromBytes(bz []byte) (activeProposalsNumber uint64) return binary.BigEndian.Uint64(bz) } +// GetInactiveProposalsNumberBytes returns the byte representation of the inactiveProposalsNumber +func GetInactiveProposalsNumberBytes(inactiveProposalsNumber uint64) (inactiveProposalsNumberBz []byte) { + inactiveProposalsNumberBz = make([]byte, 8) + binary.BigEndian.PutUint64(inactiveProposalsNumberBz, inactiveProposalsNumber) + return +} + +// GetInactiveProposalsNumberFromBytes returns inactiveProposalsNumber in uint64 format from a byte array +func GetInactiveProposalsNumberFromBytes(bz []byte) (inactiveProposalsNumber uint64) { + return binary.BigEndian.Uint64(bz) +} + // DepositsKey gets the first part of the deposits key based on the proposalID func DepositsKey(proposalID uint64) []byte { return append(DepositsKeyPrefix, GetProposalIDBytes(proposalID)...) diff --git a/x/gov/types/v1/genesis.pb.go b/x/gov/types/v1/genesis.pb.go index a21a7134b..5f95e96a8 100644 --- a/x/gov/types/v1/genesis.pb.go +++ b/x/gov/types/v1/genesis.pb.go @@ -51,6 +51,8 @@ type GenesisState struct { Constitution string `protobuf:"bytes,9,opt,name=constitution,proto3" json:"constitution,omitempty"` // last updated value for the dynamic min deposit LastMinDeposit *LastMinDeposit `protobuf:"bytes,10,opt,name=last_min_deposit,json=lastMinDeposit,proto3" json:"last_min_deposit,omitempty"` + // last updated value for the dynamic min initial deposit + LastMinInitialDeposit *LastMinDeposit `protobuf:"bytes,11,opt,name=last_min_initial_deposit,json=lastMinInitialDeposit,proto3" json:"last_min_initial_deposit,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -159,6 +161,13 @@ func (m *GenesisState) GetLastMinDeposit() *LastMinDeposit { return nil } +func (m *GenesisState) GetLastMinInitialDeposit() *LastMinDeposit { + if m != nil { + return m.LastMinInitialDeposit + } + return nil +} + func init() { proto.RegisterType((*GenesisState)(nil), "atomone.gov.v1.GenesisState") } @@ -166,33 +175,35 @@ func init() { func init() { proto.RegisterFile("atomone/gov/v1/genesis.proto", fileDescriptor_7737a96fb154b10d) } var fileDescriptor_7737a96fb154b10d = []byte{ - // 413 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x41, 0x8b, 0xd3, 0x40, - 0x14, 0xc7, 0x3b, 0xbb, 0xdd, 0xba, 0x9d, 0x66, 0x8b, 0x0c, 0x8b, 0x0e, 0xba, 0x86, 0xb0, 0xa7, - 0x20, 0x6c, 0x62, 0x77, 0xc1, 0x0f, 0x50, 0x94, 0x5d, 0x41, 0x61, 0x89, 0xe2, 0xc1, 0x4b, 0x98, - 0x6e, 0x86, 0x74, 0x20, 0xc9, 0x0b, 0x99, 0xd7, 0xc1, 0x7e, 0x0b, 0x3f, 0x96, 0x07, 0x0f, 0x3d, - 0x7a, 0x94, 0xf6, 0x8b, 0x48, 0x27, 0x89, 0x6d, 0xa3, 0xde, 0x92, 0xf7, 0x7e, 0xff, 0xdf, 0xbc, - 0xbc, 0x0c, 0xbd, 0x10, 0x08, 0x39, 0x14, 0x32, 0x4c, 0xc1, 0x84, 0x66, 0x12, 0xa6, 0xb2, 0x90, - 0x5a, 0xe9, 0xa0, 0xac, 0x00, 0x81, 0x8d, 0x9b, 0x6e, 0x90, 0x82, 0x09, 0xcc, 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, 0x26, 0x6c, 0x37, 0x6a, 0x28, 0x76, 0x49, 0x9d, 0x07, 0x28, 0x34, - 0x2a, 0x5c, 0xa0, 0x82, 0x82, 0x0f, 0x3d, 0xe2, 0x0f, 0xa3, 0x83, 0x1a, 0xbb, 0xa3, 0x8f, 0x33, - 0xa1, 0x31, 0xce, 0x55, 0x11, 0x37, 0x1f, 0xce, 0xa9, 0xb5, 0xbb, 0x5d, 0xfb, 0x7b, 0xa1, 0xf1, - 0x83, 0x2a, 0xda, 0x1f, 0x3a, 0xce, 0x0e, 0xde, 0xa7, 0xb7, 0xdf, 0xd7, 0x2e, 0x59, 0xad, 0x5d, - 0xf2, 0x6b, 0xed, 0x92, 0x6f, 0x1b, 0xb7, 0xb7, 0xda, 0xb8, 0xbd, 0x9f, 0x1b, 0xb7, 0xf7, 0xe5, - 0x2a, 0x55, 0x38, 0x5f, 0xcc, 0x82, 0x07, 0xc8, 0xc3, 0xc6, 0x79, 0x35, 0x5f, 0xcc, 0xda, 0xe7, - 0xf0, 0xab, 0xbd, 0x9b, 0xb8, 0x2c, 0xa5, 0x0e, 0xcd, 0x64, 0x36, 0xb0, 0xd7, 0xf3, 0xe6, 0x77, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x92, 0xc4, 0x2a, 0xe8, 0x02, 0x00, 0x00, + // 436 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xdf, 0x6a, 0xdb, 0x30, + 0x14, 0x87, 0xa3, 0xb6, 0xc9, 0x1a, 0x25, 0x0d, 0x43, 0x74, 0x9b, 0xd8, 0x3a, 0x13, 0x7a, 0x15, + 0x06, 0xb5, 0x97, 0x16, 0xf6, 0x00, 0x61, 0xa3, 0x2d, 0x6c, 0x50, 0xbc, 0xb1, 0xc1, 0x6e, 0x8c, + 0xd2, 0x08, 0x57, 0x60, 0xeb, 0x18, 0xeb, 0x44, 0xac, 0x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 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0x17, 0x14, 0x2b, 0xfd, + 0x41, 0x03, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -215,6 +226,18 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.LastMinInitialDeposit != nil { + { + size, err := m.LastMinInitialDeposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } if m.LastMinDeposit != nil { { size, err := m.LastMinDeposit.MarshalToSizedBuffer(dAtA[:i]) @@ -394,6 +417,10 @@ func (m *GenesisState) Size() (n int) { l = m.LastMinDeposit.Size() n += 1 + l + sovGenesis(uint64(l)) } + if m.LastMinInitialDeposit != nil { + l = m.LastMinInitialDeposit.Size() + n += 1 + l + sovGenesis(uint64(l)) + } return n } @@ -765,6 +792,42 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastMinInitialDeposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LastMinInitialDeposit == nil { + m.LastMinInitialDeposit = &LastMinDeposit{} + } + if err := m.LastMinInitialDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/gov/types/v1/gov.pb.go b/x/gov/types/v1/gov.pb.go index f420d49a5..723329dc6 100644 --- a/x/gov/types/v1/gov.pb.go +++ b/x/gov/types/v1/gov.pb.go @@ -951,6 +951,102 @@ func (m *MinDepositThrottler) GetSensitivityTargetDistance() uint64 { return 0 } +type MinInitialDepositThrottler struct { + // Floor value for the minimum initial deposit required for a proposal to enter the deposit period. + FloorValue []types.Coin `protobuf:"bytes,1,rep,name=floor_value,json=floorValue,proto3" json:"floor_value"` + // Duration that dictates after how long the dynamic minimum deposit should be recalculated + // for time-based updates. + UpdatePeriod *time.Duration `protobuf:"bytes,2,opt,name=update_period,json=updatePeriod,proto3,stdduration" json:"update_period,omitempty"` + // The number of proposals in deposit period the dynamic minimum initial deposit should target. + TargetProposals uint64 `protobuf:"varint,3,opt,name=target_proposals,json=targetProposals,proto3" json:"target_proposals,omitempty"` + // The ratio of increase for the minimum initial deposit when the number of proposals + // in deposit period exceeds the target by 1. + IncreaseRatio string `protobuf:"bytes,4,opt,name=increase_ratio,json=increaseRatio,proto3" json:"increase_ratio,omitempty"` + // The ratio of decrease for the minimum initial deposit when the number of proposals + // in deposit period is 1 less than the target. + DecreaseRatio string `protobuf:"bytes,5,opt,name=decrease_ratio,json=decreaseRatio,proto3" json:"decrease_ratio,omitempty"` + // A positive integer representing the sensitivity of the dynamic minimum initial + // deposit increase/decrease to the distance from the target number of proposals + // in deposit period. The higher the number, the lower the sensitivity. A value + // of 1 represents the highest sensitivity. + SensitivityTargetDistance uint64 `protobuf:"varint,6,opt,name=sensitivity_target_distance,json=sensitivityTargetDistance,proto3" json:"sensitivity_target_distance,omitempty"` +} + +func (m *MinInitialDepositThrottler) Reset() { *m = MinInitialDepositThrottler{} } +func (m *MinInitialDepositThrottler) String() string { return proto.CompactTextString(m) } +func (*MinInitialDepositThrottler) ProtoMessage() {} +func (*MinInitialDepositThrottler) Descriptor() ([]byte, []int) { + return fileDescriptor_ecf0f9950ff6986c, []int{11} +} +func (m *MinInitialDepositThrottler) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MinInitialDepositThrottler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MinInitialDepositThrottler.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MinInitialDepositThrottler) XXX_Merge(src proto.Message) { + xxx_messageInfo_MinInitialDepositThrottler.Merge(m, src) +} +func (m *MinInitialDepositThrottler) XXX_Size() int { + return m.Size() +} +func (m *MinInitialDepositThrottler) XXX_DiscardUnknown() { + xxx_messageInfo_MinInitialDepositThrottler.DiscardUnknown(m) +} + +var xxx_messageInfo_MinInitialDepositThrottler proto.InternalMessageInfo + +func (m *MinInitialDepositThrottler) GetFloorValue() []types.Coin { + if m != nil { + return m.FloorValue + } + return nil +} + +func (m *MinInitialDepositThrottler) GetUpdatePeriod() *time.Duration { + if m != nil { + return m.UpdatePeriod + } + return nil +} + +func (m *MinInitialDepositThrottler) GetTargetProposals() uint64 { + if m != nil { + return m.TargetProposals + } + return 0 +} + +func (m *MinInitialDepositThrottler) GetIncreaseRatio() string { + if m != nil { + return m.IncreaseRatio + } + return "" +} + +func (m *MinInitialDepositThrottler) GetDecreaseRatio() string { + if m != nil { + return m.DecreaseRatio + } + return "" +} + +func (m *MinInitialDepositThrottler) GetSensitivityTargetDistance() uint64 { + if m != nil { + return m.SensitivityTargetDistance + } + return 0 +} + // Params defines the parameters for the x/gov module. // // Since: cosmos-sdk 0.47 @@ -973,7 +1069,7 @@ type Params struct { // Minimum proportion of Yes votes for proposal to pass. Default value: 2/3. Threshold string `protobuf:"bytes,5,opt,name=threshold,proto3" json:"threshold,omitempty"` // The ratio representing the proportion of the deposit value that must be paid at proposal submission. - MinInitialDepositRatio string `protobuf:"bytes,7,opt,name=min_initial_deposit_ratio,json=minInitialDepositRatio,proto3" json:"min_initial_deposit_ratio,omitempty"` + MinInitialDepositRatio string `protobuf:"bytes,7,opt,name=min_initial_deposit_ratio,json=minInitialDepositRatio,proto3" json:"min_initial_deposit_ratio,omitempty"` // Deprecated: Do not use. // burn deposits if a proposal does not meet quorum BurnVoteQuorum bool `protobuf:"varint,13,opt,name=burn_vote_quorum,json=burnVoteQuorum,proto3" json:"burn_vote_quorum,omitempty"` // burn deposits if the proposal does not enter voting period @@ -1002,15 +1098,16 @@ type Params struct { MaxVotingPeriodExtension *time.Duration `protobuf:"bytes,21,opt,name=max_voting_period_extension,json=maxVotingPeriodExtension,proto3,stdduration" json:"max_voting_period_extension,omitempty"` // Number of times a proposal should be checked for quorum after the quorum timeout // has elapsed. Used to compute the amount of time in between quorum checks. - QuorumCheckCount uint64 `protobuf:"varint,22,opt,name=quorum_check_count,json=quorumCheckCount,proto3" json:"quorum_check_count,omitempty"` - MinDepositThrottler *MinDepositThrottler `protobuf:"bytes,23,opt,name=min_deposit_throttler,json=minDepositThrottler,proto3" json:"min_deposit_throttler,omitempty"` + QuorumCheckCount uint64 `protobuf:"varint,22,opt,name=quorum_check_count,json=quorumCheckCount,proto3" json:"quorum_check_count,omitempty"` + MinDepositThrottler *MinDepositThrottler `protobuf:"bytes,23,opt,name=min_deposit_throttler,json=minDepositThrottler,proto3" json:"min_deposit_throttler,omitempty"` + MinInitialDepositThrottler *MinInitialDepositThrottler `protobuf:"bytes,24,opt,name=min_initial_deposit_throttler,json=minInitialDepositThrottler,proto3" json:"min_initial_deposit_throttler,omitempty"` } func (m *Params) Reset() { *m = Params{} } func (m *Params) String() string { return proto.CompactTextString(m) } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_ecf0f9950ff6986c, []int{11} + return fileDescriptor_ecf0f9950ff6986c, []int{12} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1075,6 +1172,7 @@ func (m *Params) GetThreshold() string { return "" } +// Deprecated: Do not use. func (m *Params) GetMinInitialDepositRatio() string { if m != nil { return m.MinInitialDepositRatio @@ -1159,6 +1257,13 @@ func (m *Params) GetMinDepositThrottler() *MinDepositThrottler { return nil } +func (m *Params) GetMinInitialDepositThrottler() *MinInitialDepositThrottler { + if m != nil { + return m.MinInitialDepositThrottler + } + return nil +} + func init() { proto.RegisterEnum("atomone.gov.v1.VoteOption", VoteOption_name, VoteOption_value) proto.RegisterEnum("atomone.gov.v1.ProposalStatus", ProposalStatus_name, ProposalStatus_value) @@ -1173,116 +1278,121 @@ func init() { proto.RegisterType((*VotingParams)(nil), "atomone.gov.v1.VotingParams") proto.RegisterType((*TallyParams)(nil), "atomone.gov.v1.TallyParams") proto.RegisterType((*MinDepositThrottler)(nil), "atomone.gov.v1.MinDepositThrottler") + proto.RegisterType((*MinInitialDepositThrottler)(nil), "atomone.gov.v1.MinInitialDepositThrottler") proto.RegisterType((*Params)(nil), "atomone.gov.v1.Params") } func init() { proto.RegisterFile("atomone/gov/v1/gov.proto", fileDescriptor_ecf0f9950ff6986c) } var fileDescriptor_ecf0f9950ff6986c = []byte{ - // 1645 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xbd, 0x6f, 0x23, 0xc7, - 0x15, 0xd7, 0xf2, 0x4b, 0xd4, 0xa3, 0x48, 0x51, 0x23, 0xe9, 0xb4, 0x92, 0x2c, 0x4a, 0x61, 0x02, - 0x43, 0xb9, 0x9c, 0xc8, 0x48, 0xe7, 0x5c, 0x61, 0x18, 0x01, 0x28, 0x91, 0x77, 0xe1, 0x41, 0x16, - 0xe9, 0x25, 0x2d, 0xc7, 0x29, 0xb2, 0x18, 0x72, 0xe7, 0xa8, 0x85, 0xb9, 0x3b, 0xf4, 0xce, 0x2c, - 0x25, 0xb6, 0xa9, 0x52, 0xba, 0x0c, 0x52, 0xa5, 0x4c, 0x99, 0xc2, 0x40, 0xfe, 0x80, 0x20, 0x80, - 0xab, 0xc0, 0x70, 0x95, 0x34, 0x97, 0xe0, 0xae, 0x08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0x8d, 0xa2, 0x77, 0x40, 0x9f, 0x96, 0x19, 0x95, - 0x97, 0x95, 0xf3, 0x66, 0xa5, 0x9c, 0x8d, 0xcd, 0x62, 0x3e, 0x2f, 0x55, 0x2f, 0x2a, 0xe5, 0x6c, - 0xfc, 0xec, 0xc5, 0x57, 0x6f, 0x72, 0xda, 0xd7, 0x6f, 0x72, 0xda, 0xbf, 0xde, 0xe4, 0xb4, 0x2f, - 0xde, 0xe6, 0x96, 0xbe, 0x7e, 0x9b, 0x5b, 0xfa, 0xfb, 0xdb, 0xdc, 0xd2, 0xaf, 0x8e, 0x3b, 0x36, - 0xbf, 0xf6, 0x5b, 0x85, 0x36, 0x75, 0x8a, 0x2a, 0x37, 0xc7, 0xd7, 0x7e, 0x2b, 0xfc, 0x2e, 0xde, - 0x8a, 0x3f, 0xc1, 0xf0, 0x41, 0x8f, 0xb0, 0x62, 0xff, 0xa4, 0x95, 0x10, 0x05, 0xf4, 0xf4, 0x7f, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x25, 0xe0, 0x5e, 0x22, 0xa1, 0x11, 0x00, 0x00, + // 1698 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcd, 0x6f, 0x1b, 0xc7, + 0x15, 0xd7, 0x8a, 0x1f, 0x92, 0x1e, 0x45, 0x6a, 0x35, 0x92, 0xed, 0x15, 0x15, 0x51, 0x2e, 0x5b, + 0x04, 0x8e, 0x6b, 0x91, 0x95, 0x9d, 0xfa, 0x10, 0x04, 0x05, 0x28, 0x91, 0x76, 0xe9, 0xda, 0x22, + 0xb3, 0x64, 0x94, 0xa6, 0x87, 0x2e, 0x86, 0xdc, 0x31, 0xb5, 0x08, 0x77, 0x87, 0xd9, 0x99, 0xa5, + 0xc5, 0x6b, 0x4e, 0x3d, 0xe6, 0x58, 0xf4, 0xd4, 0x63, 0x8f, 0x3d, 0x04, 0xe8, 0x1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73, 0x6c, 0x40, 0xd8, + 0x3d, 0xe6, 0xf8, 0x1b, 0x6d, 0x43, 0x8a, 0x3b, 0xbc, 0x4f, 0x8c, 0x8c, 0x10, 0xc8, 0x0f, 0x64, + 0xc0, 0x0a, 0x0b, 0x5c, 0x17, 0xfb, 0x23, 0x63, 0x5d, 0x9c, 0x47, 0x9f, 0xe8, 0x7d, 0x58, 0x95, + 0x8d, 0x49, 0x7c, 0x23, 0x7b, 0x4d, 0x27, 0x8e, 0x91, 0xc5, 0xdf, 0x69, 0x90, 0x99, 0xae, 0x81, + 0x1f, 0xc3, 0xda, 0x88, 0x30, 0xab, 0x2b, 0x7a, 0x53, 0xbb, 0x34, 0x28, 0xea, 0x1e, 0x37, 0x57, + 0x47, 0x84, 0x1d, 0x87, 0x72, 0xf4, 0x08, 0xb2, 0xb8, 0xc3, 0x38, 0x76, 0x3c, 0x45, 0x58, 0x8e, + 0x25, 0xac, 0x2b, 0x90, 0x24, 0xbd, 0x07, 0xab, 0x1e, 0x55, 0xf8, 0x44, 0x2c, 0x7e, 0xc5, 0xa3, + 0x02, 0x5a, 0xfc, 0x93, 0x06, 0xc9, 0x70, 0x92, 0x5d, 0x3f, 0x87, 0x4a, 0x90, 0x1a, 0x52, 0x4e, + 0xae, 0x9f, 0x41, 0x12, 0x86, 0x3e, 0x84, 0x15, 0x39, 0x16, 0x99, 0x91, 0x14, 0x55, 0x55, 0x9c, + 0x6f, 0x95, 0xcb, 0x53, 0xd7, 0x8c, 0x28, 0x33, 0x69, 0x4b, 0xcd, 0xa6, 0xed, 0x59, 0x72, 0x35, + 0xa1, 0x27, 0x8b, 0x7f, 0xd1, 0xe0, 0xd6, 0x47, 0x01, 0xf5, 0x03, 0xf7, 0xf8, 0x8c, 0x74, 0x3f, + 0xfb, 0x28, 0x20, 0x01, 0xa9, 0x79, 0xdc, 0x1f, 0xa1, 0x26, 0x6c, 0x7d, 0x2e, 0x04, 0xa2, 0x70, + 0x68, 0xa0, 0x8a, 0x51, 0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ff, 0x57, 0x0d, 0x72, 0xb3, 0xff, + 0x08, 0x47, 0xfb, 0xb0, 0xdb, 0x34, 0x1b, 0xcd, 0x46, 0xab, 0xf2, 0xdc, 0x6a, 0xb5, 0x2b, 0xed, + 0x8f, 0x5b, 0x73, 0x56, 0x8b, 0x50, 0x98, 0x07, 0x54, 0x6b, 0xcd, 0x46, 0xab, 0xde, 0xb6, 0x9a, + 0x35, 0xb3, 0xde, 0xa8, 0xea, 0x1a, 0xfa, 0x01, 0xec, 0xcd, 0x63, 0x4e, 0x1b, 0xed, 0xfa, 0xc9, + 0xd3, 0x08, 0xb2, 0x8c, 0xf2, 0x70, 0x7b, 0x1e, 0xd2, 0xac, 0xb4, 0x5a, 0xb5, 0xaa, 0x9e, 0x40, + 0xef, 0x80, 0x31, 0x2f, 0x33, 0x6b, 0xcf, 0x6a, 0xc7, 0xed, 0x5a, 0x55, 0x4f, 0xc6, 0x31, 0x9f, + 0x54, 0xea, 0xcf, 0x6b, 0x55, 0x3d, 0x75, 0xf4, 0xf4, 0xeb, 0x8b, 0x82, 0xf6, 0xcd, 0x45, 0x41, + 0xfb, 0xe7, 0x45, 0x41, 0xfb, 0xf2, 0x4d, 0x61, 0xe9, 0x9b, 0x37, 0x85, 0xa5, 0xbf, 0xbd, 0x29, + 0x2c, 0xfd, 0xea, 0xa0, 0xe7, 0xf0, 0xb3, 0xa0, 0x53, 0xea, 0x52, 0xb7, 0xac, 0x32, 0x75, 0x70, + 0x16, 0x74, 0xa2, 0xdf, 0xe5, 0x73, 0xf1, 0x87, 0x37, 0x3e, 0x1a, 0x10, 0x56, 0x1e, 0x1e, 0x76, + 0xd2, 0xa2, 0x5e, 0x1f, 0xfd, 0x27, 0x00, 0x00, 0xff, 0xff, 0x62, 0x1f, 0xc8, 0x86, 0x97, 0x13, + 0x00, 0x00, } func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) { @@ -1916,6 +2026,77 @@ func (m *MinDepositThrottler) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MinInitialDepositThrottler) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MinInitialDepositThrottler) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MinInitialDepositThrottler) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SensitivityTargetDistance != 0 { + i = encodeVarintGov(dAtA, i, uint64(m.SensitivityTargetDistance)) + i-- + dAtA[i] = 0x30 + } + if len(m.DecreaseRatio) > 0 { + i -= len(m.DecreaseRatio) + copy(dAtA[i:], m.DecreaseRatio) + i = encodeVarintGov(dAtA, i, uint64(len(m.DecreaseRatio))) + i-- + dAtA[i] = 0x2a + } + if len(m.IncreaseRatio) > 0 { + i -= len(m.IncreaseRatio) + copy(dAtA[i:], m.IncreaseRatio) + i = encodeVarintGov(dAtA, i, uint64(len(m.IncreaseRatio))) + i-- + dAtA[i] = 0x22 + } + if m.TargetProposals != 0 { + i = encodeVarintGov(dAtA, i, uint64(m.TargetProposals)) + i-- + dAtA[i] = 0x18 + } + if m.UpdatePeriod != nil { + n11, err11 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.UpdatePeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.UpdatePeriod):]) + if err11 != nil { + return 0, err11 + } + i -= n11 + i = encodeVarintGov(dAtA, i, uint64(n11)) + i-- + dAtA[i] = 0x12 + } + if len(m.FloorValue) > 0 { + for iNdEx := len(m.FloorValue) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.FloorValue[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGov(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *Params) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1936,6 +2117,20 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.MinInitialDepositThrottler != nil { + { + size, err := m.MinInitialDepositThrottler.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGov(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc2 + } if m.MinDepositThrottler != nil { { size, err := m.MinDepositThrottler.MarshalToSizedBuffer(dAtA[:i]) @@ -1958,24 +2153,24 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0xb0 } if m.MaxVotingPeriodExtension != nil { - n12, err12 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.MaxVotingPeriodExtension, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.MaxVotingPeriodExtension):]) - if err12 != nil { - return 0, err12 + n14, err14 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.MaxVotingPeriodExtension, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.MaxVotingPeriodExtension):]) + if err14 != nil { + return 0, err14 } - i -= n12 - i = encodeVarintGov(dAtA, i, uint64(n12)) + i -= n14 + i = encodeVarintGov(dAtA, i, uint64(n14)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xaa } if m.QuorumTimeout != nil { - n13, err13 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.QuorumTimeout, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.QuorumTimeout):]) - if err13 != nil { - return 0, err13 + n15, err15 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.QuorumTimeout, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.QuorumTimeout):]) + if err15 != nil { + return 0, err15 } - i -= n13 - i = encodeVarintGov(dAtA, i, uint64(n13)) + i -= n15 + i = encodeVarintGov(dAtA, i, uint64(n15)) i-- dAtA[i] = 0x1 i-- @@ -2066,22 +2261,22 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x22 } if m.VotingPeriod != nil { - n14, err14 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.VotingPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.VotingPeriod):]) - if err14 != nil { - return 0, err14 + n16, err16 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.VotingPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.VotingPeriod):]) + if err16 != nil { + return 0, err16 } - i -= n14 - i = encodeVarintGov(dAtA, i, uint64(n14)) + i -= n16 + i = encodeVarintGov(dAtA, i, uint64(n16)) i-- dAtA[i] = 0x1a } if m.MaxDepositPeriod != nil { - n15, err15 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.MaxDepositPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.MaxDepositPeriod):]) - if err15 != nil { - return 0, err15 + n17, err17 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.MaxDepositPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.MaxDepositPeriod):]) + if err17 != nil { + return 0, err17 } - i -= n15 - i = encodeVarintGov(dAtA, i, uint64(n15)) + i -= n17 + i = encodeVarintGov(dAtA, i, uint64(n17)) i-- dAtA[i] = 0x12 } @@ -2397,6 +2592,39 @@ func (m *MinDepositThrottler) Size() (n int) { return n } +func (m *MinInitialDepositThrottler) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.FloorValue) > 0 { + for _, e := range m.FloorValue { + l = e.Size() + n += 1 + l + sovGov(uint64(l)) + } + } + if m.UpdatePeriod != nil { + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.UpdatePeriod) + n += 1 + l + sovGov(uint64(l)) + } + if m.TargetProposals != 0 { + n += 1 + sovGov(uint64(m.TargetProposals)) + } + l = len(m.IncreaseRatio) + if l > 0 { + n += 1 + l + sovGov(uint64(l)) + } + l = len(m.DecreaseRatio) + if l > 0 { + n += 1 + l + sovGov(uint64(l)) + } + if m.SensitivityTargetDistance != 0 { + n += 1 + sovGov(uint64(m.SensitivityTargetDistance)) + } + return n +} + func (m *Params) Size() (n int) { if m == nil { return 0 @@ -2470,6 +2698,10 @@ func (m *Params) Size() (n int) { l = m.MinDepositThrottler.Size() n += 2 + l + sovGov(uint64(l)) } + if m.MinInitialDepositThrottler != nil { + l = m.MinInitialDepositThrottler.Size() + n += 2 + l + sovGov(uint64(l)) + } return n } @@ -4406,6 +4638,228 @@ func (m *MinDepositThrottler) Unmarshal(dAtA []byte) error { } return nil } +func (m *MinInitialDepositThrottler) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MinInitialDepositThrottler: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MinInitialDepositThrottler: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FloorValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGov + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FloorValue = append(m.FloorValue, types.Coin{}) + if err := m.FloorValue[len(m.FloorValue)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdatePeriod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGov + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UpdatePeriod == nil { + m.UpdatePeriod = new(time.Duration) + } + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(m.UpdatePeriod, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetProposals", wireType) + } + m.TargetProposals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TargetProposals |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IncreaseRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGov + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IncreaseRatio = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DecreaseRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGov + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DecreaseRatio = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SensitivityTargetDistance", wireType) + } + m.SensitivityTargetDistance = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SensitivityTargetDistance |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGov(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGov + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Params) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4964,6 +5418,42 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 24: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinInitialDepositThrottler", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGov + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MinInitialDepositThrottler == nil { + m.MinInitialDepositThrottler = &MinInitialDepositThrottler{} + } + if err := m.MinInitialDepositThrottler.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGov(dAtA[iNdEx:]) diff --git a/x/gov/types/v1/params.go b/x/gov/types/v1/params.go index ba11e43dc..f53309bc9 100644 --- a/x/gov/types/v1/params.go +++ b/x/gov/types/v1/params.go @@ -26,20 +26,26 @@ var ( DefaultConstitutionAmendmentThreshold = sdk.NewDecWithPrec(9, 1) DefaultLawQuorum = sdk.NewDecWithPrec(25, 2) DefaultLawThreshold = sdk.NewDecWithPrec(9, 1) - DefaultMinInitialDepositRatio = sdk.ZeroDec() - DefaultBurnProposalPrevote = false // set to false to replicate behavior of when this change was made (0.47) - DefaultBurnVoteQuorom = false // set to false to replicate behavior of when this change was made (0.47) - DefaultMinDepositRatio = sdk.NewDecWithPrec(1, 2) // NOTE: backport from v50 - - DefaultQuorumTimeout time.Duration = DefaultVotingPeriod - (time.Hour * 24 * 1) // disabled by default (DefaultQuorumCheckCount must be set to a non-zero value to enable) - DefaultMaxVotingPeriodExtension time.Duration = DefaultVotingPeriod - DefaultQuorumTimeout // disabled by default (DefaultQuorumCheckCount must be set to a non-zero value to enable) - DefaultQuorumCheckCount uint64 = 0 // disabled by default (0 means no check) - DefaultMinDepositFloor sdk.Coins = sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, DefaultMinDepositTokens)) - DefaultMinDepositUpdatePeriod time.Duration = time.Hour * 24 * 7 - DefaultMinDepositSensitivityTargetDistance uint64 = 2 - DefaultMinDepositIncreaseRatio = sdk.NewDecWithPrec(5, 2) - DefaultMinDepositDecreaseRatio = sdk.NewDecWithPrec(25, 3) - DefaultTargetActiveProposals uint64 = 2 + // DefaultMinInitialDepositRatio = sdk.ZeroDec() + DefaultBurnProposalPrevote = false // set to false to replicate behavior of when this change was made (0.47) + DefaultBurnVoteQuorom = false // set to false to replicate behavior of when this change was made (0.47) + DefaultMinDepositRatio = sdk.NewDecWithPrec(1, 2) // NOTE: backport from v50 + + DefaultQuorumTimeout time.Duration = DefaultVotingPeriod - (time.Hour * 24 * 1) // disabled by default (DefaultQuorumCheckCount must be set to a non-zero value to enable) + DefaultMaxVotingPeriodExtension time.Duration = DefaultVotingPeriod - DefaultQuorumTimeout // disabled by default (DefaultQuorumCheckCount must be set to a non-zero value to enable) + DefaultQuorumCheckCount uint64 = 0 // disabled by default (0 means no check) + DefaultMinDepositFloor sdk.Coins = sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, DefaultMinDepositTokens)) + DefaultMinDepositUpdatePeriod time.Duration = time.Hour * 24 * 7 + DefaultMinDepositSensitivityTargetDistance uint64 = 2 + DefaultMinDepositIncreaseRatio = sdk.NewDecWithPrec(5, 2) + DefaultMinDepositDecreaseRatio = sdk.NewDecWithPrec(25, 3) + DefaultTargetActiveProposals uint64 = 2 + DefaultMinInitialDepositFloor sdk.Coins = sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewDecWithPrec(1, 2).MulInt(DefaultMinDepositTokens).TruncateInt())) + DefaultMinInitialDepositUpdatePeriod time.Duration = time.Hour * 24 + DefaultMinInitialDepositSensitivityTargetDistance uint64 = 2 + DefaultMinInitialDepositIncreaseRatio = sdk.NewDecWithPrec(1, 2) + DefaultMinInitialDepositDecreaseRatio = sdk.NewDecWithPrec(5, 3) + DefaultTargetProposalsInDepositPeriod uint64 = 5 ) // Deprecated: NewDepositParams creates a new DepositParams object @@ -69,11 +75,14 @@ func NewVotingParams(votingPeriod *time.Duration) VotingParams { func NewParams( // minDeposit sdk.Coins, // Deprecated in favor of dynamic min deposit maxDepositPeriod, votingPeriod time.Duration, - quorum, threshold, constitutionAmendmentQuorum, constitutionAmendmentThreshold, lawQuorum, lawThreshold, minInitialDepositRatio string, + quorum, threshold, constitutionAmendmentQuorum, constitutionAmendmentThreshold, lawQuorum, lawThreshold string, + // minInitialDepositRatio string, // Deprecated in favor of dynamic min initial deposit burnProposalDeposit, burnVoteQuorum bool, minDepositRatio string, quorumTimeout, maxVotingPeriodExtension time.Duration, quorumCheckCount uint64, minDepositFloor sdk.Coins, minDepositUpdatePeriod time.Duration, minDepositSensitivityTargetDistance uint64, minDepositIncreaseRatio, minDepositDecreaseRatio string, targetActiveProposals uint64, + minInitialDepositFloor sdk.Coins, minInitialDepositUpdatePeriod time.Duration, minInitialDepositSensitivityTargetDistance uint64, + minInitialDepositIncreaseRatio, minInitialDepositDecreaseRatio string, targetProposalsInDepositPeriod uint64, ) Params { return Params{ // MinDeposit: minDeposit, // Deprecated in favor of dynamic min deposit @@ -85,13 +94,13 @@ func NewParams( ConstitutionAmendmentThreshold: constitutionAmendmentThreshold, LawQuorum: lawQuorum, LawThreshold: lawThreshold, - MinInitialDepositRatio: minInitialDepositRatio, - BurnProposalDepositPrevote: burnProposalDeposit, - BurnVoteQuorum: burnVoteQuorum, - MinDepositRatio: minDepositRatio, - QuorumTimeout: &quorumTimeout, - MaxVotingPeriodExtension: &maxVotingPeriodExtension, - QuorumCheckCount: quorumCheckCount, + // MinInitialDepositRatio: minInitialDepositRatio, // Deprecated in favor of dynamic min deposit + BurnProposalDepositPrevote: burnProposalDeposit, + BurnVoteQuorum: burnVoteQuorum, + MinDepositRatio: minDepositRatio, + QuorumTimeout: &quorumTimeout, + MaxVotingPeriodExtension: &maxVotingPeriodExtension, + QuorumCheckCount: quorumCheckCount, MinDepositThrottler: &MinDepositThrottler{ FloorValue: minDepositFloor, UpdatePeriod: &minDepositUpdatePeriod, @@ -100,6 +109,14 @@ func NewParams( DecreaseRatio: minDepositDecreaseRatio, TargetActiveProposals: targetActiveProposals, }, + MinInitialDepositThrottler: &MinInitialDepositThrottler{ + FloorValue: minInitialDepositFloor, + UpdatePeriod: &minInitialDepositUpdatePeriod, + SensitivityTargetDistance: minInitialDepositSensitivityTargetDistance, + IncreaseRatio: minInitialDepositIncreaseRatio, + DecreaseRatio: minInitialDepositDecreaseRatio, + TargetProposals: targetProposalsInDepositPeriod, + }, } } @@ -115,7 +132,7 @@ func DefaultParams() Params { DefaultConstitutionAmendmentThreshold.String(), DefaultLawQuorum.String(), DefaultLawThreshold.String(), - DefaultMinInitialDepositRatio.String(), + // DefaultMinInitialDepositRatio.String(), DefaultBurnProposalPrevote, DefaultBurnVoteQuorom, DefaultMinDepositRatio.String(), @@ -128,6 +145,12 @@ func DefaultParams() Params { DefaultMinDepositIncreaseRatio.String(), DefaultMinDepositDecreaseRatio.String(), DefaultTargetActiveProposals, + DefaultMinInitialDepositFloor, + DefaultMinInitialDepositUpdatePeriod, + DefaultMinInitialDepositSensitivityTargetDistance, + DefaultMinInitialDepositIncreaseRatio.String(), + DefaultMinInitialDepositDecreaseRatio.String(), + DefaultTargetProposalsInDepositPeriod, ) } @@ -244,15 +267,18 @@ func (p Params) ValidateBasic() error { return fmt.Errorf("voting period must be at least %s: %s", minVotingPeriod.String(), p.VotingPeriod.String()) } - minInitialDepositRatio, err := math.LegacyNewDecFromStr(p.MinInitialDepositRatio) - if err != nil { - return fmt.Errorf("invalid mininum initial deposit ratio of proposal: %w", err) - } - if minInitialDepositRatio.IsNegative() { - return fmt.Errorf("mininum initial deposit ratio of proposal must be positive: %s", minInitialDepositRatio) - } - if minInitialDepositRatio.GT(math.LegacyOneDec()) { - return fmt.Errorf("mininum initial deposit ratio of proposal is too large: %s", minInitialDepositRatio) + // minInitialDepositRatio, err := math.LegacyNewDecFromStr(p.MinInitialDepositRatio) + // if err != nil { + // return fmt.Errorf("invalid mininum initial deposit ratio of proposal: %w", err) + // } + // if minInitialDepositRatio.IsNegative() { + // return fmt.Errorf("mininum initial deposit ratio of proposal must be positive: %s", minInitialDepositRatio) + // } + // if minInitialDepositRatio.GT(math.LegacyOneDec()) { + // return fmt.Errorf("mininum initial deposit ratio of proposal is too large: %s", minInitialDepositRatio) + // } + if len(p.MinInitialDepositRatio) > 0 { + return fmt.Errorf("manually setting min initial deposit ratio is deprecated in favor of a dynamic min initial deposit") } minDepositRatio, err := math.LegacyNewDecFromStr(p.MinDepositRatio) @@ -332,5 +358,55 @@ func (p Params) ValidateBasic() error { return fmt.Errorf("minimum deposit decrease ratio too large: %s", minDepositDecreaseRatio) } + if p.MinInitialDepositThrottler == nil { + return fmt.Errorf("min initial deposit throttler must not be nil") + } + + if minInitialDepositFloor := sdk.Coins(p.MinInitialDepositThrottler.FloorValue); minInitialDepositFloor.Empty() || !minInitialDepositFloor.IsValid() { + return fmt.Errorf("invalid minimum initial deposit floor: %s", minInitialDepositFloor) + } + + if p.MinInitialDepositThrottler.UpdatePeriod == nil { + return fmt.Errorf("minimum initial deposit update period must not be nil") + } + + if p.MinInitialDepositThrottler.UpdatePeriod.Seconds() <= 0 { + return fmt.Errorf("minimum initial deposit update period must be positive: %s", p.MinInitialDepositThrottler.UpdatePeriod) + } + + if p.MinInitialDepositThrottler.UpdatePeriod.Seconds() > p.VotingPeriod.Seconds() { + return fmt.Errorf("minimum initial deposit update period must be less than or equal to the voting period: %s", p.MinInitialDepositThrottler.UpdatePeriod) + } + + if p.MinInitialDepositThrottler.SensitivityTargetDistance == 0 { + return fmt.Errorf("minimum initial deposit sensitivity target distance must be positive: %d", p.MinInitialDepositThrottler.SensitivityTargetDistance) + } + + minInitialDepositIncreaseRatio, err := sdk.NewDecFromStr(p.MinInitialDepositThrottler.IncreaseRatio) + if err != nil { + return fmt.Errorf("invalid minimum initial deposit increase ratio: %w", err) + } + + if !minInitialDepositIncreaseRatio.IsPositive() { + return fmt.Errorf("minimum initial deposit increase ratio must be positive: %s", minInitialDepositIncreaseRatio) + } + + if minInitialDepositIncreaseRatio.GTE(math.LegacyOneDec()) { + return fmt.Errorf("minimum initial deposit increase ratio too large: %s", minInitialDepositIncreaseRatio) + } + + minInitialDepositDecreaseRatio, err := sdk.NewDecFromStr(p.MinInitialDepositThrottler.DecreaseRatio) + if err != nil { + return fmt.Errorf("invalid minimum initial deposit decrease ratio: %w", err) + } + + if !minInitialDepositDecreaseRatio.IsPositive() { + return fmt.Errorf("minimum initial deposit decrease ratio must be positive: %s", minInitialDepositDecreaseRatio) + } + + if minInitialDepositDecreaseRatio.GTE(math.LegacyOneDec()) { + return fmt.Errorf("minimum initial deposit decrease ratio too large: %s", minInitialDepositDecreaseRatio) + } + return nil } diff --git a/x/gov/types/v1/query.pb.go b/x/gov/types/v1/query.pb.go index 1ba5c62d0..ebabb4520 100644 --- a/x/gov/types/v1/query.pb.go +++ b/x/gov/types/v1/query.pb.go @@ -1060,6 +1060,89 @@ func (m *QueryMinDepositResponse) GetMinDeposit() []types.Coin { return nil } +// QueryMinInitialDepositRequest is the request type for the Query/MinInitialDeposit RPC method. +type QueryMinInitialDepositRequest struct { +} + +func (m *QueryMinInitialDepositRequest) Reset() { *m = QueryMinInitialDepositRequest{} } +func (m *QueryMinInitialDepositRequest) String() string { return proto.CompactTextString(m) } +func (*QueryMinInitialDepositRequest) ProtoMessage() {} +func (*QueryMinInitialDepositRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2290d0188dd70223, []int{20} +} +func (m *QueryMinInitialDepositRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMinInitialDepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMinInitialDepositRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryMinInitialDepositRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMinInitialDepositRequest.Merge(m, src) +} +func (m *QueryMinInitialDepositRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryMinInitialDepositRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMinInitialDepositRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMinInitialDepositRequest proto.InternalMessageInfo + +// QueryMinInitialDepositResponse is the response type for the Query/MinInitialDeposit RPC method. +type QueryMinInitialDepositResponse struct { + // min_initial_deposit defines the minimum initial deposit required for a proposal to be submitted. + MinInitialDeposit []types.Coin `protobuf:"bytes,1,rep,name=min_initial_deposit,json=minInitialDeposit,proto3" json:"min_initial_deposit"` +} + +func (m *QueryMinInitialDepositResponse) Reset() { *m = QueryMinInitialDepositResponse{} } +func (m *QueryMinInitialDepositResponse) String() string { return proto.CompactTextString(m) } +func (*QueryMinInitialDepositResponse) ProtoMessage() {} +func (*QueryMinInitialDepositResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2290d0188dd70223, []int{21} +} +func (m *QueryMinInitialDepositResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMinInitialDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMinInitialDepositResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryMinInitialDepositResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMinInitialDepositResponse.Merge(m, src) +} +func (m *QueryMinInitialDepositResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryMinInitialDepositResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMinInitialDepositResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMinInitialDepositResponse proto.InternalMessageInfo + +func (m *QueryMinInitialDepositResponse) GetMinInitialDeposit() []types.Coin { + if m != nil { + return m.MinInitialDeposit + } + return nil +} + func init() { proto.RegisterType((*QueryConstitutionRequest)(nil), "atomone.gov.v1.QueryConstitutionRequest") proto.RegisterType((*QueryConstitutionResponse)(nil), "atomone.gov.v1.QueryConstitutionResponse") @@ -1081,83 +1164,89 @@ func init() { proto.RegisterType((*QueryTallyResultResponse)(nil), "atomone.gov.v1.QueryTallyResultResponse") proto.RegisterType((*QueryMinDepositRequest)(nil), "atomone.gov.v1.QueryMinDepositRequest") proto.RegisterType((*QueryMinDepositResponse)(nil), "atomone.gov.v1.QueryMinDepositResponse") + proto.RegisterType((*QueryMinInitialDepositRequest)(nil), "atomone.gov.v1.QueryMinInitialDepositRequest") + proto.RegisterType((*QueryMinInitialDepositResponse)(nil), "atomone.gov.v1.QueryMinInitialDepositResponse") } func init() { proto.RegisterFile("atomone/gov/v1/query.proto", fileDescriptor_2290d0188dd70223) } var fileDescriptor_2290d0188dd70223 = []byte{ - // 1121 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4b, 0x6f, 0xdc, 0x54, - 0x14, 0x8e, 0x27, 0x8f, 0x26, 0x67, 0xd2, 0x00, 0x87, 0xd0, 0x3a, 0x6e, 0x98, 0xb6, 0x26, 0x24, - 0x69, 0x45, 0x6c, 0x92, 0x92, 0x16, 0x21, 0xca, 0x23, 0x2d, 0x0d, 0x5d, 0x54, 0x0a, 0x6e, 0xc5, - 0x02, 0x16, 0x23, 0x67, 0xc6, 0x72, 0x2d, 0xcd, 0xf8, 0xba, 0xe3, 0x3b, 0x23, 0xa2, 0x30, 0xaa, - 0xa8, 0x84, 0x44, 0x59, 0x15, 0x21, 0x84, 0xe8, 0xef, 0xe0, 0x47, 0x74, 0x59, 0xc1, 0x86, 0x15, - 0x42, 0x09, 0x3f, 0x04, 0xf9, 0xde, 0x63, 0x8f, 0xed, 0xf1, 0x3c, 0x52, 0x55, 0xec, 0x92, 0x7b, - 0xbf, 0xf3, 0x9d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f, 0x0c, 0x6b, 0xeb, 0xa3, 0x81, 0x2f, 0x5a, 0x4b, 0x62, 0xee, 0xe2, 0x77, - 0x0a, 0x40, 0x6f, 0xb2, 0x62, 0x71, 0xeb, 0xf6, 0x0d, 0x65, 0x6d, 0x6d, 0x24, 0x8e, 0x64, 0xe9, - 0x42, 0xd6, 0x32, 0x6a, 0x79, 0x59, 0x4d, 0xcf, 0xa7, 0xf0, 0xec, 0xec, 0x3e, 0x3b, 0xaa, 0x28, - 0xcf, 0x8f, 0x2a, 0xca, 0x3f, 0x47, 0x15, 0xe5, 0xc9, 0x71, 0x65, 0xe2, 0xf9, 0x71, 0x65, 0xe2, - 0xaf, 0xe3, 0xca, 0xc4, 0x57, 0x1b, 0xae, 0xc7, 0xef, 0xb7, 0xf7, 0x8d, 0x1a, 0x6b, 0xc6, 0xf6, - 0x1b, 0xf7, 0xdb, 0xfb, 0x09, 0xd7, 0x37, 0x82, 0x2d, 0x2a, 0xca, 0x30, 0xfa, 0x89, 0x3a, 0x23, - 0x7e, 0x40, 0x5e, 0xf9, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x97, 0x80, 0xc3, 0xd4, 0x23, 0x0f, 0x00, - 0x00, + // 1190 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x5b, 0x6f, 0xdc, 0x44, + 0x14, 0x8e, 0xb7, 0x49, 0x9a, 0x9c, 0xa4, 0x81, 0x9c, 0x86, 0xd6, 0x71, 0xd3, 0x4d, 0x33, 0x0d, + 0xb9, 0x54, 0xc4, 0x26, 0x29, 0x69, 0x11, 0xa2, 0x5c, 0xd2, 0xd2, 0x90, 0x87, 0x8a, 0xb0, 0xad, + 0x78, 0x80, 0x87, 0xc8, 0xc9, 0x5a, 0xae, 0xa5, 0x5d, 0xcf, 0x66, 0x3d, 0xbb, 0x22, 0x0a, 0x51, + 0x05, 0x12, 0x12, 0xe5, 0x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f, 0xb1, 0xae, 0x6b, 0x57, 0xb4, 0xa5, 0xd1, + 0x52, 0x6a, 0x8d, 0xdd, 0x84, 0x29, 0x49, 0xb0, 0x5d, 0xe7, 0x35, 0x1e, 0xd8, 0x15, 0x22, 0xc6, + 0x59, 0x18, 0xab, 0xd1, 0xd2, 0x8e, 0x57, 0x96, 0xa6, 0x83, 0x25, 0x88, 0x96, 0xb6, 0xca, 0xec, + 0x1e, 0xbc, 0x96, 0x31, 0x24, 0xaf, 0x6f, 0xc1, 0x48, 0x04, 0x93, 0x66, 0x63, 0x6b, 0xba, 0x99, + 0xbe, 0x06, 0x33, 0xb6, 0x89, 0x91, 0xec, 0x49, 0x21, 0xc3, 0x17, 0x44, 0x4a, 0x36, 0xe1, 0x95, + 0x58, 0x49, 0x20, 0x6c, 0xd1, 0x08, 0x24, 0xed, 0xc4, 0x5a, 0xb1, 0x13, 0xed, 0x7d, 0x89, 0x2a, + 0x4d, 0xd4, 0x52, 0xff, 0xd1, 0x84, 0xa1, 0x26, 0x17, 0x4e, 0x5d, 0x2f, 0x84, 0x71, 0xd8, 0xd0, + 0xff, 0xf8, 0x7d, 0x65, 0x8a, 0x02, 0xfd, 0x61, 0xb9, 0x5c, 0x77, 0x82, 0xe0, 0xbe, 0xa8, 0x7b, + 0xbe, 0x5b, 0x52, 0x30, 0xbc, 0x01, 0xa3, 0x65, 0xa7, 0xc6, 0x03, 0x4f, 0xf0, 0xba, 0x7e, 0xa6, + 0x87, 0x4d, 0x0b, 0x8a, 0x77, 0x01, 0x5a, 0x69, 0xa1, 0x0f, 0xca, 0x10, 0x2c, 0x98, 0x64, 0x15, + 0xe6, 0x90, 0xa9, 0x52, 0x94, 0x72, 0xc8, 0xdc, 0xb6, 0x5d, 0x87, 0x0e, 0x5b, 0x4a, 0x58, 0xb2, + 0x5f, 0x34, 0xb8, 0x90, 0x0d, 0x09, 0xc5, 0xf8, 0x06, 0x8c, 0x46, 0x87, 0x0b, 0xa3, 0x71, 0xa6, + 0x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94, 0xa4, 0x61, 0xd1, 0x04, + 0xe1, 0x67, 0xfd, 0xb0, 0xfc, 0xe8, 0xbe, 0xfe, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x14, 0xda, + 0x76, 0xdd, 0x57, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1193,6 +1282,9 @@ type QueryClient interface { // MinDeposit queries the minimum deposit currently // required for a proposal to enter voting period. MinDeposit(ctx context.Context, in *QueryMinDepositRequest, opts ...grpc.CallOption) (*QueryMinDepositResponse, error) + // MinInitialDeposit queries the minimum initial deposit + // currently required for a proposal to be submitted. + MinInitialDeposit(ctx context.Context, in *QueryMinInitialDepositRequest, opts ...grpc.CallOption) (*QueryMinInitialDepositResponse, error) } type queryClient struct { @@ -1293,6 +1385,15 @@ func (c *queryClient) MinDeposit(ctx context.Context, in *QueryMinDepositRequest return out, nil } +func (c *queryClient) MinInitialDeposit(ctx context.Context, in *QueryMinInitialDepositRequest, opts ...grpc.CallOption) (*QueryMinInitialDepositResponse, error) { + out := new(QueryMinInitialDepositResponse) + err := c.cc.Invoke(ctx, "/atomone.gov.v1.Query/MinInitialDeposit", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Constitution queries the chain's constitution. @@ -1316,6 +1417,9 @@ type QueryServer interface { // MinDeposit queries the minimum deposit currently // required for a proposal to enter voting period. MinDeposit(context.Context, *QueryMinDepositRequest) (*QueryMinDepositResponse, error) + // MinInitialDeposit queries the minimum initial deposit + // currently required for a proposal to be submitted. + MinInitialDeposit(context.Context, *QueryMinInitialDepositRequest) (*QueryMinInitialDepositResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1352,6 +1456,9 @@ func (*UnimplementedQueryServer) TallyResult(ctx context.Context, req *QueryTall func (*UnimplementedQueryServer) MinDeposit(ctx context.Context, req *QueryMinDepositRequest) (*QueryMinDepositResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MinDeposit not implemented") } +func (*UnimplementedQueryServer) MinInitialDeposit(ctx context.Context, req *QueryMinInitialDepositRequest) (*QueryMinInitialDepositResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MinInitialDeposit not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1537,6 +1644,24 @@ func _Query_MinDeposit_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Query_MinInitialDeposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryMinInitialDepositRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).MinInitialDeposit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/atomone.gov.v1.Query/MinInitialDeposit", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).MinInitialDeposit(ctx, req.(*QueryMinInitialDepositRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "atomone.gov.v1.Query", HandlerType: (*QueryServer)(nil), @@ -1581,6 +1706,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "MinDeposit", Handler: _Query_MinDeposit_Handler, }, + { + MethodName: "MinInitialDeposit", + Handler: _Query_MinInitialDeposit_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "atomone/gov/v1/query.proto", @@ -2347,6 +2476,66 @@ func (m *QueryMinDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *QueryMinInitialDepositRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryMinInitialDepositRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMinInitialDepositRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryMinInitialDepositResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryMinInitialDepositResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMinInitialDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MinInitialDeposit) > 0 { + for iNdEx := len(m.MinInitialDeposit) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MinInitialDeposit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -2663,6 +2852,30 @@ func (m *QueryMinDepositResponse) Size() (n int) { return n } +func (m *QueryMinInitialDepositRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryMinInitialDepositResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.MinInitialDeposit) > 0 { + for _, e := range m.MinInitialDeposit { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4634,6 +4847,140 @@ func (m *QueryMinDepositResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryMinInitialDepositRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryMinInitialDepositRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMinInitialDepositRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryMinInitialDepositResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryMinInitialDepositResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMinInitialDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinInitialDeposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MinInitialDeposit = append(m.MinInitialDeposit, types.Coin{}) + if err := m.MinInitialDeposit[len(m.MinInitialDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/gov/types/v1/query.pb.gw.go b/x/gov/types/v1/query.pb.gw.go index b4788f4f5..82bdfff5a 100644 --- a/x/gov/types/v1/query.pb.gw.go +++ b/x/gov/types/v1/query.pb.gw.go @@ -563,6 +563,24 @@ func local_request_Query_MinDeposit_0(ctx context.Context, marshaler runtime.Mar } +func request_Query_MinInitialDeposit_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryMinInitialDepositRequest + var metadata runtime.ServerMetadata + + msg, err := client.MinInitialDeposit(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_MinInitialDeposit_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryMinInitialDepositRequest + var metadata runtime.ServerMetadata + + msg, err := server.MinInitialDeposit(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -799,6 +817,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_MinInitialDeposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_MinInitialDeposit_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_MinInitialDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1040,6 +1081,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_MinInitialDeposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_MinInitialDeposit_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_MinInitialDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1063,6 +1124,8 @@ var ( pattern_Query_TallyResult_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"atomone", "gov", "v1", "proposals", "proposal_id", "tally"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_MinDeposit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"atomone", "gov", "v1", "mindeposit"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_MinInitialDeposit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"atomone", "gov", "v1", "mininitialdeposit"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1085,4 +1148,6 @@ var ( forward_Query_TallyResult_0 = runtime.ForwardResponseMessage forward_Query_MinDeposit_0 = runtime.ForwardResponseMessage + + forward_Query_MinInitialDeposit_0 = runtime.ForwardResponseMessage )