fix(x/gov): limit execution in gov (#20348)

Co-authored-by: Alexander Peters <alpe@users.noreply.github.com>
This commit is contained in:
Marko 2024-06-12 15:50:58 +02:00 committed by GitHub
parent 021ab6dcc2
commit d3d6448eca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 363 additions and 244 deletions

View File

@ -83,7 +83,7 @@ type MsgServer interface {
// TripCircuitBreaker pauses processing of Msg's in the state machine.
TripCircuitBreaker(context.Context, *MsgTripCircuitBreaker) (*MsgTripCircuitBreakerResponse, error)
// ResetCircuitBreaker resumes processing of Msg's in the state machine that
// have been been paused using TripCircuitBreaker.
// have been paused using TripCircuitBreaker.
ResetCircuitBreaker(context.Context, *MsgResetCircuitBreaker) (*MsgResetCircuitBreakerResponse, error)
mustEmbedUnimplementedMsgServer()
}

View File

@ -6645,6 +6645,7 @@ var (
fd_Params_optimistic_rejected_threshold protoreflect.FieldDescriptor
fd_Params_yes_quorum protoreflect.FieldDescriptor
fd_Params_expedited_quorum protoreflect.FieldDescriptor
fd_Params_proposal_execution_gas protoreflect.FieldDescriptor
)
func init() {
@ -6671,6 +6672,7 @@ func init() {
fd_Params_optimistic_rejected_threshold = md_Params.Fields().ByName("optimistic_rejected_threshold")
fd_Params_yes_quorum = md_Params.Fields().ByName("yes_quorum")
fd_Params_expedited_quorum = md_Params.Fields().ByName("expedited_quorum")
fd_Params_proposal_execution_gas = md_Params.Fields().ByName("proposal_execution_gas")
}
var _ protoreflect.Message = (*fastReflection_Params)(nil)
@ -6864,6 +6866,12 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto
return
}
}
if x.ProposalExecutionGas != uint64(0) {
value := protoreflect.ValueOfUint64(x.ProposalExecutionGas)
if !f(fd_Params_proposal_execution_gas, value) {
return
}
}
}
// Has reports whether a field is populated.
@ -6921,6 +6929,8 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool {
return x.YesQuorum != ""
case "cosmos.gov.v1.Params.expedited_quorum":
return x.ExpeditedQuorum != ""
case "cosmos.gov.v1.Params.proposal_execution_gas":
return x.ProposalExecutionGas != uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params"))
@ -6979,6 +6989,8 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) {
x.YesQuorum = ""
case "cosmos.gov.v1.Params.expedited_quorum":
x.ExpeditedQuorum = ""
case "cosmos.gov.v1.Params.proposal_execution_gas":
x.ProposalExecutionGas = uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params"))
@ -7067,6 +7079,9 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro
case "cosmos.gov.v1.Params.expedited_quorum":
value := x.ExpeditedQuorum
return protoreflect.ValueOfString(value)
case "cosmos.gov.v1.Params.proposal_execution_gas":
value := x.ProposalExecutionGas
return protoreflect.ValueOfUint64(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params"))
@ -7135,6 +7150,8 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto
x.YesQuorum = value.Interface().(string)
case "cosmos.gov.v1.Params.expedited_quorum":
x.ExpeditedQuorum = value.Interface().(string)
case "cosmos.gov.v1.Params.proposal_execution_gas":
x.ProposalExecutionGas = value.Uint()
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params"))
@ -7218,6 +7235,8 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore
panic(fmt.Errorf("field yes_quorum of message cosmos.gov.v1.Params is not mutable"))
case "cosmos.gov.v1.Params.expedited_quorum":
panic(fmt.Errorf("field expedited_quorum of message cosmos.gov.v1.Params is not mutable"))
case "cosmos.gov.v1.Params.proposal_execution_gas":
panic(fmt.Errorf("field proposal_execution_gas 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"))
@ -7279,6 +7298,8 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor
return protoreflect.ValueOfString("")
case "cosmos.gov.v1.Params.expedited_quorum":
return protoreflect.ValueOfString("")
case "cosmos.gov.v1.Params.proposal_execution_gas":
return protoreflect.ValueOfUint64(uint64(0))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params"))
@ -7435,6 +7456,9 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods {
if l > 0 {
n += 2 + l + runtime.Sov(uint64(l))
}
if x.ProposalExecutionGas != 0 {
n += 2 + runtime.Sov(uint64(x.ProposalExecutionGas))
}
if x.unknownFields != nil {
n += len(x.unknownFields)
}
@ -7464,6 +7488,13 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if x.ProposalExecutionGas != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalExecutionGas))
i--
dAtA[i] = 0x1
i--
dAtA[i] = 0xb0
}
if len(x.ExpeditedQuorum) > 0 {
i -= len(x.ExpeditedQuorum)
copy(dAtA[i:], x.ExpeditedQuorum)
@ -8374,6 +8405,25 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods {
}
x.ExpeditedQuorum = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 22:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalExecutionGas", wireType)
}
x.ProposalExecutionGas = 0
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++
x.ProposalExecutionGas |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
@ -10084,7 +10134,8 @@ type Params struct {
YesQuorum string `protobuf:"bytes,20,opt,name=yes_quorum,json=yesQuorum,proto3" json:"yes_quorum,omitempty"`
// Minimum percentage of total stake needed to vote for a result to be
// considered valid for an expedited proposal.
ExpeditedQuorum string `protobuf:"bytes,21,opt,name=expedited_quorum,json=expeditedQuorum,proto3" json:"expedited_quorum,omitempty"`
ExpeditedQuorum string `protobuf:"bytes,21,opt,name=expedited_quorum,json=expeditedQuorum,proto3" json:"expedited_quorum,omitempty"`
ProposalExecutionGas uint64 `protobuf:"varint,22,opt,name=proposal_execution_gas,json=proposalExecutionGas,proto3" json:"proposal_execution_gas,omitempty"`
}
func (x *Params) Reset() {
@ -10254,6 +10305,13 @@ func (x *Params) GetExpeditedQuorum() string {
return ""
}
func (x *Params) GetProposalExecutionGas() uint64 {
if x != nil {
return x.ProposalExecutionGas
}
return 0
}
// MessageBasedParams defines the parameters of specific messages in a proposal.
// It is used to define the parameters of a proposal that is based on a specific message.
// Once a message has message based params, it only supports a standard proposal type.
@ -10511,7 +10569,7 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{
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, 0xff, 0x0c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x45, 0x0a, 0x0b, 0x6d,
0x22, 0xc7, 0x0d, 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, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f,
@ -10612,78 +10670,83 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{
0x75, 0x6d, 0x12, 0x49, 0x0a, 0x10, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x5f,
0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, 0xd2, 0xb4,
0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xda, 0xb4, 0x2d, 0x0c,
0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x52, 0x0f, 0x65, 0x78,
0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x3a, 0x13, 0xd2,
0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e,
0x34, 0x37, 0x22, 0xa8, 0x02, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x61,
0x73, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74,
0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f,
0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12,
0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42,
0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52,
0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x2d, 0x0a, 0x0a, 0x79, 0x65, 0x73, 0x5f, 0x71,
0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d,
0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x79, 0x65, 0x73,
0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x2c, 0x0a, 0x09, 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, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73,
0x68, 0x6f, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72,
0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 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, 0x10, 0xd2, 0xb4, 0x2d,
0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x2a, 0xa7, 0x01,
0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d,
0x0a, 0x19, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f,
0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a,
0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53,
0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f,
0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49,
0x50, 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x4f, 0x49, 0x43, 0x45, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18,
0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x50,
0x54, 0x49, 0x4d, 0x49, 0x53, 0x54, 0x49, 0x43, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x52,
0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x50, 0x45,
0x44, 0x49, 0x54, 0x45, 0x44, 0x10, 0x04, 0x2a, 0xfa, 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, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45,
0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, 0x4e, 0x45, 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, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f,
0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x57, 0x4f, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x56,
0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, 0x12,
0x15, 0x0a, 0x11, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54,
0x48, 0x52, 0x45, 0x45, 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, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54,
0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x55, 0x52, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x4f,
0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x50, 0x41, 0x4d, 0x10, 0x05,
0x1a, 0x02, 0x10, 0x01, 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,
0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x52, 0x0f, 0x65, 0x78,
0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x46, 0x0a,
0x16, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x04, 0x42, 0x10, 0xda,
0xb4, 0x2d, 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x52,
0x14, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69,
0x6f, 0x6e, 0x47, 0x61, 0x73, 0x3a, 0x13, 0xd2, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x37, 0x22, 0xa8, 0x02, 0x0a, 0x12, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d,
0x73, 0x12, 0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69,
0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e,
0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75,
0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73,
0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12,
0x2d, 0x0a, 0x0a, 0x79, 0x65, 0x73, 0x5f, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x14, 0x20,
0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
0x44, 0x65, 0x63, 0x52, 0x09, 0x79, 0x65, 0x73, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x2c,
0x0a, 0x09, 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, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0e,
0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04,
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, 0x10, 0xd2, 0xb4, 0x2d, 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76,
0x30, 0x2e, 0x32, 0x2e, 0x30, 0x2a, 0xa7, 0x01, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73,
0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53,
0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41,
0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10,
0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59,
0x50, 0x45, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x50, 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x4f, 0x49,
0x43, 0x45, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c,
0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4d, 0x49, 0x53, 0x54, 0x49, 0x43,
0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54,
0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x50, 0x45, 0x44, 0x49, 0x54, 0x45, 0x44, 0x10, 0x04, 0x2a,
0xfa, 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, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
0x4f, 0x4e, 0x45, 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, 0x13,
0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x57,
0x4f, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49,
0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x4f, 0x54, 0x45, 0x5f,
0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x48, 0x52, 0x45, 0x45, 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, 0x12, 0x14, 0x0a, 0x10,
0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x55, 0x52,
0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f,
0x4e, 0x5f, 0x53, 0x50, 0x41, 0x4d, 0x10, 0x05, 0x1a, 0x02, 0x10, 0x01, 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 (

View File

@ -8,6 +8,7 @@ require (
cosmossdk.io/core v0.12.1-0.20231114100755-569e3ff6a0d7
cosmossdk.io/core/testing v0.0.0-00010101000000-000000000000
cosmossdk.io/depinject v1.0.0-alpha.4
cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91
cosmossdk.io/x/tx v0.13.3
github.com/cosmos/cosmos-sdk v0.51.0
github.com/cosmos/gogoproto v1.5.0
@ -27,7 +28,6 @@ require (
cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc // indirect
cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5
cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect
cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91
cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect
cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect
filippo.io/edwards25519 v1.1.0 // indirect

View File

@ -453,7 +453,7 @@ type MsgServer interface {
// TripCircuitBreaker pauses processing of Msg's in the state machine.
TripCircuitBreaker(context.Context, *MsgTripCircuitBreaker) (*MsgTripCircuitBreakerResponse, error)
// ResetCircuitBreaker resumes processing of Msg's in the state machine that
// have been been paused using TripCircuitBreaker.
// have been paused using TripCircuitBreaker.
ResetCircuitBreaker(context.Context, *MsgResetCircuitBreaker) (*MsgResetCircuitBreakerResponse, error)
}

View File

@ -56,6 +56,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* [#18762](https://github.com/cosmos/cosmos-sdk/pull/18762) Add multiple choice proposals.
* [#18856](https://github.com/cosmos/cosmos-sdk/pull/18856) Add `ProposalCancelMaxPeriod` parameters.
* [#19167](https://github.com/cosmos/cosmos-sdk/pull/19167) Add `YesQuorum` parameter.
* [#20348](https://github.com/cosmos/cosmos-sdk/pull/20348) Limit gov execution of proposals to a max gas limit. The limit was added to parameters and can be modified. With this version the default is set to 10 million gas. Before it was infinite gas.
### Client Breaking Changes

View File

@ -24,7 +24,7 @@ they don't vote themselves.
deposits if the proposal was accepted or rejected. If the proposal was vetoed, or never entered voting period (minimum deposit not reached within deposit period), the deposit is burned.
This module is in use on the Cosmos Hub (a.k.a [gaia](https://github.com/cosmos/gaia)).
Features that may be added in the future are described in [Future Improvements](#future-improvements).
## Contents
@ -278,6 +278,12 @@ There are three parameters that define if the deposit of a proposal should be bu
> Note: These parameters are modifiable via governance.
#### Execution
Execution is the process of executing the messages contained in a proposal. The execution phase will commence after the proposal has been accepted by the network. The messages contained in the proposal will be executed in the order they were submitted.
Execution has a upper limit on how much gas can be consumed in a single block. This limit is defined by the `ProposalExecutionGas` parameter.
## State
### Constitution

View File

@ -13,7 +13,9 @@ require (
cosmossdk.io/math v1.3.0
cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc
cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91 // indirect
cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000
cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91
cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect
cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190
cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000
github.com/chzyer/readline v1.5.1
@ -39,8 +41,6 @@ require (
require (
buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.1-20240312114316-c0d3497e35d6.1 // indirect
cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5 // indirect
cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000
cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect
cosmossdk.io/x/tx v0.13.3 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect

View File

@ -35,6 +35,11 @@ func (k Keeper) EndBlocker(ctx context.Context) error {
return err
}
params, err := k.Params.Get(ctx)
if err != nil {
return err
}
for _, prop := range inactiveProps {
proposal, err := k.Proposals.Get(ctx, prop.Key.K2())
if err != nil {
@ -61,10 +66,6 @@ func (k Keeper) EndBlocker(ctx context.Context) error {
return err
}
params, err := k.Params.Get(ctx)
if err != nil {
return err
}
if !params.BurnProposalDepositPrevote {
err = k.RefundAndDeleteDeposits(ctx, proposal.Id) // refund deposit if proposal got removed without getting 100% of the proposal
} else {
@ -77,7 +78,7 @@ func (k Keeper) EndBlocker(ctx context.Context) error {
// called when proposal become inactive
// call hook when proposal become inactive
if err := k.BranchService.Execute(ctx, func(ctx context.Context) error {
if err = k.BranchService.Execute(ctx, func(ctx context.Context) error {
return k.Hooks().AfterProposalFailedMinDeposit(ctx, proposal.Id)
}); err != nil {
// purposely ignoring the error here not to halt the chain if the hook fails
@ -193,16 +194,10 @@ func (k Keeper) EndBlocker(ctx context.Context) error {
// Messages may mutate state thus we use a cached context. If one of
// the handlers fails, no state mutation is written and the error
// message is logged.
if err := k.BranchService.Execute(ctx, func(ctx context.Context) error {
_, err = k.BranchService.ExecuteWithGasLimit(ctx, params.ProposalExecutionGas, func(ctx context.Context) error {
// execute all messages
for idx, msg = range messages {
if _, err := safeExecuteHandler(ctx, msg, k.MsgRouterService); err != nil {
// `idx` and `err` are populated with the msg index and error.
proposal.Status = v1.StatusFailed
proposal.FailedReason = err.Error()
tagValue = types.AttributeValueProposalFailed
logMsg = fmt.Sprintf("passed, but msg %d (%s) failed on execution: %s", idx, sdk.MsgTypeURL(msg), err)
return err
}
}
@ -212,7 +207,14 @@ func (k Keeper) EndBlocker(ctx context.Context) error {
logMsg = "passed"
return nil
}); err != nil {
})
if err != nil {
// `idx` and `err` are populated with the msg index and error.
proposal.Status = v1.StatusFailed
proposal.FailedReason = err.Error()
tagValue = types.AttributeValueProposalFailed
logMsg = fmt.Sprintf("passed, but msg %d (%s) failed on execution: %s", idx, sdk.MsgTypeURL(msg), err)
break // We do not anything with the error. Returning an error halts the chain, and proposal struct is already updated.
}
case !burnDeposits && (proposal.ProposalType == v1.ProposalType_PROPOSAL_TYPE_EXPEDITED ||
@ -222,10 +224,6 @@ func (k Keeper) EndBlocker(ctx context.Context) error {
// once the regular voting period expires again, the tally is repeated
// according to the regular proposal rules.
proposal.ProposalType = v1.ProposalType_PROPOSAL_TYPE_STANDARD
params, err := k.Params.Get(ctx)
if err != nil {
return err
}
endTime := proposal.VotingStartTime.Add(*params.VotingPeriod)
proposal.VotingEndTime = &endTime

View File

@ -11,7 +11,7 @@ import (
var votingPeriodProposalKeyPrefix = collections.NewPrefix(4) // VotingPeriodProposalKeyPrefix stores which proposals are on voting period.
// MigrateStore performs in-place store migrations from v5 (v0.50) to v6 (v0.51). The
// MigrateStore performs in-place store migrations from v5 (v0.50) to v6 (v0.52). The
// migration includes:
//
// Addition of new field in params to store types of proposals that can be submitted.
@ -56,6 +56,7 @@ func MigrateStore(ctx context.Context, storeService corestoretypes.KVStoreServic
govParams.OptimisticAuthorizedAddresses = defaultParams.OptimisticAuthorizedAddresses
govParams.OptimisticRejectedThreshold = defaultParams.OptimisticRejectedThreshold
govParams.ProposalCancelMaxPeriod = defaultParams.ProposalCancelMaxPeriod
govParams.ProposalExecutionGas = defaultParams.ProposalExecutionGas
return paramsCollection.Set(ctx, govParams)
}

View File

@ -342,7 +342,9 @@ message Params {
// Minimum percentage of total stake needed to vote for a result to be
// considered valid for an expedited proposal.
string expedited_quorum = 21 [(cosmos_proto.scalar) = "cosmos.Dec", (cosmos_proto.field_added_in) = "x/gov v0.2.0"];
string expedited_quorum = 21 [(cosmos_proto.scalar) = "cosmos.Dec", (cosmos_proto.field_added_in) = "x/gov v1.0.0"];
uint64 proposal_execution_gas = 22 [(cosmos_proto.field_added_in) = "x/gov v0.2.0"];
}
// MessageBasedParams defines the parameters of specific messages in a proposal.
@ -365,4 +367,4 @@ message MessageBasedParams {
// Minimum value of Veto votes to Total votes ratio for proposal to be vetoed.
string veto_threshold = 4 [(cosmos_proto.scalar) = "cosmos.Dec"];
}
}

View File

@ -194,6 +194,7 @@ func RandomizedGenState(simState *module.SimulationState) {
minDepositRatio.String(),
optimisticRejectedThreshold.String(),
[]string{},
10_000_000,
),
)

View File

@ -1003,7 +1003,8 @@ type Params struct {
YesQuorum string `protobuf:"bytes,20,opt,name=yes_quorum,json=yesQuorum,proto3" json:"yes_quorum,omitempty"`
// Minimum percentage of total stake needed to vote for a result to be
// considered valid for an expedited proposal.
ExpeditedQuorum string `protobuf:"bytes,21,opt,name=expedited_quorum,json=expeditedQuorum,proto3" json:"expedited_quorum,omitempty"`
ExpeditedQuorum string `protobuf:"bytes,21,opt,name=expedited_quorum,json=expeditedQuorum,proto3" json:"expedited_quorum,omitempty"`
ProposalExecutionGas uint64 `protobuf:"varint,22,opt,name=proposal_execution_gas,json=proposalExecutionGas,proto3" json:"proposal_execution_gas,omitempty"`
}
func (m *Params) Reset() { *m = Params{} }
@ -1186,6 +1187,13 @@ func (m *Params) GetExpeditedQuorum() string {
return ""
}
func (m *Params) GetProposalExecutionGas() uint64 {
if m != nil {
return m.ProposalExecutionGas
}
return 0
}
// MessageBasedParams defines the parameters of specific messages in a proposal.
// It is used to define the parameters of a proposal that is based on a specific message.
// Once a message has message based params, it only supports a standard proposal type.
@ -1291,131 +1299,133 @@ func init() {
func init() { proto.RegisterFile("cosmos/gov/v1/gov.proto", fileDescriptor_e05cb1c0d030febb) }
var fileDescriptor_e05cb1c0d030febb = []byte{
// 1971 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xcf, 0x6f, 0xdb, 0xc8,
0x15, 0x0e, 0x25, 0x59, 0xb6, 0x9e, 0x25, 0x99, 0x1e, 0xdb, 0x6b, 0xc6, 0x5e, 0xcb, 0x8e, 0x50,
0x2c, 0xdc, 0xec, 0x5a, 0xb2, 0xb3, 0x75, 0xbb, 0x4d, 0x37, 0x07, 0xc9, 0x62, 0x36, 0x0c, 0x62,
0x4b, 0xa5, 0x18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9, 0xea, 0x43, 0x75, 0x8f, 0x67, 0x6c, 0x1c, 0xf3, 0x7e, 0x4d, 0x7b, 0xa4, 0x36, 0xe4,
0xa9, 0xfa, 0xee, 0xd7, 0x6f, 0x4a, 0xd2, 0x37, 0x6f, 0x4a, 0xd2, 0x3f, 0xdf, 0x94, 0xa4, 0x2f,
0xdf, 0x96, 0x6e, 0x7c, 0xf3, 0xb6, 0x74, 0xe3, 0x6f, 0x6f, 0x4b, 0x37, 0x7e, 0xb1, 0x1a, 0x96,
0x6f, 0x60, 0x7f, 0x51, 0x71, 0x48, 0x95, 0x17, 0x6b, 0x95, 0x7d, 0xf5, 0x0f, 0xaa, 0x67, 0x3b,
0x47, 0x59, 0xde, 0xa3, 0x1f, 0xff, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xeb, 0xae, 0x28, 0x84,
0x15, 0x00, 0x00,
// 2006 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x4d, 0x6f, 0xdb, 0xc8,
0x19, 0x0e, 0x25, 0xf9, 0x43, 0xaf, 0x25, 0x99, 0x1e, 0xdb, 0x31, 0x63, 0xaf, 0x3f, 0x62, 0x14,
0x0b, 0x37, 0xbb, 0x96, 0xec, 0x6c, 0xdd, 0x6e, 0xd3, 0xcd, 0x41, 0xb2, 0x98, 0x84, 0x41, 0x6c,
0xa9, 0x14, 0xe3, 0x24, 0x2d, 0x0a, 0x82, 0x36, 0x27, 0x32, 0x77, 0x45, 0x8e, 0x4a, 0x8e, 0x6c,
0xab, 0xbf, 0x62, 0x8f, 0x3d, 0x15, 0xbd, 0x75, 0x8f, 0x3d, 0x04, 0xbd, 0xf7, 0xd4, 0x45, 0x0f,
0xc5, 0x22, 0xa7, 0x62, 0x81, 0xa6, 0x45, 0x72, 0x28, 0xb0, 0x3f, 0xa1, 0xe8, 0xa1, 0x98, 0xe1,
0x50, 0xa4, 0x3e,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x6f, 0xd7, 0xa4, 0x7f, 0xbd, 0x5d,
0x93, 0xbe, 0x7c, 0xb7, 0x76, 0xe3, 0x9b, 0x77, 0x6b, 0x37, 0xfe, 0xfe, 0x6e, 0xed, 0xc6, 0x2f,
0x56, 0xc2, 0xf4, 0x0d, 0xec, 0x2f, 0x8a, 0x0e, 0x29, 0xf1, 0x64, 0x2d, 0xd1, 0x6e, 0x1b, 0x07,
0xa5, 0xb3, 0xdd, 0xe3, 0x49, 0x5e, 0xa3, 0x9f, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x10, 0x4b,
0xae, 0xb9, 0xcc, 0x15, 0x00, 0x00,
}
func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) {
@ -2011,6 +2021,13 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if m.ProposalExecutionGas != 0 {
i = encodeVarintGov(dAtA, i, uint64(m.ProposalExecutionGas))
i--
dAtA[i] = 0x1
i--
dAtA[i] = 0xb0
}
if len(m.ExpeditedQuorum) > 0 {
i -= len(m.ExpeditedQuorum)
copy(dAtA[i:], m.ExpeditedQuorum)
@ -2638,6 +2655,9 @@ func (m *Params) Size() (n int) {
if l > 0 {
n += 2 + l + sovGov(uint64(l))
}
if m.ProposalExecutionGas != 0 {
n += 2 + sovGov(uint64(m.ProposalExecutionGas))
}
return n
}
@ -5195,6 +5215,25 @@ func (m *Params) Unmarshal(dAtA []byte) error {
}
m.ExpeditedQuorum = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 22:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ProposalExecutionGas", wireType)
}
m.ProposalExecutionGas = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ProposalExecutionGas |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipGov(dAtA[iNdEx:])

View File

@ -19,24 +19,25 @@ const (
// Default governance params
var (
DefaultMinDepositTokens = sdkmath.NewInt(10000000)
DefaultMinExpeditedDepositTokens = DefaultMinDepositTokens.Mul(sdkmath.NewInt(DefaultMinExpeditedDepositTokensRatio))
DefaultQuorum = sdkmath.LegacyNewDecWithPrec(334, 3)
DefaultYesQuorum = sdkmath.LegacyNewDecWithPrec(0, 1)
DefaultExpeditedQuorum = sdkmath.LegacyNewDecWithPrec(500, 3)
DefaultThreshold = sdkmath.LegacyNewDecWithPrec(5, 1)
DefaultExpeditedThreshold = sdkmath.LegacyNewDecWithPrec(667, 3)
DefaultVetoThreshold = sdkmath.LegacyNewDecWithPrec(334, 3)
DefaultMinInitialDepositRatio = sdkmath.LegacyZeroDec()
DefaultProposalCancelRatio = sdkmath.LegacyMustNewDecFromStr("0.5")
DefaultProposalCancelDestAddress = ""
DefaultProposalCancelMaxPeriod = sdkmath.LegacyMustNewDecFromStr("0.5")
DefaultBurnProposalPrevote = false // set to false to replicate behavior of when this change was made (0.47)
DefaultBurnVoteQuorum = 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 = sdkmath.LegacyMustNewDecFromStr("0.01")
DefaultOptimisticRejectedThreshold = sdkmath.LegacyMustNewDecFromStr("0.1")
DefaultOptimisticAuthorizedAddreses = []string(nil)
DefaultMinDepositTokens = sdkmath.NewInt(10000000)
DefaultMinExpeditedDepositTokens = DefaultMinDepositTokens.Mul(sdkmath.NewInt(DefaultMinExpeditedDepositTokensRatio))
DefaultQuorum = sdkmath.LegacyNewDecWithPrec(334, 3)
DefaultYesQuorum = sdkmath.LegacyNewDecWithPrec(0, 1)
DefaultExpeditedQuorum = sdkmath.LegacyNewDecWithPrec(500, 3)
DefaultThreshold = sdkmath.LegacyNewDecWithPrec(5, 1)
DefaultExpeditedThreshold = sdkmath.LegacyNewDecWithPrec(667, 3)
DefaultVetoThreshold = sdkmath.LegacyNewDecWithPrec(334, 3)
DefaultMinInitialDepositRatio = sdkmath.LegacyZeroDec()
DefaultProposalCancelRatio = sdkmath.LegacyMustNewDecFromStr("0.5")
DefaultProposalCancelDestAddress = ""
DefaultProposalCancelMaxPeriod = sdkmath.LegacyMustNewDecFromStr("0.5")
DefaultBurnProposalPrevote = false // set to false to replicate behavior of when this change was made (0.47)
DefaultBurnVoteQuorum = 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 = sdkmath.LegacyMustNewDecFromStr("0.01")
DefaultOptimisticRejectedThreshold = sdkmath.LegacyMustNewDecFromStr("0.1")
DefaultOptimisticAuthorizedAddreses = []string(nil)
DefaultProposalExecutionGas uint64 = 10_000_000 // ten million
)
// NewParams creates a new Params instance with given values.
@ -47,6 +48,7 @@ func NewParams(
burnProposalDeposit, burnVoteQuorum, burnVoteVeto bool,
minDepositRatio, optimisticRejectedThreshold string,
optimisticAuthorizedAddresses []string,
proposalExecutionGas uint64,
) Params {
return Params{
MinDeposit: minDeposit,
@ -70,6 +72,7 @@ func NewParams(
MinDepositRatio: minDepositRatio,
OptimisticRejectedThreshold: optimisticRejectedThreshold,
OptimisticAuthorizedAddresses: optimisticAuthorizedAddresses,
ProposalExecutionGas: proposalExecutionGas,
}
}
@ -97,6 +100,7 @@ func DefaultParams() Params {
DefaultMinDepositRatio.String(),
DefaultOptimisticRejectedThreshold.String(),
DefaultOptimisticAuthorizedAddreses,
DefaultProposalExecutionGas,
)
}
@ -266,6 +270,10 @@ func (p Params) ValidateBasic(addressCodec address.Codec) error {
}
}
if p.ProposalExecutionGas == 0 {
return fmt.Errorf("proposal execution gas must be positive: %d", p.ProposalExecutionGas)
}
return nil
}