diff --git a/api/cosmos/app/v1alpha1/module.pulsar.go b/api/cosmos/app/v1alpha1/module.pulsar.go index a00331b63cce..f66735fb92e0 100644 --- a/api/cosmos/app/v1alpha1/module.pulsar.go +++ b/api/cosmos/app/v1alpha1/module.pulsar.go @@ -1694,8 +1694,8 @@ type PackageReference struct { // present in a previous version. // // A package should indicate its revision with a source code comment - // above the package declaration in one of its fields containing the - // test "Revision N" where N is an integer revision. All packages start + // above the package declaration in one of its files containing the + // text "Revision N" where N is an integer revision. All packages start // at revision 0 the first time they are released in a module. // // When a new version of a module is released and items are added to existing diff --git a/api/cosmos/group/v1/events.pulsar.go b/api/cosmos/group/v1/events.pulsar.go index cde73c963885..262b1ea601da 100644 --- a/api/cosmos/group/v1/events.pulsar.go +++ b/api/cosmos/group/v1/events.pulsar.go @@ -2877,6 +2877,7 @@ var ( md_EventExec protoreflect.MessageDescriptor fd_EventExec_proposal_id protoreflect.FieldDescriptor fd_EventExec_result protoreflect.FieldDescriptor + fd_EventExec_logs protoreflect.FieldDescriptor ) func init() { @@ -2884,6 +2885,7 @@ func init() { md_EventExec = File_cosmos_group_v1_events_proto.Messages().ByName("EventExec") fd_EventExec_proposal_id = md_EventExec.Fields().ByName("proposal_id") fd_EventExec_result = md_EventExec.Fields().ByName("result") + fd_EventExec_logs = md_EventExec.Fields().ByName("logs") } var _ protoreflect.Message = (*fastReflection_EventExec)(nil) @@ -2963,6 +2965,12 @@ func (x *fastReflection_EventExec) Range(f func(protoreflect.FieldDescriptor, pr return } } + if x.Logs != "" { + value := protoreflect.ValueOfString(x.Logs) + if !f(fd_EventExec_logs, value) { + return + } + } } // Has reports whether a field is populated. @@ -2982,6 +2990,8 @@ func (x *fastReflection_EventExec) Has(fd protoreflect.FieldDescriptor) bool { return x.ProposalId != uint64(0) case "cosmos.group.v1.EventExec.result": return x.Result != 0 + case "cosmos.group.v1.EventExec.logs": + return x.Logs != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventExec")) @@ -3002,6 +3012,8 @@ func (x *fastReflection_EventExec) Clear(fd protoreflect.FieldDescriptor) { x.ProposalId = uint64(0) case "cosmos.group.v1.EventExec.result": x.Result = 0 + case "cosmos.group.v1.EventExec.logs": + x.Logs = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventExec")) @@ -3024,6 +3036,9 @@ func (x *fastReflection_EventExec) Get(descriptor protoreflect.FieldDescriptor) case "cosmos.group.v1.EventExec.result": value := x.Result return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "cosmos.group.v1.EventExec.logs": + value := x.Logs + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventExec")) @@ -3048,6 +3063,8 @@ func (x *fastReflection_EventExec) Set(fd protoreflect.FieldDescriptor, value pr x.ProposalId = value.Uint() case "cosmos.group.v1.EventExec.result": x.Result = (ProposalExecutorResult)(value.Enum()) + case "cosmos.group.v1.EventExec.logs": + x.Logs = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventExec")) @@ -3072,6 +3089,8 @@ func (x *fastReflection_EventExec) Mutable(fd protoreflect.FieldDescriptor) prot panic(fmt.Errorf("field proposal_id of message cosmos.group.v1.EventExec is not mutable")) case "cosmos.group.v1.EventExec.result": panic(fmt.Errorf("field result of message cosmos.group.v1.EventExec is not mutable")) + case "cosmos.group.v1.EventExec.logs": + panic(fmt.Errorf("field logs of message cosmos.group.v1.EventExec is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventExec")) @@ -3089,6 +3108,8 @@ func (x *fastReflection_EventExec) NewField(fd protoreflect.FieldDescriptor) pro return protoreflect.ValueOfUint64(uint64(0)) case "cosmos.group.v1.EventExec.result": return protoreflect.ValueOfEnum(0) + case "cosmos.group.v1.EventExec.logs": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.EventExec")) @@ -3164,6 +3185,10 @@ func (x *fastReflection_EventExec) ProtoMethods() *protoiface.Methods { if x.Result != 0 { n += 1 + runtime.Sov(uint64(x.Result)) } + l = len(x.Logs) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -3193,6 +3218,13 @@ func (x *fastReflection_EventExec) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Logs) > 0 { + i -= len(x.Logs) + copy(dAtA[i:], x.Logs) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Logs))) + i-- + dAtA[i] = 0x1a + } if x.Result != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Result)) i-- @@ -3290,6 +3322,38 @@ func (x *fastReflection_EventExec) ProtoMethods() *protoiface.Methods { break } } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Logs", 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.Logs = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -4077,6 +4141,8 @@ type EventExec struct { ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` // result is the proposal execution result. Result ProposalExecutorResult `protobuf:"varint,2,opt,name=result,proto3,enum=cosmos.group.v1.ProposalExecutorResult" json:"result,omitempty"` + // logs contains error logs in case the execution result is FAILURE. + Logs string `protobuf:"bytes,3,opt,name=logs,proto3" json:"logs,omitempty"` } func (x *EventExec) Reset() { @@ -4113,6 +4179,13 @@ func (x *EventExec) GetResult() ProposalExecutorResult { return ProposalExecutorResult_PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED } +func (x *EventExec) GetLogs() string { + if x != nil { + return x.Logs + } + return "" +} + // EventLeaveGroup is an event emitted when group member leaves the group. type EventLeaveGroup struct { state protoimpl.MessageState @@ -4194,32 +4267,33 @@ var file_cosmos_group_v1_events_proto_rawDesc = []byte{ 0x6c, 0x49, 0x64, 0x22, 0x2c, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, - 0x64, 0x22, 0x6d, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x65, 0x63, 0x12, 0x1f, - 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, - 0x3f, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x22, 0x60, 0x0a, 0x0f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x32, - 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x42, 0xba, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1b, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x22, 0x81, 0x01, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x65, 0x63, 0x12, + 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, + 0x12, 0x3f, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x22, 0x60, 0x0a, 0x0f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x65, + 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0xba, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x42, + 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, + 0x3b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, + 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/group/v1/tx.pulsar.go b/api/cosmos/group/v1/tx.pulsar.go index f309d16cb784..82fc1cc5147e 100644 --- a/api/cosmos/group/v1/tx.pulsar.go +++ b/api/cosmos/group/v1/tx.pulsar.go @@ -12300,12 +12300,14 @@ func (x *fastReflection_MsgExec) ProtoMethods() *protoiface.Methods { } var ( - md_MsgExecResponse protoreflect.MessageDescriptor + md_MsgExecResponse protoreflect.MessageDescriptor + fd_MsgExecResponse_result protoreflect.FieldDescriptor ) func init() { file_cosmos_group_v1_tx_proto_init() md_MsgExecResponse = File_cosmos_group_v1_tx_proto.Messages().ByName("MsgExecResponse") + fd_MsgExecResponse_result = md_MsgExecResponse.Fields().ByName("result") } var _ protoreflect.Message = (*fastReflection_MsgExecResponse)(nil) @@ -12373,6 +12375,12 @@ func (x *fastReflection_MsgExecResponse) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgExecResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Result != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Result)) + if !f(fd_MsgExecResponse_result, value) { + return + } + } } // Has reports whether a field is populated. @@ -12388,6 +12396,8 @@ func (x *fastReflection_MsgExecResponse) Range(f func(protoreflect.FieldDescript // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgExecResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "cosmos.group.v1.MsgExecResponse.result": + return x.Result != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgExecResponse")) @@ -12404,6 +12414,8 @@ func (x *fastReflection_MsgExecResponse) Has(fd protoreflect.FieldDescriptor) bo // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgExecResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "cosmos.group.v1.MsgExecResponse.result": + x.Result = 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgExecResponse")) @@ -12420,6 +12432,9 @@ func (x *fastReflection_MsgExecResponse) Clear(fd protoreflect.FieldDescriptor) // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgExecResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "cosmos.group.v1.MsgExecResponse.result": + value := x.Result + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgExecResponse")) @@ -12440,6 +12455,8 @@ func (x *fastReflection_MsgExecResponse) Get(descriptor protoreflect.FieldDescri // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgExecResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "cosmos.group.v1.MsgExecResponse.result": + x.Result = (ProposalExecutorResult)(value.Enum()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgExecResponse")) @@ -12460,6 +12477,8 @@ func (x *fastReflection_MsgExecResponse) Set(fd protoreflect.FieldDescriptor, va // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgExecResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.group.v1.MsgExecResponse.result": + panic(fmt.Errorf("field result of message cosmos.group.v1.MsgExecResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgExecResponse")) @@ -12473,6 +12492,8 @@ func (x *fastReflection_MsgExecResponse) Mutable(fd protoreflect.FieldDescriptor // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgExecResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.group.v1.MsgExecResponse.result": + return protoreflect.ValueOfEnum(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1.MsgExecResponse")) @@ -12542,6 +12563,9 @@ func (x *fastReflection_MsgExecResponse) ProtoMethods() *protoiface.Methods { var n int var l int _ = l + if x.Result != 0 { + n += 1 + runtime.Sov(uint64(x.Result)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -12571,6 +12595,11 @@ func (x *fastReflection_MsgExecResponse) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Result != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Result)) + i-- + dAtA[i] = 0x10 + } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -12620,6 +12649,25 @@ func (x *fastReflection_MsgExecResponse) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + x.Result = 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.Result |= ProposalExecutorResult(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -14700,6 +14748,9 @@ type MsgExecResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // result is the final result of the proposal execution. + Result ProposalExecutorResult `protobuf:"varint,2,opt,name=result,proto3,enum=cosmos.group.v1.ProposalExecutorResult" json:"result,omitempty"` } func (x *MsgExecResponse) Reset() { @@ -14722,6 +14773,13 @@ func (*MsgExecResponse) Descriptor() ([]byte, []int) { return file_cosmos_group_v1_tx_proto_rawDescGZIP(), []int{25} } +func (x *MsgExecResponse) GetResult() ProposalExecutorResult { + if x != nil { + return x.Result + } + return ProposalExecutorResult_PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED +} + // MsgLeaveGroup is the Msg/LeaveGroup request type. type MsgLeaveGroup struct { state protoimpl.MessageState @@ -14859,7 +14917,7 @@ var file_cosmos_group_v1_tx_proto_rawDesc = []byte{ 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x20, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xe0, 0x01, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x6e, 0x73, 0x65, 0x22, 0xf0, 0x01, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, @@ -14867,10 +14925,11 @@ var file_cosmos_group_v1_tx_proto_rawDesc = []byte{ 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x51, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x61, 0x74, 0x61, 0x12, 0x61, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, - 0x6e, 0x79, 0x42, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x6e, 0x79, 0x42, 0x22, 0xca, 0xb4, 0x2d, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x0e, 0x88, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x52, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, @@ -14892,7 +14951,7 @@ var file_cosmos_group_v1_tx_proto_rawDesc = []byte{ 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, - 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xf4, 0x02, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x43, + 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x84, 0x03, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, 0x69, 0x74, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, @@ -14909,10 +14968,11 @@ var file_cosmos_group_v1_tx_proto_rawDesc = []byte{ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x15, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x61, 0x73, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x41, 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x51, 0x0a, 0x0f, 0x64, + 0x6c, 0x69, 0x63, 0x79, 0x41, 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x61, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x12, 0xca, 0xb4, 0x2d, 0x0e, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x22, 0xca, 0xb4, 0x2d, 0x1e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x0e, 0x88, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x89, @@ -14927,7 +14987,7 @@ var file_cosmos_group_v1_tx_proto_rawDesc = []byte{ 0x69, 0x63, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x23, 0x0a, 0x21, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x83, 0x02, 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, + 0x93, 0x02, 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, @@ -14937,10 +14997,11 @@ var file_cosmos_group_v1_tx_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x51, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, + 0x73, 0x73, 0x12, 0x61, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x42, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, + 0x79, 0x42, 0x22, 0xca, 0xb4, 0x2d, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x0e, 0x88, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x2c, 0x0a, 0x2a, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, @@ -15013,124 +15074,128 @@ var file_cosmos_group_v1_tx_proto_rawDesc = []byte{ 0x75, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x0b, - 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x11, 0x0a, 0x0f, 0x4d, - 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6c, - 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, - 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x3a, 0x0c, - 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x17, 0x0a, 0x15, - 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x2a, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x14, 0x0a, - 0x10, 0x45, 0x58, 0x45, 0x43, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x45, 0x43, 0x5f, 0x54, 0x52, 0x59, 0x10, - 0x01, 0x32, 0xc3, 0x0b, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x57, 0x0a, 0x0b, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x52, 0x0a, 0x0f, 0x4d, + 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, + 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, + 0x6c, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x3a, + 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x17, 0x0a, + 0x15, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x2a, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x14, + 0x0a, 0x10, 0x45, 0x58, 0x45, 0x43, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x45, 0x43, 0x5f, 0x54, 0x52, 0x59, + 0x10, 0x01, 0x32, 0xc3, 0x0b, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x57, 0x0a, 0x0b, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, - 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x66, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, - 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x11, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x25, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x57, 0x69, 0x74, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x29, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, 0x69, - 0x74, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, 0x69, 0x74, 0x68, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x78, 0x0a, 0x16, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x41, 0x64, 0x6d, 0x69, - 0x6e, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x63, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x66, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x13, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x3b, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x11, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, + 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x57, 0x69, 0x74, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x19, + 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, + 0x69, 0x74, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, 0x69, 0x74, 0x68, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x78, 0x0a, 0x16, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x63, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, + 0x3b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, + 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x35, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x35, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x60, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, - 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x66, 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x56, 0x6f, 0x74, - 0x65, 0x12, 0x18, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x20, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, - 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x18, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, - 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x54, 0x0a, 0x0a, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, - 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, - 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xb6, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x42, - 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0f, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, - 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x60, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x66, 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x2c, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x56, 0x6f, + 0x74, 0x65, 0x12, 0x18, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x20, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, + 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x18, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, + 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0a, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xb6, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, + 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0f, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -15180,6 +15245,7 @@ var file_cosmos_group_v1_tx_proto_goTypes = []interface{}{ (*Member)(nil), // 29: cosmos.group.v1.Member (*anypb.Any)(nil), // 30: google.protobuf.Any (VoteOption)(0), // 31: cosmos.group.v1.VoteOption + (ProposalExecutorResult)(0), // 32: cosmos.group.v1.ProposalExecutorResult } var file_cosmos_group_v1_tx_proto_depIdxs = []int32{ 29, // 0: cosmos.group.v1.MsgCreateGroup.members:type_name -> cosmos.group.v1.Member @@ -15192,39 +15258,40 @@ var file_cosmos_group_v1_tx_proto_depIdxs = []int32{ 0, // 7: cosmos.group.v1.MsgSubmitProposal.exec:type_name -> cosmos.group.v1.Exec 31, // 8: cosmos.group.v1.MsgVote.option:type_name -> cosmos.group.v1.VoteOption 0, // 9: cosmos.group.v1.MsgVote.exec:type_name -> cosmos.group.v1.Exec - 1, // 10: cosmos.group.v1.Msg.CreateGroup:input_type -> cosmos.group.v1.MsgCreateGroup - 3, // 11: cosmos.group.v1.Msg.UpdateGroupMembers:input_type -> cosmos.group.v1.MsgUpdateGroupMembers - 5, // 12: cosmos.group.v1.Msg.UpdateGroupAdmin:input_type -> cosmos.group.v1.MsgUpdateGroupAdmin - 7, // 13: cosmos.group.v1.Msg.UpdateGroupMetadata:input_type -> cosmos.group.v1.MsgUpdateGroupMetadata - 9, // 14: cosmos.group.v1.Msg.CreateGroupPolicy:input_type -> cosmos.group.v1.MsgCreateGroupPolicy - 12, // 15: cosmos.group.v1.Msg.CreateGroupWithPolicy:input_type -> cosmos.group.v1.MsgCreateGroupWithPolicy - 11, // 16: cosmos.group.v1.Msg.UpdateGroupPolicyAdmin:input_type -> cosmos.group.v1.MsgUpdateGroupPolicyAdmin - 15, // 17: cosmos.group.v1.Msg.UpdateGroupPolicyDecisionPolicy:input_type -> cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy - 17, // 18: cosmos.group.v1.Msg.UpdateGroupPolicyMetadata:input_type -> cosmos.group.v1.MsgUpdateGroupPolicyMetadata - 19, // 19: cosmos.group.v1.Msg.SubmitProposal:input_type -> cosmos.group.v1.MsgSubmitProposal - 21, // 20: cosmos.group.v1.Msg.WithdrawProposal:input_type -> cosmos.group.v1.MsgWithdrawProposal - 23, // 21: cosmos.group.v1.Msg.Vote:input_type -> cosmos.group.v1.MsgVote - 25, // 22: cosmos.group.v1.Msg.Exec:input_type -> cosmos.group.v1.MsgExec - 27, // 23: cosmos.group.v1.Msg.LeaveGroup:input_type -> cosmos.group.v1.MsgLeaveGroup - 2, // 24: cosmos.group.v1.Msg.CreateGroup:output_type -> cosmos.group.v1.MsgCreateGroupResponse - 4, // 25: cosmos.group.v1.Msg.UpdateGroupMembers:output_type -> cosmos.group.v1.MsgUpdateGroupMembersResponse - 6, // 26: cosmos.group.v1.Msg.UpdateGroupAdmin:output_type -> cosmos.group.v1.MsgUpdateGroupAdminResponse - 8, // 27: cosmos.group.v1.Msg.UpdateGroupMetadata:output_type -> cosmos.group.v1.MsgUpdateGroupMetadataResponse - 10, // 28: cosmos.group.v1.Msg.CreateGroupPolicy:output_type -> cosmos.group.v1.MsgCreateGroupPolicyResponse - 13, // 29: cosmos.group.v1.Msg.CreateGroupWithPolicy:output_type -> cosmos.group.v1.MsgCreateGroupWithPolicyResponse - 14, // 30: cosmos.group.v1.Msg.UpdateGroupPolicyAdmin:output_type -> cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse - 16, // 31: cosmos.group.v1.Msg.UpdateGroupPolicyDecisionPolicy:output_type -> cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse - 18, // 32: cosmos.group.v1.Msg.UpdateGroupPolicyMetadata:output_type -> cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse - 20, // 33: cosmos.group.v1.Msg.SubmitProposal:output_type -> cosmos.group.v1.MsgSubmitProposalResponse - 22, // 34: cosmos.group.v1.Msg.WithdrawProposal:output_type -> cosmos.group.v1.MsgWithdrawProposalResponse - 24, // 35: cosmos.group.v1.Msg.Vote:output_type -> cosmos.group.v1.MsgVoteResponse - 26, // 36: cosmos.group.v1.Msg.Exec:output_type -> cosmos.group.v1.MsgExecResponse - 28, // 37: cosmos.group.v1.Msg.LeaveGroup:output_type -> cosmos.group.v1.MsgLeaveGroupResponse - 24, // [24:38] is the sub-list for method output_type - 10, // [10:24] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 32, // 10: cosmos.group.v1.MsgExecResponse.result:type_name -> cosmos.group.v1.ProposalExecutorResult + 1, // 11: cosmos.group.v1.Msg.CreateGroup:input_type -> cosmos.group.v1.MsgCreateGroup + 3, // 12: cosmos.group.v1.Msg.UpdateGroupMembers:input_type -> cosmos.group.v1.MsgUpdateGroupMembers + 5, // 13: cosmos.group.v1.Msg.UpdateGroupAdmin:input_type -> cosmos.group.v1.MsgUpdateGroupAdmin + 7, // 14: cosmos.group.v1.Msg.UpdateGroupMetadata:input_type -> cosmos.group.v1.MsgUpdateGroupMetadata + 9, // 15: cosmos.group.v1.Msg.CreateGroupPolicy:input_type -> cosmos.group.v1.MsgCreateGroupPolicy + 12, // 16: cosmos.group.v1.Msg.CreateGroupWithPolicy:input_type -> cosmos.group.v1.MsgCreateGroupWithPolicy + 11, // 17: cosmos.group.v1.Msg.UpdateGroupPolicyAdmin:input_type -> cosmos.group.v1.MsgUpdateGroupPolicyAdmin + 15, // 18: cosmos.group.v1.Msg.UpdateGroupPolicyDecisionPolicy:input_type -> cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy + 17, // 19: cosmos.group.v1.Msg.UpdateGroupPolicyMetadata:input_type -> cosmos.group.v1.MsgUpdateGroupPolicyMetadata + 19, // 20: cosmos.group.v1.Msg.SubmitProposal:input_type -> cosmos.group.v1.MsgSubmitProposal + 21, // 21: cosmos.group.v1.Msg.WithdrawProposal:input_type -> cosmos.group.v1.MsgWithdrawProposal + 23, // 22: cosmos.group.v1.Msg.Vote:input_type -> cosmos.group.v1.MsgVote + 25, // 23: cosmos.group.v1.Msg.Exec:input_type -> cosmos.group.v1.MsgExec + 27, // 24: cosmos.group.v1.Msg.LeaveGroup:input_type -> cosmos.group.v1.MsgLeaveGroup + 2, // 25: cosmos.group.v1.Msg.CreateGroup:output_type -> cosmos.group.v1.MsgCreateGroupResponse + 4, // 26: cosmos.group.v1.Msg.UpdateGroupMembers:output_type -> cosmos.group.v1.MsgUpdateGroupMembersResponse + 6, // 27: cosmos.group.v1.Msg.UpdateGroupAdmin:output_type -> cosmos.group.v1.MsgUpdateGroupAdminResponse + 8, // 28: cosmos.group.v1.Msg.UpdateGroupMetadata:output_type -> cosmos.group.v1.MsgUpdateGroupMetadataResponse + 10, // 29: cosmos.group.v1.Msg.CreateGroupPolicy:output_type -> cosmos.group.v1.MsgCreateGroupPolicyResponse + 13, // 30: cosmos.group.v1.Msg.CreateGroupWithPolicy:output_type -> cosmos.group.v1.MsgCreateGroupWithPolicyResponse + 14, // 31: cosmos.group.v1.Msg.UpdateGroupPolicyAdmin:output_type -> cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse + 16, // 32: cosmos.group.v1.Msg.UpdateGroupPolicyDecisionPolicy:output_type -> cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse + 18, // 33: cosmos.group.v1.Msg.UpdateGroupPolicyMetadata:output_type -> cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse + 20, // 34: cosmos.group.v1.Msg.SubmitProposal:output_type -> cosmos.group.v1.MsgSubmitProposalResponse + 22, // 35: cosmos.group.v1.Msg.WithdrawProposal:output_type -> cosmos.group.v1.MsgWithdrawProposalResponse + 24, // 36: cosmos.group.v1.Msg.Vote:output_type -> cosmos.group.v1.MsgVoteResponse + 26, // 37: cosmos.group.v1.Msg.Exec:output_type -> cosmos.group.v1.MsgExecResponse + 28, // 38: cosmos.group.v1.Msg.LeaveGroup:output_type -> cosmos.group.v1.MsgLeaveGroupResponse + 25, // [25:39] is the sub-list for method output_type + 11, // [11:25] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_cosmos_group_v1_tx_proto_init() } diff --git a/api/cosmos/group/v1/tx_grpc.pb.go b/api/cosmos/group/v1/tx_grpc.pb.go index a53f8a42c695..7c65460019ce 100644 --- a/api/cosmos/group/v1/tx_grpc.pb.go +++ b/api/cosmos/group/v1/tx_grpc.pb.go @@ -42,7 +42,7 @@ type MsgClient interface { UpdateGroupPolicyMetadata(ctx context.Context, in *MsgUpdateGroupPolicyMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyMetadataResponse, error) // SubmitProposal submits a new proposal. SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error) - // WithdrawProposal aborts a proposal. + // WithdrawProposal withdraws a proposal. WithdrawProposal(ctx context.Context, in *MsgWithdrawProposal, opts ...grpc.CallOption) (*MsgWithdrawProposalResponse, error) // Vote allows a voter to vote on a proposal. Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) @@ -210,7 +210,7 @@ type MsgServer interface { UpdateGroupPolicyMetadata(context.Context, *MsgUpdateGroupPolicyMetadata) (*MsgUpdateGroupPolicyMetadataResponse, error) // SubmitProposal submits a new proposal. SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error) - // WithdrawProposal aborts a proposal. + // WithdrawProposal withdraws a proposal. WithdrawProposal(context.Context, *MsgWithdrawProposal) (*MsgWithdrawProposalResponse, error) // Vote allows a voter to vote on a proposal. Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) diff --git a/api/cosmos/group/v1/types.pulsar.go b/api/cosmos/group/v1/types.pulsar.go index 2a5b9980d55a..a9977a5280ac 100644 --- a/api/cosmos/group/v1/types.pulsar.go +++ b/api/cosmos/group/v1/types.pulsar.go @@ -7881,7 +7881,7 @@ type Proposal struct { // at this point, and the `final_tally_result`and `status` fields will be // accordingly updated. VotingPeriodEnd *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=voting_period_end,json=votingPeriodEnd,proto3" json:"voting_period_end,omitempty"` - // executor_result is the final result based on the votes and election rule. Initial value is NotRun. + // executor_result is the final result of the proposal execution. Initial value is NotRun. ExecutorResult ProposalExecutorResult `protobuf:"varint,11,opt,name=executor_result,json=executorResult,proto3,enum=cosmos.group.v1.ProposalExecutorResult" json:"executor_result,omitempty"` // messages is a list of `sdk.Msg`s that will be executed if the proposal passes. Messages []*anypb.Any `protobuf:"bytes,12,rep,name=messages,proto3" json:"messages,omitempty"` @@ -8208,7 +8208,7 @@ var file_cosmos_group_v1_types_proto_rawDesc = []byte{ 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xe8, 0x02, 0x0a, 0x0f, 0x47, 0x72, 0x6f, + 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xf8, 0x02, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, @@ -8221,10 +8221,11 @@ var file_cosmos_group_v1_types_proto_rawDesc = []byte{ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x51, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, + 0x6e, 0x12, 0x61, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, - 0x42, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, + 0x42, 0x22, 0xca, 0xb4, 0x2d, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x43, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, diff --git a/proto/cosmos/group/v1/events.proto b/proto/cosmos/group/v1/events.proto index e8b457c89a9d..c2cfe8728f72 100644 --- a/proto/cosmos/group/v1/events.proto +++ b/proto/cosmos/group/v1/events.proto @@ -65,6 +65,9 @@ message EventExec { // result is the proposal execution result. ProposalExecutorResult result = 2; + + // logs contains error logs in case the execution result is FAILURE. + string logs = 3; } // EventLeaveGroup is an event emitted when group member leaves the group. diff --git a/proto/cosmos/group/v1/tx.proto b/proto/cosmos/group/v1/tx.proto index 4a3deae50202..b0359650121f 100644 --- a/proto/cosmos/group/v1/tx.proto +++ b/proto/cosmos/group/v1/tx.proto @@ -46,7 +46,7 @@ service Msg { // SubmitProposal submits a new proposal. rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse); - // WithdrawProposal aborts a proposal. + // WithdrawProposal withdraws a proposal. rpc WithdrawProposal(MsgWithdrawProposal) returns (MsgWithdrawProposalResponse); // Vote allows a voter to vote on a proposal. @@ -156,7 +156,7 @@ message MsgCreateGroupPolicy { string metadata = 3; // decision_policy specifies the group policy's decision policy. - google.protobuf.Any decision_policy = 4 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; + google.protobuf.Any decision_policy = 4 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"]; } // MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. @@ -202,7 +202,7 @@ message MsgCreateGroupWithPolicy { bool group_policy_as_admin = 5; // decision_policy specifies the group policy's decision policy. - google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; + google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"]; } // MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. @@ -231,7 +231,7 @@ message MsgUpdateGroupPolicyDecisionPolicy { string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // decision_policy is the updated group policy's decision policy. - google.protobuf.Any decision_policy = 3 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; + google.protobuf.Any decision_policy = 3 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"]; } // MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. @@ -353,7 +353,10 @@ message MsgExec { } // MsgExecResponse is the Msg/Exec request type. -message MsgExecResponse {} +message MsgExecResponse { + // result is the final result of the proposal execution. + ProposalExecutorResult result = 2; +} // MsgLeaveGroup is the Msg/LeaveGroup request type. message MsgLeaveGroup { diff --git a/proto/cosmos/group/v1/types.proto b/proto/cosmos/group/v1/types.proto index ec6cd744d8c9..5294f6b1a4b9 100644 --- a/proto/cosmos/group/v1/types.proto +++ b/proto/cosmos/group/v1/types.proto @@ -167,7 +167,7 @@ message GroupPolicyInfo { uint64 version = 5; // decision_policy specifies the group policy's decision policy. - google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; + google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"]; // created_at is a timestamp specifying when a group policy was created. google.protobuf.Timestamp created_at = 7 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; @@ -221,7 +221,7 @@ message Proposal { // accordingly updated. google.protobuf.Timestamp voting_period_end = 10 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - // executor_result is the final result based on the votes and election rule. Initial value is NotRun. + // executor_result is the final result of the proposal execution. Initial value is NotRun. ProposalExecutorResult executor_result = 11; // messages is a list of `sdk.Msg`s that will be executed if the proposal passes. diff --git a/x/group/client/cli/tx.go b/x/group/client/cli/tx.go index b4409aeb435b..08e89e6e6852 100644 --- a/x/group/client/cli/tx.go +++ b/x/group/client/cli/tx.go @@ -494,7 +494,7 @@ func MsgUpdateGroupPolicyDecisionPolicyCmd() *cobra.Command { return err } - msg, err := group.NewMsgUpdateGroupPolicyDecisionPolicyRequest( + msg, err := group.NewMsgUpdateGroupPolicyDecisionPolicy( clientCtx.GetFromAddress(), accountAddress, policy, @@ -603,7 +603,7 @@ Example: execStr, _ := cmd.Flags().GetString(FlagExec) - msg, err := group.NewMsgSubmitProposalRequest( + msg, err := group.NewMsgSubmitProposal( prop.GroupPolicyAddress, prop.Proposers, msgs, diff --git a/x/group/client/testutil/query.go b/x/group/client/testutil/query.go index 43ef6c585074..5ca1c06e6932 100644 --- a/x/group/client/testutil/query.go +++ b/x/group/client/testutil/query.go @@ -327,7 +327,11 @@ func (s *IntegrationTestSuite) TestQueryGroupPolicyInfo() { s.Require().Equal(s.groupPolicies[0].Admin, g.Admin) s.Require().Equal(s.groupPolicies[0].Metadata, g.Metadata) s.Require().Equal(s.groupPolicies[0].Version, g.Version) - s.Require().Equal(s.groupPolicies[0].GetDecisionPolicy(), g.GetDecisionPolicy()) + dp1, err := s.groupPolicies[0].GetDecisionPolicy() + s.Require().NoError(err) + dp2, err := g.GetDecisionPolicy() + s.Require().NoError(err) + s.Require().Equal(dp1, dp2) } }) } @@ -398,7 +402,11 @@ func (s *IntegrationTestSuite) TestQueryGroupPoliciesByGroup() { s.Require().Equal(res.GroupPolicies[i].Metadata, tc.expectGroupPolicies[i].Metadata) s.Require().Equal(res.GroupPolicies[i].Version, tc.expectGroupPolicies[i].Version) s.Require().Equal(res.GroupPolicies[i].Admin, tc.expectGroupPolicies[i].Admin) - s.Require().Equal(res.GroupPolicies[i].GetDecisionPolicy(), tc.expectGroupPolicies[i].GetDecisionPolicy()) + dp1, err := s.groupPolicies[i].GetDecisionPolicy() + s.Require().NoError(err) + dp2, err := tc.expectGroupPolicies[i].GetDecisionPolicy() + s.Require().NoError(err) + s.Require().Equal(dp1, dp2) } } }) @@ -470,7 +478,11 @@ func (s *IntegrationTestSuite) TestQueryGroupPoliciesByAdmin() { s.Require().Equal(res.GroupPolicies[i].Metadata, tc.expectGroupPolicies[i].Metadata) s.Require().Equal(res.GroupPolicies[i].Version, tc.expectGroupPolicies[i].Version) s.Require().Equal(res.GroupPolicies[i].Admin, tc.expectGroupPolicies[i].Admin) - s.Require().Equal(res.GroupPolicies[i].GetDecisionPolicy(), tc.expectGroupPolicies[i].GetDecisionPolicy()) + dp1, err := s.groupPolicies[i].GetDecisionPolicy() + s.Require().NoError(err) + dp2, err := tc.expectGroupPolicies[i].GetDecisionPolicy() + s.Require().NoError(err) + s.Require().Equal(dp1, dp2) } } }) diff --git a/x/group/client/testutil/tx.go b/x/group/client/testutil/tx.go index ea5638dcfada..a32c6b4206be 100644 --- a/x/group/client/testutil/tx.go +++ b/x/group/client/testutil/tx.go @@ -1582,7 +1582,7 @@ func (s *IntegrationTestSuite) TestTxSubmitProposal() { commonFlags..., ), true, - "msg does not have group policy authorization: unauthorized", + "msg does not have group policy authorization", nil, 0, }, diff --git a/x/group/events.pb.go b/x/group/events.pb.go index 0d13f3470779..3cbcb2d491d6 100644 --- a/x/group/events.pb.go +++ b/x/group/events.pb.go @@ -351,6 +351,8 @@ type EventExec struct { ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` // result is the proposal execution result. Result ProposalExecutorResult `protobuf:"varint,2,opt,name=result,proto3,enum=cosmos.group.v1.ProposalExecutorResult" json:"result,omitempty"` + // logs contains error logs in case the execution result is FAILURE. + Logs string `protobuf:"bytes,3,opt,name=logs,proto3" json:"logs,omitempty"` } func (m *EventExec) Reset() { *m = EventExec{} } @@ -400,6 +402,13 @@ func (m *EventExec) GetResult() ProposalExecutorResult { return PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED } +func (m *EventExec) GetLogs() string { + if m != nil { + return m.Logs + } + return "" +} + // EventLeaveGroup is an event emitted when group member leaves the group. type EventLeaveGroup struct { // group_id is the unique ID of the group. @@ -470,7 +479,7 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1/events.proto", fileDescriptor_e8d753981546f032) } var fileDescriptor_e8d753981546f032 = []byte{ - // 366 bytes of a gzipped FileDescriptorProto + // 382 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x2f, 0xca, 0x2f, 0x2d, 0xd0, 0x2f, 0x33, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x87, 0xc8, 0xea, 0x81, 0x65, 0xf5, @@ -485,15 +494,16 @@ var fileDescriptor_e8d753981546f032 = []byte{ 0x94, 0x9b, 0x59, 0x12, 0x50, 0x94, 0x5f, 0x90, 0x5f, 0x9c, 0x98, 0x23, 0x24, 0xcf, 0xc5, 0x5d, 0x00, 0x65, 0x23, 0x3c, 0xc4, 0x05, 0x13, 0xf2, 0x4c, 0x51, 0xb2, 0xe0, 0x12, 0x05, 0xeb, 0x0b, 0xcf, 0x2c, 0xc9, 0x48, 0x29, 0x4a, 0x2c, 0x27, 0x5e, 0xa7, 0x0e, 0x17, 0x27, 0x58, 0x67, 0x58, - 0x7e, 0x49, 0x2a, 0x61, 0xd5, 0xb9, 0x50, 0xd5, 0xae, 0x15, 0xa9, 0xc9, 0x04, 0x55, 0x0b, 0xd9, - 0x73, 0xb1, 0x15, 0xa5, 0x16, 0x97, 0xe6, 0x94, 0x48, 0x30, 0x29, 0x30, 0x6a, 0xf0, 0x19, 0xa9, - 0xeb, 0xa1, 0xa5, 0x10, 0x3d, 0x98, 0x3b, 0x41, 0xe6, 0x95, 0x96, 0xe4, 0x17, 0x05, 0x81, 0x95, - 0x07, 0x41, 0xb5, 0x29, 0x25, 0x70, 0xf1, 0x83, 0xad, 0xf3, 0x49, 0x4d, 0x2c, 0x23, 0x18, 0xb1, - 0xc8, 0x01, 0xce, 0x44, 0x64, 0x80, 0x3b, 0xd9, 0x9d, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, - 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, - 0x1c, 0x43, 0x94, 0x4a, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0x2e, 0x34, 0xe9, - 0x42, 0x29, 0xdd, 0xe2, 0x94, 0x6c, 0xfd, 0x0a, 0x48, 0xca, 0x4d, 0x62, 0x03, 0xa7, 0x58, 0x63, - 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe6, 0x94, 0x89, 0xaf, 0x1a, 0x03, 0x00, 0x00, + 0x7e, 0x49, 0x2a, 0x61, 0xd5, 0x8d, 0x8c, 0x50, 0xe5, 0xae, 0x15, 0xa9, 0xc9, 0x04, 0x95, 0x0b, + 0xd9, 0x73, 0xb1, 0x15, 0xa5, 0x16, 0x97, 0xe6, 0x94, 0x48, 0x30, 0x29, 0x30, 0x6a, 0xf0, 0x19, + 0xa9, 0xeb, 0xa1, 0x25, 0x11, 0x3d, 0x98, 0x43, 0x41, 0xe6, 0x95, 0x96, 0xe4, 0x17, 0x05, 0x81, + 0x95, 0x07, 0x41, 0xb5, 0x09, 0x09, 0x71, 0xb1, 0xe4, 0xe4, 0xa7, 0x17, 0x4b, 0x30, 0x83, 0x02, + 0x30, 0x08, 0xcc, 0x56, 0x4a, 0xe0, 0xe2, 0x07, 0x3b, 0xc1, 0x27, 0x35, 0xb1, 0x8c, 0x60, 0x6c, + 0x23, 0xc7, 0x02, 0x13, 0x91, 0xb1, 0xe0, 0x64, 0x77, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, + 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, + 0x72, 0x0c, 0x51, 0x2a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xd0, 0xf4, + 0x0c, 0xa5, 0x74, 0x8b, 0x53, 0xb2, 0xf5, 0x2b, 0x20, 0xc9, 0x39, 0x89, 0x0d, 0x9c, 0x8c, 0x8d, + 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5b, 0xc0, 0x98, 0xf8, 0x2f, 0x03, 0x00, 0x00, } func (m *EventCreateGroup) Marshal() (dAtA []byte, err error) { @@ -716,6 +726,13 @@ func (m *EventExec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Logs) > 0 { + i -= len(m.Logs) + copy(dAtA[i:], m.Logs) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Logs))) + i-- + dAtA[i] = 0x1a + } if m.Result != 0 { i = encodeVarintEvents(dAtA, i, uint64(m.Result)) i-- @@ -873,6 +890,10 @@ func (m *EventExec) Size() (n int) { if m.Result != 0 { n += 1 + sovEvents(uint64(m.Result)) } + l = len(m.Logs) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } return n } @@ -1474,6 +1495,38 @@ func (m *EventExec) Unmarshal(dAtA []byte) error { break } } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Logs = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) diff --git a/x/group/internal/math/dec_test.go b/x/group/internal/math/dec_test.go index 73807f767104..6bf0edb5afe0 100644 --- a/x/group/internal/math/dec_test.go +++ b/x/group/internal/math/dec_test.go @@ -75,6 +75,9 @@ func TestDec(t *testing.T) { require.NoError(t, err) require.True(t, res.IsEqual(minusFivePointZero)) + _, err = four.Quo(zero) + require.Error(t, err) + res, err = four.Quo(two) require.NoError(t, err) require.True(t, res.IsEqual(two)) diff --git a/x/group/keeper/genesis_test.go b/x/group/keeper/genesis_test.go index 27b0582e3ced..af0e8497723a 100644 --- a/x/group/keeper/genesis_test.go +++ b/x/group/keeper/genesis_test.go @@ -202,7 +202,11 @@ func (s *GenesisTestSuite) assertGroupPoliciesEqual(g *group.GroupPolicyInfo, ot require.Equal(g.Admin, other.Admin) require.Equal(g.Metadata, other.Metadata) require.Equal(g.Version, other.Version) - require.Equal(g.GetDecisionPolicy(), other.GetDecisionPolicy()) + dp1, err := g.GetDecisionPolicy() + require.NoError(err) + dp2, err := other.GetDecisionPolicy() + require.NoError(err) + require.Equal(dp1, dp2) } func (s *GenesisTestSuite) assertProposalsEqual(g *group.Proposal, other *group.Proposal) { @@ -218,5 +222,9 @@ func (s *GenesisTestSuite) assertProposalsEqual(g *group.Proposal, other *group. require.Equal(g.FinalTallyResult, other.FinalTallyResult) require.Equal(g.VotingPeriodEnd, other.VotingPeriodEnd) require.Equal(g.ExecutorResult, other.ExecutorResult) - require.Equal(g.GetMsgs(), other.GetMsgs()) + msgs1, err := g.GetMsgs() + require.NoError(err) + msgs2, err := other.GetMsgs() + require.NoError(err) + require.Equal(msgs1, msgs2) } diff --git a/x/group/keeper/invariants.go b/x/group/keeper/invariants.go index 5db8057e5aea..78572afa1912 100644 --- a/x/group/keeper/invariants.go +++ b/x/group/keeper/invariants.go @@ -73,7 +73,7 @@ func GroupTotalWeightInvariantHelper(ctx sdk.Context, key storetypes.StoreKey, g return msg, broken } - curMemWeight, err := groupmath.NewNonNegativeDecFromString(groupMember.GetMember().GetWeight()) + curMemWeight, err := groupmath.NewPositiveDecFromString(groupMember.GetMember().GetWeight()) if err != nil { msg += fmt.Sprintf("error while parsing non-nengative decimal for group member %s\n%v\n", groupMember.Member.Address, err) return msg, broken @@ -85,7 +85,7 @@ func GroupTotalWeightInvariantHelper(ctx sdk.Context, key storetypes.StoreKey, g } } - groupWeight, err := groupmath.NewNonNegativeDecFromString(groupInfo.GetTotalWeight()) + groupWeight, err := groupmath.NewPositiveDecFromString(groupInfo.GetTotalWeight()) if err != nil { msg += fmt.Sprintf("error while parsing non-nengative decimal for group with ID %d\n%v\n", groupInfo.Id, err) return msg, broken diff --git a/x/group/keeper/keeper.go b/x/group/keeper/keeper.go index b4db47de0901..55cdd9de64bb 100644 --- a/x/group/keeper/keeper.go +++ b/x/group/keeper/keeper.go @@ -235,7 +235,7 @@ func (k Keeper) iterateProposalsByVPEnd(ctx sdk.Context, endTime time.Time, cb f defer it.Close() for { - // Important: this following line cannot outside the for loop. + // Important: this following line cannot be outside of the for loop. // It seems that when one unmarshals into the same `group.Proposal` // reference, then gogoproto somehow "adds" the new bytes to the old // object for some fields. When running simulations, for proposals with @@ -278,8 +278,9 @@ func (k Keeper) pruneProposal(ctx sdk.Context, proposalID uint64) error { return nil } -// updateProposalStatus iterates through all proposals by group policy index and updates proposal status -func (k Keeper) updateProposalStatus(ctx sdk.Context, groupPolicyAddr sdk.AccAddress) error { +// abortProposals iterates through all proposals by group policy index +// and marks submitted proposals as aborted. +func (k Keeper) abortProposals(ctx sdk.Context, groupPolicyAddr sdk.AccAddress) error { proposalIt, err := k.proposalByGroupPolicyIndex.Get(ctx.KVStore(k.key), groupPolicyAddr.Bytes()) if err != nil { return err @@ -295,10 +296,14 @@ func (k Keeper) updateProposalStatus(ctx sdk.Context, groupPolicyAddr sdk.AccAdd if err != nil { return err } - proposalInfo.Status = group.PROPOSAL_STATUS_ABORTED - if err := k.proposalTable.Update(ctx.KVStore(k.key), proposalInfo.Id, &proposalInfo); err != nil { - return err + // Mark all proposals still in the voting phase as aborted. + if proposalInfo.Status == group.PROPOSAL_STATUS_SUBMITTED { + proposalInfo.Status = group.PROPOSAL_STATUS_ABORTED + + if err := k.proposalTable.Update(ctx.KVStore(k.key), proposalInfo.Id, &proposalInfo); err != nil { + return err + } } } return nil @@ -374,7 +379,6 @@ func (k Keeper) TallyProposalsAtVPEnd(ctx sdk.Context) error { if err := k.pruneVotes(ctx, proposalId); err != nil { return true, err } - } else { err = k.doTallyAndUpdate(ctx, &proposal, electorate, policyInfo) if err != nil { diff --git a/x/group/keeper/keeper_test.go b/x/group/keeper/keeper_test.go index c290b3b692c7..59cb7e4c2f16 100644 --- a/x/group/keeper/keeper_test.go +++ b/x/group/keeper/keeper_test.go @@ -850,7 +850,9 @@ func (s *TestSuite) TestCreateGroupWithPolicy() { s.Assert().Equal(groupPolicyAddr, groupPolicy.Address) s.Assert().Equal(id, groupPolicy.GroupId) s.Assert().Equal(spec.req.GroupPolicyMetadata, groupPolicy.Metadata) - s.Assert().Equal(spec.policy.(*group.ThresholdDecisionPolicy), groupPolicy.GetDecisionPolicy()) + dp, err := groupPolicy.GetDecisionPolicy() + s.Assert().NoError(err) + s.Assert().Equal(spec.policy.(*group.ThresholdDecisionPolicy), dp) if spec.req.GroupPolicyAsAdmin { s.Assert().NotEqual(spec.req.Admin, groupPolicy.Admin) s.Assert().Equal(groupPolicyAddr, groupPolicy.Admin) @@ -1007,9 +1009,13 @@ func (s *TestSuite) TestCreateGroupPolicy() { s.Assert().Equal(uint64(1), groupPolicy.Version) percentageDecisionPolicy, ok := spec.policy.(*group.PercentageDecisionPolicy) if ok { - s.Assert().Equal(percentageDecisionPolicy, groupPolicy.GetDecisionPolicy()) + dp, err := groupPolicy.GetDecisionPolicy() + s.Assert().NoError(err) + s.Assert().Equal(percentageDecisionPolicy, dp) } else { - s.Assert().Equal(spec.policy.(*group.ThresholdDecisionPolicy), groupPolicy.GetDecisionPolicy()) + dp, err := groupPolicy.GetDecisionPolicy() + s.Assert().NoError(err) + s.Assert().Equal(spec.policy.(*group.ThresholdDecisionPolicy), dp) } }) } @@ -1370,7 +1376,11 @@ func (s *TestSuite) TestGroupPoliciesByAdminOrGroup() { s.Assert().Equal(policyAccs[i].Metadata, expectAccs[i].Metadata) s.Assert().Equal(policyAccs[i].Version, expectAccs[i].Version) s.Assert().Equal(policyAccs[i].CreatedAt, expectAccs[i].CreatedAt) - s.Assert().Equal(policyAccs[i].GetDecisionPolicy(), expectAccs[i].GetDecisionPolicy()) + dp1, err := policyAccs[i].GetDecisionPolicy() + s.Assert().NoError(err) + dp2, err := expectAccs[i].GetDecisionPolicy() + s.Assert().NoError(err) + s.Assert().Equal(dp1, dp2) } // query group policy by admin @@ -1389,7 +1399,11 @@ func (s *TestSuite) TestGroupPoliciesByAdminOrGroup() { s.Assert().Equal(policyAccs[i].Metadata, expectAccs[i].Metadata) s.Assert().Equal(policyAccs[i].Version, expectAccs[i].Version) s.Assert().Equal(policyAccs[i].CreatedAt, expectAccs[i].CreatedAt) - s.Assert().Equal(policyAccs[i].GetDecisionPolicy(), expectAccs[i].GetDecisionPolicy()) + dp1, err := policyAccs[i].GetDecisionPolicy() + s.Assert().NoError(err) + dp2, err := expectAccs[i].GetDecisionPolicy() + s.Assert().NoError(err) + s.Assert().Equal(dp1, dp2) } } @@ -1611,10 +1625,12 @@ func (s *TestSuite) TestSubmitProposal() { s.Assert().Equal(spec.expProposal.ExecutorResult, proposal.ExecutorResult) s.Assert().Equal(s.blockTime.Add(time.Second), proposal.VotingPeriodEnd) + msgs, err := proposal.GetMsgs() + s.Assert().NoError(err) if spec.msgs == nil { // then empty list is ok - s.Assert().Len(proposal.GetMsgs(), 0) + s.Assert().Len(msgs, 0) } else { - s.Assert().Equal(spec.msgs, proposal.GetMsgs()) + s.Assert().Equal(spec.msgs, msgs) } } @@ -1627,7 +1643,6 @@ func (s *TestSuite) TestWithdrawProposal() { addrs := s.addrs addr2 := addrs[1] addr5 := addrs[4] - groupPolicy := s.groupPolicyAddr msgSend := &banktypes.MsgSend{ FromAddress: s.groupPolicyAddr.String(), @@ -1684,7 +1699,7 @@ func (s *TestSuite) TestWithdrawProposal() { return submitProposal(s.ctx, s, []sdk.Msg{msgSend}, proposers) }, proposalId: proposalID, - admin: groupPolicy.String(), + admin: proposers[0], }, } for msg, spec := range specs { @@ -2431,7 +2446,7 @@ func (s *TestSuite) TestExecPrunedProposalsAndVotes() { return myProposalID }, expErr: true, // since proposal status will be `aborted` when group policy is modified - expErrMsg: "not possible with proposal status", + expErrMsg: "not possible to exec with proposal status", expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN, }, "proposal exists when rollback all msg updates on failure": { @@ -2504,7 +2519,6 @@ func (s *TestSuite) TestExecPrunedProposalsAndVotes() { func (s *TestSuite) TestProposalsByVPEnd() { addrs := s.addrs addr2 := addrs[1] - groupPolicy := s.groupPolicyAddr votingPeriod := s.policy.GetVotingPeriod() ctx := s.sdkCtx @@ -2527,14 +2541,14 @@ func (s *TestSuite) TestProposalsByVPEnd() { tallyRes group.TallyResult expStatus group.ProposalStatus }{ - "tally updated after voting power end": { + "tally updated after voting period end": { preRun: func(sdkCtx sdk.Context) uint64 { return submitProposal(sdkCtx, s, []sdk.Msg{msgSend}, proposers) }, admin: proposers[0], newCtx: ctx.WithBlockTime(now.Add(votingPeriod).Add(time.Hour)), tallyRes: group.DefaultTallyResult(), - expStatus: group.PROPOSAL_STATUS_SUBMITTED, + expStatus: group.PROPOSAL_STATUS_REJECTED, }, "tally within voting period": { preRun: func(sdkCtx sdk.Context) uint64 { @@ -2545,7 +2559,7 @@ func (s *TestSuite) TestProposalsByVPEnd() { tallyRes: group.DefaultTallyResult(), expStatus: group.PROPOSAL_STATUS_SUBMITTED, }, - "tally within voting period(with votes)": { + "tally within voting period (with votes)": { preRun: func(sdkCtx sdk.Context) uint64 { return submitProposalAndVote(s.ctx, s, []sdk.Msg{msgSend}, proposers, group.VOTE_OPTION_YES) }, @@ -2554,7 +2568,7 @@ func (s *TestSuite) TestProposalsByVPEnd() { tallyRes: group.DefaultTallyResult(), expStatus: group.PROPOSAL_STATUS_SUBMITTED, }, - "tally after voting period(with votes)": { + "tally after voting period (with votes)": { preRun: func(sdkCtx sdk.Context) uint64 { return submitProposalAndVote(s.ctx, s, []sdk.Msg{msgSend}, proposers, group.VOTE_OPTION_YES) }, @@ -2568,12 +2582,27 @@ func (s *TestSuite) TestProposalsByVPEnd() { }, expStatus: group.PROPOSAL_STATUS_ACCEPTED, }, - "tally of closed proposal": { + "tally after voting period (not passing)": { + preRun: func(sdkCtx sdk.Context) uint64 { + // `s.addrs[4]` has weight 1 + return submitProposalAndVote(s.ctx, s, []sdk.Msg{msgSend}, []string{s.addrs[4].String()}, group.VOTE_OPTION_YES) + }, + admin: proposers[0], + newCtx: ctx.WithBlockTime(now.Add(votingPeriod).Add(time.Hour)), + tallyRes: group.TallyResult{ + YesCount: "1", + NoCount: "0", + NoWithVetoCount: "0", + AbstainCount: "0", + }, + expStatus: group.PROPOSAL_STATUS_REJECTED, + }, + "tally of withdrawn proposal": { preRun: func(sdkCtx sdk.Context) uint64 { pId := submitProposal(s.ctx, s, []sdk.Msg{msgSend}, proposers) _, err := s.keeper.WithdrawProposal(s.ctx, &group.MsgWithdrawProposal{ ProposalId: pId, - Address: groupPolicy.String(), + Address: proposers[0], }) s.Require().NoError(err) @@ -2584,12 +2613,12 @@ func (s *TestSuite) TestProposalsByVPEnd() { tallyRes: group.DefaultTallyResult(), expStatus: group.PROPOSAL_STATUS_WITHDRAWN, }, - "tally of closed proposal (with votes)": { + "tally of withdrawn proposal (with votes)": { preRun: func(sdkCtx sdk.Context) uint64 { pId := submitProposalAndVote(s.ctx, s, []sdk.Msg{msgSend}, proposers, group.VOTE_OPTION_YES) _, err := s.keeper.WithdrawProposal(s.ctx, &group.MsgWithdrawProposal{ ProposalId: pId, - Address: groupPolicy.String(), + Address: proposers[0], }) s.Require().NoError(err) diff --git a/x/group/keeper/msg_server.go b/x/group/keeper/msg_server.go index 5e1101f6622d..17fa669b79b6 100644 --- a/x/group/keeper/msg_server.go +++ b/x/group/keeper/msg_server.go @@ -4,9 +4,6 @@ import ( "context" "encoding/binary" "fmt" - "reflect" - - gogotypes "github.com/gogo/protobuf/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" @@ -100,7 +97,7 @@ func (k Keeper) CreateGroup(goCtx context.Context, req *group.MsgCreateGroup) (* func (k Keeper) UpdateGroupMembers(goCtx context.Context, req *group.MsgUpdateGroupMembers) (*group.MsgUpdateGroupMembersResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) action := func(g *group.GroupInfo) error { - totalWeight, err := math.NewNonNegativeDecFromString(g.TotalWeight) + totalWeight, err := math.NewPositiveDecFromString(g.TotalWeight) if err != nil { return err } @@ -140,7 +137,7 @@ func (k Keeper) UpdateGroupMembers(goCtx context.Context, req *group.MsgUpdateGr return sdkerrors.Wrap(sdkerrors.ErrNotFound, "unknown member") } - previousMemberWeight, err := math.NewNonNegativeDecFromString(prevGroupMember.Member.Weight) + previousMemberWeight, err := math.NewPositiveDecFromString(prevGroupMember.Member.Weight) if err != nil { return err } @@ -159,11 +156,11 @@ func (k Keeper) UpdateGroupMembers(goCtx context.Context, req *group.MsgUpdateGr } // If group member already exists, handle update if found { - previousMemberWeight, err := math.NewNonNegativeDecFromString(prevGroupMember.Member.Weight) + previousMemberWeight, err := math.NewPositiveDecFromString(prevGroupMember.Member.Weight) if err != nil { return err } - // Subtract previous weight from the group total weight. + // Substract previous weight from the group total weight. totalWeight, err = math.SubNonNegative(totalWeight, previousMemberWeight) if err != nil { return err @@ -298,7 +295,10 @@ func (k Keeper) CreateGroupPolicy(goCtx context.Context, req *group.MsgCreateGro if err != nil { return nil, sdkerrors.Wrap(err, "request admin") } - policy := req.GetDecisionPolicy() + policy, err := req.GetDecisionPolicy() + if err != nil { + return nil, sdkerrors.Wrap(err, "request decision policy") + } groupID := req.GetGroupID() metadata := req.GetMetadata() @@ -326,7 +326,8 @@ func (k Keeper) CreateGroupPolicy(goCtx context.Context, req *group.MsgCreateGro // Generate account address of group policy. var accountAddr sdk.AccAddress - // loop here in the rare case of a collision + // loop here in the rare case where a ADR-028-derived address creates a + // collision with an existing address. for { nextAccVal := k.groupPolicySeq.NextVal(ctx.KVStore(k.key)) var buf = make([]byte, 8) @@ -336,7 +337,8 @@ func (k Keeper) CreateGroupPolicy(goCtx context.Context, req *group.MsgCreateGro accountAddr = address.Derive(parentAcc, buf) if k.accKeeper.GetAccount(ctx, accountAddr) != nil { - // handle a rare collision + // handle a rare collision, in which case we just go on to the + // next sequence value and derive a new address. continue } acc := k.accKeeper.NewAccount(ctx, &authtypes.ModuleAccount{ @@ -393,7 +395,10 @@ func (k Keeper) UpdateGroupPolicyAdmin(goCtx context.Context, req *group.MsgUpda func (k Keeper) UpdateGroupPolicyDecisionPolicy(goCtx context.Context, req *group.MsgUpdateGroupPolicyDecisionPolicy) (*group.MsgUpdateGroupPolicyDecisionPolicyResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - policy := req.GetDecisionPolicy() + policy, err := req.GetDecisionPolicy() + if err != nil { + return nil, err + } action := func(groupPolicy *group.GroupPolicyInfo) error { g, err := k.getGroupInfo(ctx, groupPolicy.GroupId) @@ -415,7 +420,7 @@ func (k Keeper) UpdateGroupPolicyDecisionPolicy(goCtx context.Context, req *grou return k.groupPolicyTable.Update(ctx.KVStore(k.key), groupPolicy) } - err := k.doUpdateGroupPolicy(ctx, req.GroupPolicyAddress, req.Admin, action, "group policy's decision policy updated") + err = k.doUpdateGroupPolicy(ctx, req.GroupPolicyAddress, req.Admin, action, "group policy's decision policy updated") if err != nil { return nil, err } @@ -447,13 +452,16 @@ func (k Keeper) UpdateGroupPolicyMetadata(goCtx context.Context, req *group.MsgU func (k Keeper) SubmitProposal(goCtx context.Context, req *group.MsgSubmitProposal) (*group.MsgSubmitProposalResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - accountAddress, err := sdk.AccAddressFromBech32(req.GroupPolicyAddress) + groupPolicyAddr, err := sdk.AccAddressFromBech32(req.GroupPolicyAddress) if err != nil { return nil, sdkerrors.Wrap(err, "request account address of group policy") } metadata := req.Metadata proposers := req.Proposers - msgs := req.GetMsgs() + msgs, err := req.GetMsgs() + if err != nil { + return nil, sdkerrors.Wrap(err, "request msgs") + } if err := k.assertMetadataLength(metadata, "metadata"); err != nil { return nil, err @@ -477,13 +485,13 @@ func (k Keeper) SubmitProposal(goCtx context.Context, req *group.MsgSubmitPropos } // Check that if the messages require signers, they are all equal to the given account address of group policy. - if err := ensureMsgAuthZ(msgs, accountAddress); err != nil { + if err := ensureMsgAuthZ(msgs, groupPolicyAddr); err != nil { return nil, err } - policy := policyAcc.GetDecisionPolicy() - if policy == nil { - return nil, sdkerrors.Wrap(errors.ErrEmpty, "nil policy") + policy, err := policyAcc.GetDecisionPolicy() + if err != nil { + return nil, sdkerrors.Wrap(err, "proposal group policy decision policy") } // Prevent proposal that can not succeed. @@ -531,7 +539,7 @@ func (k Keeper) SubmitProposal(goCtx context.Context, req *group.MsgSubmitPropos Option: group.VOTE_OPTION_YES, }) if err != nil { - return &group.MsgSubmitProposalResponse{ProposalId: id}, sdkerrors.Wrap(err, "The proposal was created but failed on vote") + return &group.MsgSubmitProposalResponse{ProposalId: id}, sdkerrors.Wrapf(err, "the proposal was created but failed on vote for voter %s", proposers[i]) } } @@ -543,7 +551,7 @@ func (k Keeper) SubmitProposal(goCtx context.Context, req *group.MsgSubmitPropos Executor: proposers[0], }) if err != nil { - return &group.MsgSubmitProposalResponse{ProposalId: id}, sdkerrors.Wrap(err, "The proposal was created but failed on exec") + return &group.MsgSubmitProposalResponse{ProposalId: id}, sdkerrors.Wrap(err, "the proposal was created but failed on exec") } } @@ -570,35 +578,14 @@ func (k Keeper) WithdrawProposal(goCtx context.Context, req *group.MsgWithdrawPr return nil, sdkerrors.Wrap(err, "load group policy") } - storeUpdates := func() (*group.MsgWithdrawProposalResponse, error) { - if err := k.proposalTable.Update(ctx.KVStore(k.key), id, &proposal); err != nil { - return nil, err - } - return &group.MsgWithdrawProposalResponse{}, nil - } - - // check address is the group policy admin. - if address == policyInfo.Address { - err = ctx.EventManager().EmitTypedEvent(&group.EventWithdrawProposal{ProposalId: id}) - if err != nil { - return nil, err - } - - proposal.Status = group.PROPOSAL_STATUS_WITHDRAWN - return storeUpdates() - } - - // if address is not group policy admin then check whether he is in proposers list. - validProposer := false - for _, proposer := range proposal.Proposers { - if proposer == address { - validProposer = true - break - } + // check address is the group policy admin he is in proposers list.. + if address != policyInfo.Admin && !isProposer(proposal, address) { + return nil, sdkerrors.Wrapf(errors.ErrUnauthorized, "given address is neither group policy admin nor in proposers: %s", address) } - if !validProposer { - return nil, sdkerrors.Wrapf(errors.ErrUnauthorized, "given address is neither group policy admin nor in proposers: %s", address) + proposal.Status = group.PROPOSAL_STATUS_WITHDRAWN + if err := k.proposalTable.Update(ctx.KVStore(k.key), id, &proposal); err != nil { + return nil, err } err = ctx.EventManager().EmitTypedEvent(&group.EventWithdrawProposal{ProposalId: id}) @@ -606,8 +593,7 @@ func (k Keeper) WithdrawProposal(goCtx context.Context, req *group.MsgWithdrawPr return nil, err } - proposal.Status = group.PROPOSAL_STATUS_WITHDRAWN - return storeUpdates() + return &group.MsgWithdrawProposalResponse{}, nil } func (k Keeper) Vote(goCtx context.Context, req *group.MsgVote) (*group.MsgVoteResponse, error) { @@ -632,9 +618,8 @@ func (k Keeper) Vote(goCtx context.Context, req *group.MsgVote) (*group.MsgVoteR return nil, sdkerrors.Wrap(errors.ErrExpired, "voting period has ended already") } - var policyInfo group.GroupPolicyInfo - - if policyInfo, err = k.getGroupPolicyInfo(ctx, proposal.GroupPolicyAddress); err != nil { + policyInfo, err := k.getGroupPolicyInfo(ctx, proposal.GroupPolicyAddress) + if err != nil { return nil, sdkerrors.Wrap(err, "load group policy") } @@ -647,7 +632,7 @@ func (k Keeper) Vote(goCtx context.Context, req *group.MsgVote) (*group.MsgVoteR voterAddr := req.Voter voter := group.GroupMember{GroupId: electorate.Id, Member: &group.Member{Address: voterAddr}} if err := k.groupMemberTable.GetOne(ctx.KVStore(k.key), orm.PrimaryKey(&voter), &voter); err != nil { - return nil, sdkerrors.Wrapf(err, "address: %s", voterAddr) + return nil, sdkerrors.Wrapf(err, "voter address: %s", voterAddr) } newVote := group.Vote{ ProposalId: id, @@ -682,15 +667,11 @@ func (k Keeper) Vote(goCtx context.Context, req *group.MsgVote) (*group.MsgVoteR return &group.MsgVoteResponse{}, nil } -// doTallyAndUpdate performs a tally, and updates the proposal's -// `FinalTallyResult` field only if the tally is final. +// doTallyAndUpdate performs a tally, and, if the tally result is final, then: +// - updates the proposal's `Status` and `FinalTallyResult` fields, +// - prune all the votes. func (k Keeper) doTallyAndUpdate(ctx sdk.Context, p *group.Proposal, electorate group.GroupInfo, policyInfo group.GroupPolicyInfo) error { - policy := policyInfo.GetDecisionPolicy() - pSubmittedAt, err := gogotypes.TimestampProto(p.SubmitTime) - if err != nil { - return err - } - submittedAt, err := gogotypes.TimestampFromProto(pSubmittedAt) + policy, err := policyInfo.GetDecisionPolicy() if err != nil { return err } @@ -700,11 +681,17 @@ func (k Keeper) doTallyAndUpdate(ctx sdk.Context, p *group.Proposal, electorate return err } - result, err := policy.Allow(tallyResult, electorate.TotalWeight, ctx.BlockTime().Sub(submittedAt)) + sinceSubmission := ctx.BlockTime().Sub(p.SubmitTime) // duration passed since proposal submission. + result, err := policy.Allow(tallyResult, electorate.TotalWeight, sinceSubmission) + // If the result was final (i.e. enough votes to pass) or if the voting + // period ended, then we consider the proposal as final. + isFinal := result.Final || ctx.BlockTime().After(p.VotingPeriodEnd) + switch { case err != nil: return sdkerrors.Wrap(err, "policy allow") - case result.Final: + + case isFinal: if err := k.pruneVotes(ctx, p.Id); err != nil { return err } @@ -730,31 +717,17 @@ func (k Keeper) Exec(goCtx context.Context, req *group.MsgExec) (*group.MsgExecR } if proposal.Status != group.PROPOSAL_STATUS_SUBMITTED && proposal.Status != group.PROPOSAL_STATUS_ACCEPTED { - return nil, sdkerrors.Wrapf(errors.ErrInvalid, "not possible with proposal status %s", proposal.Status.String()) + return nil, sdkerrors.Wrapf(errors.ErrInvalid, "not possible to exec with proposal status %s", proposal.Status.String()) } - var policyInfo group.GroupPolicyInfo - if policyInfo, err = k.getGroupPolicyInfo(ctx, proposal.GroupPolicyAddress); err != nil { + policyInfo, err := k.getGroupPolicyInfo(ctx, proposal.GroupPolicyAddress) + if err != nil { return nil, sdkerrors.Wrap(err, "load group policy") } - storeUpdates := func() (*group.MsgExecResponse, error) { - store := ctx.KVStore(k.key) - - // If proposal has successfully run, delete it from state. - if proposal.ExecutorResult == group.PROPOSAL_EXECUTOR_RESULT_SUCCESS { - if err := k.pruneProposal(ctx, proposal.Id); err != nil { - return nil, err - } - } else { - if err := k.proposalTable.Update(store, id, &proposal); err != nil { - return nil, err - } - } - - return &group.MsgExecResponse{}, nil - } - + // If proposal is still in SUBMITTED phase, it means that the voting period + // didn't end yet, and tallying hasn't been done. In this case, we need to + // tally first. if proposal.Status == group.PROPOSAL_STATUS_SUBMITTED { electorate, err := k.getGroupInfo(ctx, policyInfo.GroupId) if err != nil { @@ -767,8 +740,8 @@ func (k Keeper) Exec(goCtx context.Context, req *group.MsgExec) (*group.MsgExecR } // Execute proposal payload. + var logs string if proposal.Status == group.PROPOSAL_STATUS_ACCEPTED && proposal.ExecutorResult != group.PROPOSAL_EXECUTOR_RESULT_SUCCESS { - logger := ctx.Logger().With("module", fmt.Sprintf("x/%s", group.ModuleName)) // Caching context so that we don't update the store in case of failure. ctx, flush := ctx.CacheContext() @@ -779,8 +752,8 @@ func (k Keeper) Exec(goCtx context.Context, req *group.MsgExec) (*group.MsgExecR _, err = k.doExecuteMsgs(ctx, k.router, proposal, addr) if err != nil { proposal.ExecutorResult = group.PROPOSAL_EXECUTOR_RESULT_FAILURE - proposalType := reflect.TypeOf(proposal).String() - logger.Info("proposal execution failed", "cause", err, "type", proposalType, "proposalID", id) + logs = fmt.Sprintf("proposal execution failed on proposal %d, because of error %+v", id, err) + k.Logger(ctx).Info("proposal execution failed", "cause", err, "proposalID", id) } else { proposal.ExecutorResult = group.PROPOSAL_EXECUTOR_RESULT_SUCCESS flush() @@ -788,20 +761,30 @@ func (k Keeper) Exec(goCtx context.Context, req *group.MsgExec) (*group.MsgExecR } // Update proposal in proposalTable - res, err := storeUpdates() - if err != nil { - return nil, err + // If proposal has successfully run, delete it from state. + if proposal.ExecutorResult == group.PROPOSAL_EXECUTOR_RESULT_SUCCESS { + if err := k.pruneProposal(ctx, proposal.Id); err != nil { + return nil, err + } + } else { + store := ctx.KVStore(k.key) + if err := k.proposalTable.Update(store, id, &proposal); err != nil { + return nil, err + } } err = ctx.EventManager().EmitTypedEvent(&group.EventExec{ ProposalId: id, + Logs: logs, Result: proposal.ExecutorResult, }) if err != nil { return nil, err } - return res, nil + return &group.MsgExecResponse{ + Result: proposal.ExecutorResult, + }, nil } // LeaveGroup implements the MsgServer/LeaveGroup method. @@ -817,7 +800,7 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr return nil, sdkerrors.Wrap(err, "group") } - groupWeight, err := math.NewNonNegativeDecFromString(groupInfo.TotalWeight) + groupWeight, err := math.NewPositiveDecFromString(groupInfo.TotalWeight) if err != nil { return nil, err } @@ -830,7 +813,7 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr return nil, err } - memberWeight, err := math.NewNonNegativeDecFromString(gm.Member.Weight) + memberWeight, err := math.NewPositiveDecFromString(gm.Member.Weight) if err != nil { return nil, err } @@ -847,11 +830,13 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr // update group weight groupInfo.TotalWeight = updatedWeight.String() - if err := k.groupTable.Update(ctx.KVStore(k.key), groupInfo.Id, &groupInfo); err != nil { + groupInfo.Version++ + + if err := k.validateDecisionPolicies(ctx, groupInfo); err != nil { return nil, err } - if err := k.validateDecisionPolicies(ctx, groupInfo); err != nil { + if err := k.groupTable.Update(ctx.KVStore(k.key), groupInfo.Id, &groupInfo); err != nil { return nil, err } @@ -913,14 +898,15 @@ func (k Keeper) doUpdateGroupPolicy(ctx sdk.Context, groupPolicy string, admin s return sdkerrors.Wrap(err, note) } - err = ctx.EventManager().EmitTypedEvent(&group.EventUpdateGroupPolicy{Address: admin}) - if err != nil { + if err = k.abortProposals(ctx, groupPolicyAddr); err != nil { return err } - if err = k.updateProposalStatus(ctx, groupPolicyAddr); err != nil { + err = ctx.EventManager().EmitTypedEvent(&group.EventUpdateGroupPolicy{Address: admin}) + if err != nil { return err } + return nil } @@ -941,8 +927,8 @@ func (k Keeper) doUpdateGroup(ctx sdk.Context, req authNGroupReq, action actionF } // doAuthenticated makes sure that the group admin initiated the request, -// and perform the provided action on the -func (k Keeper) doAuthenticated(ctx sdk.Context, req authNGroupReq, action actionFn, note string) error { +// and perform the provided action on the group. +func (k Keeper) doAuthenticated(ctx sdk.Context, req authNGroupReq, action actionFn, errNote string) error { group, err := k.getGroupInfo(ctx, req.GetGroupID()) if err != nil { return err @@ -956,10 +942,10 @@ func (k Keeper) doAuthenticated(ctx sdk.Context, req authNGroupReq, action actio return sdkerrors.Wrap(err, "request admin") } if !admin.Equals(reqAdmin) { - return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "not group admin") + return sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "not group admin; got %s, expected %s", req.GetAdmin(), group.Admin) } if err := action(&group); err != nil { - return sdkerrors.Wrap(err, note) + return sdkerrors.Wrap(err, errNote) } return nil } @@ -1000,3 +986,14 @@ func (k Keeper) validateDecisionPolicies(ctx sdk.Context, g group.GroupInfo) err return nil } + +// isProposer checks that an address is a proposer of a given proposal. +func isProposer(proposal group.Proposal, address string) bool { + for _, proposer := range proposal.Proposers { + if proposer == address { + return true + } + } + + return false +} diff --git a/x/group/keeper/proposal_executor.go b/x/group/keeper/proposal_executor.go index c63d9ad66f3a..aae36b311738 100644 --- a/x/group/keeper/proposal_executor.go +++ b/x/group/keeper/proposal_executor.go @@ -1,6 +1,8 @@ package keeper import ( + "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/errors" authmiddleware "github.com/cosmos/cosmos-sdk/x/auth/middleware" @@ -21,7 +23,10 @@ func (s Keeper) doExecuteMsgs(ctx sdk.Context, router *authmiddleware.MsgService return nil, grouperrors.ErrExpired.Wrapf("proposal expired on %s", expiryDate) } - msgs := proposal.GetMsgs() + msgs, err := proposal.GetMsgs() + if err != nil { + return nil, err + } results := make([]sdk.Result, len(msgs)) if err := ensureMsgAuthZ(msgs, groupPolicyAcc); err != nil { @@ -36,19 +41,27 @@ func (s Keeper) doExecuteMsgs(ctx sdk.Context, router *authmiddleware.MsgService if err != nil { return nil, errors.Wrapf(err, "message %q at position %d", msg, i) } - if r != nil { - results[i] = *r + // Handler should always return non-nil sdk.Result. + if r == nil { + return nil, fmt.Errorf("got nil sdk.Result for message %q at position %d", msg, i) } + + results[i] = *r } return results, nil } -// ensureMsgAuthZ checks that if a message requires signers that all of them are equal to the given account address of group policy. +// ensureMsgAuthZ checks that if a message requires signers that all of them +// are equal to the given account address of group policy. func ensureMsgAuthZ(msgs []sdk.Msg, groupPolicyAcc sdk.AccAddress) error { for i := range msgs { + // In practice, GetSigners() should return a non-empty array without + // duplicates, so the code below is equivalent to: + // `msgs[i].GetSigners()[0] == groupPolicyAcc` + // but we prefer to loop through all GetSigners just to be sure. for _, acct := range msgs[i].GetSigners() { if !groupPolicyAcc.Equals(acct) { - return errors.Wrap(errors.ErrUnauthorized, "msg does not have group policy authorization") + return errors.Wrapf(errors.ErrUnauthorized, "msg does not have group policy authorization; expected %s, got %s", groupPolicyAcc.String(), acct.String()) } } } diff --git a/x/group/module/abci_test.go b/x/group/module/abci_test.go index e477b1f325fa..5f510c864ed2 100644 --- a/x/group/module/abci_test.go +++ b/x/group/module/abci_test.go @@ -209,7 +209,7 @@ func TestEndBlockerPruning(t *testing.T) { require.NoError(t, err) _, err = app.GroupKeeper.WithdrawProposal(ctx, &group.MsgWithdrawProposal{ ProposalId: pId, - Address: groupPolicyAddr.String(), + Address: proposers[0], }) require.NoError(t, err) return pId @@ -224,7 +224,7 @@ func TestEndBlockerPruning(t *testing.T) { require.NoError(t, err) _, err = app.GroupKeeper.WithdrawProposal(ctx, &group.MsgWithdrawProposal{ ProposalId: pId, - Address: groupPolicyAddr.String(), + Address: proposers[0], }) require.NoError(t, err) return pId @@ -318,7 +318,7 @@ func TestEndBlockerPruning(t *testing.T) { } -func TestEndBlocker(t *testing.T) { +func TestEndBlockerTallying(t *testing.T) { app := simapp.Setup(t, false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) @@ -374,7 +374,7 @@ func TestEndBlocker(t *testing.T) { tallyRes group.TallyResult expStatus group.ProposalStatus }{ - "tally updated after voting power end": { + "tally updated after voting period end": { preRun: func(sdkCtx sdk.Context) uint64 { pId, err := submitProposal(app, sdkCtx, []sdk.Msg{msgSend}, proposers, groupPolicyAddr) require.NoError(t, err) @@ -383,7 +383,7 @@ func TestEndBlocker(t *testing.T) { admin: proposers[0], newCtx: ctx.WithBlockTime(ctx.BlockTime().Add(votingPeriod).Add(time.Hour)), tallyRes: group.DefaultTallyResult(), - expStatus: group.PROPOSAL_STATUS_SUBMITTED, + expStatus: group.PROPOSAL_STATUS_REJECTED, }, "tally within voting period": { preRun: func(sdkCtx sdk.Context) uint64 { @@ -409,6 +409,24 @@ func TestEndBlocker(t *testing.T) { tallyRes: group.DefaultTallyResult(), expStatus: group.PROPOSAL_STATUS_SUBMITTED, }, + "tally after voting period (not passing)": { + preRun: func(sdkCtx sdk.Context) uint64 { + // `addrs[1]` has weight 1 + pId, err := submitProposalAndVote(app, ctx, []sdk.Msg{msgSend}, []string{addrs[1].String()}, groupPolicyAddr, group.VOTE_OPTION_YES) + require.NoError(t, err) + + return pId + }, + admin: proposers[0], + newCtx: ctx.WithBlockTime(ctx.BlockTime().Add(votingPeriod).Add(time.Hour)), + tallyRes: group.TallyResult{ + YesCount: "1", + NoCount: "0", + NoWithVetoCount: "0", + AbstainCount: "0", + }, + expStatus: group.PROPOSAL_STATUS_REJECTED, + }, "tally after voting period(with votes)": { preRun: func(sdkCtx sdk.Context) uint64 { pId, err := submitProposalAndVote(app, ctx, []sdk.Msg{msgSend}, proposers, groupPolicyAddr, group.VOTE_OPTION_YES) @@ -426,14 +444,14 @@ func TestEndBlocker(t *testing.T) { }, expStatus: group.PROPOSAL_STATUS_ACCEPTED, }, - "tally of closed proposal": { + "tally of withdrawn proposal": { preRun: func(sdkCtx sdk.Context) uint64 { pId, err := submitProposal(app, sdkCtx, []sdk.Msg{msgSend}, proposers, groupPolicyAddr) require.NoError(t, err) _, err = app.GroupKeeper.WithdrawProposal(ctx, &group.MsgWithdrawProposal{ ProposalId: pId, - Address: groupPolicyAddr.String(), + Address: proposers[0], }) require.NoError(t, err) @@ -444,14 +462,14 @@ func TestEndBlocker(t *testing.T) { tallyRes: group.DefaultTallyResult(), expStatus: group.PROPOSAL_STATUS_WITHDRAWN, }, - "tally of closed proposal (with votes)": { + "tally of withdrawn proposal (with votes)": { preRun: func(sdkCtx sdk.Context) uint64 { pId, err := submitProposalAndVote(app, ctx, []sdk.Msg{msgSend}, proposers, groupPolicyAddr, group.VOTE_OPTION_YES) require.NoError(t, err) _, err = app.GroupKeeper.WithdrawProposal(ctx, &group.MsgWithdrawProposal{ ProposalId: pId, - Address: groupPolicyAddr.String(), + Address: proposers[0], }) require.NoError(t, err) diff --git a/x/group/msgs.go b/x/group/msgs.go index b3e6bb60cb96..0042ed4a4761 100644 --- a/x/group/msgs.go +++ b/x/group/msgs.go @@ -1,8 +1,6 @@ package group import ( - "fmt" - "github.com/cosmos/cosmos-sdk/codec/legacy" proto "github.com/gogo/protobuf/proto" @@ -44,18 +42,14 @@ func (m MsgCreateGroup) ValidateBasic() error { return sdkerrors.Wrap(err, "admin") } - return m.validateMembers() -} - -func (m MsgCreateGroup) validateMembers() error { - - err := validateMembers(m.Members) - if err != nil { - return err - } - return nil + return strictValidateMembers(m.Members) } +// ValidateBasic performs stateless validation on a group member, such as +// making sure the address is well-formed, and the weight is non-negative. +// Note: in state, a member's weight MUST be positive. However, in some Msgs, +// it's possible to set a zero member weight, for example in +// MsgUpdateGroupMembers to denote that we're removing a member. func (m Member) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(m.Address) if err != nil { @@ -216,12 +210,12 @@ var _ sdk.Msg = &MsgCreateGroupWithPolicy{} var _ types.UnpackInterfacesMessage = MsgCreateGroupWithPolicy{} // NewMsgCreateGroupWithPolicy creates a new MsgCreateGroupWithPolicy. -func NewMsgCreateGroupWithPolicy(admin string, members []Member, group_metadata string, group_policy_metadata string, groupPolicyAsAdmin bool, decisionPolicy DecisionPolicy) (*MsgCreateGroupWithPolicy, error) { +func NewMsgCreateGroupWithPolicy(admin string, members []Member, groupMetadata string, groupPolicyMetadata string, groupPolicyAsAdmin bool, decisionPolicy DecisionPolicy) (*MsgCreateGroupWithPolicy, error) { m := &MsgCreateGroupWithPolicy{ Admin: admin, Members: members, - GroupMetadata: group_metadata, - GroupPolicyMetadata: group_policy_metadata, + GroupMetadata: groupMetadata, + GroupPolicyMetadata: groupPolicyMetadata, GroupPolicyAsAdmin: groupPolicyAsAdmin, } err := m.SetDecisionPolicy(decisionPolicy) @@ -231,20 +225,16 @@ func NewMsgCreateGroupWithPolicy(admin string, members []Member, group_metadata return m, nil } -func (m *MsgCreateGroupWithPolicy) GetDecisionPolicy() DecisionPolicy { +func (m *MsgCreateGroupWithPolicy) GetDecisionPolicy() (DecisionPolicy, error) { decisionPolicy, ok := m.DecisionPolicy.GetCachedValue().(DecisionPolicy) if !ok { - return nil + return nil, sdkerrors.ErrInvalidType.Wrapf("expected %T, got %T", (DecisionPolicy)(nil), m.DecisionPolicy.GetCachedValue()) } - return decisionPolicy + return decisionPolicy, nil } func (m *MsgCreateGroupWithPolicy) SetDecisionPolicy(decisionPolicy DecisionPolicy) error { - msg, ok := decisionPolicy.(proto.Message) - if !ok { - return sdkerrors.ErrInvalidType.Wrapf("can't proto marshal %T", msg) - } - any, err := types.NewAnyWithValue(msg) + any, err := types.NewAnyWithValue(decisionPolicy) if err != nil { return err } @@ -288,24 +278,15 @@ func (m MsgCreateGroupWithPolicy) ValidateBasic() error { if err != nil { return sdkerrors.Wrap(err, "admin") } - policy := m.GetDecisionPolicy() - if policy == nil { - return sdkerrors.Wrap(errors.ErrEmpty, "decision policy") + policy, err := m.GetDecisionPolicy() + if err != nil { + return sdkerrors.Wrap(err, "decision policy") } if err := policy.ValidateBasic(); err != nil { return sdkerrors.Wrap(err, "decision policy") } - return m.validateMembers() -} - -func (m MsgCreateGroupWithPolicy) validateMembers() error { - - err := validateMembers(m.Members) - if err != nil { - return err - } - return nil + return strictValidateMembers(m.Members) } var _ sdk.Msg = &MsgCreateGroupPolicy{} @@ -342,9 +323,9 @@ func (m MsgCreateGroupPolicy) ValidateBasic() error { return sdkerrors.Wrap(errors.ErrEmpty, "group id") } - policy := m.GetDecisionPolicy() - if policy == nil { - return sdkerrors.Wrap(errors.ErrEmpty, "decision policy") + policy, err := m.GetDecisionPolicy() + if err != nil { + return sdkerrors.Wrap(err, "decision policy") } if err := policy.ValidateBasic(); err != nil { @@ -403,7 +384,8 @@ func (m MsgUpdateGroupPolicyAdmin) ValidateBasic() error { var _ sdk.Msg = &MsgUpdateGroupPolicyDecisionPolicy{} var _ types.UnpackInterfacesMessage = MsgUpdateGroupPolicyDecisionPolicy{} -func NewMsgUpdateGroupPolicyDecisionPolicyRequest(admin sdk.AccAddress, address sdk.AccAddress, decisionPolicy DecisionPolicy) (*MsgUpdateGroupPolicyDecisionPolicy, error) { +// NewMsgUpdateGroupPolicyDecisionPolicy creates a new MsgUpdateGroupPolicyDecisionPolicy. +func NewMsgUpdateGroupPolicyDecisionPolicy(admin sdk.AccAddress, address sdk.AccAddress, decisionPolicy DecisionPolicy) (*MsgUpdateGroupPolicyDecisionPolicy, error) { m := &MsgUpdateGroupPolicyDecisionPolicy{ Admin: admin.String(), GroupPolicyAddress: address.String(), @@ -464,9 +446,9 @@ func (m MsgUpdateGroupPolicyDecisionPolicy) ValidateBasic() error { return sdkerrors.Wrap(err, "group policy") } - policy := m.GetDecisionPolicy() - if policy == nil { - return sdkerrors.Wrap(errors.ErrEmpty, "decision policy") + policy, err := m.GetDecisionPolicy() + if err != nil { + return sdkerrors.Wrap(err, "decision policy") } if err := policy.ValidateBasic(); err != nil { @@ -476,12 +458,13 @@ func (m MsgUpdateGroupPolicyDecisionPolicy) ValidateBasic() error { return nil } -func (m *MsgUpdateGroupPolicyDecisionPolicy) GetDecisionPolicy() DecisionPolicy { +func (m *MsgUpdateGroupPolicyDecisionPolicy) GetDecisionPolicy() (DecisionPolicy, error) { decisionPolicy, ok := m.DecisionPolicy.GetCachedValue().(DecisionPolicy) if !ok { - return nil + return nil, sdkerrors.ErrInvalidType.Wrapf("expected %T, got %T", (DecisionPolicy)(nil), m.DecisionPolicy.GetCachedValue()) } - return decisionPolicy + + return decisionPolicy, nil } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces @@ -558,20 +541,16 @@ func (m *MsgCreateGroupPolicy) GetMetadata() string { return m.Metadata } -func (m *MsgCreateGroupPolicy) GetDecisionPolicy() DecisionPolicy { +func (m *MsgCreateGroupPolicy) GetDecisionPolicy() (DecisionPolicy, error) { decisionPolicy, ok := m.DecisionPolicy.GetCachedValue().(DecisionPolicy) if !ok { - return nil + return nil, sdkerrors.ErrInvalidType.Wrapf("expected %T, got %T", (DecisionPolicy)(nil), m.DecisionPolicy.GetCachedValue()) } - return decisionPolicy + return decisionPolicy, nil } func (m *MsgCreateGroupPolicy) SetDecisionPolicy(decisionPolicy DecisionPolicy) error { - msg, ok := decisionPolicy.(proto.Message) - if !ok { - return fmt.Errorf("can't proto marshal %T", msg) - } - any, err := types.NewAnyWithValue(msg) + any, err := types.NewAnyWithValue(decisionPolicy) if err != nil { return err } @@ -587,8 +566,8 @@ func (m MsgCreateGroupPolicy) UnpackInterfaces(unpacker types.AnyUnpacker) error var _ sdk.Msg = &MsgSubmitProposal{} -// NewMsgSubmitProposalRequest creates a new MsgSubmitProposal. -func NewMsgSubmitProposalRequest(address string, proposers []string, msgs []sdk.Msg, metadata string, exec Exec) (*MsgSubmitProposal, error) { +// NewMsgSubmitProposal creates a new MsgSubmitProposal. +func NewMsgSubmitProposal(address string, proposers []string, msgs []sdk.Msg, metadata string, exec Exec) (*MsgSubmitProposal, error) { m := &MsgSubmitProposal{ GroupPolicyAddress: address, Proposers: proposers, @@ -617,18 +596,17 @@ func (m MsgSubmitProposal) GetSignBytes() []byte { // GetSigners returns the expected signers for a MsgSubmitProposal. func (m MsgSubmitProposal) GetSigners() []sdk.AccAddress { - addrs := make([]sdk.AccAddress, len(m.Proposers)) - for i, proposer := range m.Proposers { - addr, err := sdk.AccAddressFromBech32(proposer) - if err != nil { - panic(err) - } - addrs[i] = addr + addrs, err := m.getProposerAccAddresses() + if err != nil { + panic(err) } + return addrs } -// ValidateBasic does a sanity check on the provided data +// ValidateBasic does a sanity check on the provided proposal, such as +// verifying proposer addresses, and performing ValidateBasic on each +// individual `sdk.Msg`. func (m MsgSubmitProposal) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(m.GroupPolicyAddress) if err != nil { @@ -638,19 +616,21 @@ func (m MsgSubmitProposal) ValidateBasic() error { if len(m.Proposers) == 0 { return sdkerrors.Wrap(errors.ErrEmpty, "proposers") } - addrs := make([]sdk.AccAddress, len(m.Proposers)) - for i, proposer := range m.Proposers { - addr, err := sdk.AccAddressFromBech32(proposer) - if err != nil { - return sdkerrors.Wrap(err, "proposers") - } - addrs[i] = addr + + addrs, err := m.getProposerAccAddresses() + if err != nil { + return sdkerrors.Wrap(err, "group proposers") } - if err := AccAddresses(addrs).ValidateBasic(); err != nil { + + if err := accAddresses(addrs).ValidateBasic(); err != nil { return sdkerrors.Wrap(err, "proposers") } - msgs := m.GetMsgs() + msgs, err := m.GetMsgs() + if err != nil { + return err + } + for i, msg := range msgs { if err := msg.ValidateBasic(); err != nil { return sdkerrors.Wrapf(err, "msg %d", i) @@ -659,6 +639,20 @@ func (m MsgSubmitProposal) ValidateBasic() error { return nil } +// getProposerAccAddresses returns the proposers as `[]sdk.AccAddress`. +func (m *MsgSubmitProposal) getProposerAccAddresses() ([]sdk.AccAddress, error) { + addrs := make([]sdk.AccAddress, len(m.Proposers)) + for i, proposer := range m.Proposers { + addr, err := sdk.AccAddressFromBech32(proposer) + if err != nil { + return nil, sdkerrors.Wrap(err, "proposers") + } + addrs[i] = addr + } + + return addrs, nil +} + // SetMsgs packs msgs into Any's func (m *MsgSubmitProposal) SetMsgs(msgs []sdk.Msg) error { anys, err := tx.SetMsgs(msgs) @@ -670,12 +664,8 @@ func (m *MsgSubmitProposal) SetMsgs(msgs []sdk.Msg) error { } // GetMsgs unpacks m.Messages Any's into sdk.Msg's -func (m MsgSubmitProposal) GetMsgs() []sdk.Msg { - msgs, err := tx.GetMsgs(m.Messages, "proposal") - if err != nil { - panic(err) - } - return msgs +func (m MsgSubmitProposal) GetMsgs() ([]sdk.Msg, error) { + return tx.GetMsgs(m.Messages, "proposal") } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces @@ -818,6 +808,7 @@ func (m MsgLeaveGroup) GetSigners() []sdk.AccAddress { if err != nil { panic(err) } + return []sdk.AccAddress{signer} } @@ -834,24 +825,19 @@ func (m MsgLeaveGroup) ValidateBasic() error { return nil } -func validateMembers(members []Member) error { - index := make(map[string]struct{}, len(members)) - for i := range members { - member := members[i] - _, err := sdk.AccAddressFromBech32(member.Address) - if err != nil { - return sdkerrors.Wrap(err, "address") - } +// strictValidateMembers performs ValidateBasic on Members, but also checks +// that all members weights are positive (whereas `Members{members}.ValidateBasic()` +// only checks that they are non-negative. +func strictValidateMembers(members []Member) error { + err := Members{members}.ValidateBasic() + if err != nil { + return err + } - if _, err := math.NewPositiveDecFromString(member.Weight); err != nil { + for _, m := range members { + if _, err := math.NewPositiveDecFromString(m.Weight); err != nil { return sdkerrors.Wrap(err, "weight") } - - addr := member.Address - if _, exists := index[addr]; exists { - return sdkerrors.Wrapf(errors.ErrDuplicate, "address: %s", addr) - } - index[addr] = struct{}{} } return nil diff --git a/x/group/msgs_test.go b/x/group/msgs_test.go index 03e63ecc2ffd..1c0e4fa6ca7e 100644 --- a/x/group/msgs_test.go +++ b/x/group/msgs_test.go @@ -59,7 +59,7 @@ func TestMsgCreateGroup(t *testing.T) { }, }, true, - "expected a positive decimal", + "expected a non-negative decimal", }, { "zero member's weight not allowed", @@ -416,7 +416,7 @@ func TestMsgCreateGroupWithPolicy(t *testing.T) { return req }, true, - "expected a positive decimal", + "expected a non-negative decimal", }, { "zero member's weight not allowed", @@ -692,23 +692,23 @@ func TestMsgCreateGroupPolicy(t *testing.T) { func TestMsgUpdateGroupPolicyDecisionPolicy(t *testing.T) { validPolicy := group.NewThresholdDecisionPolicy("1", time.Second, 0) - msg1, err := group.NewMsgUpdateGroupPolicyDecisionPolicyRequest(admin, member1, validPolicy) + msg1, err := group.NewMsgUpdateGroupPolicyDecisionPolicy(admin, member1, validPolicy) require.NoError(t, err) invalidPolicy := group.NewThresholdDecisionPolicy("-1", time.Second, 0) - msg2, err := group.NewMsgUpdateGroupPolicyDecisionPolicyRequest(admin, member2, invalidPolicy) + msg2, err := group.NewMsgUpdateGroupPolicyDecisionPolicy(admin, member2, invalidPolicy) require.NoError(t, err) validPercentagePolicy := group.NewPercentageDecisionPolicy("0.7", time.Second, 0) - msg3, err := group.NewMsgUpdateGroupPolicyDecisionPolicyRequest(admin, member3, validPercentagePolicy) + msg3, err := group.NewMsgUpdateGroupPolicyDecisionPolicy(admin, member3, validPercentagePolicy) require.NoError(t, err) invalidPercentagePolicy := group.NewPercentageDecisionPolicy("-0.1", time.Second, 0) - msg4, err := group.NewMsgUpdateGroupPolicyDecisionPolicyRequest(admin, member4, invalidPercentagePolicy) + msg4, err := group.NewMsgUpdateGroupPolicyDecisionPolicy(admin, member4, invalidPercentagePolicy) require.NoError(t, err) invalidPercentagePolicy2 := group.NewPercentageDecisionPolicy("2", time.Second, 0) - msg5, err := group.NewMsgUpdateGroupPolicyDecisionPolicyRequest(admin, member5, invalidPercentagePolicy2) + msg5, err := group.NewMsgUpdateGroupPolicyDecisionPolicy(admin, member5, invalidPercentagePolicy2) require.NoError(t, err) testCases := []struct { diff --git a/x/group/proposal.go b/x/group/proposal.go index 9764a1da908c..e76c05ac283c 100644 --- a/x/group/proposal.go +++ b/x/group/proposal.go @@ -6,12 +6,9 @@ import ( "github.com/cosmos/cosmos-sdk/types/tx" ) -func (p *Proposal) GetMsgs() []sdk.Msg { - msgs, err := tx.GetMsgs(p.Messages, "proposal") - if err != nil { - panic(err) - } - return msgs +func (p *Proposal) GetMsgs() ([]sdk.Msg, error) { + return tx.GetMsgs(p.Messages, "proposal") + } func (p *Proposal) SetMsgs(msgs []sdk.Msg) error { diff --git a/x/group/simulation/operations.go b/x/group/simulation/operations.go index 1bb8c205b0d2..98e04352bc2f 100644 --- a/x/group/simulation/operations.go +++ b/x/group/simulation/operations.go @@ -416,7 +416,10 @@ func SimulateMsgSubmitProposal(ak group.AccountKeeper, bk group.BankKeeper, k ke groupPolicyAddr := groupPolicy.Address // Return a no-op if we know the proposal cannot be created - policy := groupPolicy.GetDecisionPolicy() + policy, err := groupPolicy.GetDecisionPolicy() + if err != nil { + return simtypes.NoOpMsg(group.ModuleName, TypeMsgSubmitProposal, ""), nil, nil + } err = policy.Validate(*g, group.DefaultConfig()) if err != nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgSubmitProposal, ""), nil, nil @@ -710,7 +713,7 @@ func SimulateMsgUpdateGroupPolicyAdmin(ak group.AccountKeeper, bk group.BankKeep } } -// // SimulateMsgUpdateGroupPolicyDecisionPolicy generates a NewMsgUpdateGroupPolicyDecisionPolicyRequest with random values +// // SimulateMsgUpdateGroupPolicyDecisionPolicy generates a NewMsgUpdateGroupPolicyDecisionPolicy with random values func SimulateMsgUpdateGroupPolicyDecisionPolicy(ak group.AccountKeeper, bk group.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( @@ -735,7 +738,7 @@ func SimulateMsgUpdateGroupPolicyDecisionPolicy(ak group.AccountKeeper, return simtypes.NoOpMsg(group.ModuleName, TypeMsgUpdateGroupPolicyDecisionPolicy, fmt.Sprintf("fail to decide bech32 address: %s", err.Error())), nil, nil } - msg, err := group.NewMsgUpdateGroupPolicyDecisionPolicyRequest(acc.Address, groupPolicyBech32, &group.ThresholdDecisionPolicy{ + msg, err := group.NewMsgUpdateGroupPolicyDecisionPolicy(acc.Address, groupPolicyBech32, &group.ThresholdDecisionPolicy{ Threshold: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 10)), Windows: &group.DecisionPolicyWindows{ VotingPeriod: time.Second * time.Duration(simtypes.RandIntBetween(r, 100, 1000)), @@ -837,7 +840,10 @@ func SimulateMsgWithdrawProposal(ak group.AccountKeeper, groupPolicyAddr := groupPolicy.Address ctx := sdk.WrapSDKContext(sdkCtx) - policy := groupPolicy.GetDecisionPolicy() + policy, err := groupPolicy.GetDecisionPolicy() + if err != nil { + return simtypes.NoOpMsg(group.ModuleName, TypeMsgWithdrawProposal, err.Error()), nil, nil + } err = policy.Validate(*g, group.DefaultConfig()) if err != nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgWithdrawProposal, err.Error()), nil, nil diff --git a/x/group/simulation/operations_test.go b/x/group/simulation/operations_test.go index 86c07fd95fe7..8631bb76836c 100644 --- a/x/group/simulation/operations_test.go +++ b/x/group/simulation/operations_test.go @@ -282,7 +282,7 @@ func (suite *SimTestSuite) TestWithdrawProposal() { suite.Require().NoError(err) // setup a proposal - proposalReq, err := group.NewMsgSubmitProposalRequest(groupPolicyRes.Address, []string{addr}, []sdk.Msg{ + proposalReq, err := group.NewMsgSubmitProposal(groupPolicyRes.Address, []string{addr}, []sdk.Msg{ &banktypes.MsgSend{ FromAddress: groupPolicyRes.Address, ToAddress: addr, @@ -349,7 +349,7 @@ func (suite *SimTestSuite) TestSimulateVote() { suite.Require().NoError(err) // setup a proposal - proposalReq, err := group.NewMsgSubmitProposalRequest(groupPolicyRes.Address, []string{addr}, []sdk.Msg{ + proposalReq, err := group.NewMsgSubmitProposal(groupPolicyRes.Address, []string{addr}, []sdk.Msg{ &banktypes.MsgSend{ FromAddress: groupPolicyRes.Address, ToAddress: addr, @@ -415,7 +415,7 @@ func (suite *SimTestSuite) TestSimulateExec() { suite.Require().NoError(err) // setup a proposal - proposalReq, err := group.NewMsgSubmitProposalRequest(groupPolicyRes.Address, []string{addr}, []sdk.Msg{ + proposalReq, err := group.NewMsgSubmitProposal(groupPolicyRes.Address, []string{addr}, []sdk.Msg{ &banktypes.MsgSend{ FromAddress: groupPolicyRes.Address, ToAddress: addr, diff --git a/x/group/spec/01_concepts.md b/x/group/spec/01_concepts.md index aecf91ab4368..de930a6c1ad9 100644 --- a/x/group/spec/01_concepts.md +++ b/x/group/spec/01_concepts.md @@ -10,7 +10,8 @@ A group is simply an aggregation of accounts with associated weights. It is not an account and doesn't have a balance. It doesn't in and of itself have any sort of voting or decision weight. It does have an "administrator" which has the ability to add, remove and update members in the group. Note that a -group policy account could be an administrator of a group. +group policy account could be an administrator of a group, and that the +administrator doesn't necessarily have to be a member of the group. ## Group Policy diff --git a/x/group/tx.pb.go b/x/group/tx.pb.go index 4c0eb24d93ec..ffb99bd436aa 100644 --- a/x/group/tx.pb.go +++ b/x/group/tx.pb.go @@ -1324,6 +1324,8 @@ func (m *MsgExec) GetExecutor() string { // MsgExecResponse is the Msg/Exec request type. type MsgExecResponse struct { + // result is the final result of the proposal execution. + Result ProposalExecutorResult `protobuf:"varint,2,opt,name=result,proto3,enum=cosmos.group.v1.ProposalExecutorResult" json:"result,omitempty"` } func (m *MsgExecResponse) Reset() { *m = MsgExecResponse{} } @@ -1359,6 +1361,13 @@ func (m *MsgExecResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgExecResponse proto.InternalMessageInfo +func (m *MsgExecResponse) GetResult() ProposalExecutorResult { + if m != nil { + return m.Result + } + return PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED +} + // MsgLeaveGroup is the Msg/LeaveGroup request type. type MsgLeaveGroup struct { // address is the account address of the group member. @@ -1486,85 +1495,87 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1/tx.proto", fileDescriptor_6b8d3d629f136420) } var fileDescriptor_6b8d3d629f136420 = []byte{ - // 1241 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x6e, 0xe3, 0x54, - 0x14, 0x8e, 0x93, 0x4c, 0x9b, 0x9e, 0xcc, 0xa4, 0xad, 0x9b, 0x4e, 0x53, 0x77, 0x26, 0x09, 0xa6, - 0xd3, 0xe9, 0x44, 0x53, 0x87, 0xa6, 0x8c, 0x90, 0x0a, 0x42, 0xea, 0x1f, 0xa8, 0x88, 0x40, 0x71, - 0x67, 0x18, 0x60, 0x13, 0xdc, 0xd8, 0xe3, 0xb1, 0x48, 0x72, 0xad, 0x5c, 0xa7, 0x4d, 0x97, 0xc0, - 0x86, 0x9f, 0x0d, 0x12, 0x2f, 0x00, 0xe2, 0x05, 0x58, 0xf4, 0x09, 0x60, 0x33, 0x62, 0x35, 0x62, - 0x85, 0x58, 0xa0, 0x51, 0xbb, 0xe0, 0x05, 0x78, 0x00, 0xe4, 0x7b, 0xed, 0x1b, 0x3b, 0x71, 0x6a, - 0x37, 0x8a, 0x60, 0xd5, 0xda, 0xe7, 0x3b, 0xe7, 0x7c, 0xdf, 0xb9, 0xe7, 0xde, 0x73, 0x1d, 0xc8, - 0xd5, 0x11, 0x6e, 0x22, 0x5c, 0xd6, 0xdb, 0xa8, 0x63, 0x96, 0x8f, 0xd7, 0xcb, 0x56, 0x57, 0x32, - 0xdb, 0xc8, 0x42, 0xfc, 0x34, 0xb5, 0x48, 0xc4, 0x22, 0x1d, 0xaf, 0x0b, 0x59, 0x1d, 0xe9, 0x88, - 0xd8, 0xca, 0xf6, 0x7f, 0x14, 0x26, 0x2c, 0x52, 0x58, 0x8d, 0x1a, 0x1c, 0x1f, 0xc7, 0xa4, 0x23, -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x32, 0x6d, 0x44, 0x8a, 0xeb, 0x77, 0x12, 0x5e, 0x1f, 0xc1, 0x89, 0xb1, 0xfa, 0x9c, 0x83, 0xc5, - 0xe1, 0x97, 0x92, 0xb5, 0x48, 0xa1, 0x59, 0xbf, 0x3d, 0xb8, 0x12, 0x9c, 0x71, 0xf8, 0x14, 0x32, - 0x7d, 0x57, 0x05, 0x31, 0x28, 0x90, 0x1f, 0x23, 0x94, 0xc2, 0x31, 0xde, 0x0d, 0x3b, 0x30, 0x42, - 0x03, 0x37, 0x6c, 0x3f, 0x2a, 0x78, 0xc3, 0x0e, 0x1b, 0x8a, 0xfc, 0x36, 0x24, 0xc9, 0x40, 0xcc, - 0x05, 0x79, 0xd9, 0x16, 0xa1, 0x38, 0xcc, 0xe2, 0x8d, 0x41, 0xce, 0xd5, 0xc0, 0x18, 0xb6, 0x25, - 0x38, 0x86, 0x77, 0x44, 0xf0, 0x0f, 0x01, 0x3c, 0xf3, 0x21, 0x1f, 0x84, 0xef, 0xd9, 0x85, 0x95, - 0xcb, 0xed, 0x6e, 0xd4, 0xed, 0x37, 0x9f, 0x9d, 0xe7, 0xb9, 0xe7, 0xe7, 0x79, 0xee, 0xc5, 0x79, - 0x9e, 0xfb, 0xee, 0x22, 0x1f, 0x7b, 0x7e, 0x91, 0x8f, 0xfd, 0x71, 0x91, 0x8f, 0x7d, 0xb2, 0xac, - 0x1b, 0xd6, 0xd3, 0xce, 0x91, 0x54, 0x47, 0x4d, 0xe7, 0xd7, 0x3d, 0xe7, 0xcf, 0x1a, 0x56, 0x3f, - 0x2b, 0x77, 0xe9, 0x2f, 0x78, 0x47, 0x13, 0xe4, 0x82, 0xb5, 0xf1, 0x6f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x91, 0xea, 0x5a, 0x20, 0x4f, 0x14, 0x00, 0x00, + // 1271 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 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xbd, 0x4e, 0xc2, 0xeb, 0x23, 0x38, 0x31, 0x56, 0x9f, 0x73, 0xb0, 0x38, 0xfc, + 0x56, 0xb3, 0x1e, 0x2a, 0x34, 0xeb, 0xb7, 0xfb, 0x57, 0x82, 0x33, 0x0e, 0x9f, 0x42, 0xaa, 0xef, + 0xae, 0x21, 0xfa, 0x05, 0xf2, 0x62, 0x84, 0x42, 0x30, 0xa6, 0x77, 0xc3, 0x0e, 0xcc, 0x60, 0xdf, + 0x0d, 0xdb, 0x8f, 0xf2, 0xdf, 0xb0, 0xc3, 0xa6, 0x2a, 0xbf, 0x03, 0x71, 0x32, 0x51, 0x33, 0x7e, + 0x5e, 0xb6, 0x45, 0xc8, 0x0f, 0xb3, 0xf4, 0xc6, 0x20, 0xe7, 0xaa, 0x6f, 0x0c, 0xdb, 0xe2, 0x1f, + 0xc3, 0x33, 0x63, 0x1e, 0x00, 0xf4, 0xcc, 0x87, 0xac, 0x1f, 0xbe, 0x6b, 0x17, 0x56, 0x2e, 0xb7, + 0xbb, 0x51, 0x77, 0xde, 0x7c, 0x76, 0x9e, 0xe5, 0x9e, 0x9f, 0x67, 0xb9, 0xbf, 0xce, 0xb3, 0xdc, + 0x77, 0x17, 0xd9, 0xc8, 0xf3, 0x8b, 0x6c, 0xe4, 0xf7, 0x8b, 0x6c, 0xe4, 0x93, 0x65, 0xdd, 0xb0, + 0x9e, 0xb4, 0x8f, 0xa4, 0x1a, 0x6a, 0x38, 0x7f, 0x4e, 0x74, 0xfe, 0x59, 0xc7, 0xea, 0x67, 0xc5, + 0x0e, 0xfd, 0x93, 0xe1, 0xd1, 0x04, 0xb9, 0xa1, 0x6d, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xf1, + 0xa7, 0x43, 0xdc, 0xc0, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1599,7 +1610,7 @@ type MsgClient interface { UpdateGroupPolicyMetadata(ctx context.Context, in *MsgUpdateGroupPolicyMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyMetadataResponse, error) // SubmitProposal submits a new proposal. SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error) - // WithdrawProposal aborts a proposal. + // WithdrawProposal withdraws a proposal. WithdrawProposal(ctx context.Context, in *MsgWithdrawProposal, opts ...grpc.CallOption) (*MsgWithdrawProposalResponse, error) // Vote allows a voter to vote on a proposal. Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) @@ -1765,7 +1776,7 @@ type MsgServer interface { UpdateGroupPolicyMetadata(context.Context, *MsgUpdateGroupPolicyMetadata) (*MsgUpdateGroupPolicyMetadataResponse, error) // SubmitProposal submits a new proposal. SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error) - // WithdrawProposal aborts a proposal. + // WithdrawProposal withdraws a proposal. WithdrawProposal(context.Context, *MsgWithdrawProposal) (*MsgWithdrawProposalResponse, error) // Vote allows a voter to vote on a proposal. Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) @@ -3110,6 +3121,11 @@ func (m *MsgExecResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Result != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Result)) + i-- + dAtA[i] = 0x10 + } return len(dAtA) - i, nil } @@ -3609,6 +3625,9 @@ func (m *MsgExecResponse) Size() (n int) { } var l int _ = l + if m.Result != 0 { + n += 1 + sovTx(uint64(m.Result)) + } return n } @@ -6361,6 +6380,25 @@ func (m *MsgExecResponse) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: MsgExecResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + m.Result = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Result |= ProposalExecutorResult(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/group/types.go b/x/group/types.go index feeab8387b46..02e14304f999 100644 --- a/x/group/types.go +++ b/x/group/types.go @@ -4,8 +4,6 @@ import ( "fmt" "time" - proto "github.com/gogo/protobuf/proto" - "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -74,16 +72,16 @@ func (p ThresholdDecisionPolicy) Allow(tallyResult TallyResult, totalPower strin threshold, err := math.NewPositiveDecFromString(p.Threshold) if err != nil { - return DecisionPolicyResult{}, err + return DecisionPolicyResult{}, sdkerrors.Wrap(err, "threshold") } yesCount, err := math.NewNonNegativeDecFromString(tallyResult.YesCount) if err != nil { - return DecisionPolicyResult{}, err + return DecisionPolicyResult{}, sdkerrors.Wrap(err, "yes count") } totalPowerDec, err := math.NewNonNegativeDecFromString(totalPower) if err != nil { - return DecisionPolicyResult{}, err + return DecisionPolicyResult{}, sdkerrors.Wrap(err, "total power") } // the real threshold of the policy is `min(threshold,total_weight)`. If @@ -187,15 +185,15 @@ func (p PercentageDecisionPolicy) Allow(tally TallyResult, totalPower string, si percentage, err := math.NewPositiveDecFromString(p.Percentage) if err != nil { - return DecisionPolicyResult{}, err + return DecisionPolicyResult{}, sdkerrors.Wrap(err, "percentage") } yesCount, err := math.NewNonNegativeDecFromString(tally.YesCount) if err != nil { - return DecisionPolicyResult{}, err + return DecisionPolicyResult{}, sdkerrors.Wrap(err, "yes count") } totalPowerDec, err := math.NewNonNegativeDecFromString(totalPower) if err != nil { - return DecisionPolicyResult{}, err + return DecisionPolicyResult{}, sdkerrors.Wrap(err, "total power") } yesPercentage, err := yesCount.Quo(totalPowerDec) @@ -252,11 +250,7 @@ func NewGroupPolicyInfo(address sdk.AccAddress, group uint64, admin sdk.AccAddre } func (g *GroupPolicyInfo) SetDecisionPolicy(decisionPolicy DecisionPolicy) error { - msg, ok := decisionPolicy.(proto.Message) - if !ok { - return fmt.Errorf("can't proto marshal %T", msg) - } - any, err := codectypes.NewAnyWithValue(msg) + any, err := codectypes.NewAnyWithValue(decisionPolicy) if err != nil { return err } @@ -264,12 +258,13 @@ func (g *GroupPolicyInfo) SetDecisionPolicy(decisionPolicy DecisionPolicy) error return nil } -func (g GroupPolicyInfo) GetDecisionPolicy() DecisionPolicy { +func (g GroupPolicyInfo) GetDecisionPolicy() (DecisionPolicy, error) { decisionPolicy, ok := g.DecisionPolicy.GetCachedValue().(DecisionPolicy) if !ok { - return nil + return nil, sdkerrors.ErrInvalidType.Wrapf("expected %T, got %T", (DecisionPolicy)(nil), g.DecisionPolicy.GetCachedValue()) } - return decisionPolicy + + return decisionPolicy, nil } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces @@ -329,11 +324,11 @@ func (g GroupPolicyInfo) ValidateBasic() error { if g.Version == 0 { return sdkerrors.Wrap(errors.ErrEmpty, "group policy version") } - policy := g.GetDecisionPolicy() - - if policy == nil { - return sdkerrors.Wrap(errors.ErrEmpty, "group policy's decision policy") + policy, err := g.GetDecisionPolicy() + if err != nil { + return sdkerrors.Wrap(err, "group policy decision policy") } + if err := policy.ValidateBasic(); err != nil { return sdkerrors.Wrap(err, "group policy's decision policy") } diff --git a/x/group/types.pb.go b/x/group/types.pb.go index 0930b5a198f2..e9c26287cb2a 100644 --- a/x/group/types.pb.go +++ b/x/group/types.pb.go @@ -700,7 +700,7 @@ type Proposal struct { // at this point, and the `final_tally_result`and `status` fields will be // accordingly updated. VotingPeriodEnd time.Time `protobuf:"bytes,10,opt,name=voting_period_end,json=votingPeriodEnd,proto3,stdtime" json:"voting_period_end"` - // executor_result is the final result based on the votes and election rule. Initial value is NotRun. + // executor_result is the final result of the proposal execution. Initial value is NotRun. ExecutorResult ProposalExecutorResult `protobuf:"varint,11,opt,name=executor_result,json=executorResult,proto3,enum=cosmos.group.v1.ProposalExecutorResult" json:"executor_result,omitempty"` // messages is a list of `sdk.Msg`s that will be executed if the proposal passes. Messages []*types.Any `protobuf:"bytes,12,rep,name=messages,proto3" json:"messages,omitempty"` @@ -886,89 +886,89 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1/types.proto", fileDescriptor_f5bddd15d7a54a9d) } var fileDescriptor_f5bddd15d7a54a9d = []byte{ - // 1306 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4d, 0x6f, 0x1b, 0xc5, - 0x1b, 0xf7, 0xda, 0x8e, 0x5f, 0x1e, 0xa7, 0xb6, 0xff, 0xd3, 0xfc, 0x9b, 0x4d, 0x52, 0xec, 0x60, - 0x2a, 0x88, 0x8a, 0x6a, 0xb7, 0xae, 0x44, 0xa5, 0x1e, 0x00, 0xdb, 0xd9, 0x52, 0x57, 0xad, 0x6d, - 0x76, 0xd7, 0x09, 0xe5, 0xb2, 0xda, 0x78, 0xa7, 0x9b, 0x15, 0xf6, 0x8e, 0xb5, 0x3b, 0x4e, 0xea, - 0x6f, 0xd0, 0x0b, 0xa2, 0x47, 0x2e, 0x48, 0x95, 0xf8, 0x04, 0x48, 0x3d, 0x20, 0x2e, 0x5c, 0x2b, - 0x0e, 0xa8, 0xe2, 0xc4, 0x09, 0x50, 0x7b, 0x29, 0x27, 0xbe, 0x02, 0xda, 0x99, 0xd9, 0xc4, 0x2f, - 0x89, 0x69, 0x2a, 0x38, 0xc5, 0xf3, 0xfc, 0x7e, 0xcf, 0x33, 0xcf, 0xfb, 0x64, 0x61, 0xa3, 0x47, - 0xfc, 0x01, 0xf1, 0x2b, 0xb6, 0x47, 0x46, 0xc3, 0xca, 0xc1, 0xb5, 0x0a, 0x1d, 0x0f, 0xb1, 0x5f, - 0x1e, 0x7a, 0x84, 0x12, 0x94, 0xe3, 0x60, 0x99, 0x81, 0xe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xd6, 0xbc, 0xdb, - 0x55, 0x95, 0x7c, 0x8c, 0x3b, 0x5f, 0xff, 0xf0, 0xd9, 0x8b, 0x82, 0xf4, 0xfc, 0x45, 0x41, 0xfa, - 0xe3, 0x45, 0x41, 0x7a, 0xfc, 0xb2, 0x10, 0x79, 0xfe, 0xb2, 0x10, 0xf9, 0xf5, 0x65, 0x21, 0xf2, - 0xf9, 0x25, 0xdb, 0xa1, 0xfb, 0xa3, 0xbd, 0x72, 0x8f, 0x0c, 0xc4, 0x97, 0x84, 0xf8, 0x73, 0xc5, - 0xb7, 0xbe, 0xa8, 0x3c, 0xe4, 0x1f, 0x3a, 0x7b, 0x09, 0xd6, 0x89, 0xd7, 0xff, 0x0e, 0x00, 0x00, - 0xff, 0xff, 0x5b, 0x5c, 0x1c, 0x07, 0xff, 0x0c, 0x00, 0x00, + // 1311 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xf7, 0xda, 0x8e, 0x7f, 0x3c, 0xa7, 0xb6, 0xbf, 0xd3, 0x7c, 0x9b, 0x4d, 0x52, 0xec, 0x60, + 0x2a, 0x88, 0x8a, 0x62, 0xb7, 0xae, 0x44, 0xa5, 0x1e, 0x00, 0xdb, 0xd9, 0x52, 0x57, 0xad, 0x6d, + 0xed, 0xae, 0x13, 0xca, 0x65, 0xb5, 0xf1, 0x4e, 0x37, 0x2b, 0xec, 0x1d, 0x6b, 0x77, 0x9c, 0xd4, + 0xff, 0x41, 0x2f, 0x88, 0x1e, 0xb9, 0x20, 0x55, 0xe2, 0x2f, 0x40, 0xea, 0x01, 0x71, 0xe1, 0x5a, + 0xf5, 0x80, 0x2a, 0x4e, 0x9c, 0x00, 0xb5, 0x17, 0x38, 0x71, 0xe5, 0x88, 0x76, 0x66, 0x36, 0xf1, + 0x8f, 0xc4, 0xb4, 0x15, 0x9c,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68, 0x0b, 0x2e, 0x1d, 0xeb, 0x2b, 0x9f, 0x2a, 0x8d, 0xae, 0xde, + 0x56, 0x0d, 0x55, 0xd1, 0xba, 0x77, 0xf4, 0x99, 0x08, 0x2f, 0xc1, 0xe6, 0x99, 0xcc, 0x56, 0x5b, + 0x37, 0xd4, 0x6e, 0x2b, 0x2f, 0x2d, 0x64, 0x69, 0xdd, 0x46, 0x43, 0xd1, 0xb4, 0x7c, 0x74, 0x21, + 0xeb, 0x66, 0xad, 0x79, 0xa7, 0xab, 0x2a, 0xf9, 0x18, 0x77, 0xbe, 0xfe, 0xe1, 0xd3, 0x17, 0x05, + 0xe9, 0xf9, 0x8b, 0x82, 0xf4, 0xdb, 0x8b, 0x82, 0xf4, 0xe8, 0x65, 0x21, 0xf2, 0xfc, 0x65, 0x21, + 0xf2, 0xf3, 0xcb, 0x42, 0xe4, 0xb3, 0x4b, 0xb6, 0x43, 0x0f, 0x46, 0xfb, 0xe5, 0x1e, 0x19, 0x88, + 0x2f, 0x0b, 0xf1, 0x67, 0xdb, 0xb7, 0x3e, 0xaf, 0x3c, 0xe0, 0x1f, 0x3e, 0xfb, 0x09, 0xd6, 0x89, + 0xd7, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x45, 0xe0, 0x5b, 0x0f, 0x0d, 0x00, 0x00, } func (this *GroupPolicyInfo) Equal(that interface{}) bool { diff --git a/x/group/typesupport.go b/x/group/typesupport.go index f89dc2c3b83b..3bc01cddb1cd 100644 --- a/x/group/typesupport.go +++ b/x/group/typesupport.go @@ -6,6 +6,9 @@ import ( "github.com/cosmos/cosmos-sdk/x/group/errors" ) +// ValidateBasic performs stateless validation on an array of members. On top +// of validating each member individually, it also makes sure there are no +// duplicate addresses. func (ms Members) ValidateBasic() error { index := make(map[string]struct{}, len(ms.Members)) for i := range ms.Members { @@ -22,11 +25,11 @@ func (ms Members) ValidateBasic() error { return nil } -type AccAddresses []sdk.AccAddress +type accAddresses []sdk.AccAddress // ValidateBasic verifies that there's no duplicate address. // Individual account address validation has to be done separately. -func (a AccAddresses) ValidateBasic() error { +func (a accAddresses) ValidateBasic() error { index := make(map[string]struct{}, len(a)) for i := range a { accAddr := a[i]