diff --git a/api/cosmos/gov/v1/gov.pulsar.go b/api/cosmos/gov/v1/gov.pulsar.go index ad7895d1d7b7..cade88ee54cb 100644 --- a/api/cosmos/gov/v1/gov.pulsar.go +++ b/api/cosmos/gov/v1/gov.pulsar.go @@ -5481,6 +5481,7 @@ var ( fd_Params_burn_vote_quorum protoreflect.FieldDescriptor fd_Params_burn_proposal_deposit_prevote protoreflect.FieldDescriptor fd_Params_burn_vote_veto protoreflect.FieldDescriptor + fd_Params_min_deposit_ratio protoreflect.FieldDescriptor ) func init() { @@ -5499,6 +5500,7 @@ func init() { fd_Params_burn_vote_quorum = md_Params.Fields().ByName("burn_vote_quorum") fd_Params_burn_proposal_deposit_prevote = md_Params.Fields().ByName("burn_proposal_deposit_prevote") fd_Params_burn_vote_veto = md_Params.Fields().ByName("burn_vote_veto") + fd_Params_min_deposit_ratio = md_Params.Fields().ByName("min_deposit_ratio") } var _ protoreflect.Message = (*fastReflection_Params)(nil) @@ -5644,6 +5646,12 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto return } } + if x.MinDepositRatio != "" { + value := protoreflect.ValueOfString(x.MinDepositRatio) + if !f(fd_Params_min_deposit_ratio, value) { + return + } + } } // Has reports whether a field is populated. @@ -5685,6 +5693,8 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { return x.BurnProposalDepositPrevote != false case "cosmos.gov.v1.Params.burn_vote_veto": return x.BurnVoteVeto != false + case "cosmos.gov.v1.Params.min_deposit_ratio": + return x.MinDepositRatio != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -5727,6 +5737,8 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { x.BurnProposalDepositPrevote = false case "cosmos.gov.v1.Params.burn_vote_veto": x.BurnVoteVeto = false + case "cosmos.gov.v1.Params.min_deposit_ratio": + x.MinDepositRatio = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -5788,6 +5800,9 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro case "cosmos.gov.v1.Params.burn_vote_veto": value := x.BurnVoteVeto return protoreflect.ValueOfBool(value) + case "cosmos.gov.v1.Params.min_deposit_ratio": + value := x.MinDepositRatio + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -5838,6 +5853,8 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto x.BurnProposalDepositPrevote = value.Bool() case "cosmos.gov.v1.Params.burn_vote_veto": x.BurnVoteVeto = value.Bool() + case "cosmos.gov.v1.Params.min_deposit_ratio": + x.MinDepositRatio = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -5901,6 +5918,8 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore panic(fmt.Errorf("field burn_proposal_deposit_prevote of message cosmos.gov.v1.Params is not mutable")) case "cosmos.gov.v1.Params.burn_vote_veto": panic(fmt.Errorf("field burn_vote_veto of message cosmos.gov.v1.Params is not mutable")) + case "cosmos.gov.v1.Params.min_deposit_ratio": + panic(fmt.Errorf("field min_deposit_ratio of message cosmos.gov.v1.Params is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -5945,6 +5964,8 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor return protoreflect.ValueOfBool(false) case "cosmos.gov.v1.Params.burn_vote_veto": return protoreflect.ValueOfBool(false) + case "cosmos.gov.v1.Params.min_deposit_ratio": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -6067,6 +6088,10 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { if x.BurnVoteVeto { n += 2 } + l = len(x.MinDepositRatio) + if l > 0 { + n += 2 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -6096,6 +6121,15 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.MinDepositRatio) > 0 { + i -= len(x.MinDepositRatio) + copy(dAtA[i:], x.MinDepositRatio) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinDepositRatio))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } if x.BurnVoteVeto { i-- if x.BurnVoteVeto { @@ -6680,6 +6714,38 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } } x.BurnVoteVeto = bool(v != 0) + case 16: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinDepositRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.MinDepositRatio = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -7444,6 +7510,12 @@ type Params struct { BurnProposalDepositPrevote bool `protobuf:"varint,14,opt,name=burn_proposal_deposit_prevote,json=burnProposalDepositPrevote,proto3" json:"burn_proposal_deposit_prevote,omitempty"` // burn deposits if quorum with vote type no_veto is met BurnVoteVeto bool `protobuf:"varint,15,opt,name=burn_vote_veto,json=burnVoteVeto,proto3" json:"burn_vote_veto,omitempty"` + // The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. + // Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be + // required. + // + // Since: cosmos-sdk 0.50 + MinDepositRatio string `protobuf:"bytes,16,opt,name=min_deposit_ratio,json=minDepositRatio,proto3" json:"min_deposit_ratio,omitempty"` } func (x *Params) Reset() { @@ -7557,6 +7629,13 @@ func (x *Params) GetBurnVoteVeto() bool { return false } +func (x *Params) GetMinDepositRatio() string { + if x != nil { + return x.MinDepositRatio + } + return "" +} + var File_cosmos_gov_v1_gov_proto protoreflect.FileDescriptor var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{ @@ -7692,7 +7771,7 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{ 0x64, 0x12, 0x35, 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xc3, 0x06, 0x0a, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xff, 0x06, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, @@ -7745,39 +7824,42 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x62, 0x75, 0x72, 0x6e, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x62, 0x75, 0x72, 0x6e, 0x56, 0x6f, 0x74, 0x65, 0x56, 0x65, - 0x74, 0x6f, 0x2a, 0x89, 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, - 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, - 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, - 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, - 0x12, 0x1c, 0x0a, 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x4e, 0x4f, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, 0x10, 0x04, 0x2a, 0xce, - 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x5f, 0x50, 0x45, - 0x52, 0x49, 0x4f, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, - 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x4f, 0x54, 0x49, 0x4e, 0x47, - 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, - 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x53, - 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, - 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, - 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x42, - 0x99, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, - 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x12, 0x3a, 0x0a, 0x11, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, + 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0f, 0x6d, + 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x2a, 0x89, + 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, + 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, + 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x10, 0x01, 0x12, + 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, + 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, + 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, + 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x57, + 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, 0x10, 0x04, 0x2a, 0xce, 0x01, 0x0a, 0x0e, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, + 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x22, + 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, + 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x4f, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x45, 0x52, + 0x49, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, + 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, + 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x04, 0x12, + 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x42, 0x99, 0x01, 0x0a, 0x11, + 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, + 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, + 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, + 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/cosmos/gov/v1/gov.proto b/proto/cosmos/gov/v1/gov.proto index 2efd068ac758..1f0a50275a4a 100644 --- a/proto/cosmos/gov/v1/gov.proto +++ b/proto/cosmos/gov/v1/gov.proto @@ -253,4 +253,11 @@ message Params { // burn deposits if quorum with vote type no_veto is met bool burn_vote_veto = 15; + + // The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. + // Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be + // required. + // + // Since: cosmos-sdk 0.50 + string min_deposit_ratio = 16 [(cosmos_proto.scalar) = "cosmos.Dec"]; } diff --git a/tests/e2e/gov/deposits.go b/tests/e2e/gov/deposits.go index 0e8f5e6ed0b4..ebbbeccc4f6b 100644 --- a/tests/e2e/gov/deposits.go +++ b/tests/e2e/gov/deposits.go @@ -72,33 +72,6 @@ func (s *DepositTestSuite) TearDownSuite() { s.network.Cleanup() } -func (s *DepositTestSuite) TestQueryDepositsWithoutInitialDeposit() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - // submit proposal without initial deposit - id := s.submitProposal(val, sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(0)), "TestQueryDepositsWithoutInitialDeposit") - proposalID := strconv.FormatUint(id, 10) - - // deposit amount - depositAmount := sdk.NewCoin(s.cfg.BondDenom, v1.DefaultMinDepositTokens.Add(sdk.NewInt(50))).String() - _, err := govclitestutil.MsgDeposit(clientCtx, val.Address.String(), proposalID, depositAmount) - s.Require().NoError(err) - s.Require().NoError(s.network.WaitForNextBlock()) - - // query deposit - deposit := s.queryDeposit(val, proposalID, false, "") - s.Require().NotNil(deposit) - s.Require().Equal(sdk.Coins(deposit.Amount).String(), depositAmount) - - // query deposits - deposits := s.queryDeposits(val, proposalID, false, "") - s.Require().NotNil(deposits) - s.Require().Len(deposits.Deposits, 1) - // verify initial deposit - s.Require().Equal(sdk.Coins(deposits.Deposits[0].Amount).String(), depositAmount) -} - func (s *DepositTestSuite) TestQueryDepositsWithInitialDeposit() { val := s.network.Validators[0] depositAmount := sdk.NewCoin(s.cfg.BondDenom, v1.DefaultMinDepositTokens) diff --git a/tests/e2e/gov/tx.go b/tests/e2e/gov/tx.go index 6a5cf913ba7f..99b6b91fede5 100644 --- a/tests/e2e/gov/tx.go +++ b/tests/e2e/gov/tx.go @@ -54,9 +54,18 @@ func (s *E2ETestSuite) SetupSuite() { s.Require().NoError(err) s.Require().NoError(s.network.WaitForNextBlock()) +<<<<<<< HEAD // create a proposal without deposit _, err = govclitestutil.MsgSubmitLegacyProposal(val.ClientCtx, val.Address.String(), "Text Proposal 2", "Where is the title!?", v1beta1.ProposalTypeText) +======= + // create a proposal with a small deposit + minimumAcceptedDep := v1.DefaultMinDepositTokens.ToLegacyDec().Mul(v1.DefaultMinDepositRatio).Ceil().TruncateInt() + out, err = govclitestutil.MsgSubmitLegacyProposal(val.ClientCtx, val.Address.String(), + "Text Proposal 2", "Where is the title!?", v1beta1.ProposalTypeText, + fmt.Sprintf("--%s=%s", cli.FlagDeposit, sdk.NewCoin(s.cfg.BondDenom, minimumAcceptedDep).String())) + +>>>>>>> 177e7f4595 (feat(x/gov): implement a minimum amount per deposit (#18146)) s.Require().NoError(err) s.Require().NoError(s.network.WaitForNextBlock()) @@ -111,7 +120,11 @@ func (s *E2ETestSuite) TestNewCmdSubmitProposal() { "summary": "My awesome description", "metadata": "%s", "deposit": "%s" +<<<<<<< HEAD }`, authtypes.NewModuleAddress(types.ModuleName), base64.StdEncoding.EncodeToString(propMetadata), sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(5431))) +======= +}`, authtypes.NewModuleAddress(types.ModuleName), base64.StdEncoding.EncodeToString(propMetadata), sdk.NewCoin(s.cfg.BondDenom, math.NewInt(100000))) +>>>>>>> 177e7f4595 (feat(x/gov): implement a minimum amount per deposit (#18146)) validPropFile := testutil.WriteToNewTempFile(s.T(), validProp) defer validPropFile.Close() @@ -179,7 +192,11 @@ func (s *E2ETestSuite) TestNewCmdSubmitLegacyProposal() { "description": "Hello, World!", "type": "Text", "deposit": "%s" +<<<<<<< HEAD }`, sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(5431))) +======= + }`, sdk.NewCoin(s.cfg.BondDenom, math.NewInt(154310))) +>>>>>>> 177e7f4595 (feat(x/gov): implement a minimum amount per deposit (#18146)) validPropFile := testutil.WriteToNewTempFile(s.T(), validProp) defer validPropFile.Close() @@ -205,7 +222,11 @@ func (s *E2ETestSuite) TestNewCmdSubmitLegacyProposal() { []string{ fmt.Sprintf("--%s='Where is the title!?'", cli.FlagDescription), //nolint:staticcheck // we are intentionally using a deprecated flag here. fmt.Sprintf("--%s=%s", cli.FlagProposalType, v1beta1.ProposalTypeText), //nolint:staticcheck // we are intentionally using a deprecated flag here. +<<<<<<< HEAD fmt.Sprintf("--%s=%s", cli.FlagDeposit, sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(5431)).String()), +======= + fmt.Sprintf("--%s=%s", cli.FlagDeposit, sdk.NewCoin(s.cfg.BondDenom, math.NewInt(10000)).String()), +>>>>>>> 177e7f4595 (feat(x/gov): implement a minimum amount per deposit (#18146)) fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), @@ -230,7 +251,11 @@ func (s *E2ETestSuite) TestNewCmdSubmitLegacyProposal() { fmt.Sprintf("--%s='Text Proposal'", cli.FlagTitle), //nolint:staticcheck // we are intentionally using a deprecated flag here. fmt.Sprintf("--%s='Where is the title!?'", cli.FlagDescription), //nolint:staticcheck // we are intentionally using a deprecated flag here. fmt.Sprintf("--%s=%s", cli.FlagProposalType, v1beta1.ProposalTypeText), //nolint:staticcheck // we are intentionally using a deprecated flag here. +<<<<<<< HEAD fmt.Sprintf("--%s=%s", cli.FlagDeposit, sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(5431)).String()), +======= + fmt.Sprintf("--%s=%s", cli.FlagDeposit, sdk.NewCoin(s.cfg.BondDenom, math.NewInt(100000)).String()), +>>>>>>> 177e7f4595 (feat(x/gov): implement a minimum amount per deposit (#18146)) fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), diff --git a/x/bank/app_test.go b/x/bank/app_test.go index 5baabb258039..14255b92c31a 100644 --- a/x/bank/app_test.go +++ b/x/bank/app_test.go @@ -350,13 +350,14 @@ func TestMsgSetSendEnabled(t *testing.T) { ctx := s.App.BaseApp.NewContext(false, tmproto.Header{}) require.NoError(t, testutil.FundAccount(s.BankKeeper, ctx, addr1, sdk.NewCoins(sdk.NewInt64Coin("foocoin", 101)))) + require.NoError(t, testutil.FundAccount(s.BankKeeper, ctx, addr1, sdk.NewCoins(sdk.NewInt64Coin("stake", 100000)))) addr1Str := addr1.String() govAddr := s.BankKeeper.GetAuthority() goodGovProp, err := govv1.NewMsgSubmitProposal( []sdk.Msg{ types.NewMsgSetSendEnabled(govAddr, nil, nil), }, - sdk.Coins{{Denom: "foocoin", Amount: sdk.NewInt(5)}}, + sdk.Coins{{Denom: "stake", Amount: sdk.NewInt(100000)}}, addr1Str, "set default send enabled to true", "Change send enabled", diff --git a/x/gov/abci_test.go b/x/gov/abci_test.go index 42efee8552f2..d58c4deceb5c 100644 --- a/x/gov/abci_test.go +++ b/x/gov/abci_test.go @@ -39,7 +39,7 @@ func TestTickExpiredDepositPeriod(t *testing.T) { newProposalMsg, err := v1.NewMsgSubmitProposal( []sdk.Msg{mkTestLegacyContent(t)}, - sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)}, + sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}, addrs[0].String(), "", "Proposal", @@ -96,7 +96,7 @@ func TestTickMultipleExpiredDepositPeriod(t *testing.T) { newProposalMsg, err := v1.NewMsgSubmitProposal( []sdk.Msg{mkTestLegacyContent(t)}, - sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)}, + sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}, addrs[0].String(), "", "Proposal", @@ -123,7 +123,7 @@ func TestTickMultipleExpiredDepositPeriod(t *testing.T) { newProposalMsg2, err := v1.NewMsgSubmitProposal( []sdk.Msg{mkTestLegacyContent(t)}, - sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)}, + sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}, addrs[0].String(), "", "Proposal", @@ -185,7 +185,7 @@ func TestTickPassedDepositPeriod(t *testing.T) { newProposalMsg, err := v1.NewMsgSubmitProposal( []sdk.Msg{mkTestLegacyContent(t)}, - sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)}, + sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}, addrs[0].String(), "", "Proposal", @@ -212,7 +212,7 @@ func TestTickPassedDepositPeriod(t *testing.T) { require.False(t, inactiveQueue.Valid()) inactiveQueue.Close() - newDepositMsg := v1.NewMsgDeposit(addrs[1], proposalID, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)}) + newDepositMsg := v1.NewMsgDeposit(addrs[1], proposalID, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}) res1, err := govMsgSvr.Deposit(sdk.WrapSDKContext(ctx), newDepositMsg) require.NoError(t, err) diff --git a/x/gov/keeper/deposit.go b/x/gov/keeper/deposit.go index e7f015e1c215..da01e389e294 100644 --- a/x/gov/keeper/deposit.go +++ b/x/gov/keeper/deposit.go @@ -2,8 +2,10 @@ package keeper import ( "fmt" + "strings" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/gov/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" @@ -118,8 +120,48 @@ func (keeper Keeper) AddDeposit(ctx sdk.Context, proposalID uint64, depositorAdd return false, sdkerrors.Wrapf(types.ErrInactiveProposal, "%d", proposalID) } + // Check coins to be deposited match the proposal's deposit params + params := keeper.GetParams(ctx) + + minDepositAmount := proposal.GetMinDepositFromParams(params) + minDepositRatio, err := sdk.NewDecFromStr(params.GetMinDepositRatio()) + if err != nil { + return false, err + } + + // If minDepositRatio is set, the deposit must be equal or greater than minDepositAmount*minDepositRatio + // for at least one denom. If minDepositRatio is zero we skip this check. + if !minDepositRatio.IsZero() { + var ( + depositThresholdMet bool + thresholds []string + ) + for _, minDep := range minDepositAmount { + // calculate the threshold for this denom, and hold a list to later return a useful error message + threshold := sdk.NewCoin(minDep.GetDenom(), minDep.Amount.ToLegacyDec().Mul(minDepositRatio).TruncateInt()) + thresholds = append(thresholds, threshold.String()) + + found, deposit := depositAmount.Find(minDep.Denom) + if !found { // if not found, continue, as we know the deposit contains at least 1 valid denom + continue + } + + // Once we know at least one threshold has been met, we can break. The deposit + // might contain other denoms but we don't care. + if deposit.IsGTE(threshold) { + depositThresholdMet = true + break + } + } + + // the threshold must be met with at least one denom, if not, return the list of minimum deposits + if !depositThresholdMet { + return false, errors.Wrapf(types.ErrMinDepositTooSmall, "received %s but need at least one of the following: %s", depositAmount, strings.Join(thresholds, ",")) + } + } + // update the governance module's account coins pool - err := keeper.bankKeeper.SendCoinsFromAccountToModule(ctx, depositorAddr, types.ModuleName, depositAmount) + err = keeper.bankKeeper.SendCoinsFromAccountToModule(ctx, depositorAddr, types.ModuleName, depositAmount) if err != nil { return false, err } @@ -130,7 +172,6 @@ func (keeper Keeper) AddDeposit(ctx sdk.Context, proposalID uint64, depositorAdd // Check if deposit has provided sufficient total funds to transition the proposal into the voting period activatedVotingPeriod := false - minDepositAmount := proposal.GetMinDepositFromParams(keeper.GetParams(ctx)) if proposal.Status == v1.StatusDepositPeriod && sdk.NewCoins(proposal.TotalDeposit...).IsAllGTE(minDepositAmount) { keeper.ActivateVotingPeriod(ctx, proposal) @@ -185,6 +226,7 @@ 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, expedited bool) error { params := keeper.GetParams(ctx) + minInitialDepositRatio, err := sdk.NewDecFromStr(params.MinInitialDepositRatio) if err != nil { return err diff --git a/x/gov/keeper/msg_server_test.go b/x/gov/keeper/msg_server_test.go index b2a92bb41e6e..0cd8ace62e64 100644 --- a/x/gov/keeper/msg_server_test.go +++ b/x/gov/keeper/msg_server_test.go @@ -18,7 +18,7 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100000))) initialDeposit := coins minDeposit := suite.govKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ @@ -144,7 +144,7 @@ func (suite *KeeperTestSuite) TestVoteReq() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100000))) minDeposit := suite.govKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), @@ -266,7 +266,7 @@ func (suite *KeeperTestSuite) TestVoteWeightedReq() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100000))) minDeposit := suite.govKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), @@ -388,8 +388,9 @@ func (suite *KeeperTestSuite) TestDepositReq() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100000))) minDeposit := suite.govKeeper.GetParams(suite.ctx).MinDeposit + bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), ToAddress: proposer.String(), @@ -459,7 +460,7 @@ func (suite *KeeperTestSuite) TestLegacyMsgSubmitProposal() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100000))) initialDeposit := coins minDeposit := suite.govKeeper.GetParams(suite.ctx).MinDeposit @@ -509,7 +510,7 @@ func (suite *KeeperTestSuite) TestLegacyMsgVote() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100000))) minDeposit := suite.govKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), @@ -621,7 +622,7 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100000))) minDeposit := suite.govKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), @@ -733,7 +734,7 @@ func (suite *KeeperTestSuite) TestLegacyMsgDeposit() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100000))) minDeposit := suite.govKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), diff --git a/x/gov/migrations/v4/json.go b/x/gov/migrations/v4/json.go index 125116c307af..35fc49b07a9d 100644 --- a/x/gov/migrations/v4/json.go +++ b/x/gov/migrations/v4/json.go @@ -27,6 +27,7 @@ func MigrateJSON(oldState *v1.GenesisState) (*v1.GenesisState, error) { defaultParams.BurnProposalDepositPrevote, defaultParams.BurnVoteQuorum, defaultParams.BurnVoteVeto, + defaultParams.MinDepositRatio, ) return &v1.GenesisState{ diff --git a/x/gov/migrations/v4/store.go b/x/gov/migrations/v4/store.go index 94d185d6e024..429cd5078948 100644 --- a/x/gov/migrations/v4/store.go +++ b/x/gov/migrations/v4/store.go @@ -39,6 +39,7 @@ func migrateParams(ctx sdk.Context, storeKey storetypes.StoreKey, legacySubspace defaultParams.BurnProposalDepositPrevote, defaultParams.BurnVoteQuorum, defaultParams.BurnVoteVeto, + defaultParams.MinDepositRatio, ) bz, err := cdc.Marshal(¶ms) diff --git a/x/gov/migrations/v5/store.go b/x/gov/migrations/v5/store.go index aeb0735695c8..79bad752532b 100644 --- a/x/gov/migrations/v5/store.go +++ b/x/gov/migrations/v5/store.go @@ -24,6 +24,7 @@ func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.Binar params.ExpeditedMinDeposit = defaultParams.ExpeditedMinDeposit params.ExpeditedVotingPeriod = defaultParams.ExpeditedVotingPeriod params.ExpeditedThreshold = defaultParams.ExpeditedThreshold + params.MinDepositRatio = defaultParams.MinDepositRatio bz, err := cdc.Marshal(¶ms) if err != nil { diff --git a/x/gov/migrations/v5/store_test.go b/x/gov/migrations/v5/store_test.go index 069dc4ca169e..7f92fcc7fe69 100644 --- a/x/gov/migrations/v5/store_test.go +++ b/x/gov/migrations/v5/store_test.go @@ -41,4 +41,5 @@ func TestMigrateStore(t *testing.T) { require.Equal(t, v1.DefaultParams().ExpeditedMinDeposit, params.ExpeditedMinDeposit) require.Equal(t, v1.DefaultParams().ExpeditedThreshold, params.ExpeditedThreshold) require.Equal(t, v1.DefaultParams().ExpeditedVotingPeriod, params.ExpeditedVotingPeriod) + require.Equal(t, v1.DefaultParams().MinDepositRatio, params.MinDepositRatio) } diff --git a/x/gov/simulation/genesis.go b/x/gov/simulation/genesis.go index 299e3d901df3..bfa7325b1d94 100644 --- a/x/gov/simulation/genesis.go +++ b/x/gov/simulation/genesis.go @@ -28,6 +28,7 @@ const ( Threshold = "threshold" ExpeditedThreshold = "expedited_threshold" Veto = "veto" + MinDepositRatio = "min_deposit_ratio" // ExpeditedThreshold must be at least as large as the regular Threshold // Therefore, we use this break out point in randomization. @@ -94,6 +95,11 @@ func GenVeto(r *rand.Rand) math.LegacyDec { return sdk.NewDecWithPrec(int64(simulation.RandIntBetween(r, 250, 334)), 3) } +// GenMinDepositRatio returns randomized DepositMinRatio +func GenMinDepositRatio(r *rand.Rand) sdk.Dec { + return sdk.MustNewDecFromStr("0.01") +} + // RandomizedGenState generates a random GenesisState for gov func RandomizedGenState(simState *module.SimulationState) { startingProposalID := uint64(simState.Rand.Intn(100)) @@ -158,9 +164,15 @@ func RandomizedGenState(simState *module.SimulationState) { func(r *rand.Rand) { veto = GenVeto(r) }, ) + var minDepositRatio sdk.Dec + simState.AppParams.GetOrGenerate( + simState.Cdc, MinDepositRatio, &minDepositRatio, simState.Rand, + func(r *rand.Rand) { minDepositRatio = GenMinDepositRatio(r) }, + ) + govGenesis := v1.NewGenesisState( startingProposalID, - v1.NewParams(minDeposit, expeditedMinDeposit, depositPeriod, votingPeriod, expeditedVotingPeriod, quorum.String(), threshold.String(), expitedVotingThreshold.String(), veto.String(), minInitialDepositRatio.String(), simState.Rand.Intn(2) == 0, simState.Rand.Intn(2) == 0, simState.Rand.Intn(2) == 0), + v1.NewParams(minDeposit, expeditedMinDeposit, depositPeriod, votingPeriod, expeditedVotingPeriod, quorum.String(), threshold.String(), expitedVotingThreshold.String(), veto.String(), minInitialDepositRatio.String(), simState.Rand.Intn(2) == 0, simState.Rand.Intn(2) == 0, simState.Rand.Intn(2) == 0, minDepositRatio.String()), ) bz, err := json.MarshalIndent(&govGenesis, "", " ") diff --git a/x/gov/simulation/operations.go b/x/gov/simulation/operations.go index 2ca94cc4e9c7..9c53f1c98b86 100644 --- a/x/gov/simulation/operations.go +++ b/x/gov/simulation/operations.go @@ -458,7 +458,14 @@ func randomDeposit( minDepositAmount := minDeposit[denomIndex].Amount - minAmount := sdk.ZeroInt() + minDepositRatio, err := sdkmath.LegacyNewDecFromStr(params.GetMinDepositRatio()) + if err != nil { + return nil, false, err + } + + threshold := minDepositAmount.ToLegacyDec().Mul(minDepositRatio).TruncateInt() + + minAmount := sdkmath.ZeroInt() if useMinAmount { minDepositPercent, err := sdk.NewDecFromStr(params.MinInitialDepositRatio) if err != nil { @@ -473,8 +480,9 @@ func randomDeposit( return nil, false, err } amount = amount.Add(minAmount) + amount = amount.MulRaw(3) // 3x what's required // TODO: this is a hack, we need to be able to calculate the correct amount using params - if amount.GT(spendableBalance) { + if amount.GT(spendableBalance) || amount.LT(threshold) { return nil, true, nil } diff --git a/x/gov/simulation/operations_test.go b/x/gov/simulation/operations_test.go index 20d20f539cfa..a1a24da8db58 100644 --- a/x/gov/simulation/operations_test.go +++ b/x/gov/simulation/operations_test.go @@ -152,7 +152,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, "560969stake", msg.InitialDeposit[0].String()) + require.Equal(t, "143523282stake", msg.InitialDeposit[0].String()) require.Equal(t, simulation.TypeMsgSubmitProposal, sdk.MsgTypeURL(&msg)) } @@ -182,7 +182,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, "13430055stake", msg.InitialDeposit[0].String()) + require.Equal(t, "75498768stake", 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: NJWzHdBNpAXKJPHWQdrGYcAHSctgVlqwqHoLfHsXUdStwfefwzqLuKEhmMyYLdbZrcPgYqjNHxPexsruwEGStAneKbWkQDDIlCWBLSiAASNhZqNFlPtfqPJoxKsgMdzjWqLWdqKQuJqWPMvwPQWZUtVMOTMYKJbfdlZsjdsomuScvDmbDkgRualsxDvRJuCAmPOXitIbcyWsKGSdrEunFAOdmXnsuyFVgJqEjbklvmwrUlsxjRSfKZxGcpayDdgoFcnVSutxjRgOSFzPwidAjubMncNweqpbxhXGchpZUxuFDOtpnhNUycJICRYqsPhPSCjPTWZFLkstHWJxvdPEAyEIxXgLwbNOjrgzmaujiBABBIXvcXpLrbcEWNNQsbjvgJFgJkflpRohHUutvnaUqoop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xHfWotDllNkIJPMbXzjDVjPOOjCFuIvTyhXKLyhUScOXvYthRXpPfKwMhptXaxIxgqBoUqzrWbaoLTVpQoottZyPFfNOoMioXHRuFwMRYUiKvcWPkrayyTLOCFJlAyslDameIuqVAuxErqFPEWIScKpBORIuZqoXlZuTvAjEdlEWDODFRregDTqGNoFBIHxvimmIZwLfFyKUfEWAnNBdtdzDmTPXtpHRGdIbuucfTjOygZsTxPjfweXhSUkMhPjMaxKlMIJMOXcnQfyzeOcbWwNbeH", msg.Messages[0].GetCachedValue().(*v1.MsgExecLegacyContent).Content.GetCachedValue().(v1beta1.Content).GetDescription()) require.Equal(t, "gov", msg.Route()) @@ -231,7 +231,7 @@ func TestSimulateMsgDeposit(t *testing.T) { require.Equal(t, uint64(1), msg.ProposalId) require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Depositor) require.NotEqual(t, len(msg.Amount), 0) - require.Equal(t, "560969stake", msg.Amount[0].String()) + require.Equal(t, "1682907stake", msg.Amount[0].String()) require.Equal(t, "gov", msg.Route()) require.Equal(t, simulation.TypeMsgDeposit, msg.Type()) } diff --git a/x/gov/types/v1/gov.pb.go b/x/gov/types/v1/gov.pb.go index 0312e32938d3..d723d4efd650 100644 --- a/x/gov/types/v1/gov.pb.go +++ b/x/gov/types/v1/gov.pb.go @@ -772,6 +772,12 @@ type Params struct { BurnProposalDepositPrevote bool `protobuf:"varint,14,opt,name=burn_proposal_deposit_prevote,json=burnProposalDepositPrevote,proto3" json:"burn_proposal_deposit_prevote,omitempty"` // burn deposits if quorum with vote type no_veto is met BurnVoteVeto bool `protobuf:"varint,15,opt,name=burn_vote_veto,json=burnVoteVeto,proto3" json:"burn_vote_veto,omitempty"` + // The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. + // Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be + // required. + // + // Since: cosmos-sdk 0.50 + MinDepositRatio string `protobuf:"bytes,16,opt,name=min_deposit_ratio,json=minDepositRatio,proto3" json:"min_deposit_ratio,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -898,6 +904,13 @@ func (m *Params) GetBurnVoteVeto() bool { return false } +func (m *Params) GetMinDepositRatio() string { + if m != nil { + return m.MinDepositRatio + } + return "" +} + func init() { proto.RegisterEnum("cosmos.gov.v1.VoteOption", VoteOption_name, VoteOption_value) proto.RegisterEnum("cosmos.gov.v1.ProposalStatus", ProposalStatus_name, ProposalStatus_value) @@ -915,92 +928,93 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1/gov.proto", fileDescriptor_e05cb1c0d030febb) } var fileDescriptor_e05cb1c0d030febb = []byte{ - // 1348 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4f, 0x73, 0xd3, 0x46, - 0x14, 0x8f, 0x6c, 0xc7, 0x71, 0x9e, 0x63, 0xc7, 0x2c, 0x81, 0x28, 0x81, 0xd8, 0xc1, 0xc3, 0x30, - 0x29, 0x7f, 0xec, 0x06, 0x4a, 0x0f, 0xa5, 0x33, 0x1d, 0x27, 0x16, 0x45, 0x0c, 0xc4, 0xae, 0x6c, - 0x1c, 0xe8, 0x45, 0x23, 0x47, 0x8b, 0xb3, 0x53, 0x4b, 0xeb, 0x4a, 0x6b, 0x13, 0x7f, 0x84, 0xde, - 0x38, 0xf6, 0xd4, 0xe9, 0xb1, 0xc7, 0x1e, 0x98, 0x7e, 0x81, 0x5e, 0x38, 0x75, 0x18, 0x2e, 0xed, - 0xa5, 0xd0, 0x81, 0x43, 0x67, 0xf8, 0x14, 0x9d, 0x5d, 0xad, 0x2c, 0xc7, 0x71, 0x27, 0x09, 0x97, - 0xc4, 0x7a, 0xef, 0xf7, 0x7b, 0xef, 0xed, 0xfb, 0xb7, 0x12, 0x2c, 0xef, 0x51, 0xdf, 0xa1, 0x7e, - 0xb9, 0x43, 0x07, 0xe5, 0xc1, 0x26, 0xff, 0x57, 0xea, 0x79, 0x94, 0x51, 0x94, 0x09, 0x14, 0x25, - 0x2e, 0x19, 0x6c, 0xae, 0xe6, 0x25, 0xae, 0x6d, 0xf9, 0xb8, 0x3c, 0xd8, 0x6c, 0x63, 0x66, 0x6d, - 0x96, 0xf7, 0x28, 0x71, 0x03, 0xf8, 0xea, 0x52, 0x87, 0x76, 0xa8, 0xf8, 0x59, 0xe6, 0xbf, 0xa4, - 0xb4, 0xd0, 0xa1, 0xb4, 0xd3, 0xc5, 0x65, 0xf1, 0xd4, 0xee, 0x3f, 0x2d, 0x33, 0xe2, 0x60, 0x9f, - 0x59, 0x4e, 0x4f, 0x02, 0x56, 0x26, 0x01, 0x96, 0x3b, 0x94, 0xaa, 0xfc, 0xa4, 0xca, 0xee, 0x7b, - 0x16, 0x23, 0x34, 0xf4, 0xb8, 0x12, 0x44, 0x64, 0x06, 0x4e, 0x65, 0xb4, 0x81, 0xea, 0x8c, 0xe5, - 0x10, 0x97, 0x96, 0xc5, 0xdf, 0x40, 0x54, 0xa4, 0x80, 0x76, 0x31, 0xe9, 0xec, 0x33, 0x6c, 0xb7, - 0x28, 0xc3, 0xb5, 0x1e, 0xb7, 0x84, 0x36, 0x21, 0x49, 0xc5, 0x2f, 0x55, 0x59, 0x57, 0x36, 0xb2, - 0x37, 0x57, 0x4a, 0x87, 0x4e, 0x5d, 0x8a, 0xa0, 0x86, 0x04, 0xa2, 0x2b, 0x90, 0x7c, 0x26, 0x0c, - 0xa9, 0xb1, 0x75, 0x65, 0x63, 0x7e, 0x2b, 0xfb, 0xfa, 0xc5, 0x0d, 0x90, 0xac, 0x2a, 0xde, 0x33, - 0xa4, 0xb6, 0xf8, 0xb3, 0x02, 0x73, 0x55, 0xdc, 0xa3, 0x3e, 0x61, 0xa8, 0x00, 0xe9, 0x9e, 0x47, - 0x7b, 0xd4, 0xb7, 0xba, 0x26, 0xb1, 0x85, 0xaf, 0x84, 0x01, 0xa1, 0x48, 0xb7, 0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x93, 0x80, - 0xaa, 0x56, 0xaf, 0x35, 0xf4, 0xa6, 0x59, 0xd7, 0x0c, 0xbd, 0x56, 0xcd, 0x29, 0xe8, 0x12, 0xac, - 0x4d, 0x62, 0x5a, 0xb5, 0xa6, 0xbe, 0xf3, 0x75, 0x08, 0x89, 0xa1, 0x55, 0x38, 0x3f, 0x09, 0xa9, - 0x57, 0x1a, 0x0d, 0xad, 0x1a, 0x04, 0x3d, 0xa9, 0x33, 0xb4, 0xfb, 0xda, 0x76, 0x53, 0xab, 0xe6, - 0x12, 0xd3, 0x98, 0x77, 0x2b, 0xfa, 0x03, 0xad, 0x9a, 0x9b, 0xdd, 0xd2, 0x5e, 0xbe, 0xcb, 0x2b, - 0xaf, 0xde, 0xe5, 0x95, 0x7f, 0xde, 0xe5, 0x95, 0xe7, 0xef, 0xf3, 0x33, 0xaf, 0xde, 0xe7, 0x67, - 0xfe, 0x7a, 0x9f, 0x9f, 0xf9, 0xf6, 0x5a, 0x87, 0xb0, 0xfd, 0x7e, 0xbb, 0xb4, 0x47, 0x1d, 0xf9, - 0x31, 0x21, 0xff, 0xdd, 0xf0, 0xed, 0xef, 0xca, 0x07, 0xe2, 0x03, 0x89, 0x0d, 0x7b, 0xd8, 0xe7, - 0x5f, 0x3f, 0x49, 0x31, 0x01, 0xb7, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xe1, 0x09, 0x89, 0x48, - 0x3e, 0x0d, 0x00, 0x00, + // 1364 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcf, 0x73, 0xd3, 0xc6, + 0x17, 0x8f, 0x6c, 0xc7, 0x71, 0x9e, 0x63, 0x47, 0x2c, 0x81, 0x28, 0x81, 0xd8, 0xc1, 0xc3, 0x30, + 0xf9, 0xf2, 0xc3, 0xfe, 0x06, 0x4a, 0x0f, 0xd0, 0x99, 0x8e, 0x13, 0x8b, 0x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 0x9b, 0xee, 0x0f, 0x3a, 0xe5, 0x3d, 0xe2, 0x88, 0x0f, + 0x11, 0xf1, 0xef, 0x86, 0x6f, 0x7d, 0x5b, 0x39, 0xe0, 0x1f, 0x57, 0x74, 0xd4, 0xc7, 0x3e, 0xfb, + 0x72, 0x4a, 0xf3, 0xe9, 0xb9, 0xf5, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf5, 0xe3, 0xb8, 0x2b, + 0x7a, 0x0d, 0x00, 0x00, } func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) { @@ -1489,6 +1503,15 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.MinDepositRatio) > 0 { + i -= len(m.MinDepositRatio) + copy(dAtA[i:], m.MinDepositRatio) + i = encodeVarintGov(dAtA, i, uint64(len(m.MinDepositRatio))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } if m.BurnVoteVeto { i-- if m.BurnVoteVeto { @@ -1893,6 +1916,10 @@ func (m *Params) Size() (n int) { if m.BurnVoteVeto { n += 2 } + l = len(m.MinDepositRatio) + if l > 0 { + n += 2 + l + sovGov(uint64(l)) + } return n } @@ -3744,6 +3771,38 @@ func (m *Params) Unmarshal(dAtA []byte) error { } } m.BurnVoteVeto = bool(v != 0) + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinDepositRatio", 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.MinDepositRatio = string(dAtA[iNdEx:postIndex]) + 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 bef70bc7f9df..130493472cc6 100644 --- a/x/gov/types/v1/params.go +++ b/x/gov/types/v1/params.go @@ -28,6 +28,7 @@ var ( 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) DefaultBurnVoteVeto = true // set to true to replicate behavior of when this change was made (0.47) + DefaultMinDepositRatio = sdk.MustNewDecFromStr("0.01") ) // Deprecated: NewDepositParams creates a new DepositParams object @@ -57,7 +58,7 @@ func NewVotingParams(votingPeriod *time.Duration) VotingParams { // NewParams creates a new Params instance with given values. func NewParams( minDeposit, expeditedminDeposit sdk.Coins, maxDepositPeriod, votingPeriod, expeditedVotingPeriod time.Duration, - quorum, threshold, expeditedThreshold, vetoThreshold, minInitialDepositRatio string, burnProposalDeposit, burnVoteQuorum, burnVoteVeto bool, + quorum, threshold, expeditedThreshold, vetoThreshold, minInitialDepositRatio string, burnProposalDeposit, burnVoteQuorum, burnVoteVeto bool, minDepositRatio string, ) Params { return Params{ MinDeposit: minDeposit, @@ -73,6 +74,7 @@ func NewParams( BurnProposalDepositPrevote: burnProposalDeposit, BurnVoteQuorum: burnVoteQuorum, BurnVoteVeto: burnVoteVeto, + MinDepositRatio: minDepositRatio, } } @@ -92,6 +94,7 @@ func DefaultParams() Params { DefaultBurnProposalPrevote, DefaultBurnVoteQuorom, DefaultBurnVoteVeto, + DefaultMinDepositRatio.String(), ) }