From 1a890f694a1ec2331dbd931a3914136953bf1355 Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Wed, 5 Jan 2022 21:07:20 +0530 Subject: [PATCH 01/32] feat: add proto definitions --- proto/cosmos/group/v1beta1/events.proto | 7 + proto/cosmos/group/v1beta1/tx.proto | 15 + x/group/events.pb.go | 171 +++++++- x/group/tx.pb.go | 497 +++++++++++++++++++++--- 4 files changed, 619 insertions(+), 71 deletions(-) diff --git a/proto/cosmos/group/v1beta1/events.proto b/proto/cosmos/group/v1beta1/events.proto index 9b59e4744cf9..5764c56f58d7 100644 --- a/proto/cosmos/group/v1beta1/events.proto +++ b/proto/cosmos/group/v1beta1/events.proto @@ -56,3 +56,10 @@ message EventExec { // proposal_id is the unique ID of the proposal. uint64 proposal_id = 1; } + +// EventLeaveGroup is an event emitted when group member leaves the group. +message EventLeaveGroup { + + // group_id is the unique ID of the group. + uint64 group_id = 1; +} diff --git a/proto/cosmos/group/v1beta1/tx.proto b/proto/cosmos/group/v1beta1/tx.proto index 6e93bdc9caad..7796b01bf263 100644 --- a/proto/cosmos/group/v1beta1/tx.proto +++ b/proto/cosmos/group/v1beta1/tx.proto @@ -45,6 +45,9 @@ service Msg { // Exec executes a proposal. rpc Exec(MsgExec) returns (MsgExecResponse); + + // LeaveGroup allows a group member to leave the group. + rpc LeaveGroup(MsgLeaveGroup) returns (MsgLeaveGroupResponse); } // @@ -279,3 +282,15 @@ message MsgExec { // MsgExecResponse is the Msg/Exec request type. message MsgExecResponse {} + +// MsgLeaveGroup is the Msg/LeaveGroup request type. +message MsgLeaveGroup { + // member_address is the account address of the group member. + string member_address = 1; + + // group_id is the unique ID of the group. + uint64 group_id = 2; +} + +// MsgLeaveGroupResponse is the Msg/LeaveGroup response type. +message MsgLeaveGroupResponse {} diff --git a/x/group/events.pb.go b/x/group/events.pb.go index c298b3ddc827..8816889466fc 100644 --- a/x/group/events.pb.go +++ b/x/group/events.pb.go @@ -345,6 +345,52 @@ func (m *EventExec) GetProposalId() uint64 { return 0 } +// EventLeaveGroup is an event emitted when group member leaves the group. +type EventLeaveGroup struct { + // group_id is the unique ID of the group. + GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` +} + +func (m *EventLeaveGroup) Reset() { *m = EventLeaveGroup{} } +func (m *EventLeaveGroup) String() string { return proto.CompactTextString(m) } +func (*EventLeaveGroup) ProtoMessage() {} +func (*EventLeaveGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_7879e051fb126fc0, []int{7} +} +func (m *EventLeaveGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventLeaveGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventLeaveGroup.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventLeaveGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventLeaveGroup.Merge(m, src) +} +func (m *EventLeaveGroup) XXX_Size() int { + return m.Size() +} +func (m *EventLeaveGroup) XXX_DiscardUnknown() { + xxx_messageInfo_EventLeaveGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_EventLeaveGroup proto.InternalMessageInfo + +func (m *EventLeaveGroup) GetGroupId() uint64 { + if m != nil { + return m.GroupId + } + return 0 +} + func init() { proto.RegisterType((*EventCreateGroup)(nil), "cosmos.group.v1beta1.EventCreateGroup") proto.RegisterType((*EventUpdateGroup)(nil), "cosmos.group.v1beta1.EventUpdateGroup") @@ -353,12 +399,13 @@ func init() { proto.RegisterType((*EventCreateProposal)(nil), "cosmos.group.v1beta1.EventCreateProposal") proto.RegisterType((*EventVote)(nil), "cosmos.group.v1beta1.EventVote") proto.RegisterType((*EventExec)(nil), "cosmos.group.v1beta1.EventExec") + proto.RegisterType((*EventLeaveGroup)(nil), "cosmos.group.v1beta1.EventLeaveGroup") } func init() { proto.RegisterFile("cosmos/group/v1beta1/events.proto", fileDescriptor_7879e051fb126fc0) } var fileDescriptor_7879e051fb126fc0 = []byte{ - // 280 bytes of a gzipped FileDescriptorProto + // 290 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x2f, 0xca, 0x2f, 0x2d, 0xd0, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x81, @@ -371,12 +418,13 @@ var fileDescriptor_7879e051fb126fc0 = []byte{ 0x8e, 0x10, 0x99, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0xf4, 0x20, 0x98, 0x42, 0xb8, 0x69, 0x48, 0x96, 0x53, 0x60, 0x9a, 0x19, 0x97, 0x30, 0x92, 0xdb, 0x02, 0x8a, 0xf2, 0x0b, 0xf2, 0x8b, 0x13, 0x73, 0x84, 0xe4, 0xb9, 0xb8, 0x0b, 0xa0, 0x6c, 0x84, 0x87, 0xb8, 0x60, 0x42, 0x9e, 0x29, 0x4a, 0x3a, - 0x5c, 0x9c, 0x60, 0x7d, 0x61, 0xf9, 0x25, 0xa9, 0xc4, 0xab, 0x76, 0xad, 0x48, 0x4d, 0x26, 0xa8, - 0xda, 0xc9, 0xee, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, - 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x54, 0xd2, 0x33, - 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xa1, 0x11, 0x08, 0xa5, 0x74, 0x8b, 0x53, 0xb2, - 0xf5, 0x2b, 0x20, 0x69, 0x22, 0x89, 0x0d, 0x1c, 0xa9, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x78, 0x22, 0x27, 0x30, 0x2a, 0x02, 0x00, 0x00, + 0x5c, 0x9c, 0x60, 0x7d, 0x61, 0xf9, 0x25, 0xa9, 0xc4, 0xab, 0x76, 0xad, 0x48, 0x4d, 0x26, 0x46, + 0x35, 0x3f, 0x58, 0xb5, 0x4f, 0x6a, 0x62, 0x19, 0xc1, 0xd0, 0x75, 0xb2, 0x3b, 0xf1, 0x48, 0x8e, + 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, + 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x95, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, + 0xfc, 0x5c, 0x68, 0x74, 0x43, 0x29, 0xdd, 0xe2, 0x94, 0x6c, 0xfd, 0x0a, 0x48, 0x0a, 0x4a, 0x62, + 0x03, 0x27, 0x01, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6f, 0xcd, 0x86, 0x37, 0x58, 0x02, + 0x00, 0x00, } func (m *EventCreateGroup) Marshal() (dAtA []byte, err error) { @@ -579,6 +627,34 @@ func (m *EventExec) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *EventLeaveGroup) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventLeaveGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventLeaveGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GroupId != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.GroupId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { offset -= sovEvents(v) base := offset @@ -676,6 +752,18 @@ func (m *EventExec) Size() (n int) { return n } +func (m *EventLeaveGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.GroupId != 0 { + n += 1 + sovEvents(uint64(m.GroupId)) + } + return n +} + func sovEvents(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1191,6 +1279,75 @@ func (m *EventExec) Unmarshal(dAtA []byte) error { } return nil } +func (m *EventLeaveGroup) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventLeaveGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventLeaveGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + } + m.GroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipEvents(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/group/tx.pb.go b/x/group/tx.pb.go index 7fcd4eeba7c4..5f2353dbc009 100644 --- a/x/group/tx.pb.go +++ b/x/group/tx.pb.go @@ -1161,6 +1161,98 @@ func (m *MsgExecResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgExecResponse proto.InternalMessageInfo +// MsgLeaveGroup is the Msg/LeaveGroup request type. +type MsgLeaveGroup struct { + // member_address is the account address of the group member. + MemberAddress string `protobuf:"bytes,1,opt,name=member_address,json=memberAddress,proto3" json:"member_address,omitempty"` + // group_id is the unique ID of the group. + GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` +} + +func (m *MsgLeaveGroup) Reset() { *m = MsgLeaveGroup{} } +func (m *MsgLeaveGroup) String() string { return proto.CompactTextString(m) } +func (*MsgLeaveGroup) ProtoMessage() {} +func (*MsgLeaveGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{22} +} +func (m *MsgLeaveGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgLeaveGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgLeaveGroup.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgLeaveGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgLeaveGroup.Merge(m, src) +} +func (m *MsgLeaveGroup) XXX_Size() int { + return m.Size() +} +func (m *MsgLeaveGroup) XXX_DiscardUnknown() { + xxx_messageInfo_MsgLeaveGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgLeaveGroup proto.InternalMessageInfo + +func (m *MsgLeaveGroup) GetMemberAddress() string { + if m != nil { + return m.MemberAddress + } + return "" +} + +func (m *MsgLeaveGroup) GetGroupId() uint64 { + if m != nil { + return m.GroupId + } + return 0 +} + +// MsgLeaveGroupResponse is the Msg/LeaveGroup response type. +type MsgLeaveGroupResponse struct { +} + +func (m *MsgLeaveGroupResponse) Reset() { *m = MsgLeaveGroupResponse{} } +func (m *MsgLeaveGroupResponse) String() string { return proto.CompactTextString(m) } +func (*MsgLeaveGroupResponse) ProtoMessage() {} +func (*MsgLeaveGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{23} +} +func (m *MsgLeaveGroupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgLeaveGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgLeaveGroupResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgLeaveGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgLeaveGroupResponse.Merge(m, src) +} +func (m *MsgLeaveGroupResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgLeaveGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgLeaveGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgLeaveGroupResponse proto.InternalMessageInfo + func init() { proto.RegisterEnum("cosmos.group.v1beta1.Exec", Exec_name, Exec_value) proto.RegisterType((*MsgCreateGroup)(nil), "cosmos.group.v1beta1.MsgCreateGroup") @@ -1185,75 +1277,80 @@ func init() { proto.RegisterType((*MsgVoteResponse)(nil), "cosmos.group.v1beta1.MsgVoteResponse") proto.RegisterType((*MsgExec)(nil), "cosmos.group.v1beta1.MsgExec") proto.RegisterType((*MsgExecResponse)(nil), "cosmos.group.v1beta1.MsgExecResponse") + proto.RegisterType((*MsgLeaveGroup)(nil), "cosmos.group.v1beta1.MsgLeaveGroup") + proto.RegisterType((*MsgLeaveGroupResponse)(nil), "cosmos.group.v1beta1.MsgLeaveGroupResponse") } func init() { proto.RegisterFile("cosmos/group/v1beta1/tx.proto", fileDescriptor_da0de9d603d844fb) } var fileDescriptor_da0de9d603d844fb = []byte{ - // 995 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x51, 0x6f, 0xdb, 0x54, - 0x14, 0xce, 0x6d, 0xbc, 0xb6, 0x39, 0x1d, 0x59, 0xeb, 0x85, 0x29, 0x35, 0x6d, 0x12, 0x4c, 0x81, - 0x50, 0x5a, 0x9b, 0xa6, 0x43, 0xa0, 0x69, 0x42, 0xb4, 0x5d, 0x40, 0x91, 0x08, 0x2a, 0x1e, 0x43, - 0x80, 0x90, 0x22, 0x27, 0xbe, 0x78, 0x86, 0xc6, 0xd7, 0xca, 0x75, 0xbb, 0xe6, 0x09, 0x89, 0x27, - 0x24, 0x5e, 0x78, 0x43, 0x42, 0x02, 0xf1, 0x07, 0x78, 0x9b, 0xf8, 0x0d, 0x13, 0x4f, 0x13, 0x0f, - 0x88, 0x07, 0x84, 0xa0, 0xfd, 0x1d, 0x48, 0x28, 0xf7, 0xda, 0x77, 0xf1, 0xe2, 0xc4, 0x4e, 0x54, - 0xf5, 0xa9, 0xb5, 0xcf, 0x77, 0xce, 0xf9, 0xbe, 0x7b, 0xce, 0xf1, 0xb9, 0x81, 0xf5, 0x0e, 0xa1, - 0x5d, 0x42, 0x75, 0xbb, 0x47, 0x8e, 0x3d, 0xfd, 0x64, 0xa7, 0x8d, 0x7d, 0x73, 0x47, 0xf7, 0x4f, - 0x35, 0xaf, 0x47, 0x7c, 0x22, 0x17, 0xb8, 0x59, 0x63, 0x66, 0x2d, 0x30, 0x2b, 0x05, 0x9b, 0xd8, - 0x84, 0x01, 0xf4, 0xc1, 0x7f, 0x1c, 0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0x3c, 0x75, 0x6c, 0x37, 0x85, 0xe2, 0x00, 0x17, - 0x24, 0x64, 0x0c, 0x82, 0x84, 0x9b, 0x9b, 0x20, 0xb1, 0x6c, 0x05, 0x58, 0xae, 0x7f, 0x5c, 0x3f, - 0x68, 0xdd, 0x7b, 0xff, 0xee, 0x61, 0xfd, 0xa0, 0xf1, 0x4e, 0xa3, 0x7e, 0x67, 0x39, 0x23, 0x5f, - 0x85, 0x45, 0xf6, 0xf6, 0x43, 0xe3, 0x93, 0x65, 0x54, 0xfb, 0x2f, 0x07, 0xd9, 0x26, 0xb5, 0x65, - 0x13, 0x96, 0x86, 0x6f, 0x66, 0x1b, 0x63, 0x6e, 0x17, 0x91, 0x0f, 0xbd, 0xb2, 0x95, 0x06, 0x25, - 0x5a, 0xe3, 0x04, 0xe4, 0x98, 0xab, 0xd2, 0xab, 0x63, 0x63, 0x8c, 0x82, 0x95, 0xdd, 0x29, 0xc0, - 0x22, 0xaf, 0x07, 0xcb, 0x23, 0x37, 0x9a, 0x57, 0xd2, 0x04, 0x62, 0x50, 0x65, 0x27, 0x35, 0x54, - 0x64, 0xec, 0xc3, 0xf5, 0xb8, 0xbb, 0xc8, 0x56, 0x3a, 0xf6, 0x1c, 0xad, 0xdc, 0x9c, 0x06, 0x2d, - 0x52, 0x53, 0x58, 0x19, 0xbd, 0x62, 0x6c, 0xa6, 0xa9, 0x13, 0xc7, 0x2a, 0xb5, 0xf4, 0x58, 0x91, - 0xf4, 0x6b, 0x04, 0x37, 0xc6, 0xec, 0x6a, 0x3d, 0x8d, 0x8a, 0x21, 0x07, 0xe5, 0x8d, 0x29, 0x1d, - 0x04, 0x89, 0x1f, 0x11, 0x94, 0x93, 0x56, 0xea, 0x9b, 0xe9, 0x83, 0x47, 0x3d, 0x95, 0xb7, 0x67, - 0xf5, 0x14, 0xfc, 0xbe, 0x45, 0xb0, 0x3a, 0x7e, 0xc1, 0xd5, 0xd2, 0xc7, 0x17, 0x1d, 0x72, 0x6b, - 0x7a, 0x1f, 0xc1, 0xe6, 0x0b, 0xc8, 0x3f, 0xb5, 0xa4, 0x5e, 0x4e, 0x28, 0x7c, 0x08, 0x54, 0xf4, - 0x94, 0x40, 0x91, 0xeb, 0x3d, 0x90, 0xd8, 0xe7, 0x7e, 0x7d, 0xac, 0xe3, 0xc0, 0xac, 0xbc, 0x38, - 0xd1, 0x3c, 0x1c, 0x8d, 0x7d, 0xdd, 0xc6, 0x47, 0x1b, 0x98, 0x27, 0x44, 0x1b, 0xfe, 0x56, 0xee, - 0xbf, 0xf5, 0xe8, 0xac, 0x84, 0x1e, 0x9f, 0x95, 0xd0, 0x3f, 0x67, 0x25, 0xf4, 0xdd, 0x79, 0x29, - 0xf3, 0xf8, 0xbc, 0x94, 0xf9, 0xf3, 0xbc, 0x94, 0xf9, 0x74, 0xc3, 0x76, 0xfc, 0xfb, 0xc7, 0x6d, - 0xad, 0x43, 0xba, 0xc1, 0xaf, 0xe0, 0xe0, 0xcf, 0x36, 0xb5, 0xbe, 0xd4, 0x4f, 0xf9, 0x2f, 0xdd, - 0xf6, 0x3c, 0x5b, 0xab, 0xbb, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xf1, 0xe7, 0xd1, 0x30, 0x81, - 0x0f, 0x00, 0x00, + // 1044 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x5f, 0x6f, 0xdb, 0x54, + 0x14, 0xcf, 0x6d, 0xbc, 0xfe, 0x39, 0xdd, 0xb2, 0xd6, 0x0b, 0x23, 0x35, 0x6d, 0x12, 0xbc, 0x0e, + 0x42, 0xd7, 0xda, 0x34, 0x1d, 0x02, 0x4d, 0x13, 0xa2, 0xed, 0x02, 0x8a, 0xb4, 0xa0, 0xce, 0x63, + 0x08, 0x10, 0x22, 0x72, 0xe2, 0x8b, 0x67, 0x68, 0x7c, 0xad, 0x5c, 0xb7, 0x6b, 0x9e, 0x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, 0x61, 0x5a, 0x83, 0x81, 0x76, 0xa4, 0x27, 0xff, 0x94, 0x32, 0x46, + 0x68, 0x22, 0x2b, 0x30, 0xdb, 0xc1, 0xbe, 0x69, 0x99, 0xbe, 0x59, 0xc8, 0x96, 0x51, 0xe5, 0xa2, + 0x21, 0x9e, 0xd5, 0x2d, 0xb8, 0x1a, 0xe5, 0x66, 0x60, 0xea, 0x11, 0x97, 0x62, 0x79, 0x09, 0x66, + 0x99, 0xf3, 0xa6, 0x63, 0x31, 0x9a, 0x92, 0x31, 0xc3, 0x9e, 0xeb, 0x96, 0xfa, 0x0b, 0x82, 0x17, + 0x1a, 0xd4, 0x7e, 0xe0, 0x59, 0xa1, 0x55, 0x23, 0x08, 0x35, 0xae, 0xb0, 0xc1, 0x20, 0x53, 0x91, + 0x20, 0x72, 0x1d, 0x72, 0x5c, 0x40, 0xf3, 0x80, 0xc5, 0xa1, 0x85, 0x6c, 0x6a, 0xe9, 0x97, 0xb8, + 0x25, 0x27, 0x48, 0xd5, 0x12, 0xac, 0xc4, 0xd2, 0x0d, 0xb5, 0xaa, 0xdf, 0x23, 0xb8, 0x12, 0x45, + 0x6c, 0x33, 0x7a, 0xe7, 0x28, 0xe7, 0x0d, 0x98, 0x73, 0xf1, 0xa3, 0x26, 0x77, 0x97, 0x1d, 0xe1, + 0x6e, 0xd6, 0xc5, 0x8f, 0x18, 0x03, 0x75, 0x05, 0x5e, 0x8a, 0x21, 0x26, 0x88, 0x7f, 0xc5, 0xd2, + 0x17, 0x51, 0xc6, 0x13, 0x7b, 0x9e, 0xd4, 0x87, 0xd5, 0x4f, 0x19, 0x8a, 0xf1, 0x04, 0x04, 0xc5, + 0x3f, 0x10, 0xe4, 0xa3, 0x25, 0xb6, 0x47, 0xf6, 0x9d, 0x76, 0xef, 0x39, 0x31, 0x94, 0xef, 0xc1, + 0x65, 0x0b, 0xb7, 0x1d, 0xea, 0x10, 0xb7, 0xe9, 0xb1, 0xc8, 0x05, 0xa9, 0x8c, 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xa1, 0xff, + 0x9d, 0xb7, 0x9f, 0x1c, 0x17, 0xd1, 0xd3, 0xe3, 0x22, 0xfa, 0xf7, 0xb8, 0x88, 0xbe, 0x3b, 0x29, + 0x66, 0x9e, 0x9e, 0x14, 0x33, 0x7f, 0x9e, 0x14, 0x33, 0x9f, 0xac, 0xda, 0x8e, 0xff, 0xf0, 0xa0, + 0xa5, 0xb5, 0x49, 0x27, 0xf8, 0x45, 0x1f, 0xfc, 0xd9, 0xa0, 0xd6, 0x97, 0xfa, 0x11, 0xff, 0xd5, + 0xde, 0x9a, 0x66, 0x2b, 0xc2, 0xd6, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x31, 0x93, 0xbf, 0x4c, + 0x4d, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1290,6 +1387,8 @@ type MsgClient interface { Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) // Exec executes a proposal. Exec(ctx context.Context, in *MsgExec, opts ...grpc.CallOption) (*MsgExecResponse, error) + // LeaveGroup allows a group member to leave the group. + LeaveGroup(ctx context.Context, in *MsgLeaveGroup, opts ...grpc.CallOption) (*MsgLeaveGroupResponse, error) } type msgClient struct { @@ -1399,6 +1498,15 @@ func (c *msgClient) Exec(ctx context.Context, in *MsgExec, opts ...grpc.CallOpti return out, nil } +func (c *msgClient) LeaveGroup(ctx context.Context, in *MsgLeaveGroup, opts ...grpc.CallOption) (*MsgLeaveGroupResponse, error) { + out := new(MsgLeaveGroupResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/LeaveGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // CreateGroup creates a new group with an admin account address, a list of members and some optional metadata. @@ -1423,6 +1531,8 @@ type MsgServer interface { Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) // Exec executes a proposal. Exec(context.Context, *MsgExec) (*MsgExecResponse, error) + // LeaveGroup allows a group member to leave the group. + LeaveGroup(context.Context, *MsgLeaveGroup) (*MsgLeaveGroupResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1462,6 +1572,9 @@ func (*UnimplementedMsgServer) Vote(ctx context.Context, req *MsgVote) (*MsgVote func (*UnimplementedMsgServer) Exec(ctx context.Context, req *MsgExec) (*MsgExecResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Exec not implemented") } +func (*UnimplementedMsgServer) LeaveGroup(ctx context.Context, req *MsgLeaveGroup) (*MsgLeaveGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LeaveGroup not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1665,6 +1778,24 @@ func _Msg_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{ return interceptor(ctx, in, info, handler) } +func _Msg_LeaveGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgLeaveGroup) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).LeaveGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Msg/LeaveGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).LeaveGroup(ctx, req.(*MsgLeaveGroup)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.group.v1beta1.Msg", HandlerType: (*MsgServer)(nil), @@ -1713,6 +1844,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "Exec", Handler: _Msg_Exec_Handler, }, + { + MethodName: "LeaveGroup", + Handler: _Msg_LeaveGroup_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/group/v1beta1/tx.proto", @@ -2515,6 +2650,64 @@ func (m *MsgExecResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MsgLeaveGroup) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgLeaveGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgLeaveGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GroupId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GroupId)) + i-- + dAtA[i] = 0x10 + } + if len(m.MemberAddress) > 0 { + i -= len(m.MemberAddress) + copy(dAtA[i:], m.MemberAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.MemberAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgLeaveGroupResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgLeaveGroupResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgLeaveGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -2881,6 +3074,31 @@ func (m *MsgExecResponse) Size() (n int) { return n } +func (m *MsgLeaveGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MemberAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.GroupId != 0 { + n += 1 + sovTx(uint64(m.GroupId)) + } + return n +} + +func (m *MsgLeaveGroupResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -5150,6 +5368,157 @@ func (m *MsgExecResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgLeaveGroup) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgLeaveGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgLeaveGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MemberAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MemberAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + } + m.GroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgLeaveGroupResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgLeaveGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgLeaveGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 From 212613a0d27c1364bdd963ce570a3e3360782ad3 Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Thu, 20 Jan 2022 18:56:53 +0530 Subject: [PATCH 02/32] feat: implement msg --- x/group/codec.go | 1 + x/group/msgs.go | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/x/group/codec.go b/x/group/codec.go index 8a1d492d1aa5..59def96bb1f3 100644 --- a/x/group/codec.go +++ b/x/group/codec.go @@ -24,6 +24,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgCreateProposal{}, "cosmos-sdk/group/MsgCreateProposal", nil) cdc.RegisterConcrete(&MsgVote{}, "cosmos-sdk/group/MsgVote", nil) cdc.RegisterConcrete(&MsgExec{}, "cosmos-sdk/group/MsgExec", nil) + cdc.RegisterConcrete(&MsgLeaveGroup{}, "cosmos-sdk/group/MsgLeaveGroup", nil) } func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { diff --git a/x/group/msgs.go b/x/group/msgs.go index 4e4a11352d10..5d5e478455b2 100644 --- a/x/group/msgs.go +++ b/x/group/msgs.go @@ -26,6 +26,7 @@ const ( TypeMsgCreateProposal = "create_proposal" TypeMsgVote = "vote" TypeMsgExec = "exec" + TypeMsgLeaveGroup = "leave_group" ) var _ sdk.Msg = &MsgCreateGroup{} @@ -678,3 +679,39 @@ func (m MsgExec) ValidateBasic() error { } return nil } + +var _ sdk.Msg = &MsgLeaveGroup{} + +// Route Implements Msg +func (m MsgLeaveGroup) Route() string { + return RouterKey +} + +// Type Implements Msg +func (m MsgLeaveGroup) Type() string { return TypeMsgLeaveGroup } + +// GetSignBytes Implements Msg +func (m MsgLeaveGroup) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +// GetSigners returns the expected signers for a MsgLeaveGroup +func (m MsgLeaveGroup) GetSigners() []sdk.AccAddress { + signer, err := sdk.AccAddressFromBech32(m.MemberAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{signer} +} + +// ValidateBasic does a sanity check on the provided data +func (m MsgLeaveGroup) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(m.MemberAddress) + if err != nil { + return sdkerrors.Wrap(err, "group member") + } + if m.GroupId == 0 { + return sdkerrors.Wrap(errors.ErrEmpty, "group-id") + } + return nil +} From bad6dc03133260926f9020b23b84dfc82c830586 Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Thu, 20 Jan 2022 18:57:32 +0530 Subject: [PATCH 03/32] WIP: msg server --- x/group/keeper/msg_server.go | 111 +++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/x/group/keeper/msg_server.go b/x/group/keeper/msg_server.go index 1bac956e835b..f0f915b0cde1 100644 --- a/x/group/keeper/msg_server.go +++ b/x/group/keeper/msg_server.go @@ -691,6 +691,117 @@ func (k Keeper) Exec(goCtx context.Context, req *group.MsgExec) (*group.MsgExecR return res, nil } +func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*group.MsgLeaveGroupResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + _, err := sdk.AccAddressFromBech32(req.MemberAddress) + if err != nil { + return nil, err + } + + // Checking if the group member is already part of the group + groupMember, err := k.getGroupMember(ctx, &group.GroupMember{ + GroupId: req.GroupId, + Member: &group.Member{Address: req.MemberAddress}, + }) + if err != nil { + return nil, err + } + + groupIter, err := k.getGroupMembers(ctx, req.GroupId, nil) + if err != nil { + return nil, err + } + defer groupIter.Close() + + var m group.GroupMember + weight := math.NewDecFromInt64(0) + for { + if _, err := groupIter.LoadNext(&m); err != nil { + if errors.ErrORMIteratorDone.Is(err) { + break + } + return nil, err + } + + if m.Member.Address == groupMember.Member.Address { + continue + } + + d, err := math.NewNonNegativeDecFromString(m.Member.Weight) + if err != nil { + return nil, err + } + + weight, err = math.Add(weight, d) + if err != nil { + return nil, err + } + } + + policyIter, err := k.groupPolicyByGroupIndex.Get(ctx.KVStore(k.key), req.GroupId) + if err != nil { + return nil, err + } + defer policyIter.Close() + + var groupPolicy group.GroupPolicyInfo + if _, err := policyIter.LoadNext(&groupPolicy); err != nil { + return nil, err + } + + policy := groupPolicy.GetDecisionPolicy() + switch v := policy.(type) { + case *group.ThresholdDecisionPolicy: + tdp, ok := policy.(*group.ThresholdDecisionPolicy) + if !ok { + return nil, err + } + + threshold, err := math.NewNonNegativeDecFromString(tdp.Threshold) + if err != nil { + return nil, err + } + + if threshold.Cmp(weight) == -1 { + return nil, sdkerrors.ErrInvalidRequest.Wrap("cannot leave group") + } + + // TODO: how to handle other decision policies? + + default: + return nil, sdkerrors.ErrInvalidType.Wrapf("got invalid type %T", v) + } + + // Delete group member in the groupMemberTable. + if err := k.groupMemberTable.Delete(ctx.KVStore(k.key), groupMember); err != nil { + return nil, sdkerrors.Wrap(err, "delete member") + } + + // TODO: update group weight + // k.groupTable.Update() + + ctx.EventManager().EmitTypedEvent(&group.EventLeaveGroup{ + GroupId: req.GroupId, + }) + + return &group.MsgLeaveGroupResponse{}, nil +} + +func (k Keeper) getGroupMember(ctx sdk.Context, member *group.GroupMember) (*group.GroupMember, error) { + var groupMember group.GroupMember + switch err := k.groupMemberTable.GetOne(ctx.KVStore(k.key), + orm.PrimaryKey(member), &groupMember); { + case err == nil: + break + case sdkerrors.ErrNotFound.Is(err): + return nil, sdkerrors.ErrNotFound.Wrapf("%s is not part of group %d", member.Member.Address, member.GroupId) + default: + return nil, err + } + + return &groupMember, nil +} + type authNGroupReq interface { GetGroupID() uint64 GetAdmin() string From 085fa8a55fb331f9d0ed3d3f8f29309c699384d2 Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Fri, 21 Jan 2022 13:18:30 +0530 Subject: [PATCH 04/32] WIP: implementing msg server --- x/group/keeper/msg_server.go | 43 ++++++++++++++++++++------------ x/group/msgs_test.go | 48 ++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 16 deletions(-) diff --git a/x/group/keeper/msg_server.go b/x/group/keeper/msg_server.go index f23cf4eccbeb..6a1e8707cc11 100644 --- a/x/group/keeper/msg_server.go +++ b/x/group/keeper/msg_server.go @@ -717,7 +717,7 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr defer groupIter.Close() var m group.GroupMember - weight := math.NewDecFromInt64(0) + memberWeight := math.NewDecFromInt64(0) for { if _, err := groupIter.LoadNext(&m); err != nil { if errors.ErrORMIteratorDone.Is(err) { @@ -727,17 +727,11 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr } if m.Member.Address == groupMember.Member.Address { - continue - } - - d, err := math.NewNonNegativeDecFromString(m.Member.Weight) - if err != nil { - return nil, err - } - - weight, err = math.Add(weight, d) - if err != nil { - return nil, err + memberWeight, err = math.NewNonNegativeDecFromString(m.Member.Weight) + if err != nil { + return nil, err + } + break } } @@ -752,12 +746,27 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr return nil, err } + groupInfo, err := k.getGroupInfo(ctx, req.GroupId) + if err != nil { + return nil, err + } + + groupWeight, err := math.NewNonNegativeDecFromString(groupInfo.TotalWeight) + if err != nil { + return nil, err + } + + r, err := math.SubNonNegative(groupWeight, memberWeight) + if err != nil { + return nil, err + } + policy := groupPolicy.GetDecisionPolicy() switch v := policy.(type) { case *group.ThresholdDecisionPolicy: tdp, ok := policy.(*group.ThresholdDecisionPolicy) if !ok { - return nil, err + return nil, sdkerrors.ErrInvalidRequest.Wrapf("expected %T, got %T", (*group.ThresholdDecisionPolicy)(nil), policy) } threshold, err := math.NewNonNegativeDecFromString(tdp.Threshold) @@ -765,7 +774,7 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr return nil, err } - if threshold.Cmp(weight) == -1 { + if threshold.Cmp(r) == -1 { return nil, sdkerrors.ErrInvalidRequest.Wrap("cannot leave group") } @@ -780,8 +789,10 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr return nil, sdkerrors.Wrap(err, "delete member") } - // TODO: update group weight - // k.groupTable.Update() + groupInfo.TotalWeight = r.String() + if err := k.groupTable.Update(ctx.KVStore(k.key), groupInfo.GroupId, &groupInfo); err != nil { + return nil, err + } ctx.EventManager().EmitTypedEvent(&group.EventLeaveGroup{ GroupId: req.GroupId, diff --git a/x/group/msgs_test.go b/x/group/msgs_test.go index 83ebd9af79a8..43bc1e26dead 100644 --- a/x/group/msgs_test.go +++ b/x/group/msgs_test.go @@ -768,3 +768,51 @@ func TestMsgExec(t *testing.T) { }) } } + +func TestMsgLeaveGroup(t *testing.T) { + testCases := []struct { + name string + msg *group.MsgLeaveGroup + expErr bool + errMsg string + }{ + { + "invalid group member address", + &group.MsgLeaveGroup{ + MemberAddress: "member", + }, + true, + "group member: decoding bech32 failed", + }, + { + "group id is required", + &group.MsgLeaveGroup{ + MemberAddress: admin.String(), + }, + true, + "group-id: value is empty", + }, + { + "valid testcase", + &group.MsgLeaveGroup{ + MemberAddress: admin.String(), + GroupId: 1, + }, + false, + "", + }, + } + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + msg := tc.msg + err := msg.ValidateBasic() + if tc.expErr { + require.Error(t, err) + require.Contains(t, err.Error(), tc.errMsg) + } else { + require.NoError(t, err) + require.Equal(t, msg.Type(), group.TypeMsgLeaveGroup) + } + }) + } +} From c4582961dc3bc1c794db255f411bbd82f99953c8 Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Fri, 21 Jan 2022 21:05:09 +0530 Subject: [PATCH 05/32] chore: run make proto-gen --- api/cosmos/group/v1beta1/events.pulsar.go | 491 +++++++- api/cosmos/group/v1beta1/genesis.pulsar.go | 7 +- api/cosmos/group/v1beta1/tx.pulsar.go | 1249 ++++++++++++++++++-- api/cosmos/group/v1beta1/tx_grpc.pb.go | 38 + api/cosmos/orm/v1alpha1/orm.pulsar.go | 3 +- proto/cosmos/group/v1beta1/tx.proto | 6 +- x/group/tx.pb.go | 187 +-- 7 files changed, 1775 insertions(+), 206 deletions(-) diff --git a/api/cosmos/group/v1beta1/events.pulsar.go b/api/cosmos/group/v1beta1/events.pulsar.go index 062aec3f02c9..169fe88abdbb 100644 --- a/api/cosmos/group/v1beta1/events.pulsar.go +++ b/api/cosmos/group/v1beta1/events.pulsar.go @@ -2872,6 +2872,410 @@ func (x *fastReflection_EventExec) ProtoMethods() *protoiface.Methods { } } +var ( + md_EventLeaveGroup protoreflect.MessageDescriptor + fd_EventLeaveGroup_group_id protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_group_v1beta1_events_proto_init() + md_EventLeaveGroup = File_cosmos_group_v1beta1_events_proto.Messages().ByName("EventLeaveGroup") + fd_EventLeaveGroup_group_id = md_EventLeaveGroup.Fields().ByName("group_id") +} + +var _ protoreflect.Message = (*fastReflection_EventLeaveGroup)(nil) + +type fastReflection_EventLeaveGroup EventLeaveGroup + +func (x *EventLeaveGroup) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventLeaveGroup)(x) +} + +func (x *EventLeaveGroup) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_group_v1beta1_events_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_EventLeaveGroup_messageType fastReflection_EventLeaveGroup_messageType +var _ protoreflect.MessageType = fastReflection_EventLeaveGroup_messageType{} + +type fastReflection_EventLeaveGroup_messageType struct{} + +func (x fastReflection_EventLeaveGroup_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventLeaveGroup)(nil) +} +func (x fastReflection_EventLeaveGroup_messageType) New() protoreflect.Message { + return new(fastReflection_EventLeaveGroup) +} +func (x fastReflection_EventLeaveGroup_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventLeaveGroup +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventLeaveGroup) Descriptor() protoreflect.MessageDescriptor { + return md_EventLeaveGroup +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_EventLeaveGroup) Type() protoreflect.MessageType { + return _fastReflection_EventLeaveGroup_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventLeaveGroup) New() protoreflect.Message { + return new(fastReflection_EventLeaveGroup) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventLeaveGroup) Interface() protoreflect.ProtoMessage { + return (*EventLeaveGroup)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_EventLeaveGroup) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.GroupId != uint64(0) { + value := protoreflect.ValueOfUint64(x.GroupId) + if !f(fd_EventLeaveGroup_group_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_EventLeaveGroup) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.group.v1beta1.EventLeaveGroup.group_id": + return x.GroupId != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.EventLeaveGroup")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.EventLeaveGroup does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventLeaveGroup) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.group.v1beta1.EventLeaveGroup.group_id": + x.GroupId = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.EventLeaveGroup")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.EventLeaveGroup does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_EventLeaveGroup) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.group.v1beta1.EventLeaveGroup.group_id": + value := x.GroupId + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.EventLeaveGroup")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.EventLeaveGroup does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventLeaveGroup) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.group.v1beta1.EventLeaveGroup.group_id": + x.GroupId = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.EventLeaveGroup")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.EventLeaveGroup does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventLeaveGroup) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.group.v1beta1.EventLeaveGroup.group_id": + panic(fmt.Errorf("field group_id of message cosmos.group.v1beta1.EventLeaveGroup is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.EventLeaveGroup")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.EventLeaveGroup does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_EventLeaveGroup) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.group.v1beta1.EventLeaveGroup.group_id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.EventLeaveGroup")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.EventLeaveGroup does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_EventLeaveGroup) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1beta1.EventLeaveGroup", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_EventLeaveGroup) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventLeaveGroup) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_EventLeaveGroup) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_EventLeaveGroup) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventLeaveGroup) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.GroupId != 0 { + n += 1 + runtime.Sov(uint64(x.GroupId)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*EventLeaveGroup) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.GroupId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*EventLeaveGroup) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventLeaveGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventLeaveGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + } + x.GroupId = 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.GroupId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -3144,6 +3548,43 @@ func (x *EventExec) GetProposalId() uint64 { return 0 } +// EventLeaveGroup is an event emitted when group member leaves the group. +type EventLeaveGroup struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // group_id is the unique ID of the group. + GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` +} + +func (x *EventLeaveGroup) Reset() { + *x = EventLeaveGroup{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_group_v1beta1_events_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventLeaveGroup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventLeaveGroup) ProtoMessage() {} + +// Deprecated: Use EventLeaveGroup.ProtoReflect.Descriptor instead. +func (*EventLeaveGroup) Descriptor() ([]byte, []int) { + return file_cosmos_group_v1beta1_events_proto_rawDescGZIP(), []int{7} +} + +func (x *EventLeaveGroup) GetGroupId() uint64 { + if x != nil { + return x.GroupId + } + return 0 +} + var File_cosmos_group_v1beta1_events_proto protoreflect.FileDescriptor var file_cosmos_group_v1beta1_events_proto_rawDesc = []byte{ @@ -3177,21 +3618,24 @@ var file_cosmos_group_v1beta1_events_proto_rawDesc = []byte{ 0x61, 0x6c, 0x49, 0x64, 0x22, 0x2c, 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, 0x42, 0xdd, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, - 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, - 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, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, - 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x49, 0x64, 0x22, 0x2c, 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, + 0x42, 0xdd, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 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, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x3b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3206,7 +3650,7 @@ func file_cosmos_group_v1beta1_events_proto_rawDescGZIP() []byte { return file_cosmos_group_v1beta1_events_proto_rawDescData } -var file_cosmos_group_v1beta1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_cosmos_group_v1beta1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_cosmos_group_v1beta1_events_proto_goTypes = []interface{}{ (*EventCreateGroup)(nil), // 0: cosmos.group.v1beta1.EventCreateGroup (*EventUpdateGroup)(nil), // 1: cosmos.group.v1beta1.EventUpdateGroup @@ -3215,6 +3659,7 @@ var file_cosmos_group_v1beta1_events_proto_goTypes = []interface{}{ (*EventCreateProposal)(nil), // 4: cosmos.group.v1beta1.EventCreateProposal (*EventVote)(nil), // 5: cosmos.group.v1beta1.EventVote (*EventExec)(nil), // 6: cosmos.group.v1beta1.EventExec + (*EventLeaveGroup)(nil), // 7: cosmos.group.v1beta1.EventLeaveGroup } var file_cosmos_group_v1beta1_events_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -3314,6 +3759,18 @@ func file_cosmos_group_v1beta1_events_proto_init() { return nil } } + file_cosmos_group_v1beta1_events_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventLeaveGroup); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -3321,7 +3778,7 @@ func file_cosmos_group_v1beta1_events_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_group_v1beta1_events_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/api/cosmos/group/v1beta1/genesis.pulsar.go b/api/cosmos/group/v1beta1/genesis.pulsar.go index 1179d09b7c58..61749ede8929 100644 --- a/api/cosmos/group/v1beta1/genesis.pulsar.go +++ b/api/cosmos/group/v1beta1/genesis.pulsar.go @@ -2,14 +2,13 @@ package groupv1beta1 import ( fmt "fmt" - io "io" - reflect "reflect" - sync "sync" - runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" ) var _ protoreflect.List = (*_GenesisState_2_list)(nil) diff --git a/api/cosmos/group/v1beta1/tx.pulsar.go b/api/cosmos/group/v1beta1/tx.pulsar.go index 5735c6fa48e5..14f518d9023f 100644 --- a/api/cosmos/group/v1beta1/tx.pulsar.go +++ b/api/cosmos/group/v1beta1/tx.pulsar.go @@ -10554,6 +10554,894 @@ func (x *fastReflection_MsgExecResponse) ProtoMethods() *protoiface.Methods { } } +var ( + md_MsgLeaveGroup protoreflect.MessageDescriptor + fd_MsgLeaveGroup_member_address protoreflect.FieldDescriptor + fd_MsgLeaveGroup_group_id protoreflect.FieldDescriptor + fd_MsgLeaveGroup_policy_address protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_group_v1beta1_tx_proto_init() + md_MsgLeaveGroup = File_cosmos_group_v1beta1_tx_proto.Messages().ByName("MsgLeaveGroup") + fd_MsgLeaveGroup_member_address = md_MsgLeaveGroup.Fields().ByName("member_address") + fd_MsgLeaveGroup_group_id = md_MsgLeaveGroup.Fields().ByName("group_id") + fd_MsgLeaveGroup_policy_address = md_MsgLeaveGroup.Fields().ByName("policy_address") +} + +var _ protoreflect.Message = (*fastReflection_MsgLeaveGroup)(nil) + +type fastReflection_MsgLeaveGroup MsgLeaveGroup + +func (x *MsgLeaveGroup) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgLeaveGroup)(x) +} + +func (x *MsgLeaveGroup) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgLeaveGroup_messageType fastReflection_MsgLeaveGroup_messageType +var _ protoreflect.MessageType = fastReflection_MsgLeaveGroup_messageType{} + +type fastReflection_MsgLeaveGroup_messageType struct{} + +func (x fastReflection_MsgLeaveGroup_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgLeaveGroup)(nil) +} +func (x fastReflection_MsgLeaveGroup_messageType) New() protoreflect.Message { + return new(fastReflection_MsgLeaveGroup) +} +func (x fastReflection_MsgLeaveGroup_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLeaveGroup +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgLeaveGroup) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLeaveGroup +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgLeaveGroup) Type() protoreflect.MessageType { + return _fastReflection_MsgLeaveGroup_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgLeaveGroup) New() protoreflect.Message { + return new(fastReflection_MsgLeaveGroup) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgLeaveGroup) Interface() protoreflect.ProtoMessage { + return (*MsgLeaveGroup)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgLeaveGroup) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.MemberAddress != "" { + value := protoreflect.ValueOfString(x.MemberAddress) + if !f(fd_MsgLeaveGroup_member_address, value) { + return + } + } + if x.GroupId != uint64(0) { + value := protoreflect.ValueOfUint64(x.GroupId) + if !f(fd_MsgLeaveGroup_group_id, value) { + return + } + } + if x.PolicyAddress != "" { + value := protoreflect.ValueOfString(x.PolicyAddress) + if !f(fd_MsgLeaveGroup_policy_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgLeaveGroup) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.group.v1beta1.MsgLeaveGroup.member_address": + return x.MemberAddress != "" + case "cosmos.group.v1beta1.MsgLeaveGroup.group_id": + return x.GroupId != uint64(0) + case "cosmos.group.v1beta1.MsgLeaveGroup.policy_address": + return x.PolicyAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgLeaveGroup")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgLeaveGroup does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLeaveGroup) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.group.v1beta1.MsgLeaveGroup.member_address": + x.MemberAddress = "" + case "cosmos.group.v1beta1.MsgLeaveGroup.group_id": + x.GroupId = uint64(0) + case "cosmos.group.v1beta1.MsgLeaveGroup.policy_address": + x.PolicyAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgLeaveGroup")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgLeaveGroup does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgLeaveGroup) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.group.v1beta1.MsgLeaveGroup.member_address": + value := x.MemberAddress + return protoreflect.ValueOfString(value) + case "cosmos.group.v1beta1.MsgLeaveGroup.group_id": + value := x.GroupId + return protoreflect.ValueOfUint64(value) + case "cosmos.group.v1beta1.MsgLeaveGroup.policy_address": + value := x.PolicyAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgLeaveGroup")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgLeaveGroup does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLeaveGroup) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.group.v1beta1.MsgLeaveGroup.member_address": + x.MemberAddress = value.Interface().(string) + case "cosmos.group.v1beta1.MsgLeaveGroup.group_id": + x.GroupId = value.Uint() + case "cosmos.group.v1beta1.MsgLeaveGroup.policy_address": + x.PolicyAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgLeaveGroup")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgLeaveGroup does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLeaveGroup) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.group.v1beta1.MsgLeaveGroup.member_address": + panic(fmt.Errorf("field member_address of message cosmos.group.v1beta1.MsgLeaveGroup is not mutable")) + case "cosmos.group.v1beta1.MsgLeaveGroup.group_id": + panic(fmt.Errorf("field group_id of message cosmos.group.v1beta1.MsgLeaveGroup is not mutable")) + case "cosmos.group.v1beta1.MsgLeaveGroup.policy_address": + panic(fmt.Errorf("field policy_address of message cosmos.group.v1beta1.MsgLeaveGroup is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgLeaveGroup")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgLeaveGroup does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgLeaveGroup) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.group.v1beta1.MsgLeaveGroup.member_address": + return protoreflect.ValueOfString("") + case "cosmos.group.v1beta1.MsgLeaveGroup.group_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.group.v1beta1.MsgLeaveGroup.policy_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgLeaveGroup")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgLeaveGroup does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgLeaveGroup) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1beta1.MsgLeaveGroup", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgLeaveGroup) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLeaveGroup) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgLeaveGroup) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgLeaveGroup) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgLeaveGroup) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.MemberAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.GroupId != 0 { + n += 1 + runtime.Sov(uint64(x.GroupId)) + } + l = len(x.PolicyAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgLeaveGroup) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.PolicyAddress) > 0 { + i -= len(x.PolicyAddress) + copy(dAtA[i:], x.PolicyAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyAddress))) + i-- + dAtA[i] = 0x1a + } + if x.GroupId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) + i-- + dAtA[i] = 0x10 + } + if len(x.MemberAddress) > 0 { + i -= len(x.MemberAddress) + copy(dAtA[i:], x.MemberAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MemberAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgLeaveGroup) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLeaveGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLeaveGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MemberAddress", 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.MemberAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + } + x.GroupId = 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.GroupId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PolicyAddress", 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.PolicyAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgLeaveGroupResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_group_v1beta1_tx_proto_init() + md_MsgLeaveGroupResponse = File_cosmos_group_v1beta1_tx_proto.Messages().ByName("MsgLeaveGroupResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgLeaveGroupResponse)(nil) + +type fastReflection_MsgLeaveGroupResponse MsgLeaveGroupResponse + +func (x *MsgLeaveGroupResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgLeaveGroupResponse)(x) +} + +func (x *MsgLeaveGroupResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgLeaveGroupResponse_messageType fastReflection_MsgLeaveGroupResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgLeaveGroupResponse_messageType{} + +type fastReflection_MsgLeaveGroupResponse_messageType struct{} + +func (x fastReflection_MsgLeaveGroupResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgLeaveGroupResponse)(nil) +} +func (x fastReflection_MsgLeaveGroupResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgLeaveGroupResponse) +} +func (x fastReflection_MsgLeaveGroupResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLeaveGroupResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgLeaveGroupResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLeaveGroupResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgLeaveGroupResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgLeaveGroupResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgLeaveGroupResponse) New() protoreflect.Message { + return new(fastReflection_MsgLeaveGroupResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgLeaveGroupResponse) Interface() protoreflect.ProtoMessage { + return (*MsgLeaveGroupResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgLeaveGroupResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgLeaveGroupResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgLeaveGroupResponse")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgLeaveGroupResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLeaveGroupResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgLeaveGroupResponse")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgLeaveGroupResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgLeaveGroupResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgLeaveGroupResponse")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgLeaveGroupResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLeaveGroupResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgLeaveGroupResponse")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgLeaveGroupResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLeaveGroupResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgLeaveGroupResponse")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgLeaveGroupResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgLeaveGroupResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgLeaveGroupResponse")) + } + panic(fmt.Errorf("message cosmos.group.v1beta1.MsgLeaveGroupResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgLeaveGroupResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.group.v1beta1.MsgLeaveGroupResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgLeaveGroupResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLeaveGroupResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgLeaveGroupResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgLeaveGroupResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgLeaveGroupResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgLeaveGroupResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgLeaveGroupResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLeaveGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLeaveGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -11593,6 +12481,88 @@ func (*MsgExecResponse) Descriptor() ([]byte, []int) { return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{21} } +// MsgLeaveGroup is the Msg/LeaveGroup request type. +type MsgLeaveGroup struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // member_address is the account address of the group member. + MemberAddress string `protobuf:"bytes,1,opt,name=member_address,json=memberAddress,proto3" json:"member_address,omitempty"` + // group_id is the unique ID of the group. + GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // policy_address is the account address of group policy. + PolicyAddress string `protobuf:"bytes,3,opt,name=policy_address,json=policyAddress,proto3" json:"policy_address,omitempty"` +} + +func (x *MsgLeaveGroup) Reset() { + *x = MsgLeaveGroup{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgLeaveGroup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgLeaveGroup) ProtoMessage() {} + +// Deprecated: Use MsgLeaveGroup.ProtoReflect.Descriptor instead. +func (*MsgLeaveGroup) Descriptor() ([]byte, []int) { + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{22} +} + +func (x *MsgLeaveGroup) GetMemberAddress() string { + if x != nil { + return x.MemberAddress + } + return "" +} + +func (x *MsgLeaveGroup) GetGroupId() uint64 { + if x != nil { + return x.GroupId + } + return 0 +} + +func (x *MsgLeaveGroup) GetPolicyAddress() string { + if x != nil { + return x.PolicyAddress + } + return "" +} + +// MsgLeaveGroupResponse is the Msg/LeaveGroup response type. +type MsgLeaveGroupResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgLeaveGroupResponse) Reset() { + *x = MsgLeaveGroupResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgLeaveGroupResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgLeaveGroupResponse) ProtoMessage() {} + +// Deprecated: Use MsgLeaveGroupResponse.ProtoReflect.Descriptor instead. +func (*MsgLeaveGroupResponse) Descriptor() ([]byte, []int) { + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{23} +} + var File_cosmos_group_v1beta1_tx_proto protoreflect.FileDescriptor var file_cosmos_group_v1beta1_tx_proto_rawDesc = []byte{ @@ -11756,104 +12726,123 @@ var file_cosmos_group_v1beta1_tx_proto_rawDesc = []byte{ 0x65, 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, 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, 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, 0xfd, 0x09, 0x0a, 0x03, 0x4d, 0x73, - 0x67, 0x12, 0x61, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x76, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x70, 0x0a, 0x10, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, - 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x31, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 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, 0x79, - 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x73, 0x0a, 0x11, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2a, + 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xac, 0x01, + 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, + 0x3f, 0x0a, 0x0e, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 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, 0x0d, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x41, 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, 0x12, 0x3f, 0x0a, 0x0e, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 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, 0x0d, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x41, 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, 0xdd, 0x0a, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x61, 0x0a, 0x0b, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 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, 0x82, - 0x01, 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, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x12, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x1a, + 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x70, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x79, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 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, 0x34, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 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, 0x73, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x82, 0x01, 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, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x9d, 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, + 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x40, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x37, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 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, 0x9d, 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, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x40, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x8b, 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, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 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, 0x8b, 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, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x6a, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x2f, 0x2e, 0x63, + 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x3a, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 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, 0x6a, 0x0a, 0x0e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1d, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, - 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, - 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x45, - 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, - 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, - 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xd9, 0x01, 0x0a, 0x18, 0x63, 0x6f, - 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x42, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5e, 0x0a, 0x0a, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, + 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, + 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0xd9, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, + 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 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, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x3b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, + 0x43, 0x47, 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -11869,7 +12858,7 @@ func file_cosmos_group_v1beta1_tx_proto_rawDescGZIP() []byte { } var file_cosmos_group_v1beta1_tx_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_cosmos_group_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_cosmos_group_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 24) var file_cosmos_group_v1beta1_tx_proto_goTypes = []interface{}{ (Exec)(0), // 0: cosmos.group.v1beta1.Exec (*MsgCreateGroup)(nil), // 1: cosmos.group.v1beta1.MsgCreateGroup @@ -11894,18 +12883,20 @@ var file_cosmos_group_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgVoteResponse)(nil), // 20: cosmos.group.v1beta1.MsgVoteResponse (*MsgExec)(nil), // 21: cosmos.group.v1beta1.MsgExec (*MsgExecResponse)(nil), // 22: cosmos.group.v1beta1.MsgExecResponse - (*Member)(nil), // 23: cosmos.group.v1beta1.Member - (*anypb.Any)(nil), // 24: google.protobuf.Any - (Choice)(0), // 25: cosmos.group.v1beta1.Choice + (*MsgLeaveGroup)(nil), // 23: cosmos.group.v1beta1.MsgLeaveGroup + (*MsgLeaveGroupResponse)(nil), // 24: cosmos.group.v1beta1.MsgLeaveGroupResponse + (*Member)(nil), // 25: cosmos.group.v1beta1.Member + (*anypb.Any)(nil), // 26: google.protobuf.Any + (Choice)(0), // 27: cosmos.group.v1beta1.Choice } var file_cosmos_group_v1beta1_tx_proto_depIdxs = []int32{ - 23, // 0: cosmos.group.v1beta1.MsgCreateGroup.members:type_name -> cosmos.group.v1beta1.Member - 23, // 1: cosmos.group.v1beta1.MsgUpdateGroupMembers.member_updates:type_name -> cosmos.group.v1beta1.Member - 24, // 2: cosmos.group.v1beta1.MsgCreateGroupPolicy.decision_policy:type_name -> google.protobuf.Any - 24, // 3: cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicy.decision_policy:type_name -> google.protobuf.Any - 24, // 4: cosmos.group.v1beta1.MsgCreateProposal.msgs:type_name -> google.protobuf.Any + 25, // 0: cosmos.group.v1beta1.MsgCreateGroup.members:type_name -> cosmos.group.v1beta1.Member + 25, // 1: cosmos.group.v1beta1.MsgUpdateGroupMembers.member_updates:type_name -> cosmos.group.v1beta1.Member + 26, // 2: cosmos.group.v1beta1.MsgCreateGroupPolicy.decision_policy:type_name -> google.protobuf.Any + 26, // 3: cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicy.decision_policy:type_name -> google.protobuf.Any + 26, // 4: cosmos.group.v1beta1.MsgCreateProposal.msgs:type_name -> google.protobuf.Any 0, // 5: cosmos.group.v1beta1.MsgCreateProposal.exec:type_name -> cosmos.group.v1beta1.Exec - 25, // 6: cosmos.group.v1beta1.MsgVote.choice:type_name -> cosmos.group.v1beta1.Choice + 27, // 6: cosmos.group.v1beta1.MsgVote.choice:type_name -> cosmos.group.v1beta1.Choice 0, // 7: cosmos.group.v1beta1.MsgVote.exec:type_name -> cosmos.group.v1beta1.Exec 1, // 8: cosmos.group.v1beta1.Msg.CreateGroup:input_type -> cosmos.group.v1beta1.MsgCreateGroup 3, // 9: cosmos.group.v1beta1.Msg.UpdateGroupMembers:input_type -> cosmos.group.v1beta1.MsgUpdateGroupMembers @@ -11918,19 +12909,21 @@ var file_cosmos_group_v1beta1_tx_proto_depIdxs = []int32{ 17, // 16: cosmos.group.v1beta1.Msg.CreateProposal:input_type -> cosmos.group.v1beta1.MsgCreateProposal 19, // 17: cosmos.group.v1beta1.Msg.Vote:input_type -> cosmos.group.v1beta1.MsgVote 21, // 18: cosmos.group.v1beta1.Msg.Exec:input_type -> cosmos.group.v1beta1.MsgExec - 2, // 19: cosmos.group.v1beta1.Msg.CreateGroup:output_type -> cosmos.group.v1beta1.MsgCreateGroupResponse - 4, // 20: cosmos.group.v1beta1.Msg.UpdateGroupMembers:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMembersResponse - 6, // 21: cosmos.group.v1beta1.Msg.UpdateGroupAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupAdminResponse - 8, // 22: cosmos.group.v1beta1.Msg.UpdateGroupMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMetadataResponse - 10, // 23: cosmos.group.v1beta1.Msg.CreateGroupPolicy:output_type -> cosmos.group.v1beta1.MsgCreateGroupPolicyResponse - 12, // 24: cosmos.group.v1beta1.Msg.UpdateGroupPolicyAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyAdminResponse - 14, // 25: cosmos.group.v1beta1.Msg.UpdateGroupPolicyDecisionPolicy:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicyResponse - 16, // 26: cosmos.group.v1beta1.Msg.UpdateGroupPolicyMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadataResponse - 18, // 27: cosmos.group.v1beta1.Msg.CreateProposal:output_type -> cosmos.group.v1beta1.MsgCreateProposalResponse - 20, // 28: cosmos.group.v1beta1.Msg.Vote:output_type -> cosmos.group.v1beta1.MsgVoteResponse - 22, // 29: cosmos.group.v1beta1.Msg.Exec:output_type -> cosmos.group.v1beta1.MsgExecResponse - 19, // [19:30] is the sub-list for method output_type - 8, // [8:19] is the sub-list for method input_type + 23, // 19: cosmos.group.v1beta1.Msg.LeaveGroup:input_type -> cosmos.group.v1beta1.MsgLeaveGroup + 2, // 20: cosmos.group.v1beta1.Msg.CreateGroup:output_type -> cosmos.group.v1beta1.MsgCreateGroupResponse + 4, // 21: cosmos.group.v1beta1.Msg.UpdateGroupMembers:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMembersResponse + 6, // 22: cosmos.group.v1beta1.Msg.UpdateGroupAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupAdminResponse + 8, // 23: cosmos.group.v1beta1.Msg.UpdateGroupMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMetadataResponse + 10, // 24: cosmos.group.v1beta1.Msg.CreateGroupPolicy:output_type -> cosmos.group.v1beta1.MsgCreateGroupPolicyResponse + 12, // 25: cosmos.group.v1beta1.Msg.UpdateGroupPolicyAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyAdminResponse + 14, // 26: cosmos.group.v1beta1.Msg.UpdateGroupPolicyDecisionPolicy:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicyResponse + 16, // 27: cosmos.group.v1beta1.Msg.UpdateGroupPolicyMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadataResponse + 18, // 28: cosmos.group.v1beta1.Msg.CreateProposal:output_type -> cosmos.group.v1beta1.MsgCreateProposalResponse + 20, // 29: cosmos.group.v1beta1.Msg.Vote:output_type -> cosmos.group.v1beta1.MsgVoteResponse + 22, // 30: cosmos.group.v1beta1.Msg.Exec:output_type -> cosmos.group.v1beta1.MsgExecResponse + 24, // 31: cosmos.group.v1beta1.Msg.LeaveGroup:output_type -> cosmos.group.v1beta1.MsgLeaveGroupResponse + 20, // [20:32] is the sub-list for method output_type + 8, // [8:20] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name 8, // [8:8] is the sub-list for extension extendee 0, // [0:8] is the sub-list for field type_name @@ -12207,6 +13200,30 @@ func file_cosmos_group_v1beta1_tx_proto_init() { return nil } } + file_cosmos_group_v1beta1_tx_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgLeaveGroup); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_group_v1beta1_tx_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgLeaveGroupResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -12214,7 +13231,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_group_v1beta1_tx_proto_rawDesc, NumEnums: 1, - NumMessages: 22, + NumMessages: 24, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/group/v1beta1/tx_grpc.pb.go b/api/cosmos/group/v1beta1/tx_grpc.pb.go index 73c1bccbc0ae..4e7f89d58ec8 100644 --- a/api/cosmos/group/v1beta1/tx_grpc.pb.go +++ b/api/cosmos/group/v1beta1/tx_grpc.pb.go @@ -44,6 +44,8 @@ type MsgClient interface { Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) // Exec executes a proposal. Exec(ctx context.Context, in *MsgExec, opts ...grpc.CallOption) (*MsgExecResponse, error) + // LeaveGroup allows a group member to leave the group. + LeaveGroup(ctx context.Context, in *MsgLeaveGroup, opts ...grpc.CallOption) (*MsgLeaveGroupResponse, error) } type msgClient struct { @@ -153,6 +155,15 @@ func (c *msgClient) Exec(ctx context.Context, in *MsgExec, opts ...grpc.CallOpti return out, nil } +func (c *msgClient) LeaveGroup(ctx context.Context, in *MsgLeaveGroup, opts ...grpc.CallOption) (*MsgLeaveGroupResponse, error) { + out := new(MsgLeaveGroupResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/LeaveGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -179,6 +190,8 @@ type MsgServer interface { Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) // Exec executes a proposal. Exec(context.Context, *MsgExec) (*MsgExecResponse, error) + // LeaveGroup allows a group member to leave the group. + LeaveGroup(context.Context, *MsgLeaveGroup) (*MsgLeaveGroupResponse, error) mustEmbedUnimplementedMsgServer() } @@ -219,6 +232,9 @@ func (UnimplementedMsgServer) Vote(context.Context, *MsgVote) (*MsgVoteResponse, func (UnimplementedMsgServer) Exec(context.Context, *MsgExec) (*MsgExecResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Exec not implemented") } +func (UnimplementedMsgServer) LeaveGroup(context.Context, *MsgLeaveGroup) (*MsgLeaveGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LeaveGroup not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -430,6 +446,24 @@ func _Msg_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{ return interceptor(ctx, in, info, handler) } +func _Msg_LeaveGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgLeaveGroup) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).LeaveGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Msg/LeaveGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).LeaveGroup(ctx, req.(*MsgLeaveGroup)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -481,6 +515,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "Exec", Handler: _Msg_Exec_Handler, }, + { + MethodName: "LeaveGroup", + Handler: _Msg_LeaveGroup_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/group/v1beta1/tx.proto", diff --git a/api/cosmos/orm/v1alpha1/orm.pulsar.go b/api/cosmos/orm/v1alpha1/orm.pulsar.go index 203a359f1140..11ff843144c8 100644 --- a/api/cosmos/orm/v1alpha1/orm.pulsar.go +++ b/api/cosmos/orm/v1alpha1/orm.pulsar.go @@ -2333,7 +2333,8 @@ type SecondaryIndexDescriptor struct { // store the remaining primary key fields in the value.. Fields string `protobuf:"bytes,1,opt,name=fields,proto3" json:"fields,omitempty"` // id is a non-zero integer ID that must be unique within the indexes for this - // table. It may be deprecated in the future when this can be auto-generated. + // table and less than 32768. It may be deprecated in the future when this can + // be auto-generated. Id uint32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` // unique specifies that this an unique index. Unique bool `protobuf:"varint,3,opt,name=unique,proto3" json:"unique,omitempty"` diff --git a/proto/cosmos/group/v1beta1/tx.proto b/proto/cosmos/group/v1beta1/tx.proto index 7796b01bf263..f443be6c402d 100644 --- a/proto/cosmos/group/v1beta1/tx.proto +++ b/proto/cosmos/group/v1beta1/tx.proto @@ -286,10 +286,14 @@ message MsgExecResponse {} // MsgLeaveGroup is the Msg/LeaveGroup request type. message MsgLeaveGroup { // member_address is the account address of the group member. - string member_address = 1; + string member_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // group_id is the unique ID of the group. uint64 group_id = 2; + + // policy_address is the account address of group policy. + string policy_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + } // MsgLeaveGroupResponse is the Msg/LeaveGroup response type. diff --git a/x/group/tx.pb.go b/x/group/tx.pb.go index 5f2353dbc009..75a17cb989af 100644 --- a/x/group/tx.pb.go +++ b/x/group/tx.pb.go @@ -1167,6 +1167,8 @@ type MsgLeaveGroup struct { MemberAddress string `protobuf:"bytes,1,opt,name=member_address,json=memberAddress,proto3" json:"member_address,omitempty"` // group_id is the unique ID of the group. GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // policy_address is the account address of group policy. + PolicyAddress string `protobuf:"bytes,3,opt,name=policy_address,json=policyAddress,proto3" json:"policy_address,omitempty"` } func (m *MsgLeaveGroup) Reset() { *m = MsgLeaveGroup{} } @@ -1216,6 +1218,13 @@ func (m *MsgLeaveGroup) GetGroupId() uint64 { return 0 } +func (m *MsgLeaveGroup) GetPolicyAddress() string { + if m != nil { + return m.PolicyAddress + } + return "" +} + // MsgLeaveGroupResponse is the Msg/LeaveGroup response type. type MsgLeaveGroupResponse struct { } @@ -1284,73 +1293,74 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1beta1/tx.proto", fileDescriptor_da0de9d603d844fb) } var fileDescriptor_da0de9d603d844fb = []byte{ - // 1044 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x5f, 0x6f, 0xdb, 0x54, - 0x14, 0xcf, 0x6d, 0xbc, 0xfe, 0x39, 0xdd, 0xb2, 0xd6, 0x0b, 0x23, 0x35, 0x6d, 0x12, 0xbc, 0x0e, - 0x42, 0xd7, 0xda, 0x34, 0x1d, 0x02, 0x4d, 0x13, 0xa2, 0xed, 0x02, 0x8a, 0xb4, 0xa0, 0xce, 0x63, - 0x08, 0x10, 0x22, 0x72, 0xe2, 0x8b, 0x67, 0x68, 0x7c, 0xad, 0x5c, 0xb7, 0x6b, 0x9e, 0x90, 0x78, - 0x42, 0xe2, 0x85, 0x37, 0x24, 0x24, 0x10, 0x5f, 0x80, 0xb7, 0x89, 0xcf, 0x30, 0xf1, 0x34, 0xf1, - 0x80, 0x78, 0x00, 0x04, 0xed, 0x17, 0x41, 0xb9, 0xd7, 0xbe, 0x8d, 0x57, 0x3b, 0x71, 0xa2, 0x6a, - 0x4f, 0xad, 0x7d, 0x7f, 0xe7, 0x9c, 0xdf, 0xef, 0x9e, 0x73, 0x7c, 0x4e, 0x60, 0xa5, 0x4d, 0x68, - 0x87, 0x50, 0xdd, 0xee, 0x92, 0x03, 0x4f, 0x3f, 0xdc, 0x6c, 0x61, 0xdf, 0xdc, 0xd4, 0xfd, 0x23, - 0xcd, 0xeb, 0x12, 0x9f, 0xc8, 0x79, 0x7e, 0xac, 0xb1, 0x63, 0x2d, 0x38, 0x56, 0xf2, 0x36, 0xb1, - 0x09, 0x03, 0xe8, 0xfd, 0xff, 0x38, 0x56, 0x59, 0xe2, 0xd8, 0x26, 0x3f, 0x08, 0x0c, 0x83, 0x23, - 0x9b, 0x10, 0x7b, 0x1f, 0xeb, 0xec, 0xa9, 0x75, 0xf0, 0xb9, 0x6e, 0xba, 0xbd, 0xe0, 0xa8, 0x1c, - 0x4f, 0xa0, 0xe7, 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 0x54, 0xc8, 0xad, - 0xf1, 0x6d, 0x04, 0x9b, 0x2f, 0x20, 0xf7, 0xcc, 0x40, 0x7c, 0x75, 0x44, 0xe2, 0x43, 0xa0, 0xa2, - 0xa7, 0x04, 0x8a, 0x58, 0x77, 0x41, 0x62, 0xa3, 0x65, 0x25, 0xd1, 0xb0, 0x7f, 0xac, 0x5c, 0x1f, - 0x7a, 0x3c, 0xe8, 0x8d, 0x7d, 0xdd, 0x92, 0xbd, 0xf5, 0x8f, 0x87, 0x78, 0x1b, 0xfc, 0x2e, 0xcb, - 0x9f, 0x01, 0x0c, 0x7c, 0x94, 0xaf, 0x25, 0x1a, 0x9d, 0x82, 0x94, 0x1b, 0x29, 0x40, 0xa1, 0xff, - 0x9d, 0xb7, 0x9f, 0x1c, 0x17, 0xd1, 0xd3, 0xe3, 0x22, 0xfa, 0xf7, 0xb8, 0x88, 0xbe, 0x3b, 0x29, - 0x66, 0x9e, 0x9e, 0x14, 0x33, 0x7f, 0x9e, 0x14, 0x33, 0x9f, 0xac, 0xda, 0x8e, 0xff, 0xf0, 0xa0, - 0xa5, 0xb5, 0x49, 0x27, 0xf8, 0x45, 0x1f, 0xfc, 0xd9, 0xa0, 0xd6, 0x97, 0xfa, 0x11, 0xff, 0xd5, - 0xde, 0x9a, 0x66, 0x2b, 0xc2, 0xd6, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x31, 0x93, 0xbf, 0x4c, - 0x4d, 0x10, 0x00, 0x00, + // 1062 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xc4, 0xdb, 0xfc, 0x79, 0x69, 0xdc, 0x64, 0x1b, 0x8a, 0xb3, 0x24, 0xb6, 0xd9, 0x06, + 0x30, 0x69, 0xb2, 0x26, 0x4e, 0x11, 0xa8, 0xaa, 0x28, 0x49, 0x6a,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xbd, 0x48, 0x93, + 0x21, 0x54, 0x03, 0x14, 0x7c, 0x84, 0x9b, 0xd9, 0x0b, 0x05, 0x54, 0xcc, 0x94, 0xb5, 0xf0, 0x8e, + 0x52, 0x39, 0xc2, 0x4d, 0x93, 0xe1, 0xc4, 0xd5, 0xde, 0x64, 0xb5, 0x19, 0x94, 0x28, 0xab, 0x3d, + 0x0f, 0xb3, 0xae, 0x58, 0x3b, 0xed, 0x98, 0xe0, 0x2f, 0x55, 0x6d, 0xfd, 0x6f, 0x04, 0x53, 0x35, + 0xea, 0x7c, 0x48, 0xbc, 0x78, 0x70, 0xff, 0xda, 0x0f, 0x89, 0x87, 0xbb, 0xb1, 0x97, 0xc8, 0x61, + 0xea, 0x75, 0x98, 0x6c, 0xde, 0x27, 0xad, 0x26, 0x66, 0x87, 0x92, 0x89, 0x6a, 0x92, 0xbb, 0x0c, + 0x63, 0x0a, 0x6c, 0xe0, 0x30, 0x95, 0xa7, 0x0e, 0x73, 0xc4, 0x23, 0xd2, 0x17, 0xe0, 0x92, 0x50, + 0x27, 0x73, 0xe2, 0x53, 0x26, 0xb8, 0x8f, 0x89, 0x17, 0xfc, 0x1a, 0x4c, 0xd2, 0x96, 0xd3, 0x49, + 0xa0, 0x58, 0xe0, 0x44, 0x40, 0xc6, 0xc0, 0x0f, 0xf8, 0x0b, 0x82, 0xb9, 0x1a, 0x75, 0xee, 0x60, + 0xeb, 0x50, 0x0c, 0x5a, 0xb7, 0xe4, 0x10, 0x91, 0x34, 0x0f, 0xc5, 0xe8, 0x20, 0x16, 0x87, 0x35, + 0x9d, 0x5b, 0x90, 0xe1, 0x2f, 0x87, 0xf4, 0x1d, 0xf7, 0x5c, 0xce, 0xb9, 0xe2, 0x51, 0xe4, 0x8f, + 0xfd, 0xf3, 0x6c, 0x8a, 0x3a, 0x65, 0xeb, 0xeb, 0x58, 0x5b, 0x03, 0x85, 0x9d, 0xda, 0x22, 0xcc, + 0x57, 0x3e, 0xaa, 0xec, 0xd6, 0xef, 0xbd, 0x77, 0x77, 0xaf, 0xb2, 0x5b, 0x7d, 0xa7, 0x5a, 0xb9, + 0x3d, 0x9f, 0x52, 0x2f, 0xc2, 0x34, 0x5b, 0xfd, 0xc0, 0xfc, 0x78, 0x1e, 0x95, 0xff, 0x01, 0x48, + 0xd7, 0xa8, 0xa3, 0x5a, 0x30, 0x3b, 0x38, 0x61, 0xae, 0x46, 0x4c, 0x49, 0x81, 0x86, 0xa5, 0xad, + 0x27, 0x41, 0xc9, 0x14, 0x3f, 0x04, 0x35, 0x64, 0xe4, 0xbb, 0x16, 0xe9, 0xe3, 0x2c, 0x58, 0xdb, + 0x1a, 0x01, 0x2c, 0xe3, 0xba, 0x30, 0x7f, 0x66, 0x32, 0x7b, 0x35, 0x89, 0x23, 0x06, 0xd5, 0x36, + 0x13, 0x43, 0x65, 0xc4, 0x1e, 0x5c, 0x0e, 0x9b, 0xa9, 0xd6, 0x93, 0xb1, 0xe7, 0x68, 0xed, 0xfa, + 0x28, 0x68, 0x19, 0x9a, 0xc2, 0xc2, 0xd9, 0x51, 0x69, 0x2d, 0xc9, 0x3d, 0x71, 0xac, 0x56, 0x4e, + 0x8e, 0x95, 0x41, 0xbf, 0x46, 0x70, 0x25, 0x62, 0xe6, 0x28, 0x25, 0x51, 0x31, 0x60, 0xa0, 0xbd, + 0x31, 0xa2, 0x81, 0x24, 0xf1, 0x23, 0x82, 0x7c, 0xdc, 0x68, 0xf0, 0x66, 0x72, 0xe7, 0x41, 0x4b, + 0xed, 0xed, 0x71, 0x2d, 0x25, 0xbf, 0x6f, 0x11, 0x2c, 0x45, 0x37, 0xea, 0x72, 0x72, 0xff, 0x32, + 0x43, 0x6e, 0x8c, 0x6e, 0x23, 0xd9, 0x7c, 0x01, 0x99, 0xa7, 0x9a, 0xed, 0x2b, 0x31, 0x17, 0xef, + 0x03, 0xb5, 0x52, 0x42, 0xa0, 0x8c, 0x75, 0x07, 0x14, 0xd6, 0xb6, 0x56, 0x22, 0x0d, 0xfb, 0xdb, + 0xda, 0x4b, 0x43, 0xb7, 0x07, 0xbd, 0xb1, 0xd7, 0x2d, 0xda, 0x5b, 0x7f, 0x7b, 0x88, 0xb7, 0xc1, + 0x37, 0x5f, 0xfd, 0x0c, 0x60, 0xe0, 0xbd, 0xbf, 0x1a, 0x69, 0x74, 0x0a, 0xd2, 0xae, 0x25, 0x00, + 0xf9, 0xfe, 0x77, 0xde, 0x7a, 0x74, 0x9c, 0x43, 0x8f, 0x8f, 0x73, 0xe8, 0xbf, 0xe3, 0x1c, 0xfa, + 0xee, 0x24, 0x97, 0x7a, 0x7c, 0x92, 0x4b, 0xfd, 0x75, 0x92, 0x4b, 0x7d, 0xb2, 0xea, 0xb4, 0xbc, + 0xfb, 0x07, 0x0d, 0xa3, 0x49, 0xda, 0xe2, 0xd7, 0x02, 0xf1, 0x67, 0x83, 0xda, 0x5f, 0x96, 0x8e, + 0xf8, 0x2f, 0x02, 0x8d, 0x49, 0x36, 0x7e, 0x6c, 0x3d, 0x09, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x22, + 0x56, 0x92, 0xa9, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2670,6 +2680,13 @@ func (m *MsgLeaveGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.PolicyAddress) > 0 { + i -= len(m.PolicyAddress) + copy(dAtA[i:], m.PolicyAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.PolicyAddress))) + i-- + dAtA[i] = 0x1a + } if m.GroupId != 0 { i = encodeVarintTx(dAtA, i, uint64(m.GroupId)) i-- @@ -3087,6 +3104,10 @@ func (m *MsgLeaveGroup) Size() (n int) { if m.GroupId != 0 { n += 1 + sovTx(uint64(m.GroupId)) } + l = len(m.PolicyAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -5448,6 +5469,38 @@ func (m *MsgLeaveGroup) Unmarshal(dAtA []byte) error { break } } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PolicyAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PolicyAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) From e470c667b5943f2c1e91a1b30accad7f1673cf85 Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Fri, 21 Jan 2022 21:05:22 +0530 Subject: [PATCH 06/32] feat: add cli --- x/group/client/cli/tx.go | 46 ++++++++++++ x/group/keeper/keeper_test.go | 135 ++++++++++++++++++++++++++++++++++ x/group/keeper/msg_server.go | 59 ++++++--------- x/group/msgs.go | 6 ++ x/group/msgs_test.go | 11 +++ 5 files changed, 221 insertions(+), 36 deletions(-) diff --git a/x/group/client/cli/tx.go b/x/group/client/cli/tx.go index af5e461d304a..16f2423bed2e 100644 --- a/x/group/client/cli/tx.go +++ b/x/group/client/cli/tx.go @@ -45,6 +45,7 @@ func TxCmd(name string) *cobra.Command { MsgCreateProposalCmd(), MsgVoteCmd(), MsgExecCmd(), + MsgLeaveGroupCmd(), ) return txCmd @@ -648,3 +649,48 @@ func MsgExecCmd() *cobra.Command { return cmd } + +// MsgLeaveGroupCmd creates a CLI command for Msg/LeaveGroup. +func MsgLeaveGroupCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "leave-group [member-address] [group-policy-account] [group-id]", + Short: "remove member from the group", + Long: ` remove member from the group + +Parameters: + group-id: unique id of the group + group-policy-account: account address of the group policy + member-address: account address of the group member + Note, the'--from' flag is + ignored as it is implied from [member-address] + `, + Args: cobra.ExactArgs(3), + RunE: func(cmd *cobra.Command, args []string) error { + cmd.Flags().Set(flags.FlagFrom, args[0]) + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + groupID, err := strconv.ParseUint(args[2], 10, 64) + if err != nil { + return err + } + + msg := &group.MsgLeaveGroup{ + MemberAddress: clientCtx.GetFromAddress().String(), + PolicyAddress: args[1], + GroupId: groupID, + } + if err = msg.ValidateBasic(); err != nil { + return fmt.Errorf("message validation failed: %w", err) + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/group/keeper/keeper_test.go b/x/group/keeper/keeper_test.go index 4d6b6bc52c5f..b5e02127f4db 100644 --- a/x/group/keeper/keeper_test.go +++ b/x/group/keeper/keeper_test.go @@ -2034,6 +2034,141 @@ func (s *TestSuite) TestExecProposal() { } } +func (s *TestSuite) TestLeaveGroup() { + addrs := simapp.AddTestAddrsIncremental(s.app, s.sdkCtx, 5, sdk.NewInt(3000000)) + admin := addrs[0] + member1 := addrs[1] + member2 := addrs[2] + member3 := addrs[3] + member4 := addrs[4] + require := s.Require() + + res, err := s.keeper.CreateGroup(s.ctx, &group.MsgCreateGroup{ + Admin: admin.String(), + Members: []group.Member{ + { + Address: member1.String(), + Weight: "1", + Metadata: []byte("metadata"), + AddedAt: s.sdkCtx.BlockTime(), + }, + { + Address: member2.String(), + Weight: "2", + Metadata: []byte("metadata"), + AddedAt: s.sdkCtx.BlockTime(), + }, + { + Address: member3.String(), + Weight: "3", + Metadata: []byte("metadata"), + AddedAt: s.sdkCtx.BlockTime(), + }, + }, + }) + require.NoError(err) + require.NotNil(res) + + groupPolicy := &group.MsgCreateGroupPolicy{ + Admin: admin.String(), + GroupId: res.GroupId, + Metadata: []byte("metadata"), + } + policy := group.NewThresholdDecisionPolicy( + "3", + time.Hour, + ) + require.NoError(groupPolicy.SetDecisionPolicy(policy)) + require.NoError(err) + + res1, err := s.keeper.CreateGroupPolicy(s.ctx, groupPolicy) + require.NoError(err) + require.NotNil(res1) + + groupId := res.GroupId + testCases := []struct { + name string + req *group.MsgLeaveGroup + expErr bool + errMsg string + expMembersSize int + }{ + { + "expect error: group not found", + &group.MsgLeaveGroup{ + GroupId: 100000, + MemberAddress: member1.String(), + PolicyAddress: member2.String(), + }, + true, + "group: not found", + 0, + }, + { + "expect error: member not part of group", + &group.MsgLeaveGroup{ + GroupId: groupId, + MemberAddress: member4.String(), + PolicyAddress: member2.String(), + }, + true, + "not part of group", + 0, + }, + { + "expect error: group policy not found", + &group.MsgLeaveGroup{ + GroupId: groupId, + MemberAddress: member3.String(), + PolicyAddress: member2.String(), + }, + true, + "group policy: not found", + 0, + }, + { + "valid testcase", + &group.MsgLeaveGroup{ + GroupId: groupId, + MemberAddress: member3.String(), + PolicyAddress: res1.Address, + }, + false, + "", + 2, + }, + { + "valid request: cannot leave group", + &group.MsgLeaveGroup{ + GroupId: groupId, + MemberAddress: member2.String(), + PolicyAddress: res1.Address, + }, + true, + "cannot leave group", + 0, + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + res, err := s.keeper.LeaveGroup(s.ctx, tc.req) + if tc.expErr { + require.Error(err) + require.Contains(err.Error(), tc.errMsg) + } else { + require.NoError(err) + require.NotNil(res) + res, err := s.keeper.GroupMembers(s.ctx, &group.QueryGroupMembersRequest{ + GroupId: groupId, + }) + require.NoError(err) + require.Len(res.Members, tc.expMembersSize) + } + }) + } +} + func createProposal( ctx context.Context, s *TestSuite, msgs []sdk.Msg, proposers []string) uint64 { diff --git a/x/group/keeper/msg_server.go b/x/group/keeper/msg_server.go index 6a1e8707cc11..c79cb088f5c3 100644 --- a/x/group/keeper/msg_server.go +++ b/x/group/keeper/msg_server.go @@ -701,6 +701,11 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr return nil, err } + groupInfo, err := k.getGroupInfo(ctx, req.GroupId) + if err != nil { + return nil, sdkerrors.Wrap(err, "group") + } + // Checking if the group member is already part of the group groupMember, err := k.getGroupMember(ctx, &group.GroupMember{ GroupId: req.GroupId, @@ -721,72 +726,54 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr for { if _, err := groupIter.LoadNext(&m); err != nil { if errors.ErrORMIteratorDone.Is(err) { - break + return nil, sdkerrors.ErrInvalidRequest.Wrapf("%s is not part of group %d", req.MemberAddress, req.GroupId) } + return nil, err } if m.Member.Address == groupMember.Member.Address { - memberWeight, err = math.NewNonNegativeDecFromString(m.Member.Weight) - if err != nil { + if memberWeight, err = math.NewNonNegativeDecFromString(m.Member.Weight); err != nil { return nil, err } + break } } - policyIter, err := k.groupPolicyByGroupIndex.Get(ctx.KVStore(k.key), req.GroupId) + groupPolicy, err := k.getGroupPolicyInfo(ctx, req.PolicyAddress) if err != nil { - return nil, err - } - defer policyIter.Close() - - var groupPolicy group.GroupPolicyInfo - if _, err := policyIter.LoadNext(&groupPolicy); err != nil { - return nil, err - } - - groupInfo, err := k.getGroupInfo(ctx, req.GroupId) - if err != nil { - return nil, err + return nil, sdkerrors.Wrap(err, "group policy") } groupWeight, err := math.NewNonNegativeDecFromString(groupInfo.TotalWeight) if err != nil { return nil, err } - + r, err := math.SubNonNegative(groupWeight, memberWeight) if err != nil { return nil, err } policy := groupPolicy.GetDecisionPolicy() - switch v := policy.(type) { - case *group.ThresholdDecisionPolicy: - tdp, ok := policy.(*group.ThresholdDecisionPolicy) - if !ok { - return nil, sdkerrors.ErrInvalidRequest.Wrapf("expected %T, got %T", (*group.ThresholdDecisionPolicy)(nil), policy) - } - - threshold, err := math.NewNonNegativeDecFromString(tdp.Threshold) - if err != nil { - return nil, err - } - - if threshold.Cmp(r) == -1 { - return nil, sdkerrors.ErrInvalidRequest.Wrap("cannot leave group") - } + tdp, ok := policy.(*group.ThresholdDecisionPolicy) + if !ok { + return nil, sdkerrors.ErrInvalidRequest.Wrapf("expected %T, got %T", (*group.ThresholdDecisionPolicy)(nil), policy) + } - // TODO: how to handle other decision policies? + threshold, err := math.NewNonNegativeDecFromString(tdp.Threshold) + if err != nil { + return nil, err + } - default: - return nil, sdkerrors.ErrInvalidType.Wrapf("got invalid type %T", v) + if threshold.Cmp(r) == 1 { + return nil, sdkerrors.ErrInvalidRequest.Wrap("cannot leave group") } // Delete group member in the groupMemberTable. if err := k.groupMemberTable.Delete(ctx.KVStore(k.key), groupMember); err != nil { - return nil, sdkerrors.Wrap(err, "delete member") + return nil, sdkerrors.Wrap(err, "group member") } groupInfo.TotalWeight = r.String() diff --git a/x/group/msgs.go b/x/group/msgs.go index fdf1d97a09ca..b667eb3444a3 100644 --- a/x/group/msgs.go +++ b/x/group/msgs.go @@ -723,6 +723,12 @@ func (m MsgLeaveGroup) ValidateBasic() error { if err != nil { return sdkerrors.Wrap(err, "group member") } + + _, err = sdk.AccAddressFromBech32(m.PolicyAddress) + if err != nil { + return sdkerrors.Wrap(err, "policy") + } + if m.GroupId == 0 { return sdkerrors.Wrap(errors.ErrEmpty, "group-id") } diff --git a/x/group/msgs_test.go b/x/group/msgs_test.go index 43bc1e26dead..f6fa656ad10f 100644 --- a/x/group/msgs_test.go +++ b/x/group/msgs_test.go @@ -792,10 +792,21 @@ func TestMsgLeaveGroup(t *testing.T) { true, "group-id: value is empty", }, + { + "invalid policy address", + &group.MsgLeaveGroup{ + MemberAddress: admin.String(), + PolicyAddress: "policy", + GroupId: 1, + }, + false, + "", + }, { "valid testcase", &group.MsgLeaveGroup{ MemberAddress: admin.String(), + PolicyAddress: member1.String(), GroupId: 1, }, false, From 90306c1253b427437dbdb5c7f05d3052234b1a18 Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Mon, 24 Jan 2022 15:25:40 +0530 Subject: [PATCH 07/32] wip: integration tests --- x/group/client/testutil/query.go | 1496 +++++++++++++++--------------- x/group/client/testutil/tx.go | 163 ++++ x/group/keeper/msg_server.go | 2 +- x/group/spec/05_client.md | 15 + 4 files changed, 927 insertions(+), 749 deletions(-) diff --git a/x/group/client/testutil/query.go b/x/group/client/testutil/query.go index 6a51177795a6..2aaa55829f6b 100644 --- a/x/group/client/testutil/query.go +++ b/x/group/client/testutil/query.go @@ -1,750 +1,750 @@ package testutil -import ( - "fmt" - "strconv" - - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" - "github.com/cosmos/cosmos-sdk/testutil/cli" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/group" - client "github.com/cosmos/cosmos-sdk/x/group/client/cli" - - tmcli "github.com/tendermint/tendermint/libs/cli" -) - -func (s *IntegrationTestSuite) TestQueryGroupInfo() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - testCases := []struct { - name string - args []string - expectErr bool - expectErrMsg string - expectedCode uint32 - }{ - { - "group not found", - []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - true, - "not found: invalid request", - 0, - }, - { - "group id invalid", - []string{"", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - true, - "strconv.ParseUint: parsing \"\": invalid syntax", - 0, - }, - { - "group found", - []string{strconv.FormatUint(s.group.GroupId, 10), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - "", - 0, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := client.QueryGroupInfoCmd() - - out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Contains(out.String(), tc.expectErrMsg) - } else { - s.Require().NoError(err, out.String()) - - var g group.GroupInfo - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &g)) - s.Require().Equal(s.group.GroupId, g.GroupId) - s.Require().Equal(s.group.Admin, g.Admin) - s.Require().Equal(s.group.TotalWeight, g.TotalWeight) - s.Require().Equal(s.group.Metadata, g.Metadata) - s.Require().Equal(s.group.Version, g.Version) - } - }) - } -} - -func (s *IntegrationTestSuite) TestQueryGroupsByMembers() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - require := s.Require() - - cmd := client.QueryGroupsByAdminCmd() - out, err := cli.ExecTestCLICmd(clientCtx, cmd, []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) - require.NoError(err) - - var groups group.QueryGroupsByAdminResponse - val.ClientCtx.Codec.MustUnmarshalJSON(out.Bytes(), &groups) - require.Len(groups.Groups, 1) - - cmd = client.QueryGroupMembersCmd() - out, err = cli.ExecTestCLICmd(clientCtx, cmd, []string{fmt.Sprintf("%d", groups.Groups[0].GroupId), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) - require.NoError(err) - - var members group.QueryGroupMembersResponse - val.ClientCtx.Codec.MustUnmarshalJSON(out.Bytes(), &members) - require.Len(members.Members, 1) - - testAddr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) - - testCases := []struct { - name string - args []string - expectErr bool - expectErrMsg string - numItems int - expectGroups []*group.GroupInfo - }{ - { - "invalid address", - []string{"abcd", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - true, - "invalid bech32 string", - 0, - []*group.GroupInfo{}, - }, - { - "not part of any group", - []string{testAddr.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - "", - 0, - []*group.GroupInfo{}, - }, - { - "expect one group", - []string{members.Members[0].Member.Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - "", - 1, - groups.Groups, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := client.QueryGroupsByMemberCmd() - out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - require.Contains(out.String(), tc.expectErrMsg) - } else { - require.NoError(err, out.String()) - - var resp group.QueryGroupsByMemberResponse - val.ClientCtx.Codec.MustUnmarshalJSON(out.Bytes(), &resp) - require.Len(resp.Groups, tc.numItems) - - require.Equal(tc.expectGroups, resp.Groups) - } - }) - } -} - -func (s *IntegrationTestSuite) TestQueryGroupMembers() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - testCases := []struct { - name string - args []string - expectErr bool - expectErrMsg string - expectedCode uint32 - expectMembers []*group.GroupMember - }{ - { - "no group", - []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - "", - 0, - []*group.GroupMember{}, - }, - { - "members found", - []string{strconv.FormatUint(s.group.GroupId, 10), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - "", - 0, - []*group.GroupMember{ - { - GroupId: s.group.GroupId, - Member: &group.Member{ - Address: val.Address.String(), - Weight: "3", - Metadata: []byte{1}, - }, - }, - }, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := client.QueryGroupMembersCmd() - - out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Contains(out.String(), tc.expectErrMsg) - } else { - s.Require().NoError(err, out.String()) - - var res group.QueryGroupMembersResponse - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) - s.Require().Equal(len(res.Members), len(tc.expectMembers)) - for i := range res.Members { - s.Require().Equal(res.Members[i].GroupId, tc.expectMembers[i].GroupId) - s.Require().Equal(res.Members[i].Member.Address, tc.expectMembers[i].Member.Address) - s.Require().Equal(res.Members[i].Member.Metadata, tc.expectMembers[i].Member.Metadata) - s.Require().Equal(res.Members[i].Member.Weight, tc.expectMembers[i].Member.Weight) - } - } - }) - } -} - -func (s *IntegrationTestSuite) TestQueryGroupsByAdmin() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - testCases := []struct { - name string - args []string - expectErr bool - expectErrMsg string - expectedCode uint32 - expectGroups []*group.GroupInfo - }{ - { - "invalid admin address", - []string{"invalid"}, - true, - "decoding bech32 failed: invalid bech32 string", - 0, - []*group.GroupInfo{}, - }, - { - "no group", - []string{s.network.Validators[1].Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - "", - 0, - []*group.GroupInfo{}, - }, - { - "found groups", - []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - "", - 0, - []*group.GroupInfo{ - s.group, - }, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := client.QueryGroupsByAdminCmd() - - out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Contains(out.String(), tc.expectErrMsg) - } else { - s.Require().NoError(err, out.String()) - - var res group.QueryGroupsByAdminResponse - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) - s.Require().Equal(len(res.Groups), len(tc.expectGroups)) - for i := range res.Groups { - s.Require().Equal(res.Groups[i].GroupId, tc.expectGroups[i].GroupId) - s.Require().Equal(res.Groups[i].Metadata, tc.expectGroups[i].Metadata) - s.Require().Equal(res.Groups[i].Version, tc.expectGroups[i].Version) - s.Require().Equal(res.Groups[i].TotalWeight, tc.expectGroups[i].TotalWeight) - s.Require().Equal(res.Groups[i].Admin, tc.expectGroups[i].Admin) - } - } - }) - } -} - -func (s *IntegrationTestSuite) TestQueryGroupPolicyInfo() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - testCases := []struct { - name string - args []string - expectErr bool - expectErrMsg string - expectedCode uint32 - }{ - { - "group policy not found", - []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - true, - "not found: invalid request", - 0, - }, - { - "group policy found", - []string{s.groupPolicies[0].Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - "", - 0, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := client.QueryGroupPolicyInfoCmd() - - out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Contains(out.String(), tc.expectErrMsg) - } else { - s.Require().NoError(err, out.String()) - - var g group.GroupPolicyInfo - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &g)) - s.Require().Equal(s.groupPolicies[0].GroupId, g.GroupId) - s.Require().Equal(s.groupPolicies[0].Address, g.Address) - 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()) - } - }) - } -} - -func (s *IntegrationTestSuite) TestQueryGroupPoliciesByGroup() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - testCases := []struct { - name string - args []string - expectErr bool - expectErrMsg string - expectedCode uint32 - expectGroupPolicies []*group.GroupPolicyInfo - }{ - { - "invalid group id", - []string{""}, - true, - "strconv.ParseUint: parsing \"\": invalid syntax", - 0, - []*group.GroupPolicyInfo{}, - }, - { - "no group policy", - []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - "", - 0, - []*group.GroupPolicyInfo{}, - }, - { - "found group policies", - []string{strconv.FormatUint(s.group.GroupId, 10), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - "", - 0, - []*group.GroupPolicyInfo{ - s.groupPolicies[0], - s.groupPolicies[1], - s.groupPolicies[2], - s.groupPolicies[3], - s.groupPolicies[4], - }, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := client.QueryGroupPoliciesByGroupCmd() - - out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Contains(out.String(), tc.expectErrMsg) - } else { - s.Require().NoError(err, out.String()) - - var res group.QueryGroupPoliciesByGroupResponse - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) - s.Require().Equal(len(res.GroupPolicies), len(tc.expectGroupPolicies)) - for i := range res.GroupPolicies { - s.Require().Equal(res.GroupPolicies[i].GroupId, tc.expectGroupPolicies[i].GroupId) - 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()) - } - } - }) - } -} - -func (s *IntegrationTestSuite) TestQueryGroupPoliciesByAdmin() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - testCases := []struct { - name string - args []string - expectErr bool - expectErrMsg string - expectedCode uint32 - expectGroupPolicies []*group.GroupPolicyInfo - }{ - { - "invalid admin address", - []string{"invalid"}, - true, - "decoding bech32 failed: invalid bech32 string", - 0, - []*group.GroupPolicyInfo{}, - }, - { - "no group policy", - []string{s.network.Validators[1].Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - "", - 0, - []*group.GroupPolicyInfo{}, - }, - { - "found group policies", - []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - "", - 0, - []*group.GroupPolicyInfo{ - s.groupPolicies[0], - s.groupPolicies[1], - s.groupPolicies[2], - s.groupPolicies[3], - s.groupPolicies[4], - }, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := client.QueryGroupPoliciesByAdminCmd() - - out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Contains(out.String(), tc.expectErrMsg) - } else { - s.Require().NoError(err, out.String()) - - var res group.QueryGroupPoliciesByAdminResponse - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) - s.Require().Equal(len(res.GroupPolicies), len(tc.expectGroupPolicies)) - for i := range res.GroupPolicies { - s.Require().Equal(res.GroupPolicies[i].GroupId, tc.expectGroupPolicies[i].GroupId) - 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()) - } - } - }) - } -} - -func (s *IntegrationTestSuite) TestQueryProposal() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - testCases := []struct { - name string - args []string - expectErr bool - expectErrMsg string - expectedCode uint32 - }{ - { - "not found", - []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - true, - "not found", - 0, - }, - { - "invalid proposal id", - []string{"", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - true, - "strconv.ParseUint: parsing \"\": invalid syntax", - 0, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := client.QueryProposalCmd() - - out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Contains(out.String(), tc.expectErrMsg) - } else { - s.Require().NoError(err, out.String()) - } - }) - } -} - -func (s *IntegrationTestSuite) TestQueryProposalsByGroupPolicy() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - testCases := []struct { - name string - args []string - expectErr bool - expectErrMsg string - expectedCode uint32 - expectProposals []*group.Proposal - }{ - { - "invalid group policy address", - []string{"invalid"}, - true, - "decoding bech32 failed: invalid bech32 string", - 0, - []*group.Proposal{}, - }, - { - "no group policy", - []string{s.network.Validators[1].Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - "", - 0, - []*group.Proposal{}, - }, - { - "found proposals", - []string{s.groupPolicies[0].Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - "", - 0, - []*group.Proposal{ - s.proposal, - }, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := client.QueryProposalsByGroupPolicyCmd() - - out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Contains(out.String(), tc.expectErrMsg) - } else { - s.Require().NoError(err, out.String()) - - var res group.QueryProposalsByGroupPolicyResponse - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) - s.Require().Equal(len(res.Proposals), len(tc.expectProposals)) - for i := range res.Proposals { - s.Require().Equal(res.Proposals[i], tc.expectProposals[i]) - } - } - }) - } -} - -func (s *IntegrationTestSuite) TestQueryVoteByProposalVoter() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - testCases := []struct { - name string - args []string - expectErr bool - expectErrMsg string - expectedCode uint32 - }{ - { - "invalid voter address", - []string{"1", "invalid", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - true, - "decoding bech32 failed: invalid bech32", - 0, - }, - { - "invalid proposal id", - []string{"", val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - true, - "strconv.ParseUint: parsing \"\": invalid syntax", - 0, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := client.QueryVoteByProposalVoterCmd() - - out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Contains(out.String(), tc.expectErrMsg) - } else { - s.Require().NoError(err, out.String()) - } - }) - } -} - -func (s *IntegrationTestSuite) TestQueryVotesByProposal() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - testCases := []struct { - name string - args []string - expectErr bool - expectErrMsg string - expectedCode uint32 - expectVotes []*group.Vote - }{ - { - "invalid proposal id", - []string{"", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - true, - "strconv.ParseUint: parsing \"\": invalid syntax", - 0, - []*group.Vote{}, - }, - { - "no votes", - []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - "", - 0, - []*group.Vote{}, - }, - { - "found votes", - []string{"1", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - "", - 0, - []*group.Vote{ - s.vote, - }, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := client.QueryVotesByProposalCmd() - - out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Contains(out.String(), tc.expectErrMsg) - } else { - s.Require().NoError(err, out.String()) - - var res group.QueryVotesByProposalResponse - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) - s.Require().Equal(len(res.Votes), len(tc.expectVotes)) - for i := range res.Votes { - s.Require().Equal(res.Votes[i], tc.expectVotes[i]) - } - } - }) - } -} - -func (s *IntegrationTestSuite) TestQueryVotesByVoter() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - testCases := []struct { - name string - args []string - expectErr bool - expectErrMsg string - expectedCode uint32 - expectVotes []*group.Vote - }{ - { - "invalid voter address", - []string{"abcd", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - true, - "decoding bech32 failed: invalid bech32", - 0, - []*group.Vote{}, - }, - { - "no votes", - []string{s.groupPolicies[0].Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - true, - "", - 0, - []*group.Vote{}, - }, - { - "found votes", - []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - "", - 0, - []*group.Vote{ - s.vote, - }, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := client.QueryVotesByVoterCmd() - - out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Contains(out.String(), tc.expectErrMsg) - } else { - s.Require().NoError(err, out.String()) - - var res group.QueryVotesByVoterResponse - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) - s.Require().Equal(len(res.Votes), len(tc.expectVotes)) - for i := range res.Votes { - s.Require().Equal(res.Votes[i], tc.expectVotes[i]) - } - } - }) - } -} +// import ( +// "fmt" +// "strconv" + +// "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" +// "github.com/cosmos/cosmos-sdk/testutil/cli" +// sdk "github.com/cosmos/cosmos-sdk/types" +// "github.com/cosmos/cosmos-sdk/x/group" +// client "github.com/cosmos/cosmos-sdk/x/group/client/cli" + +// tmcli "github.com/tendermint/tendermint/libs/cli" +// ) + +// func (s *IntegrationTestSuite) TestQueryGroupInfo() { +// val := s.network.Validators[0] +// clientCtx := val.ClientCtx + +// testCases := []struct { +// name string +// args []string +// expectErr bool +// expectErrMsg string +// expectedCode uint32 +// }{ +// { +// "group not found", +// []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// true, +// "not found: invalid request", +// 0, +// }, +// { +// "group id invalid", +// []string{"", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// true, +// "strconv.ParseUint: parsing \"\": invalid syntax", +// 0, +// }, +// { +// "group found", +// []string{strconv.FormatUint(s.group.GroupId, 10), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// false, +// "", +// 0, +// }, +// } + +// for _, tc := range testCases { +// tc := tc + +// s.Run(tc.name, func() { +// cmd := client.QueryGroupInfoCmd() + +// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) +// if tc.expectErr { +// s.Require().Contains(out.String(), tc.expectErrMsg) +// } else { +// s.Require().NoError(err, out.String()) + +// var g group.GroupInfo +// s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &g)) +// s.Require().Equal(s.group.GroupId, g.GroupId) +// s.Require().Equal(s.group.Admin, g.Admin) +// s.Require().Equal(s.group.TotalWeight, g.TotalWeight) +// s.Require().Equal(s.group.Metadata, g.Metadata) +// s.Require().Equal(s.group.Version, g.Version) +// } +// }) +// } +// } + +// func (s *IntegrationTestSuite) TestQueryGroupsByMembers() { +// val := s.network.Validators[0] +// clientCtx := val.ClientCtx +// require := s.Require() + +// cmd := client.QueryGroupsByAdminCmd() +// out, err := cli.ExecTestCLICmd(clientCtx, cmd, []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) +// require.NoError(err) + +// var groups group.QueryGroupsByAdminResponse +// val.ClientCtx.Codec.MustUnmarshalJSON(out.Bytes(), &groups) +// require.Len(groups.Groups, 1) + +// cmd = client.QueryGroupMembersCmd() +// out, err = cli.ExecTestCLICmd(clientCtx, cmd, []string{fmt.Sprintf("%d", groups.Groups[0].GroupId), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) +// require.NoError(err) + +// var members group.QueryGroupMembersResponse +// val.ClientCtx.Codec.MustUnmarshalJSON(out.Bytes(), &members) +// require.Len(members.Members, 1) + +// testAddr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) + +// testCases := []struct { +// name string +// args []string +// expectErr bool +// expectErrMsg string +// numItems int +// expectGroups []*group.GroupInfo +// }{ +// { +// "invalid address", +// []string{"abcd", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// true, +// "invalid bech32 string", +// 0, +// []*group.GroupInfo{}, +// }, +// { +// "not part of any group", +// []string{testAddr.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// false, +// "", +// 0, +// []*group.GroupInfo{}, +// }, +// { +// "expect one group", +// []string{members.Members[0].Member.Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// false, +// "", +// 1, +// groups.Groups, +// }, +// } + +// for _, tc := range testCases { +// tc := tc +// s.Run(tc.name, func() { +// cmd := client.QueryGroupsByMemberCmd() +// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) +// if tc.expectErr { +// require.Contains(out.String(), tc.expectErrMsg) +// } else { +// require.NoError(err, out.String()) + +// var resp group.QueryGroupsByMemberResponse +// val.ClientCtx.Codec.MustUnmarshalJSON(out.Bytes(), &resp) +// require.Len(resp.Groups, tc.numItems) + +// require.Equal(tc.expectGroups, resp.Groups) +// } +// }) +// } +// } + +// func (s *IntegrationTestSuite) TestQueryGroupMembers() { +// val := s.network.Validators[0] +// clientCtx := val.ClientCtx + +// testCases := []struct { +// name string +// args []string +// expectErr bool +// expectErrMsg string +// expectedCode uint32 +// expectMembers []*group.GroupMember +// }{ +// { +// "no group", +// []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// false, +// "", +// 0, +// []*group.GroupMember{}, +// }, +// { +// "members found", +// []string{strconv.FormatUint(s.group.GroupId, 10), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// false, +// "", +// 0, +// []*group.GroupMember{ +// { +// GroupId: s.group.GroupId, +// Member: &group.Member{ +// Address: val.Address.String(), +// Weight: "3", +// Metadata: []byte{1}, +// }, +// }, +// }, +// }, +// } + +// for _, tc := range testCases { +// tc := tc + +// s.Run(tc.name, func() { +// cmd := client.QueryGroupMembersCmd() + +// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) +// if tc.expectErr { +// s.Require().Contains(out.String(), tc.expectErrMsg) +// } else { +// s.Require().NoError(err, out.String()) + +// var res group.QueryGroupMembersResponse +// s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) +// s.Require().Equal(len(res.Members), len(tc.expectMembers)) +// for i := range res.Members { +// s.Require().Equal(res.Members[i].GroupId, tc.expectMembers[i].GroupId) +// s.Require().Equal(res.Members[i].Member.Address, tc.expectMembers[i].Member.Address) +// s.Require().Equal(res.Members[i].Member.Metadata, tc.expectMembers[i].Member.Metadata) +// s.Require().Equal(res.Members[i].Member.Weight, tc.expectMembers[i].Member.Weight) +// } +// } +// }) +// } +// } + +// func (s *IntegrationTestSuite) TestQueryGroupsByAdmin() { +// val := s.network.Validators[0] +// clientCtx := val.ClientCtx + +// testCases := []struct { +// name string +// args []string +// expectErr bool +// expectErrMsg string +// expectedCode uint32 +// expectGroups []*group.GroupInfo +// }{ +// { +// "invalid admin address", +// []string{"invalid"}, +// true, +// "decoding bech32 failed: invalid bech32 string", +// 0, +// []*group.GroupInfo{}, +// }, +// { +// "no group", +// []string{s.network.Validators[1].Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// false, +// "", +// 0, +// []*group.GroupInfo{}, +// }, +// { +// "found groups", +// []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// false, +// "", +// 0, +// []*group.GroupInfo{ +// s.group, +// }, +// }, +// } + +// for _, tc := range testCases { +// tc := tc + +// s.Run(tc.name, func() { +// cmd := client.QueryGroupsByAdminCmd() + +// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) +// if tc.expectErr { +// s.Require().Contains(out.String(), tc.expectErrMsg) +// } else { +// s.Require().NoError(err, out.String()) + +// var res group.QueryGroupsByAdminResponse +// s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) +// s.Require().Equal(len(res.Groups), len(tc.expectGroups)) +// for i := range res.Groups { +// s.Require().Equal(res.Groups[i].GroupId, tc.expectGroups[i].GroupId) +// s.Require().Equal(res.Groups[i].Metadata, tc.expectGroups[i].Metadata) +// s.Require().Equal(res.Groups[i].Version, tc.expectGroups[i].Version) +// s.Require().Equal(res.Groups[i].TotalWeight, tc.expectGroups[i].TotalWeight) +// s.Require().Equal(res.Groups[i].Admin, tc.expectGroups[i].Admin) +// } +// } +// }) +// } +// } + +// func (s *IntegrationTestSuite) TestQueryGroupPolicyInfo() { +// val := s.network.Validators[0] +// clientCtx := val.ClientCtx + +// testCases := []struct { +// name string +// args []string +// expectErr bool +// expectErrMsg string +// expectedCode uint32 +// }{ +// { +// "group policy not found", +// []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// true, +// "not found: invalid request", +// 0, +// }, +// { +// "group policy found", +// []string{s.groupPolicies[0].Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// false, +// "", +// 0, +// }, +// } + +// for _, tc := range testCases { +// tc := tc + +// s.Run(tc.name, func() { +// cmd := client.QueryGroupPolicyInfoCmd() + +// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) +// if tc.expectErr { +// s.Require().Contains(out.String(), tc.expectErrMsg) +// } else { +// s.Require().NoError(err, out.String()) + +// var g group.GroupPolicyInfo +// s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &g)) +// s.Require().Equal(s.groupPolicies[0].GroupId, g.GroupId) +// s.Require().Equal(s.groupPolicies[0].Address, g.Address) +// 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()) +// } +// }) +// } +// } + +// func (s *IntegrationTestSuite) TestQueryGroupPoliciesByGroup() { +// val := s.network.Validators[0] +// clientCtx := val.ClientCtx + +// testCases := []struct { +// name string +// args []string +// expectErr bool +// expectErrMsg string +// expectedCode uint32 +// expectGroupPolicies []*group.GroupPolicyInfo +// }{ +// { +// "invalid group id", +// []string{""}, +// true, +// "strconv.ParseUint: parsing \"\": invalid syntax", +// 0, +// []*group.GroupPolicyInfo{}, +// }, +// { +// "no group policy", +// []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// false, +// "", +// 0, +// []*group.GroupPolicyInfo{}, +// }, +// { +// "found group policies", +// []string{strconv.FormatUint(s.group.GroupId, 10), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// false, +// "", +// 0, +// []*group.GroupPolicyInfo{ +// s.groupPolicies[0], +// s.groupPolicies[1], +// s.groupPolicies[2], +// s.groupPolicies[3], +// s.groupPolicies[4], +// }, +// }, +// } + +// for _, tc := range testCases { +// tc := tc + +// s.Run(tc.name, func() { +// cmd := client.QueryGroupPoliciesByGroupCmd() + +// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) +// if tc.expectErr { +// s.Require().Contains(out.String(), tc.expectErrMsg) +// } else { +// s.Require().NoError(err, out.String()) + +// var res group.QueryGroupPoliciesByGroupResponse +// s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) +// s.Require().Equal(len(res.GroupPolicies), len(tc.expectGroupPolicies)) +// for i := range res.GroupPolicies { +// s.Require().Equal(res.GroupPolicies[i].GroupId, tc.expectGroupPolicies[i].GroupId) +// 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()) +// } +// } +// }) +// } +// } + +// func (s *IntegrationTestSuite) TestQueryGroupPoliciesByAdmin() { +// val := s.network.Validators[0] +// clientCtx := val.ClientCtx + +// testCases := []struct { +// name string +// args []string +// expectErr bool +// expectErrMsg string +// expectedCode uint32 +// expectGroupPolicies []*group.GroupPolicyInfo +// }{ +// { +// "invalid admin address", +// []string{"invalid"}, +// true, +// "decoding bech32 failed: invalid bech32 string", +// 0, +// []*group.GroupPolicyInfo{}, +// }, +// { +// "no group policy", +// []string{s.network.Validators[1].Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// false, +// "", +// 0, +// []*group.GroupPolicyInfo{}, +// }, +// { +// "found group policies", +// []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// false, +// "", +// 0, +// []*group.GroupPolicyInfo{ +// s.groupPolicies[0], +// s.groupPolicies[1], +// s.groupPolicies[2], +// s.groupPolicies[3], +// s.groupPolicies[4], +// }, +// }, +// } + +// for _, tc := range testCases { +// tc := tc + +// s.Run(tc.name, func() { +// cmd := client.QueryGroupPoliciesByAdminCmd() + +// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) +// if tc.expectErr { +// s.Require().Contains(out.String(), tc.expectErrMsg) +// } else { +// s.Require().NoError(err, out.String()) + +// var res group.QueryGroupPoliciesByAdminResponse +// s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) +// s.Require().Equal(len(res.GroupPolicies), len(tc.expectGroupPolicies)) +// for i := range res.GroupPolicies { +// s.Require().Equal(res.GroupPolicies[i].GroupId, tc.expectGroupPolicies[i].GroupId) +// 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()) +// } +// } +// }) +// } +// } + +// func (s *IntegrationTestSuite) TestQueryProposal() { +// val := s.network.Validators[0] +// clientCtx := val.ClientCtx + +// testCases := []struct { +// name string +// args []string +// expectErr bool +// expectErrMsg string +// expectedCode uint32 +// }{ +// { +// "not found", +// []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// true, +// "not found", +// 0, +// }, +// { +// "invalid proposal id", +// []string{"", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// true, +// "strconv.ParseUint: parsing \"\": invalid syntax", +// 0, +// }, +// } + +// for _, tc := range testCases { +// tc := tc + +// s.Run(tc.name, func() { +// cmd := client.QueryProposalCmd() + +// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) +// if tc.expectErr { +// s.Require().Contains(out.String(), tc.expectErrMsg) +// } else { +// s.Require().NoError(err, out.String()) +// } +// }) +// } +// } + +// func (s *IntegrationTestSuite) TestQueryProposalsByGroupPolicy() { +// val := s.network.Validators[0] +// clientCtx := val.ClientCtx + +// testCases := []struct { +// name string +// args []string +// expectErr bool +// expectErrMsg string +// expectedCode uint32 +// expectProposals []*group.Proposal +// }{ +// { +// "invalid group policy address", +// []string{"invalid"}, +// true, +// "decoding bech32 failed: invalid bech32 string", +// 0, +// []*group.Proposal{}, +// }, +// { +// "no group policy", +// []string{s.network.Validators[1].Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// false, +// "", +// 0, +// []*group.Proposal{}, +// }, +// { +// "found proposals", +// []string{s.groupPolicies[0].Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// false, +// "", +// 0, +// []*group.Proposal{ +// s.proposal, +// }, +// }, +// } + +// for _, tc := range testCases { +// tc := tc + +// s.Run(tc.name, func() { +// cmd := client.QueryProposalsByGroupPolicyCmd() + +// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) +// if tc.expectErr { +// s.Require().Contains(out.String(), tc.expectErrMsg) +// } else { +// s.Require().NoError(err, out.String()) + +// var res group.QueryProposalsByGroupPolicyResponse +// s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) +// s.Require().Equal(len(res.Proposals), len(tc.expectProposals)) +// for i := range res.Proposals { +// s.Require().Equal(res.Proposals[i], tc.expectProposals[i]) +// } +// } +// }) +// } +// } + +// func (s *IntegrationTestSuite) TestQueryVoteByProposalVoter() { +// val := s.network.Validators[0] +// clientCtx := val.ClientCtx + +// testCases := []struct { +// name string +// args []string +// expectErr bool +// expectErrMsg string +// expectedCode uint32 +// }{ +// { +// "invalid voter address", +// []string{"1", "invalid", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// true, +// "decoding bech32 failed: invalid bech32", +// 0, +// }, +// { +// "invalid proposal id", +// []string{"", val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// true, +// "strconv.ParseUint: parsing \"\": invalid syntax", +// 0, +// }, +// } + +// for _, tc := range testCases { +// tc := tc + +// s.Run(tc.name, func() { +// cmd := client.QueryVoteByProposalVoterCmd() + +// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) +// if tc.expectErr { +// s.Require().Contains(out.String(), tc.expectErrMsg) +// } else { +// s.Require().NoError(err, out.String()) +// } +// }) +// } +// } + +// func (s *IntegrationTestSuite) TestQueryVotesByProposal() { +// val := s.network.Validators[0] +// clientCtx := val.ClientCtx + +// testCases := []struct { +// name string +// args []string +// expectErr bool +// expectErrMsg string +// expectedCode uint32 +// expectVotes []*group.Vote +// }{ +// { +// "invalid proposal id", +// []string{"", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// true, +// "strconv.ParseUint: parsing \"\": invalid syntax", +// 0, +// []*group.Vote{}, +// }, +// { +// "no votes", +// []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// false, +// "", +// 0, +// []*group.Vote{}, +// }, +// { +// "found votes", +// []string{"1", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// false, +// "", +// 0, +// []*group.Vote{ +// s.vote, +// }, +// }, +// } + +// for _, tc := range testCases { +// tc := tc + +// s.Run(tc.name, func() { +// cmd := client.QueryVotesByProposalCmd() + +// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) +// if tc.expectErr { +// s.Require().Contains(out.String(), tc.expectErrMsg) +// } else { +// s.Require().NoError(err, out.String()) + +// var res group.QueryVotesByProposalResponse +// s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) +// s.Require().Equal(len(res.Votes), len(tc.expectVotes)) +// for i := range res.Votes { +// s.Require().Equal(res.Votes[i], tc.expectVotes[i]) +// } +// } +// }) +// } +// } + +// func (s *IntegrationTestSuite) TestQueryVotesByVoter() { +// val := s.network.Validators[0] +// clientCtx := val.ClientCtx + +// testCases := []struct { +// name string +// args []string +// expectErr bool +// expectErrMsg string +// expectedCode uint32 +// expectVotes []*group.Vote +// }{ +// { +// "invalid voter address", +// []string{"abcd", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// true, +// "decoding bech32 failed: invalid bech32", +// 0, +// []*group.Vote{}, +// }, +// { +// "no votes", +// []string{s.groupPolicies[0].Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// true, +// "", +// 0, +// []*group.Vote{}, +// }, +// { +// "found votes", +// []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, +// false, +// "", +// 0, +// []*group.Vote{ +// s.vote, +// }, +// }, +// } + +// for _, tc := range testCases { +// tc := tc + +// s.Run(tc.name, func() { +// cmd := client.QueryVotesByVoterCmd() + +// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) +// if tc.expectErr { +// s.Require().Contains(out.String(), tc.expectErrMsg) +// } else { +// s.Require().NoError(err, out.String()) + +// var res group.QueryVotesByVoterResponse +// s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) +// s.Require().Equal(len(res.Votes), len(tc.expectVotes)) +// for i := range res.Votes { +// s.Require().Equal(res.Votes[i], tc.expectVotes[i]) +// } +// } +// }) +// } +// } diff --git a/x/group/client/testutil/tx.go b/x/group/client/testutil/tx.go index 397d5a792ad4..7f11654cc2be 100644 --- a/x/group/client/testutil/tx.go +++ b/x/group/client/testutil/tx.go @@ -1633,6 +1633,169 @@ func (s *IntegrationTestSuite) TestTxExec() { } } +func (s *IntegrationTestSuite) TestTxLeaveGroup() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + require := s.Require() + + commonFlags := []string{ + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + } + + // create 3 accounts with some tokens + members := make([]string, 3) + for i := 1; i <= 3; i++ { + info, _, err := clientCtx.Keyring.NewMnemonic(fmt.Sprintf("member%d", i), keyring.English, sdk.FullFundraiserPath, + keyring.DefaultBIP39Passphrase, hd.Secp256k1) + require.NoError(err) + + pk, err := info.GetPubKey() + require.NoError(err) + + account := sdk.AccAddress(pk.Address()) + members[i-1] = account.String() + + _, err = banktestutil.MsgSendExec(clientCtx, val.Address, account, + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(100))), + commonFlags..., + ) + require.NoError(err) + } + + // create a group + validMembers := fmt.Sprintf(`{"members": [{ + "address": "%s", + "weight": "1", + "metadata": "AQ==" + },{ + "address": "%s", + "weight": "2", + "metadata": "AQ==" + },{ + "address": "%s", + "weight": "2", + "metadata": "AQ==" + }]}`, members[0], members[1], members[2]) + validMembersFile := testutil.WriteToNewTempFile(s.T(), validMembers) + out, err := cli.ExecTestCLICmd(clientCtx, client.MsgCreateGroupCmd(), + append( + []string{ + val.Address.String(), + validMetadata, + validMembersFile.Name(), + }, + commonFlags..., + ), + ) + require.NoError(err, out.String()) + + // create decision policy + out, err = cli.ExecTestCLICmd(clientCtx, client.MsgCreateGroupPolicyCmd(), + append( + []string{ + val.Address.String(), + "4", + "AQ==", + "{\"@type\":\"/cosmos.group.v1beta1.ThresholdDecisionPolicy\", \"threshold\":\"3\", \"timeout\":\"30000s\"}", + }, + commonFlags..., + ), + ) + require.NoError(err, out.String()) + + out, err = cli.ExecTestCLICmd(clientCtx, client.QueryGroupPoliciesByGroupCmd(), []string{"4", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) + require.NoError(err, out.String()) + require.NotNil(out) + var resp group.QueryGroupPoliciesByGroupResponse + require.NoError(clientCtx.Codec.Unmarshal(out.Bytes(), &resp)) + require.Len(resp.GroupPolicies, 1) + policyAddress := resp.GroupPolicies[0].Address + + testCases := []struct { + name string + args []string + expectErr bool + errMsg string + }{ + { + "invalid member address", + append( + []string{ + "address", + val.Address.String(), + "4", + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + }, + commonFlags..., + ), + true, + "inalivs", + }, + { + "invalid policy address", + append( + []string{ + members[0], + "policy", + "4", + fmt.Sprintf("--%s=%s", flags.FlagFrom, members[0]), + }, + commonFlags..., + ), + true, + "inalivs", + }, + { + "group not found", + append( + []string{ + members[0], + policyAddress, + "40", + fmt.Sprintf("--%s=%s", flags.FlagFrom, members[0]), + }, + commonFlags..., + ), + true, + "inalivs", + }, + { + "policy not found", + append( + []string{ + members[0], + policyAddress, + "40", + fmt.Sprintf("--%s=%s", flags.FlagFrom, members[0]), + }, + commonFlags..., + ), + true, + "inalivs", + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := client.MsgLeaveGroupCmd() + + out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Contains(out.String(), tc.errMsg) + } else { + s.Require().NoError(err, out.String()) + } + }) + } + + require.True(false) + +} + func getTxSendFileName(s *IntegrationTestSuite, from string, to string) string { tx := fmt.Sprintf( `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"%s","to_address":"%s","amount":[{"denom":"%s","amount":"10"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]}`, diff --git a/x/group/keeper/msg_server.go b/x/group/keeper/msg_server.go index cad21154be15..fe496ce40204 100644 --- a/x/group/keeper/msg_server.go +++ b/x/group/keeper/msg_server.go @@ -768,7 +768,7 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr } if threshold.Cmp(r) == 1 { - return nil, sdkerrors.ErrInvalidRequest.Wrap("cannot leave group") + return nil, sdkerrors.ErrInvalidRequest.Wrap("cannot leave group. Leaving the group will break group policy.") } // Delete group member in the groupMemberTable. diff --git a/x/group/spec/05_client.md b/x/group/spec/05_client.md index 4b09fb68169a..a8ef04281e11 100644 --- a/x/group/spec/05_client.md +++ b/x/group/spec/05_client.md @@ -551,6 +551,21 @@ Example: simd tx group exec 1 ``` +#### leave-group + +The `leave-group` command allows group member to leave the group. + +```bash +simd tx group leave-group [member-address] [group-policy-account] [group-id] +``` + +Example: + +```bash +simd tx group leave-group cosmos1... cosmos1... 1 +``` + + ## gRPC A user can query the `group` module using gRPC endpoints. From 2f2f9df867877bba464ce34b0d7b685b7d0ff65b Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Mon, 24 Jan 2022 18:01:54 +0530 Subject: [PATCH 08/32] feat: add cli tests --- x/group/client/testutil/query.go | 1496 +++++++++++++++--------------- x/group/client/testutil/tx.go | 67 +- 2 files changed, 801 insertions(+), 762 deletions(-) diff --git a/x/group/client/testutil/query.go b/x/group/client/testutil/query.go index 2aaa55829f6b..6a51177795a6 100644 --- a/x/group/client/testutil/query.go +++ b/x/group/client/testutil/query.go @@ -1,750 +1,750 @@ package testutil -// import ( -// "fmt" -// "strconv" - -// "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" -// "github.com/cosmos/cosmos-sdk/testutil/cli" -// sdk "github.com/cosmos/cosmos-sdk/types" -// "github.com/cosmos/cosmos-sdk/x/group" -// client "github.com/cosmos/cosmos-sdk/x/group/client/cli" - -// tmcli "github.com/tendermint/tendermint/libs/cli" -// ) - -// func (s *IntegrationTestSuite) TestQueryGroupInfo() { -// val := s.network.Validators[0] -// clientCtx := val.ClientCtx - -// testCases := []struct { -// name string -// args []string -// expectErr bool -// expectErrMsg string -// expectedCode uint32 -// }{ -// { -// "group not found", -// []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// true, -// "not found: invalid request", -// 0, -// }, -// { -// "group id invalid", -// []string{"", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// true, -// "strconv.ParseUint: parsing \"\": invalid syntax", -// 0, -// }, -// { -// "group found", -// []string{strconv.FormatUint(s.group.GroupId, 10), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// false, -// "", -// 0, -// }, -// } - -// for _, tc := range testCases { -// tc := tc - -// s.Run(tc.name, func() { -// cmd := client.QueryGroupInfoCmd() - -// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) -// if tc.expectErr { -// s.Require().Contains(out.String(), tc.expectErrMsg) -// } else { -// s.Require().NoError(err, out.String()) - -// var g group.GroupInfo -// s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &g)) -// s.Require().Equal(s.group.GroupId, g.GroupId) -// s.Require().Equal(s.group.Admin, g.Admin) -// s.Require().Equal(s.group.TotalWeight, g.TotalWeight) -// s.Require().Equal(s.group.Metadata, g.Metadata) -// s.Require().Equal(s.group.Version, g.Version) -// } -// }) -// } -// } - -// func (s *IntegrationTestSuite) TestQueryGroupsByMembers() { -// val := s.network.Validators[0] -// clientCtx := val.ClientCtx -// require := s.Require() - -// cmd := client.QueryGroupsByAdminCmd() -// out, err := cli.ExecTestCLICmd(clientCtx, cmd, []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) -// require.NoError(err) - -// var groups group.QueryGroupsByAdminResponse -// val.ClientCtx.Codec.MustUnmarshalJSON(out.Bytes(), &groups) -// require.Len(groups.Groups, 1) - -// cmd = client.QueryGroupMembersCmd() -// out, err = cli.ExecTestCLICmd(clientCtx, cmd, []string{fmt.Sprintf("%d", groups.Groups[0].GroupId), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) -// require.NoError(err) - -// var members group.QueryGroupMembersResponse -// val.ClientCtx.Codec.MustUnmarshalJSON(out.Bytes(), &members) -// require.Len(members.Members, 1) - -// testAddr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) - -// testCases := []struct { -// name string -// args []string -// expectErr bool -// expectErrMsg string -// numItems int -// expectGroups []*group.GroupInfo -// }{ -// { -// "invalid address", -// []string{"abcd", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// true, -// "invalid bech32 string", -// 0, -// []*group.GroupInfo{}, -// }, -// { -// "not part of any group", -// []string{testAddr.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// false, -// "", -// 0, -// []*group.GroupInfo{}, -// }, -// { -// "expect one group", -// []string{members.Members[0].Member.Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// false, -// "", -// 1, -// groups.Groups, -// }, -// } - -// for _, tc := range testCases { -// tc := tc -// s.Run(tc.name, func() { -// cmd := client.QueryGroupsByMemberCmd() -// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) -// if tc.expectErr { -// require.Contains(out.String(), tc.expectErrMsg) -// } else { -// require.NoError(err, out.String()) - -// var resp group.QueryGroupsByMemberResponse -// val.ClientCtx.Codec.MustUnmarshalJSON(out.Bytes(), &resp) -// require.Len(resp.Groups, tc.numItems) - -// require.Equal(tc.expectGroups, resp.Groups) -// } -// }) -// } -// } - -// func (s *IntegrationTestSuite) TestQueryGroupMembers() { -// val := s.network.Validators[0] -// clientCtx := val.ClientCtx - -// testCases := []struct { -// name string -// args []string -// expectErr bool -// expectErrMsg string -// expectedCode uint32 -// expectMembers []*group.GroupMember -// }{ -// { -// "no group", -// []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// false, -// "", -// 0, -// []*group.GroupMember{}, -// }, -// { -// "members found", -// []string{strconv.FormatUint(s.group.GroupId, 10), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// false, -// "", -// 0, -// []*group.GroupMember{ -// { -// GroupId: s.group.GroupId, -// Member: &group.Member{ -// Address: val.Address.String(), -// Weight: "3", -// Metadata: []byte{1}, -// }, -// }, -// }, -// }, -// } - -// for _, tc := range testCases { -// tc := tc - -// s.Run(tc.name, func() { -// cmd := client.QueryGroupMembersCmd() - -// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) -// if tc.expectErr { -// s.Require().Contains(out.String(), tc.expectErrMsg) -// } else { -// s.Require().NoError(err, out.String()) - -// var res group.QueryGroupMembersResponse -// s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) -// s.Require().Equal(len(res.Members), len(tc.expectMembers)) -// for i := range res.Members { -// s.Require().Equal(res.Members[i].GroupId, tc.expectMembers[i].GroupId) -// s.Require().Equal(res.Members[i].Member.Address, tc.expectMembers[i].Member.Address) -// s.Require().Equal(res.Members[i].Member.Metadata, tc.expectMembers[i].Member.Metadata) -// s.Require().Equal(res.Members[i].Member.Weight, tc.expectMembers[i].Member.Weight) -// } -// } -// }) -// } -// } - -// func (s *IntegrationTestSuite) TestQueryGroupsByAdmin() { -// val := s.network.Validators[0] -// clientCtx := val.ClientCtx - -// testCases := []struct { -// name string -// args []string -// expectErr bool -// expectErrMsg string -// expectedCode uint32 -// expectGroups []*group.GroupInfo -// }{ -// { -// "invalid admin address", -// []string{"invalid"}, -// true, -// "decoding bech32 failed: invalid bech32 string", -// 0, -// []*group.GroupInfo{}, -// }, -// { -// "no group", -// []string{s.network.Validators[1].Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// false, -// "", -// 0, -// []*group.GroupInfo{}, -// }, -// { -// "found groups", -// []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// false, -// "", -// 0, -// []*group.GroupInfo{ -// s.group, -// }, -// }, -// } - -// for _, tc := range testCases { -// tc := tc - -// s.Run(tc.name, func() { -// cmd := client.QueryGroupsByAdminCmd() - -// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) -// if tc.expectErr { -// s.Require().Contains(out.String(), tc.expectErrMsg) -// } else { -// s.Require().NoError(err, out.String()) - -// var res group.QueryGroupsByAdminResponse -// s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) -// s.Require().Equal(len(res.Groups), len(tc.expectGroups)) -// for i := range res.Groups { -// s.Require().Equal(res.Groups[i].GroupId, tc.expectGroups[i].GroupId) -// s.Require().Equal(res.Groups[i].Metadata, tc.expectGroups[i].Metadata) -// s.Require().Equal(res.Groups[i].Version, tc.expectGroups[i].Version) -// s.Require().Equal(res.Groups[i].TotalWeight, tc.expectGroups[i].TotalWeight) -// s.Require().Equal(res.Groups[i].Admin, tc.expectGroups[i].Admin) -// } -// } -// }) -// } -// } - -// func (s *IntegrationTestSuite) TestQueryGroupPolicyInfo() { -// val := s.network.Validators[0] -// clientCtx := val.ClientCtx - -// testCases := []struct { -// name string -// args []string -// expectErr bool -// expectErrMsg string -// expectedCode uint32 -// }{ -// { -// "group policy not found", -// []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// true, -// "not found: invalid request", -// 0, -// }, -// { -// "group policy found", -// []string{s.groupPolicies[0].Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// false, -// "", -// 0, -// }, -// } - -// for _, tc := range testCases { -// tc := tc - -// s.Run(tc.name, func() { -// cmd := client.QueryGroupPolicyInfoCmd() - -// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) -// if tc.expectErr { -// s.Require().Contains(out.String(), tc.expectErrMsg) -// } else { -// s.Require().NoError(err, out.String()) - -// var g group.GroupPolicyInfo -// s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &g)) -// s.Require().Equal(s.groupPolicies[0].GroupId, g.GroupId) -// s.Require().Equal(s.groupPolicies[0].Address, g.Address) -// 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()) -// } -// }) -// } -// } - -// func (s *IntegrationTestSuite) TestQueryGroupPoliciesByGroup() { -// val := s.network.Validators[0] -// clientCtx := val.ClientCtx - -// testCases := []struct { -// name string -// args []string -// expectErr bool -// expectErrMsg string -// expectedCode uint32 -// expectGroupPolicies []*group.GroupPolicyInfo -// }{ -// { -// "invalid group id", -// []string{""}, -// true, -// "strconv.ParseUint: parsing \"\": invalid syntax", -// 0, -// []*group.GroupPolicyInfo{}, -// }, -// { -// "no group policy", -// []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// false, -// "", -// 0, -// []*group.GroupPolicyInfo{}, -// }, -// { -// "found group policies", -// []string{strconv.FormatUint(s.group.GroupId, 10), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// false, -// "", -// 0, -// []*group.GroupPolicyInfo{ -// s.groupPolicies[0], -// s.groupPolicies[1], -// s.groupPolicies[2], -// s.groupPolicies[3], -// s.groupPolicies[4], -// }, -// }, -// } - -// for _, tc := range testCases { -// tc := tc - -// s.Run(tc.name, func() { -// cmd := client.QueryGroupPoliciesByGroupCmd() - -// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) -// if tc.expectErr { -// s.Require().Contains(out.String(), tc.expectErrMsg) -// } else { -// s.Require().NoError(err, out.String()) - -// var res group.QueryGroupPoliciesByGroupResponse -// s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) -// s.Require().Equal(len(res.GroupPolicies), len(tc.expectGroupPolicies)) -// for i := range res.GroupPolicies { -// s.Require().Equal(res.GroupPolicies[i].GroupId, tc.expectGroupPolicies[i].GroupId) -// 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()) -// } -// } -// }) -// } -// } - -// func (s *IntegrationTestSuite) TestQueryGroupPoliciesByAdmin() { -// val := s.network.Validators[0] -// clientCtx := val.ClientCtx - -// testCases := []struct { -// name string -// args []string -// expectErr bool -// expectErrMsg string -// expectedCode uint32 -// expectGroupPolicies []*group.GroupPolicyInfo -// }{ -// { -// "invalid admin address", -// []string{"invalid"}, -// true, -// "decoding bech32 failed: invalid bech32 string", -// 0, -// []*group.GroupPolicyInfo{}, -// }, -// { -// "no group policy", -// []string{s.network.Validators[1].Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// false, -// "", -// 0, -// []*group.GroupPolicyInfo{}, -// }, -// { -// "found group policies", -// []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// false, -// "", -// 0, -// []*group.GroupPolicyInfo{ -// s.groupPolicies[0], -// s.groupPolicies[1], -// s.groupPolicies[2], -// s.groupPolicies[3], -// s.groupPolicies[4], -// }, -// }, -// } - -// for _, tc := range testCases { -// tc := tc - -// s.Run(tc.name, func() { -// cmd := client.QueryGroupPoliciesByAdminCmd() - -// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) -// if tc.expectErr { -// s.Require().Contains(out.String(), tc.expectErrMsg) -// } else { -// s.Require().NoError(err, out.String()) - -// var res group.QueryGroupPoliciesByAdminResponse -// s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) -// s.Require().Equal(len(res.GroupPolicies), len(tc.expectGroupPolicies)) -// for i := range res.GroupPolicies { -// s.Require().Equal(res.GroupPolicies[i].GroupId, tc.expectGroupPolicies[i].GroupId) -// 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()) -// } -// } -// }) -// } -// } - -// func (s *IntegrationTestSuite) TestQueryProposal() { -// val := s.network.Validators[0] -// clientCtx := val.ClientCtx - -// testCases := []struct { -// name string -// args []string -// expectErr bool -// expectErrMsg string -// expectedCode uint32 -// }{ -// { -// "not found", -// []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// true, -// "not found", -// 0, -// }, -// { -// "invalid proposal id", -// []string{"", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// true, -// "strconv.ParseUint: parsing \"\": invalid syntax", -// 0, -// }, -// } - -// for _, tc := range testCases { -// tc := tc - -// s.Run(tc.name, func() { -// cmd := client.QueryProposalCmd() - -// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) -// if tc.expectErr { -// s.Require().Contains(out.String(), tc.expectErrMsg) -// } else { -// s.Require().NoError(err, out.String()) -// } -// }) -// } -// } - -// func (s *IntegrationTestSuite) TestQueryProposalsByGroupPolicy() { -// val := s.network.Validators[0] -// clientCtx := val.ClientCtx - -// testCases := []struct { -// name string -// args []string -// expectErr bool -// expectErrMsg string -// expectedCode uint32 -// expectProposals []*group.Proposal -// }{ -// { -// "invalid group policy address", -// []string{"invalid"}, -// true, -// "decoding bech32 failed: invalid bech32 string", -// 0, -// []*group.Proposal{}, -// }, -// { -// "no group policy", -// []string{s.network.Validators[1].Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// false, -// "", -// 0, -// []*group.Proposal{}, -// }, -// { -// "found proposals", -// []string{s.groupPolicies[0].Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// false, -// "", -// 0, -// []*group.Proposal{ -// s.proposal, -// }, -// }, -// } - -// for _, tc := range testCases { -// tc := tc - -// s.Run(tc.name, func() { -// cmd := client.QueryProposalsByGroupPolicyCmd() - -// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) -// if tc.expectErr { -// s.Require().Contains(out.String(), tc.expectErrMsg) -// } else { -// s.Require().NoError(err, out.String()) - -// var res group.QueryProposalsByGroupPolicyResponse -// s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) -// s.Require().Equal(len(res.Proposals), len(tc.expectProposals)) -// for i := range res.Proposals { -// s.Require().Equal(res.Proposals[i], tc.expectProposals[i]) -// } -// } -// }) -// } -// } - -// func (s *IntegrationTestSuite) TestQueryVoteByProposalVoter() { -// val := s.network.Validators[0] -// clientCtx := val.ClientCtx - -// testCases := []struct { -// name string -// args []string -// expectErr bool -// expectErrMsg string -// expectedCode uint32 -// }{ -// { -// "invalid voter address", -// []string{"1", "invalid", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// true, -// "decoding bech32 failed: invalid bech32", -// 0, -// }, -// { -// "invalid proposal id", -// []string{"", val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// true, -// "strconv.ParseUint: parsing \"\": invalid syntax", -// 0, -// }, -// } - -// for _, tc := range testCases { -// tc := tc - -// s.Run(tc.name, func() { -// cmd := client.QueryVoteByProposalVoterCmd() - -// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) -// if tc.expectErr { -// s.Require().Contains(out.String(), tc.expectErrMsg) -// } else { -// s.Require().NoError(err, out.String()) -// } -// }) -// } -// } - -// func (s *IntegrationTestSuite) TestQueryVotesByProposal() { -// val := s.network.Validators[0] -// clientCtx := val.ClientCtx - -// testCases := []struct { -// name string -// args []string -// expectErr bool -// expectErrMsg string -// expectedCode uint32 -// expectVotes []*group.Vote -// }{ -// { -// "invalid proposal id", -// []string{"", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// true, -// "strconv.ParseUint: parsing \"\": invalid syntax", -// 0, -// []*group.Vote{}, -// }, -// { -// "no votes", -// []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// false, -// "", -// 0, -// []*group.Vote{}, -// }, -// { -// "found votes", -// []string{"1", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// false, -// "", -// 0, -// []*group.Vote{ -// s.vote, -// }, -// }, -// } - -// for _, tc := range testCases { -// tc := tc - -// s.Run(tc.name, func() { -// cmd := client.QueryVotesByProposalCmd() - -// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) -// if tc.expectErr { -// s.Require().Contains(out.String(), tc.expectErrMsg) -// } else { -// s.Require().NoError(err, out.String()) - -// var res group.QueryVotesByProposalResponse -// s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) -// s.Require().Equal(len(res.Votes), len(tc.expectVotes)) -// for i := range res.Votes { -// s.Require().Equal(res.Votes[i], tc.expectVotes[i]) -// } -// } -// }) -// } -// } - -// func (s *IntegrationTestSuite) TestQueryVotesByVoter() { -// val := s.network.Validators[0] -// clientCtx := val.ClientCtx - -// testCases := []struct { -// name string -// args []string -// expectErr bool -// expectErrMsg string -// expectedCode uint32 -// expectVotes []*group.Vote -// }{ -// { -// "invalid voter address", -// []string{"abcd", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// true, -// "decoding bech32 failed: invalid bech32", -// 0, -// []*group.Vote{}, -// }, -// { -// "no votes", -// []string{s.groupPolicies[0].Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// true, -// "", -// 0, -// []*group.Vote{}, -// }, -// { -// "found votes", -// []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, -// false, -// "", -// 0, -// []*group.Vote{ -// s.vote, -// }, -// }, -// } - -// for _, tc := range testCases { -// tc := tc - -// s.Run(tc.name, func() { -// cmd := client.QueryVotesByVoterCmd() - -// out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) -// if tc.expectErr { -// s.Require().Contains(out.String(), tc.expectErrMsg) -// } else { -// s.Require().NoError(err, out.String()) - -// var res group.QueryVotesByVoterResponse -// s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) -// s.Require().Equal(len(res.Votes), len(tc.expectVotes)) -// for i := range res.Votes { -// s.Require().Equal(res.Votes[i], tc.expectVotes[i]) -// } -// } -// }) -// } -// } +import ( + "fmt" + "strconv" + + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + "github.com/cosmos/cosmos-sdk/testutil/cli" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/group" + client "github.com/cosmos/cosmos-sdk/x/group/client/cli" + + tmcli "github.com/tendermint/tendermint/libs/cli" +) + +func (s *IntegrationTestSuite) TestQueryGroupInfo() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + testCases := []struct { + name string + args []string + expectErr bool + expectErrMsg string + expectedCode uint32 + }{ + { + "group not found", + []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, + "not found: invalid request", + 0, + }, + { + "group id invalid", + []string{"", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, + "strconv.ParseUint: parsing \"\": invalid syntax", + 0, + }, + { + "group found", + []string{strconv.FormatUint(s.group.GroupId, 10), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + "", + 0, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := client.QueryGroupInfoCmd() + + out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Contains(out.String(), tc.expectErrMsg) + } else { + s.Require().NoError(err, out.String()) + + var g group.GroupInfo + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &g)) + s.Require().Equal(s.group.GroupId, g.GroupId) + s.Require().Equal(s.group.Admin, g.Admin) + s.Require().Equal(s.group.TotalWeight, g.TotalWeight) + s.Require().Equal(s.group.Metadata, g.Metadata) + s.Require().Equal(s.group.Version, g.Version) + } + }) + } +} + +func (s *IntegrationTestSuite) TestQueryGroupsByMembers() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + require := s.Require() + + cmd := client.QueryGroupsByAdminCmd() + out, err := cli.ExecTestCLICmd(clientCtx, cmd, []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) + require.NoError(err) + + var groups group.QueryGroupsByAdminResponse + val.ClientCtx.Codec.MustUnmarshalJSON(out.Bytes(), &groups) + require.Len(groups.Groups, 1) + + cmd = client.QueryGroupMembersCmd() + out, err = cli.ExecTestCLICmd(clientCtx, cmd, []string{fmt.Sprintf("%d", groups.Groups[0].GroupId), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) + require.NoError(err) + + var members group.QueryGroupMembersResponse + val.ClientCtx.Codec.MustUnmarshalJSON(out.Bytes(), &members) + require.Len(members.Members, 1) + + testAddr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) + + testCases := []struct { + name string + args []string + expectErr bool + expectErrMsg string + numItems int + expectGroups []*group.GroupInfo + }{ + { + "invalid address", + []string{"abcd", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, + "invalid bech32 string", + 0, + []*group.GroupInfo{}, + }, + { + "not part of any group", + []string{testAddr.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + "", + 0, + []*group.GroupInfo{}, + }, + { + "expect one group", + []string{members.Members[0].Member.Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + "", + 1, + groups.Groups, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + cmd := client.QueryGroupsByMemberCmd() + out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + require.Contains(out.String(), tc.expectErrMsg) + } else { + require.NoError(err, out.String()) + + var resp group.QueryGroupsByMemberResponse + val.ClientCtx.Codec.MustUnmarshalJSON(out.Bytes(), &resp) + require.Len(resp.Groups, tc.numItems) + + require.Equal(tc.expectGroups, resp.Groups) + } + }) + } +} + +func (s *IntegrationTestSuite) TestQueryGroupMembers() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + testCases := []struct { + name string + args []string + expectErr bool + expectErrMsg string + expectedCode uint32 + expectMembers []*group.GroupMember + }{ + { + "no group", + []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + "", + 0, + []*group.GroupMember{}, + }, + { + "members found", + []string{strconv.FormatUint(s.group.GroupId, 10), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + "", + 0, + []*group.GroupMember{ + { + GroupId: s.group.GroupId, + Member: &group.Member{ + Address: val.Address.String(), + Weight: "3", + Metadata: []byte{1}, + }, + }, + }, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := client.QueryGroupMembersCmd() + + out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Contains(out.String(), tc.expectErrMsg) + } else { + s.Require().NoError(err, out.String()) + + var res group.QueryGroupMembersResponse + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + s.Require().Equal(len(res.Members), len(tc.expectMembers)) + for i := range res.Members { + s.Require().Equal(res.Members[i].GroupId, tc.expectMembers[i].GroupId) + s.Require().Equal(res.Members[i].Member.Address, tc.expectMembers[i].Member.Address) + s.Require().Equal(res.Members[i].Member.Metadata, tc.expectMembers[i].Member.Metadata) + s.Require().Equal(res.Members[i].Member.Weight, tc.expectMembers[i].Member.Weight) + } + } + }) + } +} + +func (s *IntegrationTestSuite) TestQueryGroupsByAdmin() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + testCases := []struct { + name string + args []string + expectErr bool + expectErrMsg string + expectedCode uint32 + expectGroups []*group.GroupInfo + }{ + { + "invalid admin address", + []string{"invalid"}, + true, + "decoding bech32 failed: invalid bech32 string", + 0, + []*group.GroupInfo{}, + }, + { + "no group", + []string{s.network.Validators[1].Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + "", + 0, + []*group.GroupInfo{}, + }, + { + "found groups", + []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + "", + 0, + []*group.GroupInfo{ + s.group, + }, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := client.QueryGroupsByAdminCmd() + + out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Contains(out.String(), tc.expectErrMsg) + } else { + s.Require().NoError(err, out.String()) + + var res group.QueryGroupsByAdminResponse + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + s.Require().Equal(len(res.Groups), len(tc.expectGroups)) + for i := range res.Groups { + s.Require().Equal(res.Groups[i].GroupId, tc.expectGroups[i].GroupId) + s.Require().Equal(res.Groups[i].Metadata, tc.expectGroups[i].Metadata) + s.Require().Equal(res.Groups[i].Version, tc.expectGroups[i].Version) + s.Require().Equal(res.Groups[i].TotalWeight, tc.expectGroups[i].TotalWeight) + s.Require().Equal(res.Groups[i].Admin, tc.expectGroups[i].Admin) + } + } + }) + } +} + +func (s *IntegrationTestSuite) TestQueryGroupPolicyInfo() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + testCases := []struct { + name string + args []string + expectErr bool + expectErrMsg string + expectedCode uint32 + }{ + { + "group policy not found", + []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, + "not found: invalid request", + 0, + }, + { + "group policy found", + []string{s.groupPolicies[0].Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + "", + 0, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := client.QueryGroupPolicyInfoCmd() + + out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Contains(out.String(), tc.expectErrMsg) + } else { + s.Require().NoError(err, out.String()) + + var g group.GroupPolicyInfo + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &g)) + s.Require().Equal(s.groupPolicies[0].GroupId, g.GroupId) + s.Require().Equal(s.groupPolicies[0].Address, g.Address) + 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()) + } + }) + } +} + +func (s *IntegrationTestSuite) TestQueryGroupPoliciesByGroup() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + testCases := []struct { + name string + args []string + expectErr bool + expectErrMsg string + expectedCode uint32 + expectGroupPolicies []*group.GroupPolicyInfo + }{ + { + "invalid group id", + []string{""}, + true, + "strconv.ParseUint: parsing \"\": invalid syntax", + 0, + []*group.GroupPolicyInfo{}, + }, + { + "no group policy", + []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + "", + 0, + []*group.GroupPolicyInfo{}, + }, + { + "found group policies", + []string{strconv.FormatUint(s.group.GroupId, 10), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + "", + 0, + []*group.GroupPolicyInfo{ + s.groupPolicies[0], + s.groupPolicies[1], + s.groupPolicies[2], + s.groupPolicies[3], + s.groupPolicies[4], + }, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := client.QueryGroupPoliciesByGroupCmd() + + out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Contains(out.String(), tc.expectErrMsg) + } else { + s.Require().NoError(err, out.String()) + + var res group.QueryGroupPoliciesByGroupResponse + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + s.Require().Equal(len(res.GroupPolicies), len(tc.expectGroupPolicies)) + for i := range res.GroupPolicies { + s.Require().Equal(res.GroupPolicies[i].GroupId, tc.expectGroupPolicies[i].GroupId) + 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()) + } + } + }) + } +} + +func (s *IntegrationTestSuite) TestQueryGroupPoliciesByAdmin() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + testCases := []struct { + name string + args []string + expectErr bool + expectErrMsg string + expectedCode uint32 + expectGroupPolicies []*group.GroupPolicyInfo + }{ + { + "invalid admin address", + []string{"invalid"}, + true, + "decoding bech32 failed: invalid bech32 string", + 0, + []*group.GroupPolicyInfo{}, + }, + { + "no group policy", + []string{s.network.Validators[1].Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + "", + 0, + []*group.GroupPolicyInfo{}, + }, + { + "found group policies", + []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + "", + 0, + []*group.GroupPolicyInfo{ + s.groupPolicies[0], + s.groupPolicies[1], + s.groupPolicies[2], + s.groupPolicies[3], + s.groupPolicies[4], + }, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := client.QueryGroupPoliciesByAdminCmd() + + out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Contains(out.String(), tc.expectErrMsg) + } else { + s.Require().NoError(err, out.String()) + + var res group.QueryGroupPoliciesByAdminResponse + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + s.Require().Equal(len(res.GroupPolicies), len(tc.expectGroupPolicies)) + for i := range res.GroupPolicies { + s.Require().Equal(res.GroupPolicies[i].GroupId, tc.expectGroupPolicies[i].GroupId) + 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()) + } + } + }) + } +} + +func (s *IntegrationTestSuite) TestQueryProposal() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + testCases := []struct { + name string + args []string + expectErr bool + expectErrMsg string + expectedCode uint32 + }{ + { + "not found", + []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, + "not found", + 0, + }, + { + "invalid proposal id", + []string{"", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, + "strconv.ParseUint: parsing \"\": invalid syntax", + 0, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := client.QueryProposalCmd() + + out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Contains(out.String(), tc.expectErrMsg) + } else { + s.Require().NoError(err, out.String()) + } + }) + } +} + +func (s *IntegrationTestSuite) TestQueryProposalsByGroupPolicy() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + testCases := []struct { + name string + args []string + expectErr bool + expectErrMsg string + expectedCode uint32 + expectProposals []*group.Proposal + }{ + { + "invalid group policy address", + []string{"invalid"}, + true, + "decoding bech32 failed: invalid bech32 string", + 0, + []*group.Proposal{}, + }, + { + "no group policy", + []string{s.network.Validators[1].Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + "", + 0, + []*group.Proposal{}, + }, + { + "found proposals", + []string{s.groupPolicies[0].Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + "", + 0, + []*group.Proposal{ + s.proposal, + }, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := client.QueryProposalsByGroupPolicyCmd() + + out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Contains(out.String(), tc.expectErrMsg) + } else { + s.Require().NoError(err, out.String()) + + var res group.QueryProposalsByGroupPolicyResponse + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + s.Require().Equal(len(res.Proposals), len(tc.expectProposals)) + for i := range res.Proposals { + s.Require().Equal(res.Proposals[i], tc.expectProposals[i]) + } + } + }) + } +} + +func (s *IntegrationTestSuite) TestQueryVoteByProposalVoter() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + testCases := []struct { + name string + args []string + expectErr bool + expectErrMsg string + expectedCode uint32 + }{ + { + "invalid voter address", + []string{"1", "invalid", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, + "decoding bech32 failed: invalid bech32", + 0, + }, + { + "invalid proposal id", + []string{"", val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, + "strconv.ParseUint: parsing \"\": invalid syntax", + 0, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := client.QueryVoteByProposalVoterCmd() + + out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Contains(out.String(), tc.expectErrMsg) + } else { + s.Require().NoError(err, out.String()) + } + }) + } +} + +func (s *IntegrationTestSuite) TestQueryVotesByProposal() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + testCases := []struct { + name string + args []string + expectErr bool + expectErrMsg string + expectedCode uint32 + expectVotes []*group.Vote + }{ + { + "invalid proposal id", + []string{"", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, + "strconv.ParseUint: parsing \"\": invalid syntax", + 0, + []*group.Vote{}, + }, + { + "no votes", + []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + "", + 0, + []*group.Vote{}, + }, + { + "found votes", + []string{"1", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + "", + 0, + []*group.Vote{ + s.vote, + }, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := client.QueryVotesByProposalCmd() + + out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Contains(out.String(), tc.expectErrMsg) + } else { + s.Require().NoError(err, out.String()) + + var res group.QueryVotesByProposalResponse + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + s.Require().Equal(len(res.Votes), len(tc.expectVotes)) + for i := range res.Votes { + s.Require().Equal(res.Votes[i], tc.expectVotes[i]) + } + } + }) + } +} + +func (s *IntegrationTestSuite) TestQueryVotesByVoter() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + testCases := []struct { + name string + args []string + expectErr bool + expectErrMsg string + expectedCode uint32 + expectVotes []*group.Vote + }{ + { + "invalid voter address", + []string{"abcd", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, + "decoding bech32 failed: invalid bech32", + 0, + []*group.Vote{}, + }, + { + "no votes", + []string{s.groupPolicies[0].Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, + "", + 0, + []*group.Vote{}, + }, + { + "found votes", + []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + "", + 0, + []*group.Vote{ + s.vote, + }, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := client.QueryVotesByVoterCmd() + + out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Contains(out.String(), tc.expectErrMsg) + } else { + s.Require().NoError(err, out.String()) + + var res group.QueryVotesByVoterResponse + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + s.Require().Equal(len(res.Votes), len(tc.expectVotes)) + for i := range res.Votes { + s.Require().Equal(res.Votes[i], tc.expectVotes[i]) + } + } + }) + } +} diff --git a/x/group/client/testutil/tx.go b/x/group/client/testutil/tx.go index 7f11654cc2be..4b14d40feef1 100644 --- a/x/group/client/testutil/tx.go +++ b/x/group/client/testutil/tx.go @@ -1664,7 +1664,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { require.NoError(err) } - // create a group + // create a group with three members validMembers := fmt.Sprintf(`{"members": [{ "address": "%s", "weight": "1", @@ -1709,7 +1709,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { require.NoError(err, out.String()) require.NotNil(out) var resp group.QueryGroupPoliciesByGroupResponse - require.NoError(clientCtx.Codec.Unmarshal(out.Bytes(), &resp)) + require.NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &resp)) require.Len(resp.GroupPolicies, 1) policyAddress := resp.GroupPolicies[0].Address @@ -1731,7 +1731,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { commonFlags..., ), true, - "inalivs", + "decoding bech32 failed", }, { "invalid policy address", @@ -1745,7 +1745,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { commonFlags..., ), true, - "inalivs", + "decoding bech32 failed", }, { "group not found", @@ -1759,21 +1759,63 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { commonFlags..., ), true, - "inalivs", + "group: not found", }, { "policy not found", append( []string{ members[0], - policyAddress, - "40", + members[1], + "4", fmt.Sprintf("--%s=%s", flags.FlagFrom, members[0]), }, commonFlags..., ), true, - "inalivs", + "group policy: not found", + }, + { + "valid case", + append( + []string{ + members[2], + policyAddress, + "4", + fmt.Sprintf("--%s=%s", flags.FlagFrom, members[2]), + }, + commonFlags..., + ), + false, + "", + }, + { + "not part of group", + append( + []string{ + members[2], + policyAddress, + "4", + fmt.Sprintf("--%s=%s", flags.FlagFrom, members[2]), + }, + commonFlags..., + ), + true, + "is not part of group", + }, + { + "error: cannot leave group (breaks policy threshold)", + append( + []string{ + members[1], + policyAddress, + "4", + fmt.Sprintf("--%s=%s", flags.FlagFrom, members[1]), + }, + commonFlags..., + ), + true, + "Leaving the group will break group policy", }, } @@ -1782,18 +1824,15 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { s.Run(tc.name, func() { cmd := client.MsgLeaveGroupCmd() - out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) if tc.expectErr { - s.Require().Contains(out.String(), tc.errMsg) + require.Error(err, err.Error()) + require.Contains(out.String(), tc.errMsg) } else { - s.Require().NoError(err, out.String()) + require.NoError(err, out.String()) } }) } - - require.True(false) - } func getTxSendFileName(s *IntegrationTestSuite, from string, to string) string { From 6c166cbc5daed13de0038f7af46dcb29c49b79aa Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Mon, 24 Jan 2022 18:19:10 +0530 Subject: [PATCH 09/32] chore: fix test --- x/group/client/testutil/tx.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/group/client/testutil/tx.go b/x/group/client/testutil/tx.go index 4b14d40feef1..48bd5bc9c539 100644 --- a/x/group/client/testutil/tx.go +++ b/x/group/client/testutil/tx.go @@ -1731,7 +1731,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { commonFlags..., ), true, - "decoding bech32 failed", + "key not found", }, { "invalid policy address", From 8f9bfb6329582bd0cb587e49a8544cbdc951ab45 Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Mon, 24 Jan 2022 20:44:10 +0530 Subject: [PATCH 10/32] feat: add simulation --- x/group/client/testutil/tx.go | 3 +- x/group/keeper/msg_server.go | 3 +- x/group/simulation/operations.go | 140 ++++++++++++++++++++++---- x/group/simulation/operations_test.go | 72 ++++++++++++- 4 files changed, 193 insertions(+), 25 deletions(-) diff --git a/x/group/client/testutil/tx.go b/x/group/client/testutil/tx.go index 48bd5bc9c539..6fea234c3d2c 100644 --- a/x/group/client/testutil/tx.go +++ b/x/group/client/testutil/tx.go @@ -1826,10 +1826,11 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { cmd := client.MsgLeaveGroupCmd() out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) if tc.expectErr { - require.Error(err, err.Error()) require.Contains(out.String(), tc.errMsg) } else { require.NoError(err, out.String()) + var resp sdk.TxResponse + require.NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &resp), out.String()) } }) } diff --git a/x/group/keeper/msg_server.go b/x/group/keeper/msg_server.go index fe496ce40204..376e1954f364 100644 --- a/x/group/keeper/msg_server.go +++ b/x/group/keeper/msg_server.go @@ -733,7 +733,8 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr } if m.Member.Address == groupMember.Member.Address { - if memberWeight, err = math.NewNonNegativeDecFromString(m.Member.Weight); err != nil { + memberWeight, err = math.NewNonNegativeDecFromString(m.Member.Weight) + if err != nil { return nil, err } diff --git a/x/group/simulation/operations.go b/x/group/simulation/operations.go index 9fd304e2b793..d7cb53bc7413 100644 --- a/x/group/simulation/operations.go +++ b/x/group/simulation/operations.go @@ -36,6 +36,7 @@ var ( TypeMsgCreateProposal = sdk.MsgTypeURL(&group.MsgCreateProposal{}) TypeMsgVote = sdk.MsgTypeURL(&group.MsgVote{}) TypeMsgExec = sdk.MsgTypeURL(&group.MsgExec{}) + TypeMsgLeaveGroup = sdk.MsgTypeURL(&group.MsgLeaveGroup{}) ) // Simulation operation weights constants @@ -51,6 +52,7 @@ const ( OpMsgCreateProposal = "op_weight_msg_create_proposal" OpMsgVote = "op_weight_msg_vote" OpMsgExec = "ops_weight_msg_exec" + OpMsgLeaveGroup = "ops_weight_msg_leave_group" ) // If update group or group account txn's executed, `SimulateMsgVote` & `SimulateMsgExec` txn's returns `noOp`. @@ -61,6 +63,7 @@ const ( WeightMsgCreateProposal = 90 WeightMsgVote = 90 WeightMsgExec = 90 + WeightMsgLeaveGroup = 20 WeightMsgUpdateGroupMetadata = 5 WeightMsgUpdateGroupAdmin = 5 WeightMsgUpdateGroupMembers = 5 @@ -69,8 +72,6 @@ const ( WeightMsgUpdateGroupPolicyMetadata = 5 ) -const GroupMemberWeight = 40 - // WeightedOperations returns all the operations from the module with their respective weights func WeightedOperations( appParams simtypes.AppParams, cdc codec.JSONCodec, ak group.AccountKeeper, @@ -87,6 +88,7 @@ func WeightedOperations( weightMsgCreateProposal int weightMsgVote int weightMsgExec int + weightMsgLeaveGroup int ) appParams.GetOrGenerate(cdc, OpMsgCreateGroup, &weightMsgCreateGroup, nil, @@ -144,6 +146,11 @@ func WeightedOperations( weightMsgUpdateGroupPolicyMetadata = WeightMsgUpdateGroupPolicyMetadata }, ) + appParams.GetOrGenerate(cdc, OpMsgLeaveGroup, &weightMsgLeaveGroup, nil, + func(_ *rand.Rand) { + weightMsgLeaveGroup = WeightMsgLeaveGroup + }, + ) return simulation.WeightedOperations{ simulation.NewWeightedOperation( @@ -190,6 +197,10 @@ func WeightedOperations( weightMsgUpdateGroupPolicyMetadata, SimulateMsgUpdateGroupPolicyMetadata(ak, bk, k), ), + simulation.NewWeightedOperation( + weightMsgLeaveGroup, + SimulateMsgLeaveGroup(k, ak, bk), + ), } } @@ -207,14 +218,7 @@ func SimulateMsgCreateGroup(ak group.AccountKeeper, bk group.BankKeeper) simtype return simtypes.NoOpMsg(group.ModuleName, TypeMsgCreateGroup, "fee error"), nil, err } - members := []group.Member{ - { - Address: accAddr, - Weight: fmt.Sprintf("%d", GroupMemberWeight), - Metadata: []byte(simtypes.RandStringOfLength(r, 10)), - }, - } - + members := genGroupMembers(r, accounts) msg := &group.MsgCreateGroup{Admin: accAddr, Members: members, Metadata: []byte(simtypes.RandStringOfLength(r, 10))} txGen := simappparams.MakeTestEncodingConfig().TxConfig @@ -265,7 +269,7 @@ func SimulateMsgCreateGroupPolicy(ak group.AccountKeeper, bk group.BankKeeper, k groupID, []byte(simtypes.RandStringOfLength(r, 10)), &group.ThresholdDecisionPolicy{ - Threshold: "20", + Threshold: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 20)), Timeout: time.Second * time.Duration(30*24*60*60), }, ) @@ -495,16 +499,7 @@ func SimulateMsgUpdateGroupMembers(ak group.AccountKeeper, return simtypes.NoOpMsg(group.ModuleName, TypeMsgUpdateGroupMembers, "fee error"), nil, err } - member, _ := simtypes.RandomAcc(r, accounts) - - members := []group.Member{ - { - Address: member.Address.String(), - Weight: fmt.Sprintf("%d", GroupMemberWeight), - Metadata: []byte(simtypes.RandStringOfLength(r, 10)), - }, - } - + members := genGroupMembers(r, accounts) msg := group.MsgUpdateGroupMembers{ GroupId: groupID, Admin: acc.Address.String(), @@ -887,6 +882,79 @@ func SimulateMsgExec(ak group.AccountKeeper, } } +// SimulateMsgLeaveGroup generates a MsgLeaveGroup with random values +func SimulateMsgLeaveGroup(k keeper.Keeper, ak group.AccountKeeper, bk group.BankKeeper) simtypes.Operation { + return func( + r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accounts []simtypes.Account, chainID string) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + + ctx := sdk.WrapSDKContext(sdkCtx) + groupInfo, policyInfo, _, _, err := randomGroupPolicy(r, k, ak, sdkCtx, accounts) + if err != nil { + return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, ""), nil, err + } + + if groupInfo == nil { + return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, ""), nil, nil + } + + if policyInfo == nil { + return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, "no policy found"), nil, nil + } + + // Pick a random member from the group + acc, account, err := randomMember(r, k, ak, ctx, accounts, groupInfo.GroupId) + if err != nil { + return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, ""), nil, err + } + if account == nil { + return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, "no group member found"), nil, nil + } + + member, exists := simtypes.FindAccount(accounts, acc.Address) + if !exists { + return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, "not a sim account"), nil, nil + } + + spendableCoins := bk.SpendableCoins(sdkCtx, member.Address) + fees, err := simtypes.RandomFees(r, sdkCtx, spendableCoins) + if err != nil { + return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, "fee error"), nil, err + } + + msg := &group.MsgLeaveGroup{ + MemberAddress: member.Address.String(), + GroupId: groupInfo.GroupId, + PolicyAddress: policyInfo.Address, + } + + txGen := simappparams.MakeTestEncodingConfig().TxConfig + tx, err := helpers.GenTx( + txGen, + []sdk.Msg{msg}, + fees, + helpers.DefaultGenTxGas, + chainID, + []uint64{account.GetAccountNumber()}, + []uint64{account.GetSequence()}, + member.PrivKey, + ) + if err != nil { + return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, "unable to generate mock tx"), nil, err + } + + _, _, err = app.SimDeliver(txGen.TxEncoder(), tx) + if err != nil { + if strings.Contains(err.Error(), "cannot leave group") { + return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, ""), nil, nil + } + + return simtypes.NoOpMsg(group.ModuleName, msg.Type(), "unable to deliver tx"), nil, err + } + + return simtypes.NewOperationMsg(msg, true, "", nil), nil, err + } +} + func randomGroup(r *rand.Rand, k keeper.Keeper, ak group.AccountKeeper, ctx sdk.Context, accounts []simtypes.Account) (groupInfo *group.GroupInfo, acc simtypes.Account, account authtypes.AccountI, err error) { groupID := k.GetGroupSequence(ctx) @@ -997,3 +1065,33 @@ func findAccount(accounts []simtypes.Account, addr string) (idx int) { } return idx } + +func genGroupMembers(r *rand.Rand, accounts []simtypes.Account) []group.Member { + if len(accounts) == 1 { + return []group.Member{ + { + Address: accounts[0].Address.String(), + Weight: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 10)), + Metadata: []byte(simtypes.RandStringOfLength(r, 10)), + }, + } + } + + max := 5 + if len(accounts) < max { + max = len(accounts) + } + + membersLen := simtypes.RandIntBetween(r, 1, max) + members := make([]group.Member, membersLen) + + for i := 0; i < membersLen; i++ { + members[i] = group.Member{ + Address: accounts[i].Address.String(), + Weight: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 10)), + Metadata: []byte(simtypes.RandStringOfLength(r, 10)), + } + } + + return members +} diff --git a/x/group/simulation/operations_test.go b/x/group/simulation/operations_test.go index 31e082434e14..0689c45bdf9d 100644 --- a/x/group/simulation/operations_test.go +++ b/x/group/simulation/operations_test.go @@ -40,7 +40,7 @@ func (suite *SimTestSuite) TestWeightedOperations() { suite.app.BankKeeper, suite.app.GroupKeeper, cdc, ) - s := rand.NewSource(1) + s := rand.NewSource(2) r := rand.New(s) accs := suite.getTestingAccounts(r, 3) @@ -60,6 +60,7 @@ func (suite *SimTestSuite) TestWeightedOperations() { {simulation.WeightMsgUpdateGroupPolicyAdmin, group.MsgUpdateGroupPolicyAdmin{}.Route(), simulation.TypeMsgUpdateGroupPolicyAdmin}, {simulation.WeightMsgUpdateGroupPolicyDecisionPolicy, group.MsgUpdateGroupPolicyDecisionPolicy{}.Route(), simulation.TypeMsgUpdateGroupPolicyDecisionPolicy}, {simulation.WeightMsgUpdateGroupPolicyMetadata, group.MsgUpdateGroupPolicyMetadata{}.Route(), simulation.TypeMsgUpdateGroupPolicyMetadata}, + {simulation.WeightMsgLeaveGroup, group.MsgLeaveGroup{}.Route(), simulation.TypeMsgLeaveGroup}, } for i, w := range weightedOps { @@ -163,7 +164,7 @@ func (suite *SimTestSuite) TestSimulateCreateGroupPolicy() { func (suite *SimTestSuite) TestSimulateCreateProposal() { // setup 1 account - s := rand.NewSource(1) + s := rand.NewSource(2) r := rand.New(s) accounts := suite.getTestingAccounts(r, 1) acc := accounts[0] @@ -645,6 +646,73 @@ func (suite *SimTestSuite) TestSimulateUpdateGroupPolicyMetadata() { suite.Require().Len(futureOperations, 0) } +func (suite *SimTestSuite) TestSimulateLeaveGroup() { + s := rand.NewSource(1) + r := rand.New(s) + require := suite.Require() + + // setup 4 account + accounts := suite.getTestingAccounts(r, 4) + admin := accounts[0] + member1 := accounts[1] + member2 := accounts[2] + member3 := accounts[3] + + // setup a group + ctx := sdk.WrapSDKContext(suite.ctx) + groupRes, err := suite.app.GroupKeeper.CreateGroup(ctx, + &group.MsgCreateGroup{ + Admin: admin.Address.String(), + Members: []group.Member{ + { + Address: member1.Address.String(), + Weight: "1", + }, + { + Address: member2.Address.String(), + Weight: "2", + }, + { + Address: member3.Address.String(), + Weight: "1", + }, + }, + }, + ) + require.NoError(err) + + // setup a group account + accountReq := &group.MsgCreateGroupPolicy{ + Admin: admin.Address.String(), + GroupId: groupRes.GroupId, + Metadata: nil, + } + require.NoError(accountReq.SetDecisionPolicy(group.NewThresholdDecisionPolicy("3", time.Hour))) + groupPolicyRes, err := suite.app.GroupKeeper.CreateGroupPolicy(ctx, accountReq) + require.NoError(err) + + // begin a new block + suite.app.BeginBlock(abci.RequestBeginBlock{ + Header: tmproto.Header{ + Height: suite.app.LastBlockHeight() + 1, + AppHash: suite.app.LastCommitID().Hash, + }, + }) + + // execute operation + op := simulation.SimulateMsgLeaveGroup(suite.app.GroupKeeper, suite.app.AccountKeeper, suite.app.BankKeeper) + operationMsg, futureOperations, err := op(r, suite.app.BaseApp, suite.ctx, accounts, "") + suite.Require().NoError(err) + + var msg group.MsgLeaveGroup + err = group.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) + suite.Require().NoError(err) + suite.Require().True(operationMsg.OK) + suite.Require().Equal(groupRes.GroupId, msg.GroupId) + suite.Require().Equal(groupPolicyRes.Address, msg.PolicyAddress) + suite.Require().Len(futureOperations, 0) +} + func TestSimTestSuite(t *testing.T) { suite.Run(t, new(SimTestSuite)) } From 932dcf3ec87c012d06da8b6ac4acb561d8944f4a Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Wed, 26 Jan 2022 18:39:13 +0530 Subject: [PATCH 11/32] chore: cleanup --- x/group/keeper/msg_server.go | 43 +++++++++--------------------------- 1 file changed, 11 insertions(+), 32 deletions(-) diff --git a/x/group/keeper/msg_server.go b/x/group/keeper/msg_server.go index 376e1954f364..ce1ee4a6f6b2 100644 --- a/x/group/keeper/msg_server.go +++ b/x/group/keeper/msg_server.go @@ -694,6 +694,7 @@ func (k Keeper) Exec(goCtx context.Context, req *group.MsgExec) (*group.MsgExecR return res, nil } +// LeaveGroup implements the MsgServer/LeaveGroup method. func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*group.MsgLeaveGroupResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) _, err := sdk.AccAddressFromBech32(req.MemberAddress) @@ -707,7 +708,7 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr } // Checking if the group member is already part of the group - groupMember, err := k.getGroupMember(ctx, &group.GroupMember{ + gm, err := k.getGroupMember(ctx, &group.GroupMember{ GroupId: req.GroupId, Member: &group.Member{Address: req.MemberAddress}, }) @@ -715,32 +716,10 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr return nil, err } - groupIter, err := k.getGroupMembers(ctx, req.GroupId, nil) + memberWeight, err := math.NewNonNegativeDecFromString(gm.Member.Weight) if err != nil { return nil, err } - defer groupIter.Close() - - var m group.GroupMember - memberWeight := math.NewDecFromInt64(0) - for { - if _, err := groupIter.LoadNext(&m); err != nil { - if errors.ErrORMIteratorDone.Is(err) { - return nil, sdkerrors.ErrInvalidRequest.Wrapf("%s is not part of group %d", req.MemberAddress, req.GroupId) - } - - return nil, err - } - - if m.Member.Address == groupMember.Member.Address { - memberWeight, err = math.NewNonNegativeDecFromString(m.Member.Weight) - if err != nil { - return nil, err - } - - break - } - } groupPolicy, err := k.getGroupPolicyInfo(ctx, req.PolicyAddress) if err != nil { @@ -751,29 +730,29 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr if err != nil { return nil, err } - - r, err := math.SubNonNegative(groupWeight, memberWeight) - if err != nil { - return nil, err - } - + policy := groupPolicy.GetDecisionPolicy() tdp, ok := policy.(*group.ThresholdDecisionPolicy) if !ok { return nil, sdkerrors.ErrInvalidRequest.Wrapf("expected %T, got %T", (*group.ThresholdDecisionPolicy)(nil), policy) } - + threshold, err := math.NewNonNegativeDecFromString(tdp.Threshold) if err != nil { return nil, err } + + r, err := math.SubNonNegative(groupWeight, memberWeight) + if err != nil { + return nil, err + } if threshold.Cmp(r) == 1 { return nil, sdkerrors.ErrInvalidRequest.Wrap("cannot leave group. Leaving the group will break group policy.") } // Delete group member in the groupMemberTable. - if err := k.groupMemberTable.Delete(ctx.KVStore(k.key), groupMember); err != nil { + if err := k.groupMemberTable.Delete(ctx.KVStore(k.key), gm); err != nil { return nil, sdkerrors.Wrap(err, "group member") } From 387a0939f5f33e3ff80820aa838cef1ef86cd684 Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Mon, 7 Feb 2022 13:08:37 +0530 Subject: [PATCH 12/32] refactor: remove policy_addr --- proto/cosmos/group/v1beta1/tx.proto | 4 - x/group/client/cli/tx.go | 8 +- x/group/client/testutil/tx.go | 34 ----- x/group/keeper/keeper_test.go | 40 +++--- x/group/keeper/msg_server.go | 62 +++++---- x/group/msgs.go | 5 - x/group/msgs_test.go | 12 -- x/group/simulation/operations.go | 1 - x/group/simulation/operations_test.go | 3 +- x/group/spec/05_client.md | 4 +- x/group/tx.pb.go | 187 +++++++++----------------- 11 files changed, 136 insertions(+), 224 deletions(-) diff --git a/proto/cosmos/group/v1beta1/tx.proto b/proto/cosmos/group/v1beta1/tx.proto index f443be6c402d..a94ba33a7105 100644 --- a/proto/cosmos/group/v1beta1/tx.proto +++ b/proto/cosmos/group/v1beta1/tx.proto @@ -290,10 +290,6 @@ message MsgLeaveGroup { // group_id is the unique ID of the group. uint64 group_id = 2; - - // policy_address is the account address of group policy. - string policy_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - } // MsgLeaveGroupResponse is the Msg/LeaveGroup response type. diff --git a/x/group/client/cli/tx.go b/x/group/client/cli/tx.go index 16f2423bed2e..e2123f0133be 100644 --- a/x/group/client/cli/tx.go +++ b/x/group/client/cli/tx.go @@ -653,18 +653,17 @@ func MsgExecCmd() *cobra.Command { // MsgLeaveGroupCmd creates a CLI command for Msg/LeaveGroup. func MsgLeaveGroupCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "leave-group [member-address] [group-policy-account] [group-id]", + Use: "leave-group [member-address] [group-id]", Short: "remove member from the group", Long: ` remove member from the group Parameters: group-id: unique id of the group - group-policy-account: account address of the group policy member-address: account address of the group member Note, the'--from' flag is ignored as it is implied from [member-address] `, - Args: cobra.ExactArgs(3), + Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { cmd.Flags().Set(flags.FlagFrom, args[0]) clientCtx, err := client.GetClientTxContext(cmd) @@ -672,14 +671,13 @@ Parameters: return err } - groupID, err := strconv.ParseUint(args[2], 10, 64) + groupID, err := strconv.ParseUint(args[1], 10, 64) if err != nil { return err } msg := &group.MsgLeaveGroup{ MemberAddress: clientCtx.GetFromAddress().String(), - PolicyAddress: args[1], GroupId: groupID, } if err = msg.ValidateBasic(); err != nil { diff --git a/x/group/client/testutil/tx.go b/x/group/client/testutil/tx.go index 6fea234c3d2c..196fb4ee5b65 100644 --- a/x/group/client/testutil/tx.go +++ b/x/group/client/testutil/tx.go @@ -1711,7 +1711,6 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { var resp group.QueryGroupPoliciesByGroupResponse require.NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &resp)) require.Len(resp.GroupPolicies, 1) - policyAddress := resp.GroupPolicies[0].Address testCases := []struct { name string @@ -1724,7 +1723,6 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { append( []string{ "address", - val.Address.String(), "4", fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), }, @@ -1733,26 +1731,11 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { true, "key not found", }, - { - "invalid policy address", - append( - []string{ - members[0], - "policy", - "4", - fmt.Sprintf("--%s=%s", flags.FlagFrom, members[0]), - }, - commonFlags..., - ), - true, - "decoding bech32 failed", - }, { "group not found", append( []string{ members[0], - policyAddress, "40", fmt.Sprintf("--%s=%s", flags.FlagFrom, members[0]), }, @@ -1761,26 +1744,11 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { true, "group: not found", }, - { - "policy not found", - append( - []string{ - members[0], - members[1], - "4", - fmt.Sprintf("--%s=%s", flags.FlagFrom, members[0]), - }, - commonFlags..., - ), - true, - "group policy: not found", - }, { "valid case", append( []string{ members[2], - policyAddress, "4", fmt.Sprintf("--%s=%s", flags.FlagFrom, members[2]), }, @@ -1794,7 +1762,6 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { append( []string{ members[2], - policyAddress, "4", fmt.Sprintf("--%s=%s", flags.FlagFrom, members[2]), }, @@ -1808,7 +1775,6 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { append( []string{ members[1], - policyAddress, "4", fmt.Sprintf("--%s=%s", flags.FlagFrom, members[1]), }, diff --git a/x/group/keeper/keeper_test.go b/x/group/keeper/keeper_test.go index b5e02127f4db..c7a4e6b50087 100644 --- a/x/group/keeper/keeper_test.go +++ b/x/group/keeper/keeper_test.go @@ -2035,14 +2035,15 @@ func (s *TestSuite) TestExecProposal() { } func (s *TestSuite) TestLeaveGroup() { - addrs := simapp.AddTestAddrsIncremental(s.app, s.sdkCtx, 5, sdk.NewInt(3000000)) + addrs := simapp.AddTestAddrsIncremental(s.app, s.sdkCtx, 6, sdk.NewInt(3000000)) admin := addrs[0] member1 := addrs[1] member2 := addrs[2] member3 := addrs[3] member4 := addrs[4] - require := s.Require() + admin2 := addrs[5] + require := s.Require() res, err := s.keeper.CreateGroup(s.ctx, &group.MsgCreateGroup{ Admin: admin.String(), Members: []group.Member{ @@ -2069,6 +2070,20 @@ func (s *TestSuite) TestLeaveGroup() { require.NoError(err) require.NotNil(res) + res1, err := s.keeper.CreateGroup(s.ctx, &group.MsgCreateGroup{ + Admin: admin2.String(), + Members: []group.Member{ + { + Address: member1.String(), + Weight: "1", + Metadata: []byte("metadata"), + AddedAt: s.sdkCtx.BlockTime(), + }, + }, + }) + require.NoError(err) + require.NotNil(res1) + groupPolicy := &group.MsgCreateGroupPolicy{ Admin: admin.String(), GroupId: res.GroupId, @@ -2081,9 +2096,9 @@ func (s *TestSuite) TestLeaveGroup() { require.NoError(groupPolicy.SetDecisionPolicy(policy)) require.NoError(err) - res1, err := s.keeper.CreateGroupPolicy(s.ctx, groupPolicy) + policyRes, err := s.keeper.CreateGroupPolicy(s.ctx, groupPolicy) require.NoError(err) - require.NotNil(res1) + require.NotNil(policyRes) groupId := res.GroupId testCases := []struct { @@ -2098,7 +2113,6 @@ func (s *TestSuite) TestLeaveGroup() { &group.MsgLeaveGroup{ GroupId: 100000, MemberAddress: member1.String(), - PolicyAddress: member2.String(), }, true, "group: not found", @@ -2109,21 +2123,19 @@ func (s *TestSuite) TestLeaveGroup() { &group.MsgLeaveGroup{ GroupId: groupId, MemberAddress: member4.String(), - PolicyAddress: member2.String(), }, true, "not part of group", 0, }, { - "expect error: group policy not found", + "valid testcase: decision policy is not present", &group.MsgLeaveGroup{ - GroupId: groupId, - MemberAddress: member3.String(), - PolicyAddress: member2.String(), + GroupId: res1.GroupId, + MemberAddress: member1.String(), }, - true, - "group policy: not found", + false, + "", 0, }, { @@ -2131,7 +2143,6 @@ func (s *TestSuite) TestLeaveGroup() { &group.MsgLeaveGroup{ GroupId: groupId, MemberAddress: member3.String(), - PolicyAddress: res1.Address, }, false, "", @@ -2142,7 +2153,6 @@ func (s *TestSuite) TestLeaveGroup() { &group.MsgLeaveGroup{ GroupId: groupId, MemberAddress: member2.String(), - PolicyAddress: res1.Address, }, true, "cannot leave group", @@ -2160,7 +2170,7 @@ func (s *TestSuite) TestLeaveGroup() { require.NoError(err) require.NotNil(res) res, err := s.keeper.GroupMembers(s.ctx, &group.QueryGroupMembersRequest{ - GroupId: groupId, + GroupId: tc.req.GroupId, }) require.NoError(err) require.Len(res.Members, tc.expMembersSize) diff --git a/x/group/keeper/msg_server.go b/x/group/keeper/msg_server.go index ce1ee4a6f6b2..e45c355c05b6 100644 --- a/x/group/keeper/msg_server.go +++ b/x/group/keeper/msg_server.go @@ -707,7 +707,11 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr return nil, sdkerrors.Wrap(err, "group") } - // Checking if the group member is already part of the group + groupWeight, err := math.NewNonNegativeDecFromString(groupInfo.TotalWeight) + if err != nil { + return nil, err + } + gm, err := k.getGroupMember(ctx, &group.GroupMember{ GroupId: req.GroupId, Member: &group.Member{Address: req.MemberAddress}, @@ -721,42 +725,52 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr return nil, err } - groupPolicy, err := k.getGroupPolicyInfo(ctx, req.PolicyAddress) - if err != nil { - return nil, sdkerrors.Wrap(err, "group policy") - } - - groupWeight, err := math.NewNonNegativeDecFromString(groupInfo.TotalWeight) + updatedWeight, err := math.SubNonNegative(groupWeight, memberWeight) if err != nil { return nil, err } - - policy := groupPolicy.GetDecisionPolicy() - tdp, ok := policy.(*group.ThresholdDecisionPolicy) - if !ok { - return nil, sdkerrors.ErrInvalidRequest.Wrapf("expected %T, got %T", (*group.ThresholdDecisionPolicy)(nil), policy) - } - - threshold, err := math.NewNonNegativeDecFromString(tdp.Threshold) - if err != nil { - return nil, err - } - - r, err := math.SubNonNegative(groupWeight, memberWeight) + + iter, err := k.getGroupPoliciesByGroup(ctx, req.GroupId, nil) if err != nil { return nil, err } + defer iter.Close() - if threshold.Cmp(r) == 1 { - return nil, sdkerrors.ErrInvalidRequest.Wrap("cannot leave group. Leaving the group will break group policy.") + var groupPolicy group.GroupPolicyInfo + for { + if _, err := iter.LoadNext(&groupPolicy); err != nil { + if errors.ErrORMIteratorDone.Is(err) { + break + } + + return nil, err + } + + policy := groupPolicy.GetDecisionPolicy() + tdp, ok := policy.(*group.ThresholdDecisionPolicy) + // TODO: handle percentage decision policy + if !ok { + return nil, sdkerrors.ErrInvalidRequest.Wrapf("expected %T, got %T", (*group.ThresholdDecisionPolicy)(nil), policy) + } + + threshold, err := math.NewNonNegativeDecFromString(tdp.Threshold) + if err != nil { + return nil, err + } + + if threshold.Cmp(updatedWeight) == 1 { + return nil, sdkerrors.ErrInvalidRequest.Wrap("cannot leave group. Leaving the group will break group policy.") + } } - // Delete group member in the groupMemberTable. + // delete group member in the groupMemberTable. if err := k.groupMemberTable.Delete(ctx.KVStore(k.key), gm); err != nil { return nil, sdkerrors.Wrap(err, "group member") } - groupInfo.TotalWeight = r.String() + // update group weight and increment group version + groupInfo.TotalWeight = updatedWeight.String() + groupInfo.Version++ if err := k.groupTable.Update(ctx.KVStore(k.key), groupInfo.GroupId, &groupInfo); err != nil { return nil, err } diff --git a/x/group/msgs.go b/x/group/msgs.go index 395dec241885..3c994622b90a 100644 --- a/x/group/msgs.go +++ b/x/group/msgs.go @@ -708,11 +708,6 @@ func (m MsgLeaveGroup) ValidateBasic() error { return sdkerrors.Wrap(err, "group member") } - _, err = sdk.AccAddressFromBech32(m.PolicyAddress) - if err != nil { - return sdkerrors.Wrap(err, "policy") - } - if m.GroupId == 0 { return sdkerrors.Wrap(errors.ErrEmpty, "group-id") } diff --git a/x/group/msgs_test.go b/x/group/msgs_test.go index 041cbd9e3b99..e8a172b2fbbe 100644 --- a/x/group/msgs_test.go +++ b/x/group/msgs_test.go @@ -788,26 +788,14 @@ func TestMsgLeaveGroup(t *testing.T) { "group id is required", &group.MsgLeaveGroup{ MemberAddress: admin.String(), - PolicyAddress: member1.String(), }, true, "group-id: value is empty", }, - { - "invalid policy address", - &group.MsgLeaveGroup{ - MemberAddress: admin.String(), - PolicyAddress: "policy", - GroupId: 1, - }, - true, - "decoding bech32 failed", - }, { "valid testcase", &group.MsgLeaveGroup{ MemberAddress: admin.String(), - PolicyAddress: member1.String(), GroupId: 1, }, false, diff --git a/x/group/simulation/operations.go b/x/group/simulation/operations.go index d7cb53bc7413..4f6a862e97de 100644 --- a/x/group/simulation/operations.go +++ b/x/group/simulation/operations.go @@ -924,7 +924,6 @@ func SimulateMsgLeaveGroup(k keeper.Keeper, ak group.AccountKeeper, bk group.Ban msg := &group.MsgLeaveGroup{ MemberAddress: member.Address.String(), GroupId: groupInfo.GroupId, - PolicyAddress: policyInfo.Address, } txGen := simappparams.MakeTestEncodingConfig().TxConfig diff --git a/x/group/simulation/operations_test.go b/x/group/simulation/operations_test.go index 0689c45bdf9d..5811af62b9fd 100644 --- a/x/group/simulation/operations_test.go +++ b/x/group/simulation/operations_test.go @@ -688,7 +688,7 @@ func (suite *SimTestSuite) TestSimulateLeaveGroup() { Metadata: nil, } require.NoError(accountReq.SetDecisionPolicy(group.NewThresholdDecisionPolicy("3", time.Hour))) - groupPolicyRes, err := suite.app.GroupKeeper.CreateGroupPolicy(ctx, accountReq) + _, err = suite.app.GroupKeeper.CreateGroupPolicy(ctx, accountReq) require.NoError(err) // begin a new block @@ -709,7 +709,6 @@ func (suite *SimTestSuite) TestSimulateLeaveGroup() { suite.Require().NoError(err) suite.Require().True(operationMsg.OK) suite.Require().Equal(groupRes.GroupId, msg.GroupId) - suite.Require().Equal(groupPolicyRes.Address, msg.PolicyAddress) suite.Require().Len(futureOperations, 0) } diff --git a/x/group/spec/05_client.md b/x/group/spec/05_client.md index a8ef04281e11..5925e49967d3 100644 --- a/x/group/spec/05_client.md +++ b/x/group/spec/05_client.md @@ -556,13 +556,13 @@ simd tx group exec 1 The `leave-group` command allows group member to leave the group. ```bash -simd tx group leave-group [member-address] [group-policy-account] [group-id] +simd tx group leave-group [member-address] [group-id] ``` Example: ```bash -simd tx group leave-group cosmos1... cosmos1... 1 +simd tx group leave-group cosmos1... 1 ``` diff --git a/x/group/tx.pb.go b/x/group/tx.pb.go index 75a17cb989af..07e58e458449 100644 --- a/x/group/tx.pb.go +++ b/x/group/tx.pb.go @@ -1167,8 +1167,6 @@ type MsgLeaveGroup struct { MemberAddress string `protobuf:"bytes,1,opt,name=member_address,json=memberAddress,proto3" json:"member_address,omitempty"` // group_id is the unique ID of the group. GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // policy_address is the account address of group policy. - PolicyAddress string `protobuf:"bytes,3,opt,name=policy_address,json=policyAddress,proto3" json:"policy_address,omitempty"` } func (m *MsgLeaveGroup) Reset() { *m = MsgLeaveGroup{} } @@ -1218,13 +1216,6 @@ func (m *MsgLeaveGroup) GetGroupId() uint64 { return 0 } -func (m *MsgLeaveGroup) GetPolicyAddress() string { - if m != nil { - return m.PolicyAddress - } - return "" -} - // MsgLeaveGroupResponse is the Msg/LeaveGroup response type. type MsgLeaveGroupResponse struct { } @@ -1293,74 +1284,73 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1beta1/tx.proto", fileDescriptor_da0de9d603d844fb) } var fileDescriptor_da0de9d603d844fb = []byte{ - // 1062 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xc4, 0xdb, 0xfc, 0x79, 0x69, 0xdc, 0x64, 0x1b, 0x8a, 0xb3, 0x24, 0xb6, 0xd9, 0x06, - 0x30, 0x69, 0xb2, 0x26, 0x4e, 0x11, 0xa8, 0xaa, 0x28, 0x49, 0x6a, 0x90, 0xa5, 0x1a, 0x85, 0x2d, - 0x45, 0x80, 0x10, 0xd6, 0xda, 0x3b, 0x6c, 0x0d, 0xb1, 0x67, 0xe5, 0xd9, 0xa4, 0xf1, 0x09, 0x89, - 0x13, 0x12, 0x17, 0x6e, 0x48, 0x48, 0x20, 0x3e, 0x00, 0xdc, 0x2a, 0x3e, 0x43, 0xc5, 0xa9, 0xe2, - 0x80, 0x38, 0x00, 0x82, 0xe4, 0x8b, 0x54, 0x9e, 0x99, 0x9d, 0x78, 0x9b, 0x5d, 0xef, 0xda, 0x8a, -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81, 0xef, 0x1b, 0xca, 0x37, 0x3f, - 0xe7, 0x53, 0xba, 0x09, 0xcb, 0x61, 0xba, 0x64, 0x01, 0x95, 0x61, 0xca, 0xe2, 0x3a, 0x62, 0x15, - 0xfa, 0x40, 0xfd, 0x37, 0x04, 0x4b, 0xc1, 0xf3, 0xe4, 0x4e, 0xc7, 0x4b, 0xc7, 0x01, 0x06, 0x13, - 0x09, 0x19, 0x8c, 0x9b, 0xa7, 0x57, 0xe1, 0xc5, 0x48, 0xde, 0x32, 0x15, 0xfe, 0x47, 0xa0, 0x87, - 0xa1, 0x82, 0xc7, 0xfd, 0x4c, 0x64, 0x86, 0x64, 0x45, 0xfa, 0x5c, 0xb2, 0x62, 0x1d, 0xd6, 0xe2, - 0x25, 0xca, 0x13, 0xf9, 0x09, 0xb1, 0x24, 0x3a, 0x03, 0x1f, 0xbb, 0x8c, 0xc7, 0x39, 0x8b, 0x61, - 0xf5, 0xfd, 0x32, 0xac, 0x0e, 0xe3, 0x37, 0x78, 0xb5, 0x0b, 0xb2, 0x1a, 0xf6, 0xba, 0xc4, 0x25, - 0xd4, 0xda, 0x1f, 0xa7, 0x04, 0xd4, 0x65, 0x98, 0x71, 0x99, 0xbd, 0xdf, 0xed, 0x66, 0xcc, 0xd3, - 0x85, 0xa1, 0x95, 0x5e, 0x04, 0xa5, 0x4d, 0x1d, 0x9a, 0x55, 0x58, 0x9f, 0x08, 0xbd, 0x48, 0x93, - 0x21, 0x54, 0x03, 0x14, 0x7c, 0x84, 0x9b, 0xd9, 0x0b, 0x05, 0x54, 0xcc, 0x94, 0xb5, 0xf0, 0x8e, - 0x52, 0x39, 0xc2, 0x4d, 0x93, 0xe1, 0xc4, 0xd5, 0xde, 0x64, 0xb5, 0x19, 0x94, 0x28, 0xab, 0x3d, - 0x0f, 0xb3, 0xae, 0x58, 0x3b, 0xed, 0x98, 0xe0, 0x2f, 0x55, 0x6d, 0xfd, 0x6f, 0x04, 0x53, 0x35, - 0xea, 0x7c, 0x48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x16, 0xe9, 0xe3, 0x2c, 0x58, 0xdb, - 0x1a, 0x01, 0x2c, 0xe3, 0xba, 0x30, 0x7f, 0x66, 0x32, 0x7b, 0x35, 0x89, 0x23, 0x06, 0xd5, 0x36, - 0x13, 0x43, 0x65, 0xc4, 0x1e, 0x5c, 0x0e, 0x9b, 0xa9, 0xd6, 0x93, 0xb1, 0xe7, 0x68, 0xed, 0xfa, - 0x28, 0x68, 0x19, 0x9a, 0xc2, 0xc2, 0xd9, 0x51, 0x69, 0x2d, 0xc9, 0x3d, 0x71, 0xac, 0x56, 0x4e, - 0x8e, 0x95, 0x41, 0xbf, 0x46, 0x70, 0x25, 0x62, 0xe6, 0x28, 0x25, 0x51, 0x31, 0x60, 0xa0, 0xbd, - 0x31, 0xa2, 0x81, 0x24, 0xf1, 0x23, 0x82, 0x7c, 0xdc, 0x68, 0xf0, 0x66, 0x72, 0xe7, 0x41, 0x4b, - 0xed, 0xed, 0x71, 0x2d, 0x25, 0xbf, 0x6f, 0x11, 0x2c, 0x45, 0x37, 0xea, 0x72, 0x72, 0xff, 0x32, - 0x43, 0x6e, 0x8c, 0x6e, 0x23, 0xd9, 0x7c, 0x01, 0x99, 0xa7, 0x9a, 0xed, 0x2b, 0x31, 0x17, 0xef, - 0x03, 0xb5, 0x52, 0x42, 0xa0, 0x8c, 0x75, 0x07, 0x14, 0xd6, 0xb6, 0x56, 0x22, 0x0d, 0xfb, 0xdb, - 0xda, 0x4b, 0x43, 0xb7, 0x07, 0xbd, 0xb1, 0xd7, 0x2d, 0xda, 0x5b, 0x7f, 0x7b, 0x88, 0xb7, 0xc1, - 0x37, 0x5f, 0xfd, 0x0c, 0x60, 0xe0, 0xbd, 0xbf, 0x1a, 0x69, 0x74, 0x0a, 0xd2, 0xae, 0x25, 0x00, - 0xf9, 0xfe, 0x77, 0xde, 0x7a, 0x74, 0x9c, 0x43, 0x8f, 0x8f, 0x73, 0xe8, 0xbf, 0xe3, 0x1c, 0xfa, - 0xee, 0x24, 0x97, 0x7a, 0x7c, 0x92, 0x4b, 0xfd, 0x75, 0x92, 0x4b, 0x7d, 0xb2, 0xea, 0xb4, 0xbc, - 0xfb, 0x07, 0x0d, 0xa3, 0x49, 0xda, 0xe2, 0xd7, 0x02, 0xf1, 0x67, 0x83, 0xda, 0x5f, 0x96, 0x8e, - 0xf8, 0x2f, 0x02, 0x8d, 0x49, 0x36, 0x7e, 0x6c, 0x3d, 0x09, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x22, - 0x56, 0x92, 0xa9, 0x10, 0x00, 0x00, + // 1044 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x5f, 0x6f, 0xdb, 0x54, + 0x14, 0xcf, 0x6d, 0xbc, 0xfe, 0x39, 0xdd, 0xb2, 0xd6, 0x0b, 0x23, 0x35, 0x6d, 0x12, 0xbc, 0x02, + 0xa1, 0x6b, 0x1d, 0x9a, 0x0e, 0x81, 0xa6, 0x09, 0x68, 0xbb, 0x80, 0x22, 0x2d, 0xa8, 0x78, 0x0c, + 0x01, 0x42, 0x44, 0x4e, 0x7c, 0xf1, 0xc2, 0x1a, 0x5f, 0x2b, 0xd7, 0xed, 0x9a, 0x27, 0x24, 0x9e, + 0x90, 0x78, 0xe1, 0x0d, 0x09, 0x09, 0xc4, 0x17, 0xe0, 0x6d, 0xe2, 0x33, 0x4c, 0x3c, 0x4d, 0x3c, + 0x20, 0x1e, 0x00, 0x41, 0xfb, 0x45, 0x50, 0xee, 0xbd, 0xbe, 0x8d, 0x57, 0x3b, 0x71, 0xa2, 0x6a, + 0x4f, 0xad, 0x7d, 0x7f, 0xe7, 0x9c, 0xdf, 0xef, 0x9e, 0x73, 0x7c, 0x4e, 0x60, 0xa5, 0x45, 0x68, + 0x87, 0xd0, 0xb2, 0xd3, 0x25, 0x07, 0x5e, 0xf9, 0x70, 0xb3, 0x89, 0x7d, 0x6b, 0xb3, 0xec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, 0xd5, 0x6e, 0xe4, + 0x67, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2680,13 +2670,6 @@ func (m *MsgLeaveGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.PolicyAddress) > 0 { - i -= len(m.PolicyAddress) - copy(dAtA[i:], m.PolicyAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.PolicyAddress))) - i-- - dAtA[i] = 0x1a - } if m.GroupId != 0 { i = encodeVarintTx(dAtA, i, uint64(m.GroupId)) i-- @@ -3104,10 +3087,6 @@ func (m *MsgLeaveGroup) Size() (n int) { if m.GroupId != 0 { n += 1 + sovTx(uint64(m.GroupId)) } - l = len(m.PolicyAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } return n } @@ -5469,38 +5448,6 @@ func (m *MsgLeaveGroup) Unmarshal(dAtA []byte) error { break } } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PolicyAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PolicyAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) From 206ed22e83f55780e58099967220e218e257766d Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Mon, 7 Feb 2022 18:23:16 +0530 Subject: [PATCH 13/32] make proto-gen --- api/cosmos/group/v1beta1/events.pulsar.go | 48 +-- api/cosmos/group/v1beta1/tx.pulsar.go | 349 +++++++++------------- x/group/events.pb.go | 17 +- x/group/tx.pb.go | 145 ++++----- 4 files changed, 256 insertions(+), 303 deletions(-) diff --git a/api/cosmos/group/v1beta1/events.pulsar.go b/api/cosmos/group/v1beta1/events.pulsar.go index 69c1f7ae0763..534fb9de775c 100644 --- a/api/cosmos/group/v1beta1/events.pulsar.go +++ b/api/cosmos/group/v1beta1/events.pulsar.go @@ -3297,7 +3297,7 @@ func (x *EventLeaveGroup) ProtoReflect() protoreflect.Message { } func (x *EventLeaveGroup) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1beta1_events_proto_msgTypes[7] + mi := &file_cosmos_group_v1beta1_events_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4003,7 +4003,7 @@ type EventLeaveGroup struct { func (x *EventLeaveGroup) Reset() { *x = EventLeaveGroup{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1beta1_events_proto_msgTypes[7] + mi := &file_cosmos_group_v1beta1_events_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4017,7 +4017,7 @@ func (*EventLeaveGroup) ProtoMessage() {} // Deprecated: Use EventLeaveGroup.ProtoReflect.Descriptor instead. func (*EventLeaveGroup) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1beta1_events_proto_rawDescGZIP(), []int{7} + return file_cosmos_group_v1beta1_events_proto_rawDescGZIP(), []int{8} } func (x *EventLeaveGroup) GetGroupId() uint64 { @@ -4063,22 +4063,25 @@ var file_cosmos_group_v1beta1_events_proto_rawDesc = []byte{ 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x2c, 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, 0x42, 0xdd, 0x01, 0x0a, - 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, - 0x47, 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x2c, 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, 0x42, 0xdd, 0x01, 0x0a, 0x18, 0x63, + 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, + 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, + 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -4093,7 +4096,7 @@ func file_cosmos_group_v1beta1_events_proto_rawDescGZIP() []byte { return file_cosmos_group_v1beta1_events_proto_rawDescData } -var file_cosmos_group_v1beta1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_cosmos_group_v1beta1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_cosmos_group_v1beta1_events_proto_goTypes = []interface{}{ (*EventCreateGroup)(nil), // 0: cosmos.group.v1beta1.EventCreateGroup (*EventUpdateGroup)(nil), // 1: cosmos.group.v1beta1.EventUpdateGroup @@ -4103,6 +4106,7 @@ var file_cosmos_group_v1beta1_events_proto_goTypes = []interface{}{ (*EventWithdrawProposal)(nil), // 5: cosmos.group.v1beta1.EventWithdrawProposal (*EventVote)(nil), // 6: cosmos.group.v1beta1.EventVote (*EventExec)(nil), // 7: cosmos.group.v1beta1.EventExec + (*EventLeaveGroup)(nil), // 8: cosmos.group.v1beta1.EventLeaveGroup } var file_cosmos_group_v1beta1_events_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -4214,7 +4218,7 @@ func file_cosmos_group_v1beta1_events_proto_init() { return nil } } - file_cosmos_group_v1beta1_events_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_cosmos_group_v1beta1_events_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EventLeaveGroup); i { case 0: return &v.state @@ -4233,7 +4237,7 @@ func file_cosmos_group_v1beta1_events_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_group_v1beta1_events_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/api/cosmos/group/v1beta1/tx.pulsar.go b/api/cosmos/group/v1beta1/tx.pulsar.go index c41b22ea180d..61169e1acdd6 100644 --- a/api/cosmos/group/v1beta1/tx.pulsar.go +++ b/api/cosmos/group/v1beta1/tx.pulsar.go @@ -11384,7 +11384,6 @@ var ( md_MsgLeaveGroup protoreflect.MessageDescriptor fd_MsgLeaveGroup_member_address protoreflect.FieldDescriptor fd_MsgLeaveGroup_group_id protoreflect.FieldDescriptor - fd_MsgLeaveGroup_policy_address protoreflect.FieldDescriptor ) func init() { @@ -11392,7 +11391,6 @@ func init() { md_MsgLeaveGroup = File_cosmos_group_v1beta1_tx_proto.Messages().ByName("MsgLeaveGroup") fd_MsgLeaveGroup_member_address = md_MsgLeaveGroup.Fields().ByName("member_address") fd_MsgLeaveGroup_group_id = md_MsgLeaveGroup.Fields().ByName("group_id") - fd_MsgLeaveGroup_policy_address = md_MsgLeaveGroup.Fields().ByName("policy_address") } var _ protoreflect.Message = (*fastReflection_MsgLeaveGroup)(nil) @@ -11404,7 +11402,7 @@ func (x *MsgLeaveGroup) ProtoReflect() protoreflect.Message { } func (x *MsgLeaveGroup) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[22] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11472,12 +11470,6 @@ func (x *fastReflection_MsgLeaveGroup) Range(f func(protoreflect.FieldDescriptor return } } - if x.PolicyAddress != "" { - value := protoreflect.ValueOfString(x.PolicyAddress) - if !f(fd_MsgLeaveGroup_policy_address, value) { - return - } - } } // Has reports whether a field is populated. @@ -11497,8 +11489,6 @@ func (x *fastReflection_MsgLeaveGroup) Has(fd protoreflect.FieldDescriptor) bool return x.MemberAddress != "" case "cosmos.group.v1beta1.MsgLeaveGroup.group_id": return x.GroupId != uint64(0) - case "cosmos.group.v1beta1.MsgLeaveGroup.policy_address": - return x.PolicyAddress != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgLeaveGroup")) @@ -11519,8 +11509,6 @@ func (x *fastReflection_MsgLeaveGroup) Clear(fd protoreflect.FieldDescriptor) { x.MemberAddress = "" case "cosmos.group.v1beta1.MsgLeaveGroup.group_id": x.GroupId = uint64(0) - case "cosmos.group.v1beta1.MsgLeaveGroup.policy_address": - x.PolicyAddress = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgLeaveGroup")) @@ -11543,9 +11531,6 @@ func (x *fastReflection_MsgLeaveGroup) Get(descriptor protoreflect.FieldDescript case "cosmos.group.v1beta1.MsgLeaveGroup.group_id": value := x.GroupId return protoreflect.ValueOfUint64(value) - case "cosmos.group.v1beta1.MsgLeaveGroup.policy_address": - value := x.PolicyAddress - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgLeaveGroup")) @@ -11570,8 +11555,6 @@ func (x *fastReflection_MsgLeaveGroup) Set(fd protoreflect.FieldDescriptor, valu x.MemberAddress = value.Interface().(string) case "cosmos.group.v1beta1.MsgLeaveGroup.group_id": x.GroupId = value.Uint() - case "cosmos.group.v1beta1.MsgLeaveGroup.policy_address": - x.PolicyAddress = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgLeaveGroup")) @@ -11596,8 +11579,6 @@ func (x *fastReflection_MsgLeaveGroup) Mutable(fd protoreflect.FieldDescriptor) panic(fmt.Errorf("field member_address of message cosmos.group.v1beta1.MsgLeaveGroup is not mutable")) case "cosmos.group.v1beta1.MsgLeaveGroup.group_id": panic(fmt.Errorf("field group_id of message cosmos.group.v1beta1.MsgLeaveGroup is not mutable")) - case "cosmos.group.v1beta1.MsgLeaveGroup.policy_address": - panic(fmt.Errorf("field policy_address of message cosmos.group.v1beta1.MsgLeaveGroup is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgLeaveGroup")) @@ -11615,8 +11596,6 @@ func (x *fastReflection_MsgLeaveGroup) NewField(fd protoreflect.FieldDescriptor) return protoreflect.ValueOfString("") case "cosmos.group.v1beta1.MsgLeaveGroup.group_id": return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.group.v1beta1.MsgLeaveGroup.policy_address": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.MsgLeaveGroup")) @@ -11693,10 +11672,6 @@ func (x *fastReflection_MsgLeaveGroup) ProtoMethods() *protoiface.Methods { if x.GroupId != 0 { n += 1 + runtime.Sov(uint64(x.GroupId)) } - l = len(x.PolicyAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -11726,13 +11701,6 @@ func (x *fastReflection_MsgLeaveGroup) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.PolicyAddress) > 0 { - i -= len(x.PolicyAddress) - copy(dAtA[i:], x.PolicyAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PolicyAddress))) - i-- - dAtA[i] = 0x1a - } if x.GroupId != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) i-- @@ -11845,38 +11813,6 @@ func (x *fastReflection_MsgLeaveGroup) 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 PolicyAddress", 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.PolicyAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -11930,7 +11866,7 @@ func (x *MsgLeaveGroupResponse) ProtoReflect() protoreflect.Message { } func (x *MsgLeaveGroupResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[23] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13390,14 +13326,12 @@ type MsgLeaveGroup struct { MemberAddress string `protobuf:"bytes,1,opt,name=member_address,json=memberAddress,proto3" json:"member_address,omitempty"` // group_id is the unique ID of the group. GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // policy_address is the account address of group policy. - PolicyAddress string `protobuf:"bytes,3,opt,name=policy_address,json=policyAddress,proto3" json:"policy_address,omitempty"` } func (x *MsgLeaveGroup) Reset() { *x = MsgLeaveGroup{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[22] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13411,7 +13345,7 @@ func (*MsgLeaveGroup) ProtoMessage() {} // Deprecated: Use MsgLeaveGroup.ProtoReflect.Descriptor instead. func (*MsgLeaveGroup) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{22} + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{24} } func (x *MsgLeaveGroup) GetMemberAddress() string { @@ -13428,13 +13362,6 @@ func (x *MsgLeaveGroup) GetGroupId() uint64 { return 0 } -func (x *MsgLeaveGroup) GetPolicyAddress() string { - if x != nil { - return x.PolicyAddress - } - return "" -} - // MsgLeaveGroupResponse is the Msg/LeaveGroup response type. type MsgLeaveGroupResponse struct { state protoimpl.MessageState @@ -13445,7 +13372,7 @@ type MsgLeaveGroupResponse struct { func (x *MsgLeaveGroupResponse) Reset() { *x = MsgLeaveGroupResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[23] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13459,7 +13386,7 @@ func (*MsgLeaveGroupResponse) ProtoMessage() {} // Deprecated: Use MsgLeaveGroupResponse.ProtoReflect.Descriptor instead. func (*MsgLeaveGroupResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{23} + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{25} } var File_cosmos_group_v1beta1_tx_proto protoreflect.FileDescriptor @@ -13644,111 +13571,125 @@ var file_cosmos_group_v1beta1_tx_proto_rawDesc = []byte{ 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 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, 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, 0xef, 0x0a, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x61, 0x0a, 0x0b, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2c, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6b, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x3f, 0x0a, 0x0e, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x5f, 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, 0x0d, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x41, 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, 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, 0xcf, 0x0b, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, + 0x61, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x76, 0x0a, 0x12, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x1a, - 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x70, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x76, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, - 0x6d, 0x69, 0x6e, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x70, 0x0a, 0x10, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x29, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x79, 0x0a, 0x13, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x79, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 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, 0x34, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 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, 0x73, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x82, 0x01, 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, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x9d, 0x01, 0x0a, 0x1f, + 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2a, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x82, 0x01, 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, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x9d, 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, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x12, - 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x79, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, + 0x40, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x40, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x8b, 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, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x3a, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 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, 0x6a, 0x0a, 0x0e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x4c, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, - 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x25, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, + 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x8b, 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, + 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, + 0x6a, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x10, 0x57, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, + 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 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, 0x4c, 0x0a, + 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, + 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x45, + 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, + 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, + 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0a, 0x4c, 0x65, 0x61, + 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x42, 0xd9, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 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, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x3b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, - 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xd9, 0x01, 0x0a, 0x18, 0x63, 0x6f, + 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x42, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -13764,7 +13705,7 @@ func file_cosmos_group_v1beta1_tx_proto_rawDescGZIP() []byte { } var file_cosmos_group_v1beta1_tx_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_cosmos_group_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_cosmos_group_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 26) var file_cosmos_group_v1beta1_tx_proto_goTypes = []interface{}{ (Exec)(0), // 0: cosmos.group.v1beta1.Exec (*MsgCreateGroup)(nil), // 1: cosmos.group.v1beta1.MsgCreateGroup @@ -13791,18 +13732,20 @@ var file_cosmos_group_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgVoteResponse)(nil), // 22: cosmos.group.v1beta1.MsgVoteResponse (*MsgExec)(nil), // 23: cosmos.group.v1beta1.MsgExec (*MsgExecResponse)(nil), // 24: cosmos.group.v1beta1.MsgExecResponse - (*Member)(nil), // 25: cosmos.group.v1beta1.Member - (*anypb.Any)(nil), // 26: google.protobuf.Any - (Choice)(0), // 27: cosmos.group.v1beta1.Choice + (*MsgLeaveGroup)(nil), // 25: cosmos.group.v1beta1.MsgLeaveGroup + (*MsgLeaveGroupResponse)(nil), // 26: cosmos.group.v1beta1.MsgLeaveGroupResponse + (*Member)(nil), // 27: cosmos.group.v1beta1.Member + (*anypb.Any)(nil), // 28: google.protobuf.Any + (Choice)(0), // 29: cosmos.group.v1beta1.Choice } var file_cosmos_group_v1beta1_tx_proto_depIdxs = []int32{ - 25, // 0: cosmos.group.v1beta1.MsgCreateGroup.members:type_name -> cosmos.group.v1beta1.Member - 25, // 1: cosmos.group.v1beta1.MsgUpdateGroupMembers.member_updates:type_name -> cosmos.group.v1beta1.Member - 26, // 2: cosmos.group.v1beta1.MsgCreateGroupPolicy.decision_policy:type_name -> google.protobuf.Any - 26, // 3: cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicy.decision_policy:type_name -> google.protobuf.Any - 26, // 4: cosmos.group.v1beta1.MsgCreateProposal.msgs:type_name -> google.protobuf.Any + 27, // 0: cosmos.group.v1beta1.MsgCreateGroup.members:type_name -> cosmos.group.v1beta1.Member + 27, // 1: cosmos.group.v1beta1.MsgUpdateGroupMembers.member_updates:type_name -> cosmos.group.v1beta1.Member + 28, // 2: cosmos.group.v1beta1.MsgCreateGroupPolicy.decision_policy:type_name -> google.protobuf.Any + 28, // 3: cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicy.decision_policy:type_name -> google.protobuf.Any + 28, // 4: cosmos.group.v1beta1.MsgCreateProposal.msgs:type_name -> google.protobuf.Any 0, // 5: cosmos.group.v1beta1.MsgCreateProposal.exec:type_name -> cosmos.group.v1beta1.Exec - 27, // 6: cosmos.group.v1beta1.MsgVote.choice:type_name -> cosmos.group.v1beta1.Choice + 29, // 6: cosmos.group.v1beta1.MsgVote.choice:type_name -> cosmos.group.v1beta1.Choice 0, // 7: cosmos.group.v1beta1.MsgVote.exec:type_name -> cosmos.group.v1beta1.Exec 1, // 8: cosmos.group.v1beta1.Msg.CreateGroup:input_type -> cosmos.group.v1beta1.MsgCreateGroup 3, // 9: cosmos.group.v1beta1.Msg.UpdateGroupMembers:input_type -> cosmos.group.v1beta1.MsgUpdateGroupMembers @@ -13816,20 +13759,22 @@ var file_cosmos_group_v1beta1_tx_proto_depIdxs = []int32{ 19, // 17: cosmos.group.v1beta1.Msg.WithdrawProposal:input_type -> cosmos.group.v1beta1.MsgWithdrawProposal 21, // 18: cosmos.group.v1beta1.Msg.Vote:input_type -> cosmos.group.v1beta1.MsgVote 23, // 19: cosmos.group.v1beta1.Msg.Exec:input_type -> cosmos.group.v1beta1.MsgExec - 2, // 20: cosmos.group.v1beta1.Msg.CreateGroup:output_type -> cosmos.group.v1beta1.MsgCreateGroupResponse - 4, // 21: cosmos.group.v1beta1.Msg.UpdateGroupMembers:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMembersResponse - 6, // 22: cosmos.group.v1beta1.Msg.UpdateGroupAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupAdminResponse - 8, // 23: cosmos.group.v1beta1.Msg.UpdateGroupMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMetadataResponse - 10, // 24: cosmos.group.v1beta1.Msg.CreateGroupPolicy:output_type -> cosmos.group.v1beta1.MsgCreateGroupPolicyResponse - 12, // 25: cosmos.group.v1beta1.Msg.UpdateGroupPolicyAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyAdminResponse - 14, // 26: cosmos.group.v1beta1.Msg.UpdateGroupPolicyDecisionPolicy:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicyResponse - 16, // 27: cosmos.group.v1beta1.Msg.UpdateGroupPolicyMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadataResponse - 18, // 28: cosmos.group.v1beta1.Msg.CreateProposal:output_type -> cosmos.group.v1beta1.MsgCreateProposalResponse - 20, // 29: cosmos.group.v1beta1.Msg.WithdrawProposal:output_type -> cosmos.group.v1beta1.MsgWithdrawProposalResponse - 22, // 30: cosmos.group.v1beta1.Msg.Vote:output_type -> cosmos.group.v1beta1.MsgVoteResponse - 24, // 31: cosmos.group.v1beta1.Msg.Exec:output_type -> cosmos.group.v1beta1.MsgExecResponse - 20, // [20:32] is the sub-list for method output_type - 8, // [8:20] is the sub-list for method input_type + 25, // 20: cosmos.group.v1beta1.Msg.LeaveGroup:input_type -> cosmos.group.v1beta1.MsgLeaveGroup + 2, // 21: cosmos.group.v1beta1.Msg.CreateGroup:output_type -> cosmos.group.v1beta1.MsgCreateGroupResponse + 4, // 22: cosmos.group.v1beta1.Msg.UpdateGroupMembers:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMembersResponse + 6, // 23: cosmos.group.v1beta1.Msg.UpdateGroupAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupAdminResponse + 8, // 24: cosmos.group.v1beta1.Msg.UpdateGroupMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMetadataResponse + 10, // 25: cosmos.group.v1beta1.Msg.CreateGroupPolicy:output_type -> cosmos.group.v1beta1.MsgCreateGroupPolicyResponse + 12, // 26: cosmos.group.v1beta1.Msg.UpdateGroupPolicyAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyAdminResponse + 14, // 27: cosmos.group.v1beta1.Msg.UpdateGroupPolicyDecisionPolicy:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicyResponse + 16, // 28: cosmos.group.v1beta1.Msg.UpdateGroupPolicyMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadataResponse + 18, // 29: cosmos.group.v1beta1.Msg.CreateProposal:output_type -> cosmos.group.v1beta1.MsgCreateProposalResponse + 20, // 30: cosmos.group.v1beta1.Msg.WithdrawProposal:output_type -> cosmos.group.v1beta1.MsgWithdrawProposalResponse + 22, // 31: cosmos.group.v1beta1.Msg.Vote:output_type -> cosmos.group.v1beta1.MsgVoteResponse + 24, // 32: cosmos.group.v1beta1.Msg.Exec:output_type -> cosmos.group.v1beta1.MsgExecResponse + 26, // 33: cosmos.group.v1beta1.Msg.LeaveGroup:output_type -> cosmos.group.v1beta1.MsgLeaveGroupResponse + 21, // [21:34] is the sub-list for method output_type + 8, // [8:21] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name 8, // [8:8] is the sub-list for extension extendee 0, // [0:8] is the sub-list for field type_name @@ -14130,7 +14075,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { return nil } } - file_cosmos_group_v1beta1_tx_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_cosmos_group_v1beta1_tx_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgLeaveGroup); i { case 0: return &v.state @@ -14142,7 +14087,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { return nil } } - file_cosmos_group_v1beta1_tx_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_cosmos_group_v1beta1_tx_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgLeaveGroupResponse); i { case 0: return &v.state @@ -14161,7 +14106,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_group_v1beta1_tx_proto_rawDesc, NumEnums: 1, - NumMessages: 24, + NumMessages: 26, NumExtensions: 0, NumServices: 1, }, diff --git a/x/group/events.pb.go b/x/group/events.pb.go index a3883f9d33d1..ba407640e4cd 100644 --- a/x/group/events.pb.go +++ b/x/group/events.pb.go @@ -401,7 +401,7 @@ func (m *EventLeaveGroup) Reset() { *m = EventLeaveGroup{} } func (m *EventLeaveGroup) String() string { return proto.CompactTextString(m) } func (*EventLeaveGroup) ProtoMessage() {} func (*EventLeaveGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_7879e051fb126fc0, []int{7} + return fileDescriptor_7879e051fb126fc0, []int{8} } func (m *EventLeaveGroup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -452,7 +452,7 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1beta1/events.proto", fileDescriptor_7879e051fb126fc0) } var fileDescriptor_7879e051fb126fc0 = []byte{ - // 295 bytes of a gzipped FileDescriptorProto + // 305 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x2f, 0xca, 0x2f, 0x2d, 0xd0, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x81, @@ -466,12 +466,13 @@ var fileDescriptor_7879e051fb126fc0 = []byte{ 0x53, 0x60, 0x9a, 0x19, 0x97, 0x30, 0x92, 0xdb, 0x02, 0x8a, 0xf2, 0x0b, 0xf2, 0x8b, 0x13, 0x73, 0x84, 0xe4, 0xb9, 0xb8, 0x0b, 0xa0, 0x6c, 0x84, 0x87, 0xb8, 0x60, 0x42, 0x9e, 0x29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xbd, 0x24, 0x36, + 0x70, 0xe2, 0x31, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x80, 0xe3, 0x0f, 0x79, 0x92, 0x02, 0x00, + 0x00, } func (m *EventCreateGroup) Marshal() (dAtA []byte, err error) { diff --git a/x/group/tx.pb.go b/x/group/tx.pb.go index 128a293c3147..319d30f225e4 100644 --- a/x/group/tx.pb.go +++ b/x/group/tx.pb.go @@ -1266,7 +1266,7 @@ func (m *MsgLeaveGroup) Reset() { *m = MsgLeaveGroup{} } func (m *MsgLeaveGroup) String() string { return proto.CompactTextString(m) } func (*MsgLeaveGroup) ProtoMessage() {} func (*MsgLeaveGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_da0de9d603d844fb, []int{22} + return fileDescriptor_da0de9d603d844fb, []int{24} } func (m *MsgLeaveGroup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1317,7 +1317,7 @@ func (m *MsgLeaveGroupResponse) Reset() { *m = MsgLeaveGroupResponse{} } func (m *MsgLeaveGroupResponse) String() string { return proto.CompactTextString(m) } func (*MsgLeaveGroupResponse) ProtoMessage() {} func (*MsgLeaveGroupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_da0de9d603d844fb, []int{23} + return fileDescriptor_da0de9d603d844fb, []int{25} } func (m *MsgLeaveGroupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1379,75 +1379,78 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1beta1/tx.proto", fileDescriptor_da0de9d603d844fb) } var fileDescriptor_da0de9d603d844fb = []byte{ - // 1077 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xc4, 0x6e, 0x3e, 0x9e, 0x8b, 0x9b, 0x6c, 0x4d, 0x71, 0x96, 0xc4, 0x36, 0x26, 0x80, - 0x31, 0x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7f, 0x51, 0x21, 0x95, 0xc9, 0x6d, 0x04, 0x9b, 0x07, 0x90, 0xba, 0xd0, 0x56, 0xdf, 0x18, 0x93, - 0x78, 0x0f, 0x28, 0xab, 0x11, 0x81, 0x83, 0x17, 0x70, 0xa8, 0x27, 0x85, 0x5f, 0xc0, 0x8b, 0xd0, - 0x11, 0x17, 0x30, 0xac, 0xfb, 0x48, 0x1f, 0x43, 0x82, 0x75, 0x9e, 0xd5, 0x50, 0xd3, 0xfe, 0xb6, - 0xfc, 0xda, 0xc8, 0xed, 0x41, 0x6f, 0xec, 0x3d, 0x0d, 0xf7, 0xd6, 0xdf, 0x1e, 0xe1, 0x6d, 0xf0, - 0x75, 0xde, 0x79, 0xff, 0xc9, 0x69, 0x16, 0x3d, 0x3d, 0xcd, 0xa2, 0x67, 0xa7, 0x59, 0xf4, 0xfd, - 0x59, 0x36, 0xf6, 0xf4, 0x2c, 0x1b, 0xfb, 0xeb, 0x2c, 0x1b, 0xfb, 0x7a, 0xcd, 0xb4, 0x9c, 0xfd, - 0xc3, 0xa6, 0xd2, 0x22, 0x6d, 0xf7, 0xf7, 0x09, 0xf7, 0xcf, 0x06, 0x35, 0xbe, 0x55, 0x4f, 0xf8, - 0x6f, 0x10, 0xcd, 0x59, 0x36, 0x7a, 0x6c, 0xfd, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x1d, 0x8e, - 0x60, 0x1b, 0x11, 0x00, 0x00, + // 1129 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0xd4, 0x6e, 0x7e, 0x3c, 0xb7, 0x6e, 0xb2, 0x0d, 0xad, 0xb3, 0x24, 0xb6, 0xd9, 0x06, + 0x30, 0x6e, 0xb2, 0x4b, 0x9c, 0x22, 0x90, 0x55, 0x01, 0x49, 0x6a, 0x90, 0xa5, 0x1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 0x8f, 0x11, 0xcd, 0xab, 0x4f, 0x26, + 0xcb, 0xfe, 0x79, 0xea, 0x88, 0x5a, 0x64, 0x39, 0xc8, 0x04, 0x93, 0xe1, 0x7c, 0x9f, 0x23, 0x58, + 0xf2, 0xd7, 0xe1, 0x9e, 0x75, 0x60, 0x36, 0xba, 0x2f, 0x88, 0xad, 0xf0, 0x31, 0x5c, 0xd1, 0x71, + 0xc3, 0x24, 0xa6, 0xd5, 0xaa, 0xd9, 0x34, 0x72, 0x3a, 0x91, 0x43, 0xf9, 0x64, 0x71, 0x49, 0x66, + 0xef, 0x83, 0xec, 0xbd, 0x0f, 0xf2, 0x76, 0xab, 0xbb, 0x23, 0xfc, 0xf6, 0x64, 0x23, 0x75, 0xc7, + 0x35, 0x60, 0x4c, 0xd5, 0x94, 0xee, 0xfb, 0x2e, 0xa5, 0xbe, 0xf9, 0x3e, 0x1b, 0x1b, 0x38, 0x04, + 0x15, 0x56, 0x82, 0x14, 0xf2, 0xfb, 0x56, 0x84, 0x59, 0x8d, 0x29, 0x1a, 0xab, 0xd5, 0x03, 0x4a, + 0xbf, 0x22, 0x58, 0xf6, 0x9f, 0x2c, 0x73, 0x3a, 0x5d, 0xc5, 0x0e, 0x30, 0xb8, 0x10, 0x91, 0xc1, + 0x79, 0x94, 0xf2, 0x0d, 0x78, 0x25, 0x54, 0x03, 0x2f, 0x90, 0x7f, 0x11, 0x48, 0x41, 0x28, 0x7f, + 0x12, 0x5e, 0x88, 0xe4, 0x80, 0x5a, 0x89, 0x9f, 0x73, 0xad, 0xac, 0x43, 0x61, 0xbc, 0x58, 0x7e, + 0x36, 0x3f, 0x21, 0x5a, 0x5a, 0x43, 0xf0, 0xa9, 0xaf, 0xfc, 0x34, 0xa7, 0x12, 0xf5, 0x2d, 0x78, + 0x0d, 0xd6, 0x46, 0x71, 0xe5, 0xa2, 0xfe, 0x43, 0xb0, 0xc8, 0xef, 0xcb, 0x5e, 0xdb, 0xb2, 0x2d, + 0xa2, 0x1d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x1b, 0x50, + 0xde, 0x89, 0xee, 0xdc, 0x6f, 0x29, 0xbe, 0x3f, 0xad, 0x25, 0xe7, 0xf7, 0x18, 0xc1, 0x72, 0xf8, + 0x90, 0x50, 0x8c, 0xee, 0x9f, 0x57, 0x48, 0x69, 0x72, 0x1b, 0xce, 0xe6, 0x01, 0xa4, 0xce, 0x34, + 0xf7, 0xd7, 0xc7, 0x24, 0xde, 0x03, 0x8a, 0x4a, 0x44, 0xe0, 0xe0, 0x05, 0x1c, 0xea, 0x8c, 0xe1, + 0x17, 0xf0, 0x2c, 0x74, 0xc4, 0x05, 0x0c, 0xeb, 0x81, 0xc2, 0x5d, 0x48, 0xd0, 0xfe, 0xb7, 0x1a, + 0x6a, 0xda, 0xdb, 0x16, 0x5f, 0x1d, 0xb9, 0x3d, 0xe8, 0x8d, 0xbe, 0xa7, 0xe1, 0xde, 0x7a, 0xdb, + 0x23, 0xbc, 0x0d, 0xf6, 0x08, 0xe1, 0x2b, 0x80, 0x81, 0x06, 0x71, 0x23, 0xd4, 0xa8, 0x0f, 0x12, + 0x6f, 0x46, 0x00, 0x79, 0xfe, 0x77, 0xde, 0x7d, 0x7a, 0x92, 0x41, 0xcf, 0x4e, 0x32, 0xe8, 0xf9, + 0x49, 0x06, 0x7d, 0x7b, 0x9a, 0x89, 0x3d, 0x3b, 0xcd, 0xc4, 0xfe, 0x3c, 0xcd, 0xc4, 0xbe, 0x5c, + 0x33, 0x4c, 0x67, 0xff, 0xb0, 0x2e, 0x37, 0xac, 0xa6, 0xfb, 0x2b, 0x8c, 0xfb, 0x67, 0x83, 0xe8, + 0x0f, 0x95, 0x63, 0xf6, 0x4b, 0x4b, 0x7d, 0x86, 0x0e, 0x58, 0x5b, 0xff, 0x07, 0x00, 0x00, 0xff, + 0xff, 0xff, 0x74, 0xf8, 0x22, 0x01, 0x12, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From fd33f9335b3d9b8b7411b6e45d92684b1fea5b7b Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Tue, 15 Feb 2022 20:11:18 +0530 Subject: [PATCH 14/32] chore: run make proto-gen --- api/cosmos/group/v1beta1/events.pulsar.go | 110 ++++++++-- api/cosmos/group/v1beta1/tx.pulsar.go | 251 ++++++++++++---------- api/cosmos/group/v1beta1/types.pulsar.go | 2 +- proto/cosmos/group/v1beta1/events.proto | 3 + proto/cosmos/group/v1beta1/tx.proto | 2 + x/group/events.pb.go | 65 +++++- x/group/tx.pb.go | 143 ++++++------ x/group/types.pb.go | 2 +- 8 files changed, 367 insertions(+), 211 deletions(-) diff --git a/api/cosmos/group/v1beta1/events.pulsar.go b/api/cosmos/group/v1beta1/events.pulsar.go index 6da04133184f..e92122e975ae 100644 --- a/api/cosmos/group/v1beta1/events.pulsar.go +++ b/api/cosmos/group/v1beta1/events.pulsar.go @@ -3280,12 +3280,14 @@ func (x *fastReflection_EventExec) ProtoMethods() *protoiface.Methods { var ( md_EventLeaveGroup protoreflect.MessageDescriptor fd_EventLeaveGroup_group_id protoreflect.FieldDescriptor + fd_EventLeaveGroup_address protoreflect.FieldDescriptor ) func init() { file_cosmos_group_v1beta1_events_proto_init() md_EventLeaveGroup = File_cosmos_group_v1beta1_events_proto.Messages().ByName("EventLeaveGroup") fd_EventLeaveGroup_group_id = md_EventLeaveGroup.Fields().ByName("group_id") + fd_EventLeaveGroup_address = md_EventLeaveGroup.Fields().ByName("address") } var _ protoreflect.Message = (*fastReflection_EventLeaveGroup)(nil) @@ -3359,6 +3361,12 @@ func (x *fastReflection_EventLeaveGroup) Range(f func(protoreflect.FieldDescript return } } + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_EventLeaveGroup_address, value) { + return + } + } } // Has reports whether a field is populated. @@ -3376,6 +3384,8 @@ func (x *fastReflection_EventLeaveGroup) Has(fd protoreflect.FieldDescriptor) bo switch fd.FullName() { case "cosmos.group.v1beta1.EventLeaveGroup.group_id": return x.GroupId != uint64(0) + case "cosmos.group.v1beta1.EventLeaveGroup.address": + return x.Address != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.EventLeaveGroup")) @@ -3394,6 +3404,8 @@ func (x *fastReflection_EventLeaveGroup) Clear(fd protoreflect.FieldDescriptor) switch fd.FullName() { case "cosmos.group.v1beta1.EventLeaveGroup.group_id": x.GroupId = uint64(0) + case "cosmos.group.v1beta1.EventLeaveGroup.address": + x.Address = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.EventLeaveGroup")) @@ -3413,6 +3425,9 @@ func (x *fastReflection_EventLeaveGroup) Get(descriptor protoreflect.FieldDescri case "cosmos.group.v1beta1.EventLeaveGroup.group_id": value := x.GroupId return protoreflect.ValueOfUint64(value) + case "cosmos.group.v1beta1.EventLeaveGroup.address": + value := x.Address + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.EventLeaveGroup")) @@ -3435,6 +3450,8 @@ func (x *fastReflection_EventLeaveGroup) Set(fd protoreflect.FieldDescriptor, va switch fd.FullName() { case "cosmos.group.v1beta1.EventLeaveGroup.group_id": x.GroupId = value.Uint() + case "cosmos.group.v1beta1.EventLeaveGroup.address": + x.Address = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.EventLeaveGroup")) @@ -3457,6 +3474,8 @@ func (x *fastReflection_EventLeaveGroup) Mutable(fd protoreflect.FieldDescriptor switch fd.FullName() { case "cosmos.group.v1beta1.EventLeaveGroup.group_id": panic(fmt.Errorf("field group_id of message cosmos.group.v1beta1.EventLeaveGroup is not mutable")) + case "cosmos.group.v1beta1.EventLeaveGroup.address": + panic(fmt.Errorf("field address of message cosmos.group.v1beta1.EventLeaveGroup is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.EventLeaveGroup")) @@ -3472,6 +3491,8 @@ func (x *fastReflection_EventLeaveGroup) NewField(fd protoreflect.FieldDescripto switch fd.FullName() { case "cosmos.group.v1beta1.EventLeaveGroup.group_id": return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.group.v1beta1.EventLeaveGroup.address": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.group.v1beta1.EventLeaveGroup")) @@ -3544,6 +3565,10 @@ func (x *fastReflection_EventLeaveGroup) ProtoMethods() *protoiface.Methods { if x.GroupId != 0 { n += 1 + runtime.Sov(uint64(x.GroupId)) } + l = len(x.Address) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -3573,6 +3598,13 @@ func (x *fastReflection_EventLeaveGroup) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + i-- + dAtA[i] = 0x12 + } if x.GroupId != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) i-- @@ -3646,6 +3678,38 @@ func (x *fastReflection_EventLeaveGroup) ProtoMethods() *protoiface.Methods { break } } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3998,6 +4062,8 @@ type EventLeaveGroup struct { // group_id is the unique ID of the group. GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // address is the account address of the group member. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` } func (x *EventLeaveGroup) Reset() { @@ -4027,6 +4093,13 @@ func (x *EventLeaveGroup) GetGroupId() uint64 { return 0 } +func (x *EventLeaveGroup) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + var File_cosmos_group_v1beta1_events_proto protoreflect.FileDescriptor var file_cosmos_group_v1beta1_events_proto_rawDesc = []byte{ @@ -4063,25 +4136,28 @@ var file_cosmos_group_v1beta1_events_proto_rawDesc = []byte{ 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x2c, 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, 0x22, 0x2c, 0x0a, 0x0f, + 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 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, 0x42, 0xdd, 0x01, 0x0a, 0x18, 0x63, - 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, - 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, - 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 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, 0xdd, + 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 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, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x3b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, + 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/group/v1beta1/tx.pulsar.go b/api/cosmos/group/v1beta1/tx.pulsar.go index 6c33b8729946..8bdd809fa2c9 100644 --- a/api/cosmos/group/v1beta1/tx.pulsar.go +++ b/api/cosmos/group/v1beta1/tx.pulsar.go @@ -13572,111 +13572,126 @@ var file_cosmos_group_v1beta1_tx_proto_rawDesc = []byte{ 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 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, 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, 0xef, 0x0a, - 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x61, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, + 0x65, 0x22, 0x80, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x12, 0x3f, 0x0a, 0x0e, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 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, 0x0d, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x41, 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, + 0x13, 0x82, 0xe7, 0xb0, 0x2a, 0x0e, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 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, 0xcf, 0x0b, 0x0a, 0x03, 0x4d, 0x73, + 0x67, 0x12, 0x61, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x76, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 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, 0x76, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2b, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x70, 0x0a, 0x10, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x70, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, - 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, - 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x79, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x73, 0x0a, - 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x32, + 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, + 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x73, 0x0a, 0x11, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x82, 0x01, 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, 0x2f, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 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, 0x37, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 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, 0x9d, 0x01, 0x0a, 0x1f, 0x55, 0x70, 0x64, 0x61, + 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 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, 0x82, + 0x01, 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, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x37, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 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, 0x9d, 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, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x40, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x12, 0x38, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 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, 0x40, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x8b, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x8b, 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, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x6a, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x6a, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x2f, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 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, 0x70, 0x0a, + 0x10, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x31, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 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, + 0x4c, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x70, 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, + 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x4c, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, + 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0a, 0x4c, + 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0xd9, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, - 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, - 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2b, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xd9, 0x01, 0x0a, 0x18, + 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x42, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x14, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -13719,18 +13734,20 @@ var file_cosmos_group_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgVoteResponse)(nil), // 22: cosmos.group.v1beta1.MsgVoteResponse (*MsgExec)(nil), // 23: cosmos.group.v1beta1.MsgExec (*MsgExecResponse)(nil), // 24: cosmos.group.v1beta1.MsgExecResponse - (*Member)(nil), // 25: cosmos.group.v1beta1.Member - (*anypb.Any)(nil), // 26: google.protobuf.Any - (VoteOption)(0), // 27: cosmos.group.v1beta1.VoteOption + (*MsgLeaveGroup)(nil), // 25: cosmos.group.v1beta1.MsgLeaveGroup + (*MsgLeaveGroupResponse)(nil), // 26: cosmos.group.v1beta1.MsgLeaveGroupResponse + (*Member)(nil), // 27: cosmos.group.v1beta1.Member + (*anypb.Any)(nil), // 28: google.protobuf.Any + (VoteOption)(0), // 29: cosmos.group.v1beta1.VoteOption } var file_cosmos_group_v1beta1_tx_proto_depIdxs = []int32{ - 25, // 0: cosmos.group.v1beta1.MsgCreateGroup.members:type_name -> cosmos.group.v1beta1.Member - 25, // 1: cosmos.group.v1beta1.MsgUpdateGroupMembers.member_updates:type_name -> cosmos.group.v1beta1.Member - 26, // 2: cosmos.group.v1beta1.MsgCreateGroupPolicy.decision_policy:type_name -> google.protobuf.Any - 26, // 3: cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicy.decision_policy:type_name -> google.protobuf.Any - 26, // 4: cosmos.group.v1beta1.MsgSubmitProposal.messages:type_name -> google.protobuf.Any + 27, // 0: cosmos.group.v1beta1.MsgCreateGroup.members:type_name -> cosmos.group.v1beta1.Member + 27, // 1: cosmos.group.v1beta1.MsgUpdateGroupMembers.member_updates:type_name -> cosmos.group.v1beta1.Member + 28, // 2: cosmos.group.v1beta1.MsgCreateGroupPolicy.decision_policy:type_name -> google.protobuf.Any + 28, // 3: cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicy.decision_policy:type_name -> google.protobuf.Any + 28, // 4: cosmos.group.v1beta1.MsgSubmitProposal.messages:type_name -> google.protobuf.Any 0, // 5: cosmos.group.v1beta1.MsgSubmitProposal.exec:type_name -> cosmos.group.v1beta1.Exec - 27, // 6: cosmos.group.v1beta1.MsgVote.option:type_name -> cosmos.group.v1beta1.VoteOption + 29, // 6: cosmos.group.v1beta1.MsgVote.option:type_name -> cosmos.group.v1beta1.VoteOption 0, // 7: cosmos.group.v1beta1.MsgVote.exec:type_name -> cosmos.group.v1beta1.Exec 1, // 8: cosmos.group.v1beta1.Msg.CreateGroup:input_type -> cosmos.group.v1beta1.MsgCreateGroup 3, // 9: cosmos.group.v1beta1.Msg.UpdateGroupMembers:input_type -> cosmos.group.v1beta1.MsgUpdateGroupMembers @@ -13744,20 +13761,22 @@ var file_cosmos_group_v1beta1_tx_proto_depIdxs = []int32{ 19, // 17: cosmos.group.v1beta1.Msg.WithdrawProposal:input_type -> cosmos.group.v1beta1.MsgWithdrawProposal 21, // 18: cosmos.group.v1beta1.Msg.Vote:input_type -> cosmos.group.v1beta1.MsgVote 23, // 19: cosmos.group.v1beta1.Msg.Exec:input_type -> cosmos.group.v1beta1.MsgExec - 2, // 20: cosmos.group.v1beta1.Msg.CreateGroup:output_type -> cosmos.group.v1beta1.MsgCreateGroupResponse - 4, // 21: cosmos.group.v1beta1.Msg.UpdateGroupMembers:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMembersResponse - 6, // 22: cosmos.group.v1beta1.Msg.UpdateGroupAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupAdminResponse - 8, // 23: cosmos.group.v1beta1.Msg.UpdateGroupMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMetadataResponse - 10, // 24: cosmos.group.v1beta1.Msg.CreateGroupPolicy:output_type -> cosmos.group.v1beta1.MsgCreateGroupPolicyResponse - 12, // 25: cosmos.group.v1beta1.Msg.UpdateGroupPolicyAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyAdminResponse - 14, // 26: cosmos.group.v1beta1.Msg.UpdateGroupPolicyDecisionPolicy:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicyResponse - 16, // 27: cosmos.group.v1beta1.Msg.UpdateGroupPolicyMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadataResponse - 18, // 28: cosmos.group.v1beta1.Msg.SubmitProposal:output_type -> cosmos.group.v1beta1.MsgSubmitProposalResponse - 20, // 29: cosmos.group.v1beta1.Msg.WithdrawProposal:output_type -> cosmos.group.v1beta1.MsgWithdrawProposalResponse - 22, // 30: cosmos.group.v1beta1.Msg.Vote:output_type -> cosmos.group.v1beta1.MsgVoteResponse - 24, // 31: cosmos.group.v1beta1.Msg.Exec:output_type -> cosmos.group.v1beta1.MsgExecResponse - 20, // [20:32] is the sub-list for method output_type - 8, // [8:20] is the sub-list for method input_type + 25, // 20: cosmos.group.v1beta1.Msg.LeaveGroup:input_type -> cosmos.group.v1beta1.MsgLeaveGroup + 2, // 21: cosmos.group.v1beta1.Msg.CreateGroup:output_type -> cosmos.group.v1beta1.MsgCreateGroupResponse + 4, // 22: cosmos.group.v1beta1.Msg.UpdateGroupMembers:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMembersResponse + 6, // 23: cosmos.group.v1beta1.Msg.UpdateGroupAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupAdminResponse + 8, // 24: cosmos.group.v1beta1.Msg.UpdateGroupMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMetadataResponse + 10, // 25: cosmos.group.v1beta1.Msg.CreateGroupPolicy:output_type -> cosmos.group.v1beta1.MsgCreateGroupPolicyResponse + 12, // 26: cosmos.group.v1beta1.Msg.UpdateGroupPolicyAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyAdminResponse + 14, // 27: cosmos.group.v1beta1.Msg.UpdateGroupPolicyDecisionPolicy:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicyResponse + 16, // 28: cosmos.group.v1beta1.Msg.UpdateGroupPolicyMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadataResponse + 18, // 29: cosmos.group.v1beta1.Msg.SubmitProposal:output_type -> cosmos.group.v1beta1.MsgSubmitProposalResponse + 20, // 30: cosmos.group.v1beta1.Msg.WithdrawProposal:output_type -> cosmos.group.v1beta1.MsgWithdrawProposalResponse + 22, // 31: cosmos.group.v1beta1.Msg.Vote:output_type -> cosmos.group.v1beta1.MsgVoteResponse + 24, // 32: cosmos.group.v1beta1.Msg.Exec:output_type -> cosmos.group.v1beta1.MsgExecResponse + 26, // 33: cosmos.group.v1beta1.Msg.LeaveGroup:output_type -> cosmos.group.v1beta1.MsgLeaveGroupResponse + 21, // [21:34] is the sub-list for method output_type + 8, // [8:21] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name 8, // [8:8] is the sub-list for extension extendee 0, // [0:8] is the sub-list for field type_name diff --git a/api/cosmos/group/v1beta1/types.pulsar.go b/api/cosmos/group/v1beta1/types.pulsar.go index 0df890979c9c..f9160f288dea 100644 --- a/api/cosmos/group/v1beta1/types.pulsar.go +++ b/api/cosmos/group/v1beta1/types.pulsar.go @@ -7401,7 +7401,7 @@ type Proposal struct { // has ended. FinalTallyResult *TallyResult `protobuf:"bytes,10,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result,omitempty"` // timeout is the timestamp before which both voting and execution must be - // done. If this timestamp is passed, then the proposal can not be executed + // done. If this timestamp is passed, then the proposal cannot be executed // anymore and should be considered pending delete. This timestamp is checked // against the block header's timestamp. Timeout *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=timeout,proto3" json:"timeout,omitempty"` diff --git a/proto/cosmos/group/v1beta1/events.proto b/proto/cosmos/group/v1beta1/events.proto index 54029edf357d..8f35fa5db971 100644 --- a/proto/cosmos/group/v1beta1/events.proto +++ b/proto/cosmos/group/v1beta1/events.proto @@ -67,4 +67,7 @@ message EventLeaveGroup { // group_id is the unique ID of the group. uint64 group_id = 1; + + // address is the account address of the group member. + string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } diff --git a/proto/cosmos/group/v1beta1/tx.proto b/proto/cosmos/group/v1beta1/tx.proto index 880702e5c04a..329c6631501b 100644 --- a/proto/cosmos/group/v1beta1/tx.proto +++ b/proto/cosmos/group/v1beta1/tx.proto @@ -315,6 +315,8 @@ message MsgExecResponse {} // MsgLeaveGroup is the Msg/LeaveGroup request type. message MsgLeaveGroup { + option (cosmos.msg.v1.signer) = "member_address"; + // member_address is the account address of the group member. string member_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; diff --git a/x/group/events.pb.go b/x/group/events.pb.go index cee6dd9c33a8..9f414ee3a3d5 100644 --- a/x/group/events.pb.go +++ b/x/group/events.pb.go @@ -395,6 +395,8 @@ func (m *EventExec) GetProposalId() uint64 { type EventLeaveGroup struct { // group_id is the unique ID of the group. GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // address is the account address of the group member. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` } func (m *EventLeaveGroup) Reset() { *m = EventLeaveGroup{} } @@ -437,6 +439,13 @@ func (m *EventLeaveGroup) GetGroupId() uint64 { return 0 } +func (m *EventLeaveGroup) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + func init() { proto.RegisterType((*EventCreateGroup)(nil), "cosmos.group.v1beta1.EventCreateGroup") proto.RegisterType((*EventUpdateGroup)(nil), "cosmos.group.v1beta1.EventUpdateGroup") @@ -452,7 +461,7 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1beta1/events.proto", fileDescriptor_7879e051fb126fc0) } var fileDescriptor_7879e051fb126fc0 = []byte{ - // 301 bytes of a gzipped FileDescriptorProto + // 319 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x2f, 0xca, 0x2f, 0x2d, 0xd0, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x81, @@ -467,11 +476,12 @@ var fileDescriptor_7879e051fb126fc0 = []byte{ 0xfc, 0x82, 0xfc, 0xe2, 0xc4, 0x1c, 0x21, 0x79, 0x2e, 0xee, 0x02, 0x28, 0x1b, 0xe1, 0x21, 0x2e, 0x98, 0x90, 0x67, 0x8a, 0x92, 0x05, 0x97, 0x28, 0x58, 0x5f, 0x78, 0x66, 0x49, 0x46, 0x4a, 0x51, 0x62, 0x39, 0xf1, 0x3a, 0x75, 0xb8, 0x38, 0xc1, 0x3a, 0xc3, 0xf2, 0x4b, 0x52, 0x89, 0x57, 0xed, - 0x5a, 0x91, 0x9a, 0x4c, 0x50, 0xb5, 0x93, 0xdd, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, - 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, - 0x31, 0x44, 0xa9, 0xa4, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0x42, 0xa3, 0x1e, - 0x4a, 0xe9, 0x16, 0xa7, 0x64, 0xeb, 0x57, 0x40, 0x52, 0x53, 0x12, 0x1b, 0x38, 0x39, 0x18, 0x03, - 0x02, 0x00, 0x00, 0xff, 0xff, 0x54, 0x9c, 0xae, 0x89, 0x64, 0x02, 0x00, 0x00, + 0x5a, 0x91, 0x9a, 0x4c, 0x58, 0x75, 0x02, 0x17, 0x3f, 0x58, 0xb5, 0x4f, 0x6a, 0x62, 0x19, 0xc1, + 0x78, 0x41, 0x0e, 0x2f, 0x26, 0x22, 0xc3, 0xcb, 0xc9, 0xee, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, + 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, + 0x8f, 0xe5, 0x18, 0xa2, 0x54, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xa1, + 0x89, 0x0b, 0x4a, 0xe9, 0x16, 0xa7, 0x64, 0xeb, 0x57, 0x40, 0xd2, 0x6b, 0x12, 0x1b, 0x38, 0xc1, + 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf6, 0xfb, 0x10, 0x68, 0xc6, 0x02, 0x00, 0x00, } func (m *EventCreateGroup) Marshal() (dAtA []byte, err error) { @@ -722,6 +732,13 @@ func (m *EventLeaveGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } if m.GroupId != 0 { i = encodeVarintEvents(dAtA, i, uint64(m.GroupId)) i-- @@ -848,6 +865,10 @@ func (m *EventLeaveGroup) Size() (n int) { if m.GroupId != 0 { n += 1 + sovEvents(uint64(m.GroupId)) } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } return n } @@ -1483,6 +1504,38 @@ func (m *EventLeaveGroup) Unmarshal(dAtA []byte) error { break } } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) diff --git a/x/group/tx.pb.go b/x/group/tx.pb.go index 1a523d39f07a..2e42af8438a3 100644 --- a/x/group/tx.pb.go +++ b/x/group/tx.pb.go @@ -1379,76 +1379,79 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1beta1/tx.proto", fileDescriptor_da0de9d603d844fb) } var fileDescriptor_da0de9d603d844fb = []byte{ - // 1089 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0xc4, 0x6e, 0x7e, 0xbc, 0x14, 0x37, 0xd9, 0x86, 0xe2, 0x2c, 0x89, 0x63, 0x4c, 0x00, - 0x63, 0x92, 0xdd, 0xc6, 0x01, 0x51, 0x59, 0x15, 0x22, 0x49, 0x0d, 0xb2, 0x84, 0x21, 0x6c, 0x28, - 0xbf, 0x2e, 0xd6, 0xda, 0x3b, 0x6c, 0xb7, 0xc4, 0x9e, 0x95, 0x67, 0x9d, 0xc4, 0xd7, 0x9e, 0x90, - 0x7a, 0xe1, 0x1f, 0x40, 0x42, 0x42, 0xe2, 0xc0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 0x07, 0xf0, 0x22, 0x74, 0xc8, 0x01, 0x8c, 0x9a, - 0x40, 0xd2, 0x07, 0x90, 0x62, 0xd3, 0x67, 0x35, 0xd2, 0xd4, 0xdd, 0x96, 0x5f, 0x19, 0xba, 0xdd, - 0xef, 0x8d, 0xdd, 0xa7, 0xd1, 0xde, 0xdc, 0xed, 0x21, 0xde, 0xfa, 0x6f, 0xe7, 0xdd, 0x77, 0x1e, - 0x9f, 0x66, 0xd1, 0x93, 0xd3, 0x2c, 0x7a, 0x7a, 0x9a, 0x45, 0xdf, 0x9e, 0x65, 0x13, 0x4f, 0xce, - 0xb2, 0x89, 0x3f, 0xce, 0xb2, 0x89, 0x2f, 0xd7, 0x4d, 0xcb, 0xb9, 0xd7, 0x6d, 0x28, 0x4d, 0xd2, - 0xf2, 0x7e, 0xab, 0xf0, 0xfe, 0x6c, 0x52, 0xe3, 0x6b, 0xf5, 0x84, 0xff, 0x1e, 0xd1, 0x98, 0x66, - 0x4f, 0x90, 0xed, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0xe8, 0x9f, 0x5f, 0xcd, 0x27, 0x11, 0x00, - 0x00, + // 1146 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xd4, 0x6e, 0x3e, 0x9e, 0x5b, 0x37, 0xd9, 0x84, 0xd6, 0x59, 0x12, 0xc7, 0x6c, 0x03, + 0x84, 0x34, 0xd9, 0x6d, 0x1c, 0x10, 0x95, 0x55, 0x01, 0x49, 0x1a, 0x50, 0xa4, 0x1a, 0xc2, 0x86, + 0xf2, 0x75, 0xc0, 0x5a, 0x7b, 0x87, 0xed, 0x96, 0xd8, 0xbb, 0xf2, 0xac, 0x9d, 0xf8, 0x86, 0x7a, + 0x42, 0xea, 0x85, 0x7f, 0x00, 0x09, 0x09, 0x89, 0x03, 0x27, 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, + 0x74, 0x61, 0x51, 0x0e, 0x8b, 0x58, 0x2e, 0x51, 0xd0, 0x4e, 0xea, 0xc9, 0x5f, 0xcb, 0x09, 0xd5, + 0x57, 0x11, 0x44, 0x98, 0xaa, 0x61, 0x47, 0xd3, 0x35, 0x47, 0xcb, 0x26, 0xf3, 0x68, 0xf5, 0x92, + 0xca, 0xbf, 0x8b, 0xf0, 0xf0, 0xef, 0x9f, 0xd7, 0x98, 0x17, 0x69, 0x0b, 0xae, 0x06, 0x79, 0xaa, + 0x98, 0xd8, 0x56, 0x9d, 0x60, 0x61, 0x01, 0xa6, 0xa8, 0xa3, 0xb2, 0xa9, 0x53, 0xca, 0x29, 0x75, + 0x92, 0x7e, 0xef, 0xeb, 0xd2, 0x2f, 0x08, 0x5e, 0x28, 0x11, 0xe3, 0x9e, 0xad, 0xfb, 0x5a, 0x25, + 0xcf, 0xed, 0xa8, 0x41, 0x76, 0x3b, 0xb9, 0x10, 0x70, 0x22, 0xec, 0x43, 0x86, 0x05, 0x53, 0x6e, + 0x52, 0x3f, 0x24, 0x9b, 0x8c, 0x9d, 0x86, 0xcb, 0x4c, 0x93, 0x11, 0x24, 0x81, 0x80, 0x97, 0x61, + 0x29, 0x94, 0xba, 0x1f, 0xb7, 0xf4, 0x03, 0x82, 0xb9, 0x20, 0x62, 0x9b, 0x52, 0x3d, 0xc7, 0xd0, + 0xde, 0x80, 0xe9, 0x3a, 0x3e, 0x2e, 0x33, 0x73, 0xc9, 0x21, 0xe6, 0xa6, 0xea, 0xf8, 0x98, 0x32, + 0x08, 0x84, 0xb1, 0x04, 0x2f, 0x86, 0x90, 0xe4, 0x41, 0x3c, 0x42, 0xb4, 0xae, 0x81, 0x30, 0x59, + 0xf5, 0xcf, 0x33, 0x8e, 0xb8, 0x4d, 0x96, 0x87, 0x5c, 0x38, 0x19, 0xce, 0xf7, 0x19, 0x82, 0xf9, + 0x60, 0x1f, 0x1e, 0x58, 0x47, 0x66, 0xb5, 0xfd, 0x9c, 0x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, 0x9d, 0x71, 0x35, 0x39, 0xbf, 0x47, 0x08, + 0x16, 0xa2, 0xd7, 0x88, 0x42, 0x7c, 0xfb, 0xbc, 0x43, 0x8a, 0xa3, 0xeb, 0x70, 0x36, 0x0f, 0x20, + 0xd3, 0x33, 0xfe, 0x5f, 0x8d, 0xb4, 0x16, 0x04, 0x8a, 0x4a, 0x4c, 0x60, 0xf7, 0x05, 0xec, 0x9b, + 0x99, 0xd1, 0x17, 0xb0, 0x17, 0x3a, 0xe0, 0x02, 0x46, 0x4d, 0x47, 0xe1, 0x2e, 0xa4, 0xe8, 0x64, + 0x5c, 0x8a, 0x54, 0x75, 0xc5, 0xe2, 0xcb, 0x03, 0xc5, 0xdd, 0xd6, 0xe8, 0x7b, 0x1a, 0x6d, 0xcd, + 0x15, 0x0f, 0xb0, 0xd6, 0x3d, 0x39, 0x84, 0x2f, 0x00, 0xba, 0xa6, 0xc6, 0xf5, 0x48, 0xa5, 0x0e, + 0x48, 0xbc, 0x11, 0x03, 0xe4, 0xdb, 0xdf, 0x79, 0xeb, 0xc9, 0x69, 0x0e, 0x3d, 0x3d, 0xcd, 0xa1, + 0x67, 0xa7, 0x39, 0xf4, 0xed, 0x59, 0x2e, 0xf1, 0xf4, 0x2c, 0x97, 0xf8, 0xf3, 0x2c, 0x97, 0xf8, + 0x7c, 0xc5, 0x30, 0x9d, 0xfb, 0xcd, 0x8a, 0x5c, 0xb5, 0x6a, 0xde, 0xef, 0x34, 0xde, 0x9f, 0x0d, + 0xa2, 0x7f, 0xa5, 0x9c, 0xb0, 0xdf, 0x62, 0x2a, 0x13, 0x74, 0xfd, 0xda, 0xfa, 0x3f, 0x00, 0x00, + 0xff, 0xff, 0x4d, 0x56, 0x73, 0x25, 0x23, 0x12, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/group/types.pb.go b/x/group/types.pb.go index 5151d457e1a5..c7c2780863e3 100644 --- a/x/group/types.pb.go +++ b/x/group/types.pb.go @@ -649,7 +649,7 @@ type Proposal struct { // has ended. FinalTallyResult TallyResult `protobuf:"bytes,10,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result"` // timeout is the timestamp before which both voting and execution must be - // done. If this timestamp is passed, then the proposal can not be executed + // done. If this timestamp is passed, then the proposal cannot be executed // anymore and should be considered pending delete. This timestamp is checked // against the block header's timestamp. Timeout time.Time `protobuf:"bytes,11,opt,name=timeout,proto3,stdtime" json:"timeout"` From c04f98c4f71111f7078dc005ed5e93f0c58edd1e Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Tue, 15 Feb 2022 21:25:22 +0530 Subject: [PATCH 15/32] chore: review changes --- x/group/codec.go | 1 + x/group/keeper/keeper_test.go | 49 +++++++++++++++++++++++++++++++- x/group/keeper/msg_server.go | 29 ++++++++++--------- x/group/simulation/operations.go | 4 +-- 4 files changed, 66 insertions(+), 17 deletions(-) diff --git a/x/group/codec.go b/x/group/codec.go index d5b4146e1f45..70e3efc5df11 100644 --- a/x/group/codec.go +++ b/x/group/codec.go @@ -43,6 +43,7 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { &MsgWithdrawProposal{}, &MsgVote{}, &MsgExec{}, + &MsgLeaveGroup{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/group/keeper/keeper_test.go b/x/group/keeper/keeper_test.go index d027c118757e..dd654bdb5352 100644 --- a/x/group/keeper/keeper_test.go +++ b/x/group/keeper/keeper_test.go @@ -2208,13 +2208,14 @@ func (s *TestSuite) TestExecProposal() { } func (s *TestSuite) TestLeaveGroup() { - addrs := simapp.AddTestAddrsIncremental(s.app, s.sdkCtx, 6, sdk.NewInt(3000000)) + addrs := simapp.AddTestAddrsIncremental(s.app, s.sdkCtx, 7, sdk.NewInt(3000000)) admin := addrs[0] member1 := addrs[1] member2 := addrs[2] member3 := addrs[3] member4 := addrs[4] admin2 := addrs[5] + admin3 := addrs[6] require := s.Require() res, err := s.keeper.CreateGroup(s.ctx, &group.MsgCreateGroup{ @@ -2257,6 +2258,26 @@ func (s *TestSuite) TestLeaveGroup() { require.NoError(err) require.NotNil(res1) + res2, err := s.keeper.CreateGroup(s.ctx, &group.MsgCreateGroup{ + Admin: admin3.String(), + Members: []group.Member{ + { + Address: member1.String(), + Weight: "1", + Metadata: []byte("metadata"), + AddedAt: s.sdkCtx.BlockTime(), + }, + { + Address: member2.String(), + Weight: "2", + Metadata: []byte("metadata"), + AddedAt: s.sdkCtx.BlockTime(), + }, + }, + }) + require.NoError(err) + require.NotNil(res2) + groupPolicy := &group.MsgCreateGroupPolicy{ Admin: admin.String(), GroupId: res.GroupId, @@ -2273,6 +2294,22 @@ func (s *TestSuite) TestLeaveGroup() { require.NoError(err) require.NotNil(policyRes) + groupPolicy = &group.MsgCreateGroupPolicy{ + Admin: admin3.String(), + GroupId: res2.GroupId, + Metadata: []byte("metadata"), + } + pPolicy := &group.PercentageDecisionPolicy{ + Percentage: "0.5", + Timeout: time.Hour, + } + require.NoError(groupPolicy.SetDecisionPolicy(pPolicy)) + require.NoError(err) + + policyRes1, err := s.keeper.CreateGroupPolicy(s.ctx, groupPolicy) + require.NoError(err) + require.NotNil(policyRes1) + groupId := res.GroupId testCases := []struct { name string @@ -2331,6 +2368,16 @@ func (s *TestSuite) TestLeaveGroup() { "cannot leave group", 0, }, + { + "valid request: can leave group (percentage decision policy)", + &group.MsgLeaveGroup{ + GroupId: res2.GroupId, + MemberAddress: member2.String(), + }, + false, + "", + 1, + }, } for _, tc := range testCases { diff --git a/x/group/keeper/msg_server.go b/x/group/keeper/msg_server.go index af2f4eaaa816..fef230b4af8e 100644 --- a/x/group/keeper/msg_server.go +++ b/x/group/keeper/msg_server.go @@ -808,20 +808,21 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr return nil, err } - policy := groupPolicy.GetDecisionPolicy() - tdp, ok := policy.(*group.ThresholdDecisionPolicy) - // TODO: handle percentage decision policy - if !ok { - return nil, sdkerrors.ErrInvalidRequest.Wrapf("expected %T, got %T", (*group.ThresholdDecisionPolicy)(nil), policy) - } - - threshold, err := math.NewNonNegativeDecFromString(tdp.Threshold) - if err != nil { - return nil, err - } + policyI := groupPolicy.GetDecisionPolicy() + switch policy := policyI.(type) { + case *group.ThresholdDecisionPolicy: + threshold, err := math.NewNonNegativeDecFromString(policy.Threshold) + if err != nil { + return nil, err + } - if threshold.Cmp(updatedWeight) == 1 { - return nil, sdkerrors.ErrInvalidRequest.Wrap("cannot leave group. Leaving the group will break group policy.") + if threshold.Cmp(updatedWeight) == 1 { + return nil, sdkerrors.ErrInvalidRequest.Wrap("cannot leave group. Leaving the group will break group policy.") + } + case *group.PercentageDecisionPolicy: + continue + default: + return nil, sdkerrors.ErrInvalidRequest.Wrapf("expected %T, got %T", (*group.ThresholdDecisionPolicy)(nil), policy) } } @@ -833,7 +834,7 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr // update group weight and increment group version groupInfo.TotalWeight = updatedWeight.String() groupInfo.Version++ - if err := k.groupTable.Update(ctx.KVStore(k.key), groupInfo.GroupId, &groupInfo); err != nil { + if err := k.groupTable.Update(ctx.KVStore(k.key), groupInfo.Id, &groupInfo); err != nil { return nil, err } diff --git a/x/group/simulation/operations.go b/x/group/simulation/operations.go index 95f478f16742..14188be23ef9 100644 --- a/x/group/simulation/operations.go +++ b/x/group/simulation/operations.go @@ -1037,7 +1037,7 @@ func SimulateMsgLeaveGroup(k keeper.Keeper, ak group.AccountKeeper, bk group.Ban } // Pick a random member from the group - acc, account, err := randomMember(r, k, ak, ctx, accounts, groupInfo.GroupId) + acc, account, err := randomMember(r, k, ak, ctx, accounts, groupInfo.Id) if err != nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, ""), nil, err } @@ -1058,7 +1058,7 @@ func SimulateMsgLeaveGroup(k keeper.Keeper, ak group.AccountKeeper, bk group.Ban msg := &group.MsgLeaveGroup{ MemberAddress: member.Address.String(), - GroupId: groupInfo.GroupId, + GroupId: groupInfo.Id, } txGen := simappparams.MakeTestEncodingConfig().TxConfig From 61f5fd5445633a6833f361f44916de093ee93ca5 Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Wed, 23 Feb 2022 15:24:54 +0530 Subject: [PATCH 16/32] make proto-gen --- api/cosmos/group/v1beta1/tx.pulsar.go | 295 +++++++++++++----------- api/cosmos/tx/v1beta1/service.pulsar.go | 4 + types/tx/service.pb.go | 4 + x/group/tx.pb.go | 160 ++++++------- 4 files changed, 247 insertions(+), 216 deletions(-) diff --git a/api/cosmos/group/v1beta1/tx.pulsar.go b/api/cosmos/group/v1beta1/tx.pulsar.go index e39da40335a0..be16fc65887a 100644 --- a/api/cosmos/group/v1beta1/tx.pulsar.go +++ b/api/cosmos/group/v1beta1/tx.pulsar.go @@ -12693,7 +12693,7 @@ func (x *MsgLeaveGroup) ProtoReflect() protoreflect.Message { } func (x *MsgLeaveGroup) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[24] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13157,7 +13157,7 @@ func (x *MsgLeaveGroupResponse) ProtoReflect() protoreflect.Message { } func (x *MsgLeaveGroupResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[25] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14750,7 +14750,7 @@ type MsgLeaveGroup struct { func (x *MsgLeaveGroup) Reset() { *x = MsgLeaveGroup{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[24] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14764,7 +14764,7 @@ func (*MsgLeaveGroup) ProtoMessage() {} // Deprecated: Use MsgLeaveGroup.ProtoReflect.Descriptor instead. func (*MsgLeaveGroup) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{24} + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{26} } func (x *MsgLeaveGroup) GetMemberAddress() string { @@ -14791,7 +14791,7 @@ type MsgLeaveGroupResponse struct { func (x *MsgLeaveGroupResponse) Reset() { *x = MsgLeaveGroupResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[25] + mi := &file_cosmos_group_v1beta1_tx_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14805,7 +14805,7 @@ func (*MsgLeaveGroupResponse) ProtoMessage() {} // Deprecated: Use MsgLeaveGroupResponse.ProtoReflect.Descriptor instead. func (*MsgLeaveGroupResponse) Descriptor() ([]byte, []int) { - return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{25} + return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{27} } var File_cosmos_group_v1beta1_tx_proto protoreflect.FileDescriptor @@ -15022,120 +15022,135 @@ var file_cosmos_group_v1beta1_tx_proto_rawDesc = []byte{ 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 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, 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, 0xf0, 0x0b, 0x0a, 0x03, - 0x4d, 0x73, 0x67, 0x12, 0x61, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x80, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x12, 0x3f, 0x0a, 0x0e, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 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, 0x0d, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x41, 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, 0x13, 0x82, + 0xe7, 0xb0, 0x2a, 0x0e, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 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, 0xd0, 0x0c, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, + 0x61, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x24, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x76, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x76, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2b, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x70, - 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, - 0x69, 0x6e, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x31, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 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, 0x79, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x70, 0x0a, 0x10, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x29, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x79, 0x0a, 0x13, 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, 0x73, 0x0a, 0x11, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x32, 0x2e, 0x63, + 0x61, 0x74, 0x61, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x73, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x7f, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, - 0x69, 0x74, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x36, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x7f, 0x0a, 0x15, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, 0x69, 0x74, 0x68, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x36, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x82, 0x01, + 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, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x82, 0x01, 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, 0x2f, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 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, 0x37, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 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, 0x9d, 0x01, 0x0a, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, + 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, 0x9d, 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, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x40, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 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, 0x40, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x8b, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x8b, 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, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, + 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x6a, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x6a, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 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, 0x70, 0x0a, 0x10, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x31, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 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, 0x4c, + 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, - 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x70, 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, - 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x4c, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4c, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, + 0x45, 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, + 0x78, 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, + 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0a, 0x4c, 0x65, + 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xd9, - 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, - 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, - 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2b, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xd9, 0x01, 0x0a, 0x18, 0x63, + 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x42, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x14, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -15151,7 +15166,7 @@ func file_cosmos_group_v1beta1_tx_proto_rawDescGZIP() []byte { } var file_cosmos_group_v1beta1_tx_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_cosmos_group_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 26) +var file_cosmos_group_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 28) var file_cosmos_group_v1beta1_tx_proto_goTypes = []interface{}{ (Exec)(0), // 0: cosmos.group.v1beta1.Exec (*MsgCreateGroup)(nil), // 1: cosmos.group.v1beta1.MsgCreateGroup @@ -15180,20 +15195,22 @@ var file_cosmos_group_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgVoteResponse)(nil), // 24: cosmos.group.v1beta1.MsgVoteResponse (*MsgExec)(nil), // 25: cosmos.group.v1beta1.MsgExec (*MsgExecResponse)(nil), // 26: cosmos.group.v1beta1.MsgExecResponse - (*Member)(nil), // 27: cosmos.group.v1beta1.Member - (*anypb.Any)(nil), // 28: google.protobuf.Any - (VoteOption)(0), // 29: cosmos.group.v1beta1.VoteOption + (*MsgLeaveGroup)(nil), // 27: cosmos.group.v1beta1.MsgLeaveGroup + (*MsgLeaveGroupResponse)(nil), // 28: cosmos.group.v1beta1.MsgLeaveGroupResponse + (*Member)(nil), // 29: cosmos.group.v1beta1.Member + (*anypb.Any)(nil), // 30: google.protobuf.Any + (VoteOption)(0), // 31: cosmos.group.v1beta1.VoteOption } var file_cosmos_group_v1beta1_tx_proto_depIdxs = []int32{ - 27, // 0: cosmos.group.v1beta1.MsgCreateGroup.members:type_name -> cosmos.group.v1beta1.Member - 27, // 1: cosmos.group.v1beta1.MsgUpdateGroupMembers.member_updates:type_name -> cosmos.group.v1beta1.Member - 28, // 2: cosmos.group.v1beta1.MsgCreateGroupPolicy.decision_policy:type_name -> google.protobuf.Any - 27, // 3: cosmos.group.v1beta1.MsgCreateGroupWithPolicy.members:type_name -> cosmos.group.v1beta1.Member - 28, // 4: cosmos.group.v1beta1.MsgCreateGroupWithPolicy.decision_policy:type_name -> google.protobuf.Any - 28, // 5: cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicy.decision_policy:type_name -> google.protobuf.Any - 28, // 6: cosmos.group.v1beta1.MsgSubmitProposal.messages:type_name -> google.protobuf.Any + 29, // 0: cosmos.group.v1beta1.MsgCreateGroup.members:type_name -> cosmos.group.v1beta1.Member + 29, // 1: cosmos.group.v1beta1.MsgUpdateGroupMembers.member_updates:type_name -> cosmos.group.v1beta1.Member + 30, // 2: cosmos.group.v1beta1.MsgCreateGroupPolicy.decision_policy:type_name -> google.protobuf.Any + 29, // 3: cosmos.group.v1beta1.MsgCreateGroupWithPolicy.members:type_name -> cosmos.group.v1beta1.Member + 30, // 4: cosmos.group.v1beta1.MsgCreateGroupWithPolicy.decision_policy:type_name -> google.protobuf.Any + 30, // 5: cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicy.decision_policy:type_name -> google.protobuf.Any + 30, // 6: cosmos.group.v1beta1.MsgSubmitProposal.messages:type_name -> google.protobuf.Any 0, // 7: cosmos.group.v1beta1.MsgSubmitProposal.exec:type_name -> cosmos.group.v1beta1.Exec - 29, // 8: cosmos.group.v1beta1.MsgVote.option:type_name -> cosmos.group.v1beta1.VoteOption + 31, // 8: cosmos.group.v1beta1.MsgVote.option:type_name -> cosmos.group.v1beta1.VoteOption 0, // 9: cosmos.group.v1beta1.MsgVote.exec:type_name -> cosmos.group.v1beta1.Exec 1, // 10: cosmos.group.v1beta1.Msg.CreateGroup:input_type -> cosmos.group.v1beta1.MsgCreateGroup 3, // 11: cosmos.group.v1beta1.Msg.UpdateGroupMembers:input_type -> cosmos.group.v1beta1.MsgUpdateGroupMembers @@ -15208,21 +15225,23 @@ var file_cosmos_group_v1beta1_tx_proto_depIdxs = []int32{ 21, // 20: cosmos.group.v1beta1.Msg.WithdrawProposal:input_type -> cosmos.group.v1beta1.MsgWithdrawProposal 23, // 21: cosmos.group.v1beta1.Msg.Vote:input_type -> cosmos.group.v1beta1.MsgVote 25, // 22: cosmos.group.v1beta1.Msg.Exec:input_type -> cosmos.group.v1beta1.MsgExec - 2, // 23: cosmos.group.v1beta1.Msg.CreateGroup:output_type -> cosmos.group.v1beta1.MsgCreateGroupResponse - 4, // 24: cosmos.group.v1beta1.Msg.UpdateGroupMembers:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMembersResponse - 6, // 25: cosmos.group.v1beta1.Msg.UpdateGroupAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupAdminResponse - 8, // 26: cosmos.group.v1beta1.Msg.UpdateGroupMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMetadataResponse - 10, // 27: cosmos.group.v1beta1.Msg.CreateGroupPolicy:output_type -> cosmos.group.v1beta1.MsgCreateGroupPolicyResponse - 13, // 28: cosmos.group.v1beta1.Msg.CreateGroupWithPolicy:output_type -> cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse - 14, // 29: cosmos.group.v1beta1.Msg.UpdateGroupPolicyAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyAdminResponse - 16, // 30: cosmos.group.v1beta1.Msg.UpdateGroupPolicyDecisionPolicy:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicyResponse - 18, // 31: cosmos.group.v1beta1.Msg.UpdateGroupPolicyMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadataResponse - 20, // 32: cosmos.group.v1beta1.Msg.SubmitProposal:output_type -> cosmos.group.v1beta1.MsgSubmitProposalResponse - 22, // 33: cosmos.group.v1beta1.Msg.WithdrawProposal:output_type -> cosmos.group.v1beta1.MsgWithdrawProposalResponse - 24, // 34: cosmos.group.v1beta1.Msg.Vote:output_type -> cosmos.group.v1beta1.MsgVoteResponse - 26, // 35: cosmos.group.v1beta1.Msg.Exec:output_type -> cosmos.group.v1beta1.MsgExecResponse - 23, // [23:36] is the sub-list for method output_type - 10, // [10:23] is the sub-list for method input_type + 27, // 23: cosmos.group.v1beta1.Msg.LeaveGroup:input_type -> cosmos.group.v1beta1.MsgLeaveGroup + 2, // 24: cosmos.group.v1beta1.Msg.CreateGroup:output_type -> cosmos.group.v1beta1.MsgCreateGroupResponse + 4, // 25: cosmos.group.v1beta1.Msg.UpdateGroupMembers:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMembersResponse + 6, // 26: cosmos.group.v1beta1.Msg.UpdateGroupAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupAdminResponse + 8, // 27: cosmos.group.v1beta1.Msg.UpdateGroupMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupMetadataResponse + 10, // 28: cosmos.group.v1beta1.Msg.CreateGroupPolicy:output_type -> cosmos.group.v1beta1.MsgCreateGroupPolicyResponse + 13, // 29: cosmos.group.v1beta1.Msg.CreateGroupWithPolicy:output_type -> cosmos.group.v1beta1.MsgCreateGroupWithPolicyResponse + 14, // 30: cosmos.group.v1beta1.Msg.UpdateGroupPolicyAdmin:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyAdminResponse + 16, // 31: cosmos.group.v1beta1.Msg.UpdateGroupPolicyDecisionPolicy:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicyResponse + 18, // 32: cosmos.group.v1beta1.Msg.UpdateGroupPolicyMetadata:output_type -> cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadataResponse + 20, // 33: cosmos.group.v1beta1.Msg.SubmitProposal:output_type -> cosmos.group.v1beta1.MsgSubmitProposalResponse + 22, // 34: cosmos.group.v1beta1.Msg.WithdrawProposal:output_type -> cosmos.group.v1beta1.MsgWithdrawProposalResponse + 24, // 35: cosmos.group.v1beta1.Msg.Vote:output_type -> cosmos.group.v1beta1.MsgVoteResponse + 26, // 36: cosmos.group.v1beta1.Msg.Exec:output_type -> cosmos.group.v1beta1.MsgExecResponse + 28, // 37: cosmos.group.v1beta1.Msg.LeaveGroup:output_type -> cosmos.group.v1beta1.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 @@ -15547,7 +15566,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { return nil } } - file_cosmos_group_v1beta1_tx_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_cosmos_group_v1beta1_tx_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgLeaveGroup); i { case 0: return &v.state @@ -15559,7 +15578,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { return nil } } - file_cosmos_group_v1beta1_tx_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_cosmos_group_v1beta1_tx_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgLeaveGroupResponse); i { case 0: return &v.state @@ -15578,7 +15597,7 @@ func file_cosmos_group_v1beta1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_group_v1beta1_tx_proto_rawDesc, NumEnums: 1, - NumMessages: 26, + NumMessages: 28, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/tx/v1beta1/service.pulsar.go b/api/cosmos/tx/v1beta1/service.pulsar.go index 8540bf41c75f..ec4afdbe92bd 100644 --- a/api/cosmos/tx/v1beta1/service.pulsar.go +++ b/api/cosmos/tx/v1beta1/service.pulsar.go @@ -5909,6 +5909,8 @@ func (x *GetTxResponse) GetTxResponse() *v1beta11.TxResponse { // GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs // RPC method. +// +// Since: cosmos-sdk 0.45.2 type GetBlockWithTxsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -5955,6 +5957,8 @@ func (x *GetBlockWithTxsRequest) GetPagination() *v1beta1.PageRequest { } // GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. +// +// Since: cosmos-sdk 0.45.2 type GetBlockWithTxsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/types/tx/service.pb.go b/types/tx/service.pb.go index b33e2a7a2f87..ee8ee8ac5608 100644 --- a/types/tx/service.pb.go +++ b/types/tx/service.pb.go @@ -553,6 +553,8 @@ func (m *GetTxResponse) GetTxResponse() *types.TxResponse { // GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs // RPC method. +// +// Since: cosmos-sdk 0.45.2 type GetBlockWithTxsRequest struct { // height is the height of the block to query. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` @@ -608,6 +610,8 @@ func (m *GetBlockWithTxsRequest) GetPagination() *query.PageRequest { } // GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. +// +// Since: cosmos-sdk 0.45.2 type GetBlockWithTxsResponse struct { // txs are the transactions in the block. Txs []*Tx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` diff --git a/x/group/tx.pb.go b/x/group/tx.pb.go index 27283773e64b..728037fcae43 100644 --- a/x/group/tx.pb.go +++ b/x/group/tx.pb.go @@ -1370,7 +1370,7 @@ func (m *MsgLeaveGroup) Reset() { *m = MsgLeaveGroup{} } func (m *MsgLeaveGroup) String() string { return proto.CompactTextString(m) } func (*MsgLeaveGroup) ProtoMessage() {} func (*MsgLeaveGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_da0de9d603d844fb, []int{24} + return fileDescriptor_da0de9d603d844fb, []int{26} } func (m *MsgLeaveGroup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1421,7 +1421,7 @@ func (m *MsgLeaveGroupResponse) Reset() { *m = MsgLeaveGroupResponse{} } func (m *MsgLeaveGroupResponse) String() string { return proto.CompactTextString(m) } func (*MsgLeaveGroupResponse) ProtoMessage() {} func (*MsgLeaveGroupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_da0de9d603d844fb, []int{25} + return fileDescriptor_da0de9d603d844fb, []int{27} } func (m *MsgLeaveGroupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1485,82 +1485,86 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1beta1/tx.proto", fileDescriptor_da0de9d603d844fb) } var fileDescriptor_da0de9d603d844fb = []byte{ - // 1199 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x6f, 0xe3, 0x44, - 0x14, 0xcf, 0x34, 0xde, 0x7e, 0xbc, 0xec, 0x66, 0xbb, 0x6e, 0xba, 0xa4, 0xa6, 0x4d, 0x83, 0xe9, - 0x42, 0x29, 0xad, 0xbd, 0x4d, 0xf9, 0x58, 0x55, 0x2b, 0x44, 0xdb, 0x0d, 0x28, 0x88, 0x40, 0x71, - 0x59, 0xbe, 0x2e, 0x91, 0x13, 0x1b, 0xaf, 0x97, 0x26, 0xb6, 0x32, 0x4e, 0xdb, 0x9c, 0x90, 0xf6, - 0x04, 0xda, 0x0b, 0xff, 0x00, 0x12, 0x12, 0x12, 0x07, 0x4e, 0x1c, 0xf6, 0xc2, 0x95, 0xd3, 0x8a, - 0xd3, 0x8a, 0x13, 0x27, 0xb4, 0x6a, 0x0f, 0x1c, 0x40, 0x82, 0x1b, 0x57, 0xe4, 0x19, 0x7b, 0x12, - 0x27, 0x76, 0xe2, 0x64, 0xab, 0x3d, 0x25, 0xf6, 0xfc, 0xde, 0x7b, 0xbf, 0xdf, 0x7b, 0x6f, 0xde, - 0x4c, 0x02, 0x4b, 0x35, 0x0b, 0xd7, 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x88, 0xab, 0xb0, 0x1c, 0x27, 0x8d, 0x5d, 0x06, 0xc2, 0xeb, 0x23, 0x1a, 0x30, 0x12, - 0xdf, 0x22, 0x58, 0x1e, 0x76, 0x4f, 0xb9, 0x11, 0xdf, 0x79, 0xd0, 0x52, 0x78, 0x73, 0x5c, 0x4b, - 0xc6, 0xef, 0x3e, 0x82, 0x85, 0xe8, 0xbb, 0x42, 0x21, 0xbe, 0x7f, 0xd6, 0xa2, 0xdb, 0xa3, 0xdb, - 0x30, 0x36, 0x77, 0x21, 0xdd, 0x73, 0xc6, 0xbf, 0x18, 0xe9, 0x2d, 0x08, 0x14, 0xe4, 0x98, 0xc0, - 0xee, 0x09, 0xd0, 0x77, 0x30, 0x46, 0x4f, 0x80, 0x5e, 0xe8, 0x80, 0x09, 0x10, 0x75, 0x04, 0xf2, - 0xef, 0x02, 0x47, 0x8e, 0xbf, 0xa5, 0x48, 0x53, 0x77, 0x59, 0xb8, 0x36, 0x70, 0xb9, 0xdb, 0x1b, - 0x19, 0xe8, 0xd1, 0xde, 0xdc, 0xe5, 0x01, 0xde, 0xba, 0x8f, 0x87, 0xdd, 0x37, 0x1e, 0x9e, 0xe6, - 0xd0, 0xa3, 0xd3, 0x1c, 0x7a, 0x7c, 0x9a, 0x43, 0xdf, 0x9c, 0xe5, 0x12, 0x8f, 0xce, 0x72, 0x89, - 0xdf, 0xcf, 0x72, 0x89, 0xcf, 0x56, 0x0c, 0xd3, 0xb9, 0xd3, 0xaa, 0x4a, 0x35, 0xab, 0xee, 0xfd, - 0x55, 0xe6, 0x7d, 0x6c, 0x60, 0xed, 0x0b, 0xf9, 0x84, 0xfe, 0x1d, 0x56, 0x9d, 0x24, 0x77, 0xa0, - 0xad, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x4c, 0xbd, 0x11, 0x36, 0xa6, 0x13, 0x00, 0x00, + // 1256 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0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8c, 0x19, 0x81, 0x23, 0x54, + 0x84, 0x29, 0x0a, 0xa3, 0xad, 0xd2, 0x42, 0xa7, 0x08, 0x7a, 0xd2, 0x68, 0x55, 0x82, 0xeb, 0xac, + 0xb4, 0xe9, 0xa8, 0x98, 0x25, 0xed, 0x42, 0x1e, 0x2d, 0x0c, 0x2b, 0x82, 0x4f, 0x67, 0x0d, 0xd3, + 0xfa, 0x85, 0x34, 0xe5, 0xe0, 0x53, 0x36, 0x65, 0xca, 0x6d, 0x4a, 0xe9, 0x1b, 0x04, 0xf9, 0xa8, + 0x8c, 0xc7, 0x98, 0xff, 0xc2, 0x3b, 0x90, 0x09, 0xc6, 0x12, 0xb3, 0x6b, 0x02, 0x41, 0xb2, 0x16, + 0xbe, 0x0a, 0xcf, 0x47, 0x76, 0x30, 0x1f, 0x0f, 0x7f, 0x23, 0x90, 0xc2, 0x50, 0xc1, 0x68, 0x9f, + 0x49, 0xc3, 0x87, 0x14, 0x25, 0x79, 0xce, 0x93, 0x62, 0x09, 0x16, 0xbb, 0x07, 0xcb, 0x73, 0xf3, + 0x13, 0x22, 0x83, 0xe5, 0x0c, 0xbc, 0xef, 0x81, 0xdf, 0x4f, 0x56, 0xe2, 0xde, 0x04, 0x2f, 0xc0, + 0x7c, 0x27, 0xae, 0x3c, 0xa8, 0xff, 0x10, 0x4c, 0x94, 0xb1, 0xb1, 0xb3, 0x57, 0xad, 0x9b, 0xce, + 0x76, 0xd3, 0xb2, 0x2d, 0xac, 0xee, 0xf6, 0x33, 0x22, 0x85, 0x19, 0x18, 0xb1, 0x89, 0xbe, 0x37, + 0x12, 0x46, 0x94, 0xd6, 0x8b, 0x8e, 0x77, 0xc2, 0x0d, 0x57, 0x86, 0xb1, 0x6a, 0xe8, 0x38, 0x9b, + 0x22, 0xb3, 0x24, 0xb4, 0xc4, 0x0a, 0x47, 0x09, 0x32, 0xa4, 0xf4, 0x43, 0xbd, 0x46, 0x8e, 0x74, + 0xba, 0x28, 0x86, 0x4f, 0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, 0xf1, 0xed, 0xf3, 0x16, 0x2d, 0xf5, 0xae, 0xc3, 0xd9, 0xdc, 0x87, 0x74, 0xdb, 0xfe, + 0xf1, 0x62, 0xa4, 0xb5, 0x20, 0x50, 0x2c, 0xc4, 0x04, 0xfa, 0x27, 0xc0, 0x99, 0x4b, 0x3b, 0x7a, + 0x02, 0xb4, 0x43, 0x3b, 0x4c, 0x80, 0xa8, 0xeb, 0x59, 0xb8, 0x03, 0x29, 0x72, 0x35, 0xcf, 0x46, + 0xaa, 0xba, 0x62, 0xf1, 0x5a, 0x47, 0xb1, 0xdf, 0x1a, 0x19, 0xe8, 0xd1, 0xd6, 0x5c, 0x71, 0x07, + 0x6b, 0xfe, 0xab, 0x4b, 0xf8, 0x0c, 0xc0, 0x77, 0x6d, 0x5d, 0x8d, 0x54, 0x6a, 0x81, 0xc4, 0xeb, + 0x31, 0x40, 0x9e, 0xfd, 0xf5, 0xd7, 0x1f, 0x9f, 0xe4, 0xd0, 0xf1, 0x49, 0x0e, 0x3d, 0x39, 0xc9, + 0xa1, 0x6f, 0x4f, 0x73, 0x89, 0xe3, 0xd3, 0x5c, 0xe2, 0x8f, 0xd3, 0x5c, 0xe2, 0xd3, 0x79, 0xc3, + 0x74, 0xee, 0xed, 0x55, 0xe5, 0x9a, 0x55, 0x67, 0x3f, 0x13, 0xb2, 0x3f, 0xcb, 0x58, 0xfb, 0xa2, + 0x70, 0x48, 0x7f, 0x0a, 0xac, 0x0e, 0x92, 0xfd, 0x6f, 0xf5, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xe4, 0x62, 0xf7, 0x57, 0xa2, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From a635fd78663d04c5de23f4d032e5a3abea1b005a Mon Sep 17 00:00:00 2001 From: MD Aleem <72057206+aleem1314@users.noreply.github.com> Date: Wed, 23 Feb 2022 15:26:07 +0530 Subject: [PATCH 17/32] Update x/group/client/testutil/tx.go Co-authored-by: Marie Gauthier --- x/group/client/testutil/tx.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/group/client/testutil/tx.go b/x/group/client/testutil/tx.go index ce65014526cc..ad30e9188205 100644 --- a/x/group/client/testutil/tx.go +++ b/x/group/client/testutil/tx.go @@ -2166,7 +2166,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { ) require.NoError(err, out.String()) - // create decision policy + // create group policy out, err = cli.ExecTestCLICmd(clientCtx, client.MsgCreateGroupPolicyCmd(), append( []string{ From 8bacac768a286b6c2fc668e2448fb24d6454c10f Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Wed, 23 Feb 2022 16:26:55 +0530 Subject: [PATCH 18/32] review changes --- api/cosmos/group/v1beta1/tx.pulsar.go | 293 +++++++++++++------------- proto/cosmos/group/v1beta1/tx.proto | 4 +- x/group/client/cli/tx.go | 2 +- x/group/client/testutil/tx.go | 2 +- x/group/keeper/keeper_test.go | 26 +-- x/group/keeper/msg_server.go | 31 ++- x/group/msgs.go | 6 +- x/group/msgs_test.go | 6 +- x/group/simulation/operations.go | 41 ++-- x/group/simulation/operations_test.go | 2 +- x/group/spec/03_messages.md | 11 + x/group/tx.pb.go | 181 ++++++++-------- 12 files changed, 300 insertions(+), 305 deletions(-) diff --git a/api/cosmos/group/v1beta1/tx.pulsar.go b/api/cosmos/group/v1beta1/tx.pulsar.go index be16fc65887a..32e913c3263a 100644 --- a/api/cosmos/group/v1beta1/tx.pulsar.go +++ b/api/cosmos/group/v1beta1/tx.pulsar.go @@ -12672,15 +12672,15 @@ func (x *fastReflection_MsgExecResponse) ProtoMethods() *protoiface.Methods { } var ( - md_MsgLeaveGroup protoreflect.MessageDescriptor - fd_MsgLeaveGroup_member_address protoreflect.FieldDescriptor - fd_MsgLeaveGroup_group_id protoreflect.FieldDescriptor + md_MsgLeaveGroup protoreflect.MessageDescriptor + fd_MsgLeaveGroup_address protoreflect.FieldDescriptor + fd_MsgLeaveGroup_group_id protoreflect.FieldDescriptor ) func init() { file_cosmos_group_v1beta1_tx_proto_init() md_MsgLeaveGroup = File_cosmos_group_v1beta1_tx_proto.Messages().ByName("MsgLeaveGroup") - fd_MsgLeaveGroup_member_address = md_MsgLeaveGroup.Fields().ByName("member_address") + fd_MsgLeaveGroup_address = md_MsgLeaveGroup.Fields().ByName("address") fd_MsgLeaveGroup_group_id = md_MsgLeaveGroup.Fields().ByName("group_id") } @@ -12749,9 +12749,9 @@ func (x *fastReflection_MsgLeaveGroup) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgLeaveGroup) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.MemberAddress != "" { - value := protoreflect.ValueOfString(x.MemberAddress) - if !f(fd_MsgLeaveGroup_member_address, value) { + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_MsgLeaveGroup_address, value) { return } } @@ -12776,8 +12776,8 @@ func (x *fastReflection_MsgLeaveGroup) Range(f func(protoreflect.FieldDescriptor // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgLeaveGroup) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.group.v1beta1.MsgLeaveGroup.member_address": - return x.MemberAddress != "" + case "cosmos.group.v1beta1.MsgLeaveGroup.address": + return x.Address != "" case "cosmos.group.v1beta1.MsgLeaveGroup.group_id": return x.GroupId != uint64(0) default: @@ -12796,8 +12796,8 @@ func (x *fastReflection_MsgLeaveGroup) Has(fd protoreflect.FieldDescriptor) bool // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLeaveGroup) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.group.v1beta1.MsgLeaveGroup.member_address": - x.MemberAddress = "" + case "cosmos.group.v1beta1.MsgLeaveGroup.address": + x.Address = "" case "cosmos.group.v1beta1.MsgLeaveGroup.group_id": x.GroupId = uint64(0) default: @@ -12816,8 +12816,8 @@ func (x *fastReflection_MsgLeaveGroup) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgLeaveGroup) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.group.v1beta1.MsgLeaveGroup.member_address": - value := x.MemberAddress + case "cosmos.group.v1beta1.MsgLeaveGroup.address": + value := x.Address return protoreflect.ValueOfString(value) case "cosmos.group.v1beta1.MsgLeaveGroup.group_id": value := x.GroupId @@ -12842,8 +12842,8 @@ func (x *fastReflection_MsgLeaveGroup) Get(descriptor protoreflect.FieldDescript // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLeaveGroup) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.group.v1beta1.MsgLeaveGroup.member_address": - x.MemberAddress = value.Interface().(string) + case "cosmos.group.v1beta1.MsgLeaveGroup.address": + x.Address = value.Interface().(string) case "cosmos.group.v1beta1.MsgLeaveGroup.group_id": x.GroupId = value.Uint() default: @@ -12866,8 +12866,8 @@ func (x *fastReflection_MsgLeaveGroup) Set(fd protoreflect.FieldDescriptor, valu // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgLeaveGroup) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.group.v1beta1.MsgLeaveGroup.member_address": - panic(fmt.Errorf("field member_address of message cosmos.group.v1beta1.MsgLeaveGroup is not mutable")) + case "cosmos.group.v1beta1.MsgLeaveGroup.address": + panic(fmt.Errorf("field address of message cosmos.group.v1beta1.MsgLeaveGroup is not mutable")) case "cosmos.group.v1beta1.MsgLeaveGroup.group_id": panic(fmt.Errorf("field group_id of message cosmos.group.v1beta1.MsgLeaveGroup is not mutable")) default: @@ -12883,7 +12883,7 @@ func (x *fastReflection_MsgLeaveGroup) Mutable(fd protoreflect.FieldDescriptor) // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgLeaveGroup) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.group.v1beta1.MsgLeaveGroup.member_address": + case "cosmos.group.v1beta1.MsgLeaveGroup.address": return protoreflect.ValueOfString("") case "cosmos.group.v1beta1.MsgLeaveGroup.group_id": return protoreflect.ValueOfUint64(uint64(0)) @@ -12956,7 +12956,7 @@ func (x *fastReflection_MsgLeaveGroup) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.MemberAddress) + l = len(x.Address) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -12997,10 +12997,10 @@ func (x *fastReflection_MsgLeaveGroup) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x10 } - if len(x.MemberAddress) > 0 { - i -= len(x.MemberAddress) - copy(dAtA[i:], x.MemberAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MemberAddress))) + if len(x.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) i-- dAtA[i] = 0xa } @@ -13055,7 +13055,7 @@ func (x *fastReflection_MsgLeaveGroup) ProtoMethods() *protoiface.Methods { switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MemberAddress", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13083,7 +13083,7 @@ func (x *fastReflection_MsgLeaveGroup) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.MemberAddress = string(dAtA[iNdEx:postIndex]) + x.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { @@ -14741,8 +14741,8 @@ type MsgLeaveGroup struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // member_address is the account address of the group member. - MemberAddress string `protobuf:"bytes,1,opt,name=member_address,json=memberAddress,proto3" json:"member_address,omitempty"` + // address is the account address of the group member. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // group_id is the unique ID of the group. GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` } @@ -14767,9 +14767,9 @@ func (*MsgLeaveGroup) Descriptor() ([]byte, []int) { return file_cosmos_group_v1beta1_tx_proto_rawDescGZIP(), []int{26} } -func (x *MsgLeaveGroup) GetMemberAddress() string { +func (x *MsgLeaveGroup) GetAddress() string { if x != nil { - return x.MemberAddress + return x.Address } return "" } @@ -15023,134 +15023,133 @@ var file_cosmos_group_v1beta1_tx_proto_rawDesc = []byte{ 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 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, - 0x80, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x12, 0x3f, 0x0a, 0x0e, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 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, 0x0d, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x41, 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, 0x13, 0x82, - 0xe7, 0xb0, 0x2a, 0x0e, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 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, 0xd0, 0x0c, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, - 0x61, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x24, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x76, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x73, 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, + 0x13, 0x82, 0xe7, 0xb0, 0x2a, 0x0e, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 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, 0xd0, 0x0c, 0x0a, 0x03, 0x4d, 0x73, + 0x67, 0x12, 0x61, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x76, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x70, 0x0a, 0x10, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x31, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 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, 0x79, + 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x70, 0x0a, 0x10, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x29, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x79, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, + 0x61, 0x74, 0x61, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x73, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2a, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x7f, 0x0a, 0x15, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, 0x69, 0x74, 0x68, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x36, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x82, 0x01, - 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, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x11, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2a, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 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, 0x7f, + 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, 0x69, 0x74, + 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x36, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, + 0x82, 0x01, 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, 0x2f, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 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, 0x37, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 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, 0x9d, 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, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x9d, 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, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x1a, 0x40, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x8b, 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, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x40, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x8b, 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, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x6a, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, - 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 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, 0x70, 0x0a, 0x10, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x31, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 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, 0x4c, - 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x63, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x2f, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 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, 0x70, + 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x31, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 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, 0x4c, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, + 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, - 0x45, 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, - 0x78, 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, - 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0a, 0x4c, 0x65, - 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2b, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xd9, 0x01, 0x0a, 0x18, 0x63, - 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x42, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x14, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0a, + 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, + 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xd9, 0x01, 0x0a, + 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, + 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/cosmos/group/v1beta1/tx.proto b/proto/cosmos/group/v1beta1/tx.proto index f6b2c8e673f4..b40be0d605b4 100644 --- a/proto/cosmos/group/v1beta1/tx.proto +++ b/proto/cosmos/group/v1beta1/tx.proto @@ -353,8 +353,8 @@ message MsgExecResponse {} message MsgLeaveGroup { option (cosmos.msg.v1.signer) = "member_address"; - // member_address is the account address of the group member. - string member_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // address is the account address of the group member. + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // group_id is the unique ID of the group. uint64 group_id = 2; diff --git a/x/group/client/cli/tx.go b/x/group/client/cli/tx.go index ae34436682a7..a3d615bec821 100644 --- a/x/group/client/cli/tx.go +++ b/x/group/client/cli/tx.go @@ -846,7 +846,7 @@ Parameters: } msg := &group.MsgLeaveGroup{ - MemberAddress: clientCtx.GetFromAddress().String(), + Address: clientCtx.GetFromAddress().String(), GroupId: groupID, } if err = msg.ValidateBasic(); err != nil { diff --git a/x/group/client/testutil/tx.go b/x/group/client/testutil/tx.go index ce65014526cc..7dfe777e6149 100644 --- a/x/group/client/testutil/tx.go +++ b/x/group/client/testutil/tx.go @@ -2256,7 +2256,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { commonFlags..., ), true, - "Leaving the group will break group policy", + "should not be greater than the total group weight", }, } diff --git a/x/group/keeper/keeper_test.go b/x/group/keeper/keeper_test.go index b0b767d7fed7..afcf9e059001 100644 --- a/x/group/keeper/keeper_test.go +++ b/x/group/keeper/keeper_test.go @@ -2525,8 +2525,8 @@ func (s *TestSuite) TestLeaveGroup() { { "expect error: group not found", &group.MsgLeaveGroup{ - GroupId: 100000, - MemberAddress: member1.String(), + GroupId: 100000, + Address: member1.String(), }, true, "group: not found", @@ -2535,8 +2535,8 @@ func (s *TestSuite) TestLeaveGroup() { { "expect error: member not part of group", &group.MsgLeaveGroup{ - GroupId: groupId, - MemberAddress: member4.String(), + GroupId: groupId, + Address: member4.String(), }, true, "not part of group", @@ -2545,8 +2545,8 @@ func (s *TestSuite) TestLeaveGroup() { { "valid testcase: decision policy is not present", &group.MsgLeaveGroup{ - GroupId: res1.GroupId, - MemberAddress: member1.String(), + GroupId: res1.GroupId, + Address: member1.String(), }, false, "", @@ -2555,8 +2555,8 @@ func (s *TestSuite) TestLeaveGroup() { { "valid testcase", &group.MsgLeaveGroup{ - GroupId: groupId, - MemberAddress: member3.String(), + GroupId: groupId, + Address: member3.String(), }, false, "", @@ -2565,18 +2565,18 @@ func (s *TestSuite) TestLeaveGroup() { { "valid request: cannot leave group", &group.MsgLeaveGroup{ - GroupId: groupId, - MemberAddress: member2.String(), + GroupId: groupId, + Address: member2.String(), }, true, - "cannot leave group", + "should not be greater than the total group weight", 0, }, { "valid request: can leave group (percentage decision policy)", &group.MsgLeaveGroup{ - GroupId: res2.GroupId, - MemberAddress: member2.String(), + GroupId: res2.GroupId, + Address: member2.String(), }, false, "", diff --git a/x/group/keeper/msg_server.go b/x/group/keeper/msg_server.go index d9c8ad6a07e4..7563727d7198 100644 --- a/x/group/keeper/msg_server.go +++ b/x/group/keeper/msg_server.go @@ -813,7 +813,7 @@ func (k Keeper) Exec(goCtx context.Context, req *group.MsgExec) (*group.MsgExecR // LeaveGroup implements the MsgServer/LeaveGroup method. func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*group.MsgLeaveGroupResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - _, err := sdk.AccAddressFromBech32(req.MemberAddress) + _, err := sdk.AccAddressFromBech32(req.Address) if err != nil { return nil, err } @@ -830,7 +830,7 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr gm, err := k.getGroupMember(ctx, &group.GroupMember{ GroupId: req.GroupId, - Member: &group.Member{Address: req.MemberAddress}, + Member: &group.Member{Address: req.Address}, }) if err != nil { return nil, err @@ -852,8 +852,13 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr } defer iter.Close() + // update group weight and increment group version + groupInfo.TotalWeight = updatedWeight.String() + groupInfo.Version++ + var groupPolicy group.GroupPolicyInfo for { + ctx.GasMeter().ConsumeGas(gasCostPerIteration, "group policy") if _, err := iter.LoadNext(&groupPolicy); err != nil { if errors.ErrORMIteratorDone.Is(err) { break @@ -863,20 +868,12 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr } policyI := groupPolicy.GetDecisionPolicy() - switch policy := policyI.(type) { - case *group.ThresholdDecisionPolicy: - threshold, err := math.NewNonNegativeDecFromString(policy.Threshold) - if err != nil { - return nil, err - } + if policyI == nil { + return nil, sdkerrors.ErrInvalidRequest.Wrapf("expected %T, got %T", (group.DecisionPolicy)(nil), groupPolicy.DecisionPolicy.GetCachedValue()) + } - if threshold.Cmp(updatedWeight) == 1 { - return nil, sdkerrors.ErrInvalidRequest.Wrap("cannot leave group. Leaving the group will break group policy.") - } - case *group.PercentageDecisionPolicy: - continue - default: - return nil, sdkerrors.ErrInvalidRequest.Wrapf("expected %T, got %T", (*group.ThresholdDecisionPolicy)(nil), policy) + if err := policyI.Validate(groupInfo); err != nil { + return nil, err } } @@ -885,15 +882,13 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr return nil, sdkerrors.Wrap(err, "group member") } - // update group weight and increment group version - groupInfo.TotalWeight = updatedWeight.String() - groupInfo.Version++ if err := k.groupTable.Update(ctx.KVStore(k.key), groupInfo.Id, &groupInfo); err != nil { return nil, err } ctx.EventManager().EmitTypedEvent(&group.EventLeaveGroup{ GroupId: req.GroupId, + Address: req.Address, }) return &group.MsgLeaveGroupResponse{}, nil diff --git a/x/group/msgs.go b/x/group/msgs.go index bb80f5449eb8..134d578b9208 100644 --- a/x/group/msgs.go +++ b/x/group/msgs.go @@ -799,7 +799,7 @@ var _ sdk.Msg = &MsgLeaveGroup{} // Route Implements Msg func (m MsgLeaveGroup) Route() string { - return RouterKey + return sdk.MsgTypeURL(&m) } // Type Implements Msg @@ -812,7 +812,7 @@ func (m MsgLeaveGroup) GetSignBytes() []byte { // GetSigners returns the expected signers for a MsgLeaveGroup func (m MsgLeaveGroup) GetSigners() []sdk.AccAddress { - signer, err := sdk.AccAddressFromBech32(m.MemberAddress) + signer, err := sdk.AccAddressFromBech32(m.Address) if err != nil { panic(err) } @@ -821,7 +821,7 @@ func (m MsgLeaveGroup) GetSigners() []sdk.AccAddress { // ValidateBasic does a sanity check on the provided data func (m MsgLeaveGroup) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(m.MemberAddress) + _, err := sdk.AccAddressFromBech32(m.Address) if err != nil { return sdkerrors.Wrap(err, "group member") } diff --git a/x/group/msgs_test.go b/x/group/msgs_test.go index 15c8e2b43fb7..8eaafde22da8 100644 --- a/x/group/msgs_test.go +++ b/x/group/msgs_test.go @@ -1084,7 +1084,7 @@ func TestMsgLeaveGroup(t *testing.T) { { "invalid group member address", &group.MsgLeaveGroup{ - MemberAddress: "member", + Address: "member", }, true, "group member: decoding bech32 failed", @@ -1092,7 +1092,7 @@ func TestMsgLeaveGroup(t *testing.T) { { "group id is required", &group.MsgLeaveGroup{ - MemberAddress: admin.String(), + Address: admin.String(), }, true, "group-id: value is empty", @@ -1100,7 +1100,7 @@ func TestMsgLeaveGroup(t *testing.T) { { "valid testcase", &group.MsgLeaveGroup{ - MemberAddress: admin.String(), + Address: admin.String(), GroupId: 1, }, false, diff --git a/x/group/simulation/operations.go b/x/group/simulation/operations.go index 7fe0fe779006..eaa03d7a1882 100644 --- a/x/group/simulation/operations.go +++ b/x/group/simulation/operations.go @@ -109,6 +109,11 @@ func WeightedOperations( weightMsgCreateGroupPolicy = WeightMsgCreateGroupPolicy }, ) + appParams.GetOrGenerate(cdc, OpMsgLeaveGroup, &weightMsgLeaveGroup, nil, + func(_ *rand.Rand) { + weightMsgLeaveGroup = WeightMsgLeaveGroup + }, + ) appParams.GetOrGenerate(cdc, OpMsgCreateGroupWithPolicy, &weightMsgCreateGroupWithPolicy, nil, func(_ *rand.Rand) { weightMsgCreateGroupWithPolicy = WeightMsgCreateGroupWithPolicy @@ -159,11 +164,6 @@ func WeightedOperations( weightMsgUpdateGroupPolicyMetadata = WeightMsgUpdateGroupPolicyMetadata }, ) - appParams.GetOrGenerate(cdc, OpMsgLeaveGroup, &weightMsgLeaveGroup, nil, - func(_ *rand.Rand) { - weightMsgLeaveGroup = WeightMsgLeaveGroup - }, - ) appParams.GetOrGenerate(cdc, OpMsgWithdrawProposal, &weightMsgWithdrawProposal, nil, func(_ *rand.Rand) { weightMsgWithdrawProposal = WeightMsgWithdrawProposal @@ -188,6 +188,10 @@ func WeightedOperations( weightMsgCreateGroupPolicy, SimulateMsgCreateGroupPolicy(ak, bk, k), ), + simulation.NewWeightedOperation( + weightMsgLeaveGroup, + SimulateMsgLeaveGroup(k, ak, bk), + ), // simulation.NewWeightedOperation( // weightMsgCreateGroupWithPolicy, // SimulateMsgCreateGroupWithPolicy(ak, bk), @@ -231,10 +235,6 @@ func WeightedOperations( weightMsgUpdateGroupPolicyMetadata, SimulateMsgUpdateGroupPolicyMetadata(ak, bk, k), ), - simulation.NewWeightedOperation( - weightMsgLeaveGroup, - SimulateMsgLeaveGroup(k, ak, bk), - ), } return append(wPreCreateProposalOps, append(createProposalOps, wPostCreateProposalOps...)...) @@ -1123,10 +1123,6 @@ func SimulateMsgLeaveGroup(k keeper.Keeper, ak group.AccountKeeper, bk group.Ban return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, ""), nil, err } - if groupInfo == nil { - return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, ""), nil, nil - } - if policyInfo == nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, "no policy found"), nil, nil } @@ -1140,20 +1136,15 @@ func SimulateMsgLeaveGroup(k keeper.Keeper, ak group.AccountKeeper, bk group.Ban return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, "no group member found"), nil, nil } - member, exists := simtypes.FindAccount(accounts, acc.Address) - if !exists { - return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, "not a sim account"), nil, nil - } - - spendableCoins := bk.SpendableCoins(sdkCtx, member.Address) + spendableCoins := bk.SpendableCoins(sdkCtx, acc.Address) fees, err := simtypes.RandomFees(r, sdkCtx, spendableCoins) if err != nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, "fee error"), nil, err } msg := &group.MsgLeaveGroup{ - MemberAddress: member.Address.String(), - GroupId: groupInfo.Id, + Address: acc.Address.String(), + GroupId: groupInfo.Id, } txGen := simappparams.MakeTestEncodingConfig().TxConfig @@ -1165,7 +1156,7 @@ func SimulateMsgLeaveGroup(k keeper.Keeper, ak group.AccountKeeper, bk group.Ban chainID, []uint64{account.GetAccountNumber()}, []uint64{account.GetSequence()}, - member.PrivKey, + acc.PrivKey, ) if err != nil { return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, "unable to generate mock tx"), nil, err @@ -1177,7 +1168,7 @@ func SimulateMsgLeaveGroup(k keeper.Keeper, ak group.AccountKeeper, bk group.Ban return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, ""), nil, nil } - return simtypes.NoOpMsg(group.ModuleName, msg.Type(), "unable to deliver tx"), nil, err + return simtypes.NoOpMsg(group.ModuleName, msg.Type(), err.Error()), nil, err } return simtypes.NewOperationMsg(msg, true, "", nil), nil, err @@ -1300,7 +1291,7 @@ func genGroupMembers(r *rand.Rand, accounts []simtypes.Account) []group.Member { return []group.Member{ { Address: accounts[0].Address.String(), - Weight: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 5)), + Weight: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 10)), Metadata: []byte(simtypes.RandStringOfLength(r, 10)), }, } @@ -1317,7 +1308,7 @@ func genGroupMembers(r *rand.Rand, accounts []simtypes.Account) []group.Member { for i := 0; i < membersLen; i++ { members[i] = group.Member{ Address: accounts[i].Address.String(), - Weight: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 5)), + Weight: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 10)), Metadata: []byte(simtypes.RandStringOfLength(r, 10)), } } diff --git a/x/group/simulation/operations_test.go b/x/group/simulation/operations_test.go index eb7a66969193..de5c446936ac 100644 --- a/x/group/simulation/operations_test.go +++ b/x/group/simulation/operations_test.go @@ -51,6 +51,7 @@ func (suite *SimTestSuite) TestWeightedOperations() { }{ {simulation.WeightMsgCreateGroup, group.MsgCreateGroup{}.Route(), simulation.TypeMsgCreateGroup}, {simulation.WeightMsgCreateGroupPolicy, group.MsgCreateGroupPolicy{}.Route(), simulation.TypeMsgCreateGroupPolicy}, + {simulation.WeightMsgLeaveGroup, group.MsgLeaveGroup{}.Route(), simulation.TypeMsgLeaveGroup}, // {simulation.WeightMsgCreateGroupWithPolicy, group.MsgCreateGroupWithPolicy{}.Route(), simulation.TypeMsgCreateGroupWithPolicy}, {simulation.WeightMsgSubmitProposal, group.MsgSubmitProposal{}.Route(), simulation.TypeMsgSubmitProposal}, {simulation.WeightMsgSubmitProposal, group.MsgSubmitProposal{}.Route(), simulation.TypeMsgSubmitProposal}, @@ -63,7 +64,6 @@ func (suite *SimTestSuite) TestWeightedOperations() { {simulation.WeightMsgUpdateGroupPolicyAdmin, group.MsgUpdateGroupPolicyAdmin{}.Route(), simulation.TypeMsgUpdateGroupPolicyAdmin}, {simulation.WeightMsgUpdateGroupPolicyDecisionPolicy, group.MsgUpdateGroupPolicyDecisionPolicy{}.Route(), simulation.TypeMsgUpdateGroupPolicyDecisionPolicy}, {simulation.WeightMsgUpdateGroupPolicyMetadata, group.MsgUpdateGroupPolicyMetadata{}.Route(), simulation.TypeMsgUpdateGroupPolicyMetadata}, - {simulation.WeightMsgLeaveGroup, group.MsgLeaveGroup{}.Route(), simulation.TypeMsgLeaveGroup}, } for i, w := range weightedOps { diff --git a/x/group/spec/03_messages.md b/x/group/spec/03_messages.md index 736943c80731..3c4e2a59a32a 100644 --- a/x/group/spec/03_messages.md +++ b/x/group/spec/03_messages.md @@ -129,3 +129,14 @@ The messages that are part of this proposal won't be executed if: * the proposal has not been accepted. * the proposal status is not closed. * the proposal has already been successfully executed. + +## Msg/LeaveGroup + +The `MsgLeaveGroup` allows group member to leave the group. + ++++ https://github.com/cosmos/cosmos-sdk/blob/a635fd78663d04c5de23f4d032e5a3abea1b005a/proto/cosmos/group/v1beta1/tx.proto#L352-L361 + +It's expecting to fail if: + +* the group member is not part of the group. +* group weight updates that breaks decision policy. \ No newline at end of file diff --git a/x/group/tx.pb.go b/x/group/tx.pb.go index 728037fcae43..785ea5974d76 100644 --- a/x/group/tx.pb.go +++ b/x/group/tx.pb.go @@ -1360,8 +1360,8 @@ var xxx_messageInfo_MsgExecResponse proto.InternalMessageInfo // MsgLeaveGroup is the Msg/LeaveGroup request type. type MsgLeaveGroup struct { - // member_address is the account address of the group member. - MemberAddress string `protobuf:"bytes,1,opt,name=member_address,json=memberAddress,proto3" json:"member_address,omitempty"` + // address is the account address of the group member. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // group_id is the unique ID of the group. GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` } @@ -1399,9 +1399,9 @@ func (m *MsgLeaveGroup) XXX_DiscardUnknown() { var xxx_messageInfo_MsgLeaveGroup proto.InternalMessageInfo -func (m *MsgLeaveGroup) GetMemberAddress() string { +func (m *MsgLeaveGroup) GetAddress() string { if m != nil { - return m.MemberAddress + return m.Address } return "" } @@ -1485,86 +1485,85 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1beta1/tx.proto", fileDescriptor_da0de9d603d844fb) } var fileDescriptor_da0de9d603d844fb = []byte{ - // 1256 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x73, 0xdb, 0x44, - 0x14, 0xf7, 0xc6, 0x6e, 0x3e, 0x5e, 0x1a, 0x37, 0x51, 0x9c, 0xd6, 0x11, 0x89, 0x63, 0xd4, 0x14, - 0x42, 0x9a, 0xc8, 0x8d, 0xc3, 0x47, 0xc7, 0xd3, 0x01, 0x92, 0x34, 0x30, 0x61, 0x6a, 0x08, 0x0a, - 0xe5, 0xeb, 0x80, 0x47, 0xb6, 0x84, 0xaa, 0x12, 0x5b, 0x1a, 0xaf, 0xf2, 0x75, 0x82, 0xe9, 0x09, - 0xa6, 0x17, 0xfe, 0x01, 0x66, 0x98, 0x61, 0x86, 0x03, 0x27, 0x0e, 0xbd, 0x70, 0xe5, 0xd4, 0xe1, - 0x94, 0xe1, 0xc4, 0x89, 0xe9, 0x24, 0x07, 0x0e, 0x30, 0xc3, 0x91, 0x2b, 0xa3, 0xdd, 0xd5, 0x5a, - 0x72, 0x24, 0x5b, 0x76, 0x33, 0x3d, 0x25, 0xd2, 0xfb, 0xbd, 0xf7, 0x7e, 0xef, 0x63, 0xdf, 0x3e, - 0x19, 0x66, 0x6b, 0x16, 0xae, 0x5b, 0xb8, 0x60, 0x34, 0xad, 0x3d, 0xbb, 0xb0, 0xbf, 0x52, 0xd5, - 0x1d, 0x75, 0xa5, 0xe0, 0x1c, 0xca, 0x76, 0xd3, 0x72, 0x2c, 0x21, 0x43, 0xc5, 0x32, 0x11, 0xcb, - 0x4c, 0x2c, 0x66, 0x0c, 0xcb, 0xb0, 0x08, 0xa0, 0xe0, 0xfe, 0x47, 0xb1, 0xe2, 0x34, 0xc5, 0x56, - 0xa8, 0x80, 0x29, 0x32, 0x91, 0x61, 0x59, 0xc6, 0xae, 0x5e, 0x20, 0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x06, 0x33, 0xf3, 0x91, 0xe9, 0xdc, 0xeb, 0xb3, - 0xfe, 0x4f, 0x37, 0x35, 0xaf, 0x41, 0x9a, 0x76, 0x4f, 0x5b, 0xa3, 0x8c, 0x19, 0x81, 0x23, 0x54, - 0x84, 0x29, 0x0a, 0xa3, 0xad, 0xd2, 0x42, 0xa7, 0x08, 0x7a, 0xd2, 0x68, 0x55, 0x82, 0xeb, 0xac, - 0xb4, 0xe9, 0xa8, 0x98, 0x25, 0xed, 0x42, 0x1e, 0x2d, 0x0c, 0x2b, 0x82, 0x4f, 0x67, 0x0d, 0xd3, - 0xfa, 0x85, 0x34, 0xe5, 0xe0, 0x53, 0x36, 0x65, 0xca, 0x6d, 0x4a, 0xe9, 0x1b, 0x04, 0xf9, 0xa8, - 0x8c, 0xc7, 0x98, 0xff, 0xc2, 0x3b, 0x90, 0x09, 0xc6, 0x12, 0xb3, 0x6b, 0x02, 0x41, 0xb2, 0x16, - 0xbe, 0x0a, 0xcf, 0x47, 0x76, 0x30, 0x1f, 0x0f, 0x7f, 0x23, 0x90, 0xc2, 0x50, 0xc1, 0x68, 0x9f, - 0x49, 0xc3, 0x87, 0x14, 0x25, 0x79, 0xce, 0x93, 0x62, 0x09, 0x16, 0xbb, 0x07, 0xcb, 0x73, 0xf3, - 0x13, 0x22, 0x83, 0xe5, 0x0c, 0xbc, 0xef, 0x81, 0xdf, 0x4f, 0x56, 0xe2, 0xde, 0x04, 0x2f, 0xc0, - 0x7c, 0x27, 0xae, 0x3c, 0xa8, 0xff, 0x10, 0x4c, 0x94, 0xb1, 0xb1, 0xb3, 0x57, 0xad, 0x9b, 0xce, - 0x76, 0xd3, 0xb2, 0x2d, 0xac, 0xee, 0xf6, 0x33, 0x22, 0x85, 0x19, 0x18, 0xb1, 0x89, 0xbe, 0x37, - 0x12, 0x46, 0x94, 0xd6, 0x8b, 0x8e, 0x77, 0xc2, 0x0d, 0x57, 0x86, 0xb1, 0x6a, 0xe8, 0x38, 0x9b, - 0x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, 0xa8, - 0x9b, 0xf1, 0x8d, 0x07, 0x35, 0xc5, 0x37, 0xfb, 0xd5, 0xe4, 0xfc, 0x1e, 0x22, 0x98, 0x8e, 0xde, - 0x63, 0x8a, 0xf1, 0xed, 0xf3, 0x16, 0x2d, 0xf5, 0xae, 0xc3, 0xd9, 0xdc, 0x87, 0x74, 0xdb, 0xfe, - 0xf1, 0x62, 0xa4, 0xb5, 0x20, 0x50, 0x2c, 0xc4, 0x04, 0xfa, 0x27, 0xc0, 0x99, 0x4b, 0x3b, 0x7a, - 0x02, 0xb4, 0x43, 0x3b, 0x4c, 0x80, 0xa8, 0xeb, 0x59, 0xb8, 0x03, 0x29, 0x72, 0x35, 0xcf, 0x46, - 0xaa, 0xba, 0x62, 0xf1, 0x5a, 0x47, 0xb1, 0xdf, 0x1a, 0x19, 0xe8, 0xd1, 0xd6, 0x5c, 0x71, 0x07, - 0x6b, 0xfe, 0xab, 0x4b, 0xf8, 0x0c, 0xc0, 0x77, 0x6d, 0x5d, 0x8d, 0x54, 0x6a, 0x81, 0xc4, 0xeb, - 0x31, 0x40, 0x9e, 0xfd, 0xf5, 0xd7, 0x1f, 0x9f, 0xe4, 0xd0, 0xf1, 0x49, 0x0e, 0x3d, 0x39, 0xc9, - 0xa1, 0x6f, 0x4f, 0x73, 0x89, 0xe3, 0xd3, 0x5c, 0xe2, 0x8f, 0xd3, 0x5c, 0xe2, 0xd3, 0x79, 0xc3, - 0x74, 0xee, 0xed, 0x55, 0xe5, 0x9a, 0x55, 0x67, 0x3f, 0x13, 0xb2, 0x3f, 0xcb, 0x58, 0xfb, 0xa2, - 0x70, 0x48, 0x7f, 0x0a, 0xac, 0x0e, 0x92, 0xfd, 0x6f, 0xf5, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xe4, 0x62, 0xf7, 0x57, 0xa2, 0x14, 0x00, 0x00, + // 1248 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x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0xd1, 0x44, 0x64, 0x60, 0x62, 0xeb, 0x93, 0xad, + 0xcd, 0xca, 0xbd, 0xf7, 0x76, 0x77, 0xb6, 0x36, 0xb7, 0xdf, 0xde, 0xde, 0xba, 0x33, 0x91, 0x10, + 0xc6, 0x60, 0x98, 0xbe, 0xfd, 0x50, 0xf9, 0x74, 0x02, 0x15, 0x4f, 0xc6, 0x20, 0x59, 0x26, 0xba, + 0xa0, 0xc2, 0xa8, 0xff, 0x03, 0x6a, 0x21, 0xe2, 0x26, 0x0f, 0x5c, 0x64, 0xe2, 0x72, 0x1c, 0x14, + 0x3f, 0x50, 0x07, 0x20, 0x84, 0x7c, 0xc5, 0xdc, 0x88, 0xb4, 0x71, 0x1e, 0x2c, 0xae, 0xf5, 0x00, + 0xe6, 0x7e, 0x2d, 0x98, 0x38, 0xf7, 0x81, 0xf1, 0x4a, 0x1c, 0x43, 0x14, 0x2a, 0xae, 0xc6, 0x86, + 0x72, 0x8f, 0xc7, 0x30, 0x15, 0xf6, 0x35, 0xb0, 0x1c, 0x8f, 0x3d, 0x43, 0x8b, 0xaf, 0xf6, 0x82, + 0xe6, 0xae, 0x09, 0x4c, 0x9e, 0x5f, 0xec, 0x97, 0xe2, 0xd4, 0x89, 0x61, 0xc5, 0x62, 0x7c, 0x2c, + 0x77, 0xfa, 0x15, 0x4c, 0x47, 0x6c, 0x94, 0x71, 0x8c, 0xb5, 0xf0, 0xe2, 0xeb, 0xbd, 0xe1, 0x39, + 0x81, 0x87, 0x08, 0xae, 0x44, 0x2c, 0xe6, 0x72, 0x9c, 0x34, 0xfa, 0x14, 0xc4, 0x37, 0x7a, 0x54, + 0xe0, 0x24, 0xbe, 0x43, 0x30, 0xdf, 0x6d, 0x6b, 0xba, 0x15, 0xdf, 0x78, 0x50, 0x53, 0x7c, 0xab, + 0x5f, 0x4d, 0xce, 0xef, 0x11, 0x82, 0x99, 0xe8, 0xcd, 0xa5, 0x18, 0xdf, 0x3e, 0x6f, 0xd1, 0x52, + 0xef, 0x3a, 0x9c, 0xcd, 0x03, 0x48, 0xb7, 0x6d, 0x1c, 0x2f, 0x47, 0x5a, 0x0b, 0x02, 0x45, 0x39, + 0x26, 0xd0, 0x3f, 0x01, 0xce, 0x5d, 0xd3, 0xd1, 0x13, 0xa0, 0x1d, 0xda, 0x61, 0x02, 0x44, 0x5d, + 0xc8, 0xc2, 0x5d, 0x48, 0xd1, 0xcb, 0x78, 0x2e, 0x52, 0xd5, 0x11, 0x8b, 0xd7, 0x3b, 0x8a, 0xfd, + 0xd6, 0xe8, 0x40, 0x8f, 0xb6, 0xe6, 0x88, 0x3b, 0x58, 0xf3, 0x5f, 0x56, 0xc2, 0xe7, 0x00, 0xbe, + 0x9b, 0xea, 0x5a, 0xa4, 0x52, 0x0b, 0x24, 0xde, 0x88, 0x01, 0xf2, 0xec, 0x6f, 0xbc, 0xf9, 0xe4, + 0x34, 0x87, 0x4e, 0x4e, 0x73, 0xe8, 0xe9, 0x69, 0x0e, 0x7d, 0x7b, 0x96, 0x4b, 0x9c, 0x9c, 0xe5, + 0x12, 0x7f, 0x9c, 0xe5, 0x12, 0x9f, 0x2d, 0xe8, 0x86, 0x7d, 0x7f, 0xbf, 0x2a, 0xd5, 0xcc, 0xba, + 0xfb, 0xc3, 0xa0, 0xfb, 0x67, 0x85, 0x68, 0x5f, 0xca, 0x47, 0xec, 0xc7, 0xbf, 0xea, 0x20, 0xdd, + 0xf8, 0xd6, 0xfe, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xa8, 0x17, 0xa1, 0xbf, 0x94, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3138,10 +3137,10 @@ func (m *MsgLeaveGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x10 } - if len(m.MemberAddress) > 0 { - i -= len(m.MemberAddress) - copy(dAtA[i:], m.MemberAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.MemberAddress))) + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0xa } @@ -3618,7 +3617,7 @@ func (m *MsgLeaveGroup) Size() (n int) { } var l int _ = l - l = len(m.MemberAddress) + l = len(m.Address) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -6429,7 +6428,7 @@ func (m *MsgLeaveGroup) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MemberAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6457,7 +6456,7 @@ func (m *MsgLeaveGroup) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.MemberAddress = string(dAtA[iNdEx:postIndex]) + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { From 2247cc83648d2527207d8e9265dccdae2e92605b Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Wed, 23 Feb 2022 17:09:35 +0530 Subject: [PATCH 19/32] update error check --- x/group/simulation/operations.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/group/simulation/operations.go b/x/group/simulation/operations.go index eaa03d7a1882..ff629ea0c230 100644 --- a/x/group/simulation/operations.go +++ b/x/group/simulation/operations.go @@ -1164,8 +1164,8 @@ func SimulateMsgLeaveGroup(k keeper.Keeper, ak group.AccountKeeper, bk group.Ban _, _, err = app.SimDeliver(txGen.TxEncoder(), tx) if err != nil { - if strings.Contains(err.Error(), "cannot leave group") { - return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, ""), nil, nil + if strings.Contains(err.Error(), "should not be greater than the total group weight") { + return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, err.Error()), nil, nil } return simtypes.NoOpMsg(group.ModuleName, msg.Type(), err.Error()), nil, err From 51f370e7db4a4316fc4fffd98633bd053b79741a Mon Sep 17 00:00:00 2001 From: MD Aleem <72057206+aleem1314@users.noreply.github.com> Date: Mon, 28 Feb 2022 16:32:08 +0530 Subject: [PATCH 20/32] Update x/group/msgs.go --- x/group/msgs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/group/msgs.go b/x/group/msgs.go index 272168d25d34..0bd94e51b3c1 100644 --- a/x/group/msgs.go +++ b/x/group/msgs.go @@ -809,7 +809,7 @@ func (m MsgLeaveGroup) Type() string { return sdk.MsgTypeURL(&m) } // GetSignBytes Implements Msg func (m MsgLeaveGroup) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) + return sdk.MustSortJSON(legacy.Cdc.MustMarshalJSON(&m)) } // GetSigners returns the expected signers for a MsgLeaveGroup From 9f6f30b18433efc07b77e0d446810695ec2ebcca Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Mon, 28 Feb 2022 19:45:08 +0530 Subject: [PATCH 21/32] fix imports --- x/group/simulation/operations_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/group/simulation/operations_test.go b/x/group/simulation/operations_test.go index b1adac19c6a3..1cc569e9cbd3 100644 --- a/x/group/simulation/operations_test.go +++ b/x/group/simulation/operations_test.go @@ -804,7 +804,7 @@ func (suite *SimTestSuite) TestSimulateLeaveGroup() { suite.Require().NoError(err) var msg group.MsgLeaveGroup - err = group.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) + err = legacy.Cdc.UnmarshalJSON(operationMsg.Msg, &msg) suite.Require().NoError(err) suite.Require().True(operationMsg.OK) suite.Require().Equal(groupRes.GroupId, msg.GroupId) From f9b4c5ac3cb99144159f84e372dd40033efa5214 Mon Sep 17 00:00:00 2001 From: MD Aleem <72057206+aleem1314@users.noreply.github.com> Date: Wed, 2 Mar 2022 13:39:28 +0530 Subject: [PATCH 22/32] Update x/group/client/cli/tx.go Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> --- x/group/client/cli/tx.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/group/client/cli/tx.go b/x/group/client/cli/tx.go index a3d615bec821..a404cac203c6 100644 --- a/x/group/client/cli/tx.go +++ b/x/group/client/cli/tx.go @@ -829,7 +829,7 @@ func MsgLeaveGroupCmd() *cobra.Command { Parameters: group-id: unique id of the group member-address: account address of the group member - Note, the'--from' flag is + Note, the '--from' flag is ignored as it is implied from [member-address] `, Args: cobra.ExactArgs(2), From 1988cbc665e5f35109875616f8b93e9467e37878 Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Wed, 2 Mar 2022 13:43:09 +0530 Subject: [PATCH 23/32] make proto-gen --- .../base/snapshots/v1beta1/snapshot.pulsar.go | 10 +- api/cosmos/group/v1beta1/tx.pulsar.go | 228 +++++++++--------- proto/cosmos/group/v1beta1/tx.proto | 2 +- snapshots/types/snapshot.pb.go | 10 +- x/group/client/cli/tx.go | 2 +- x/group/tx.pb.go | 154 ++++++------ 6 files changed, 205 insertions(+), 201 deletions(-) diff --git a/api/cosmos/base/snapshots/v1beta1/snapshot.pulsar.go b/api/cosmos/base/snapshots/v1beta1/snapshot.pulsar.go index ce92b9e1ea1c..8bbe2e70da60 100644 --- a/api/cosmos/base/snapshots/v1beta1/snapshot.pulsar.go +++ b/api/cosmos/base/snapshots/v1beta1/snapshot.pulsar.go @@ -4076,10 +4076,12 @@ type SnapshotIAVLItem struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // version is block height + Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + // height is depth of the tree. + Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` } func (x *SnapshotIAVLItem) Reset() { diff --git a/api/cosmos/group/v1beta1/tx.pulsar.go b/api/cosmos/group/v1beta1/tx.pulsar.go index 32e913c3263a..9d836eea42ea 100644 --- a/api/cosmos/group/v1beta1/tx.pulsar.go +++ b/api/cosmos/group/v1beta1/tx.pulsar.go @@ -15023,133 +15023,133 @@ var file_cosmos_group_v1beta1_tx_proto_rawDesc = []byte{ 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 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, - 0x73, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 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, - 0x13, 0x82, 0xe7, 0xb0, 0x2a, 0x0e, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 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, 0xd0, 0x0c, 0x0a, 0x03, 0x4d, 0x73, - 0x67, 0x12, 0x61, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x76, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x70, 0x0a, 0x10, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, - 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x31, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 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, 0x79, - 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, + 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, 0xd0, 0x0c, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x61, 0x0a, 0x0b, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, + 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x76, 0x0a, + 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x73, 0x0a, 0x11, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2a, + 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x70, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, + 0x64, 0x6d, 0x69, 0x6e, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x79, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 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, 0x7f, - 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, 0x69, 0x74, - 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x36, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x62, 0x65, 0x74, 0x61, 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, 0x34, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 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, 0x73, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, - 0x82, 0x01, 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, 0x2f, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 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, 0x37, 0x2e, 0x63, 0x6f, + 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x7f, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x57, 0x69, 0x74, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x36, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x82, 0x01, 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, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x9d, 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, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x40, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x9d, 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, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x40, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x8b, 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, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x6a, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x2f, 0x2e, + 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, 0x8b, 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, 0x32, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 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, + 0x3a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x6a, 0x0a, 0x0e, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x70, - 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x31, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 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, 0x4c, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, - 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x70, 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x29, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0a, - 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, - 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xd9, 0x01, 0x0a, - 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, - 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 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, 0x4c, 0x0a, 0x04, 0x56, 0x6f, 0x74, + 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, + 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, + 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0a, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, + 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xd9, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 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, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, + 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x3a, 0x3a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/cosmos/group/v1beta1/tx.proto b/proto/cosmos/group/v1beta1/tx.proto index b40be0d605b4..d7608477cc05 100644 --- a/proto/cosmos/group/v1beta1/tx.proto +++ b/proto/cosmos/group/v1beta1/tx.proto @@ -351,7 +351,7 @@ message MsgExecResponse {} // MsgLeaveGroup is the Msg/LeaveGroup request type. message MsgLeaveGroup { - option (cosmos.msg.v1.signer) = "member_address"; + option (cosmos.msg.v1.signer) = "address"; // address is the account address of the group member. string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; diff --git a/snapshots/types/snapshot.pb.go b/snapshots/types/snapshot.pb.go index 5a70e5eb8d4d..c7e427343346 100644 --- a/snapshots/types/snapshot.pb.go +++ b/snapshots/types/snapshot.pb.go @@ -306,10 +306,12 @@ func (m *SnapshotStoreItem) GetName() string { // SnapshotIAVLItem is an exported IAVL node. type SnapshotIAVLItem struct { - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // version is block height + Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + // height is depth of the tree. + Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` } func (m *SnapshotIAVLItem) Reset() { *m = SnapshotIAVLItem{} } diff --git a/x/group/client/cli/tx.go b/x/group/client/cli/tx.go index a3d615bec821..afc72764ab9f 100644 --- a/x/group/client/cli/tx.go +++ b/x/group/client/cli/tx.go @@ -847,7 +847,7 @@ Parameters: msg := &group.MsgLeaveGroup{ Address: clientCtx.GetFromAddress().String(), - GroupId: groupID, + GroupId: groupID, } if err = msg.ValidateBasic(); err != nil { return fmt.Errorf("message validation failed: %w", err) diff --git a/x/group/tx.pb.go b/x/group/tx.pb.go index 785ea5974d76..7b4b488ac3da 100644 --- a/x/group/tx.pb.go +++ b/x/group/tx.pb.go @@ -1485,85 +1485,85 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1beta1/tx.proto", fileDescriptor_da0de9d603d844fb) } var fileDescriptor_da0de9d603d844fb = []byte{ - // 1248 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x6f, 0xe3, 0x44, - 0x14, 0xcf, 0x34, 0xd9, 0x7e, 0xbc, 0xb6, 0xd9, 0xd6, 0x4d, 0x77, 0x53, 0xd3, 0xa6, 0x21, 0xdb, - 0x85, 0xd2, 0x6d, 0xed, 0x6d, 0xca, 0xc7, 0x2a, 0x5a, 0x21, 0xda, 0x6e, 0x41, 0x45, 0x1b, 0x28, - 0x2e, 0xcb, 0xd7, 0x81, 0xc8, 0x89, 0x07, 0xaf, 0x97, 0x26, 0xb6, 0x32, 0xee, 0xd7, 0x09, 0x69, - 0x4f, 0xa0, 0xbd, 0xf0, 0x0f, 0x20, 0x21, 0x21, 0x71, 0xe0, 0xc4, 0x61, 0x2f, 0x5c, 0x39, 0xad, - 0x38, 0x55, 0x9c, 0x38, 0xa1, 0x55, 0x7b, 0xe0, 0x00, 0x12, 0x47, 0xae, 0xc8, 0x33, 0xf6, 0xc4, - 0x4e, 0xed, 0xc4, 0xc9, 0x56, 0x7b, 0x6a, 0xed, 0xf7, 0x7b, 0xef, 0xfd, 0xde, 0xc7, 0xbc, 0x79, - 0x0e, 0xcc, 0xd5, 0x4c, 0x52, 0x37, 0x89, 0xac, 0x37, 0xcd, 0x7d, 0x4b, 0x3e, 0x58, 0xad, 0x62, + // 1246 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xc4, 0x6e, 0x3e, 0x5e, 0x12, 0x37, 0xd9, 0x38, 0xad, 0xb3, 0x24, 0x8e, 0x71, 0x53, + 0x08, 0x69, 0xb2, 0xdb, 0x38, 0x7c, 0x54, 0x56, 0x85, 0x48, 0xd2, 0x80, 0x82, 0x6a, 0x08, 0x1b, + 0xca, 0xd7, 0x01, 0x6b, 0xed, 0x1d, 0xb6, 0x5b, 0x62, 0xef, 0xca, 0xb3, 0xf9, 0x3a, 0x21, 0xf5, + 0x04, 0xea, 0x85, 0x7f, 0x00, 0x09, 0x09, 0x89, 0x03, 0x27, 0x0e, 0xbd, 0x70, 0xe5, 0x54, 0x71, + 0x8a, 0x38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x5c, 0x33, 0x88, 0x61, 0x36, 0x2a, 0x16, 0xf5, 0x9c, 0x4d, 0xe5, 0xd1, 0xe2, 0x68, 0x31, 0x23, - 0xb1, 0xf9, 0x20, 0x79, 0xf3, 0x41, 0x5a, 0x6f, 0x1c, 0x6f, 0x08, 0xbf, 0x3d, 0x5e, 0x49, 0xdf, - 0x71, 0x15, 0x18, 0x53, 0x25, 0xad, 0x05, 0x9e, 0x4b, 0xe9, 0xaf, 0xbf, 0x9f, 0x4f, 0xf8, 0x92, - 0xa0, 0xc0, 0x6c, 0x58, 0x84, 0xfc, 0xbc, 0x15, 0x61, 0x48, 0x65, 0x11, 0x75, 0x8d, 0xd5, 0x03, - 0x16, 0x7e, 0x45, 0x30, 0x13, 0xcc, 0x2c, 0x33, 0xda, 0x5f, 0xc7, 0xfa, 0x18, 0x0c, 0xc4, 0x64, - 0x70, 0x11, 0xad, 0xfc, 0xef, 0x00, 0x64, 0x83, 0x99, 0xf9, 0xd8, 0xb0, 0xef, 0xf7, 0x59, 0xff, - 0x67, 0x9b, 0x9a, 0xd7, 0x21, 0xcd, 0xba, 0xa7, 0xad, 0x51, 0xc6, 0xf5, 0xc0, 0x11, 0x2a, 0xc2, - 0x34, 0x83, 0xb1, 0x56, 0x69, 0xa1, 0x53, 0x14, 0x3d, 0xa5, 0xb7, 0x2a, 0xc1, 0x75, 0x56, 0xdb, - 0x74, 0x54, 0xe2, 0x26, 0xed, 0x52, 0x1e, 0x2d, 0x0e, 0x2b, 0x82, 0x4f, 0x67, 0x9d, 0xb0, 0xfa, - 0x85, 0x34, 0xe5, 0xe0, 0x33, 0x36, 0x65, 0xca, 0x69, 0xca, 0xc2, 0x37, 0x08, 0xf2, 0x51, 0x19, - 0x8f, 0x31, 0xff, 0x85, 0x77, 0x21, 0x13, 0x8c, 0x25, 0x66, 0xd7, 0x04, 0x82, 0x74, 0x5b, 0xf8, - 0x1a, 0xbc, 0x18, 0xd9, 0xc1, 0x7c, 0x3c, 0xfc, 0x8d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8, + 0xe4, 0x34, 0x87, 0x9e, 0x9e, 0xe6, 0xd0, 0xb7, 0x67, 0xb9, 0xc4, 0xc9, 0x59, 0x2e, 0xf1, 0xc7, + 0x59, 0x2e, 0xf1, 0xd9, 0x82, 0x6e, 0xd8, 0xf7, 0xf7, 0xab, 0x52, 0xcd, 0xac, 0xbb, 0xbf, 0x08, + 0xba, 0x7f, 0x56, 0x88, 0xf6, 0xa5, 0x7c, 0xc4, 0x7e, 0xf5, 0xab, 0x0e, 0xd2, 0xab, 0xde, 0xda, + 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x27, 0x64, 0x87, 0x8d, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From ad889b73afe06a44d1e15a8ce61f0c3734855767 Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Wed, 2 Mar 2022 13:48:13 +0530 Subject: [PATCH 24/32] make proto-gen --- x/group/tx.pb.go | 155 ++++++++++++++++++++++++----------------------- 1 file changed, 79 insertions(+), 76 deletions(-) diff --git a/x/group/tx.pb.go b/x/group/tx.pb.go index 1155137a48b2..1e1cd2ddb572 100644 --- a/x/group/tx.pb.go +++ b/x/group/tx.pb.go @@ -1485,82 +1485,85 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1beta1/tx.proto", fileDescriptor_da0de9d603d844fb) } var fileDescriptor_da0de9d603d844fb = []byte{ - // 1198 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcf, 0x6f, 0xe3, 0xc4, - 0x17, 0xcf, 0x34, 0xde, 0xfe, 0x78, 0xf9, 0x6e, 0xb6, 0x75, 0xd3, 0xfd, 0xa6, 0xa6, 0x4d, 0x83, - 0xe9, 0x42, 0x29, 0xad, 0xbd, 0x4d, 0xf9, 0xb1, 0xaa, 0x56, 0x88, 0xb6, 0x1b, 0x50, 0x10, 0x81, - 0xe2, 0xb2, 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f1, 0xe8, 0x3c, 0x97, 0xf8, - 0xed, 0x3c, 0x97, 0xf8, 0x74, 0xd5, 0x30, 0x9d, 0x3b, 0xad, 0xaa, 0x54, 0xb3, 0xea, 0xde, 0x5f, - 0x65, 0xde, 0xc7, 0x26, 0xd6, 0x3e, 0x97, 0x4f, 0xe9, 0xdf, 0x61, 0xd5, 0x49, 0x72, 0x07, 0xda, - 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x75, 0x15, 0x0d, 0x97, 0xa6, 0x13, 0x00, 0x00, + // 1244 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xc4, 0x6e, 0x3e, 0x5e, 0x12, 0x37, 0xd9, 0x38, 0xad, 0xb3, 0x24, 0x8e, 0x71, 0x53, + 0x08, 0x69, 0xb2, 0xdb, 0x38, 0x7c, 0x54, 0x56, 0x85, 0x48, 0xd2, 0x80, 0x82, 0x6a, 0x08, 0x1b, + 0xca, 0xd7, 0x01, 0x6b, 0xed, 0x1d, 0xb6, 0x5b, 0x62, 0xef, 0xca, 0xb3, 0xf9, 0x3a, 0x21, 0xf5, + 0x04, 0xea, 0x85, 0x7f, 0x00, 0x09, 0x09, 0x89, 0x03, 0x27, 0x0e, 0xbd, 0x70, 0xe5, 0x54, 0x71, + 0x8a, 0x38, 0x71, 0x42, 0x55, 0x72, 0xe0, 0x00, 0x12, 0x47, 0xae, 0x68, 0x67, 0x76, 0xc7, 0xbb, + 0xce, 0xae, 0xbd, 0x76, 0xa3, 0x9e, 0x92, 0xd9, 0xf7, 0x7b, 0xef, 0xfd, 0xde, 0xc7, 0xbc, 0x99, + 0x31, 0xcc, 0xd5, 0x4c, 0x52, 0x37, 0x89, 0xac, 0x37, 0xcd, 0x7d, 0x4b, 0x3e, 0x58, 0xad, 0x62, + 0x5b, 0x5d, 0x95, 0xed, 0x23, 0xc9, 0x6a, 0x9a, 0xb6, 0x29, 0x64, 0x98, 0x58, 0xa2, 0x62, 0xc9, + 0x15, 0x8b, 0x19, 0xdd, 0xd4, 0x4d, 0x0a, 0x90, 0x9d, 0xff, 0x18, 0x56, 0x9c, 0x61, 0xd8, 0x0a, + 0x13, 0xb8, 0x8a, 0xae, 0x48, 0x37, 0x4d, 0x7d, 0x0f, 0xcb, 0x74, 0x55, 0xdd, 0xff, 0x42, 0x56, + 0x1b, 0xc7, 0xae, 0x28, 0x1f, 0x4e, 0xe0, 0xd8, 0xc2, 0x9e, 0xf2, 0x55, 0x17, 0x51, 0x27, 0xba, + 0x7c, 0xb0, 0xea, 0xfc, 0x61, 0x82, 0xc2, 0x8f, 0x08, 0xd2, 0x65, 0xa2, 0x6f, 0x36, 0xb1, 0x6a, + 0xe3, 0x77, 0x1c, 0x7d, 0x41, 0x82, 0x4b, 0xaa, 0x56, 0x37, 0x1a, 0x59, 0x94, 0x47, 0x8b, 0x23, + 0x1b, 0xd9, 0xdf, 0x1f, 0xaf, 0x78, 0x21, 0xac, 0x6b, 0x5a, 0x13, 0x13, 0xb2, 0x6b, 0x37, 0x8d, + 0x86, 0xae, 0x30, 0x98, 0x70, 0x1b, 0x86, 0xea, 0xb8, 0x5e, 0xc5, 0x4d, 0x92, 0x1d, 0xc8, 0x27, + 0x17, 0x47, 0x8b, 0xb3, 0x52, 0x58, 0xc4, 0x52, 0x99, 0x82, 0x36, 0x52, 0x4f, 0xfe, 0x9c, 0x4f, + 0x28, 0x9e, 0x8a, 0x20, 0xc2, 0x70, 0x1d, 0xdb, 0xaa, 0xa6, 0xda, 0x6a, 0x36, 0xe9, 0x38, 0x54, + 0xf8, 0xba, 0x04, 0x0f, 0xff, 0xfa, 0x79, 0x89, 0x79, 0x29, 0xac, 0xc1, 0x95, 0x20, 0x4f, 0x05, + 0x13, 0xcb, 0x6c, 0x10, 0x2c, 0xcc, 0xc0, 0x30, 0x75, 0x54, 0x31, 0x34,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f5, 0xd6, 0xfe, 0x0f, + 0x00, 0x00, 0xff, 0xff, 0x07, 0xa9, 0xb6, 0xce, 0x8d, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From 62e767270c95ac76840bfd2db2b48822981de437 Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Wed, 2 Mar 2022 14:00:07 +0530 Subject: [PATCH 25/32] fix tests --- x/group/keeper/keeper_test.go | 16 ++++++++-------- x/group/simulation/operations.go | 4 ++-- x/group/simulation/operations_test.go | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/x/group/keeper/keeper_test.go b/x/group/keeper/keeper_test.go index f9c090ce10f5..113f3604a2d7 100644 --- a/x/group/keeper/keeper_test.go +++ b/x/group/keeper/keeper_test.go @@ -2338,19 +2338,19 @@ func (s *TestSuite) TestLeaveGroup() { { Address: member1.String(), Weight: "1", - Metadata: []byte("metadata"), + Metadata: "metadata", AddedAt: s.sdkCtx.BlockTime(), }, { Address: member2.String(), Weight: "2", - Metadata: []byte("metadata"), + Metadata: "metadata", AddedAt: s.sdkCtx.BlockTime(), }, { Address: member3.String(), Weight: "3", - Metadata: []byte("metadata"), + Metadata: "metadata", AddedAt: s.sdkCtx.BlockTime(), }, }, @@ -2364,7 +2364,7 @@ func (s *TestSuite) TestLeaveGroup() { { Address: member1.String(), Weight: "1", - Metadata: []byte("metadata"), + Metadata: "metadata", AddedAt: s.sdkCtx.BlockTime(), }, }, @@ -2378,13 +2378,13 @@ func (s *TestSuite) TestLeaveGroup() { { Address: member1.String(), Weight: "1", - Metadata: []byte("metadata"), + Metadata: "metadata", AddedAt: s.sdkCtx.BlockTime(), }, { Address: member2.String(), Weight: "2", - Metadata: []byte("metadata"), + Metadata: "metadata", AddedAt: s.sdkCtx.BlockTime(), }, }, @@ -2395,7 +2395,7 @@ func (s *TestSuite) TestLeaveGroup() { groupPolicy := &group.MsgCreateGroupPolicy{ Admin: admin.String(), GroupId: res.GroupId, - Metadata: []byte("metadata"), + Metadata: "metadata", } policy := group.NewThresholdDecisionPolicy( "3", @@ -2411,7 +2411,7 @@ func (s *TestSuite) TestLeaveGroup() { groupPolicy = &group.MsgCreateGroupPolicy{ Admin: admin3.String(), GroupId: res2.GroupId, - Metadata: []byte("metadata"), + Metadata: "metadata", } pPolicy := &group.PercentageDecisionPolicy{ Percentage: "0.5", diff --git a/x/group/simulation/operations.go b/x/group/simulation/operations.go index 6d7db36d77be..67e8bca60cf0 100644 --- a/x/group/simulation/operations.go +++ b/x/group/simulation/operations.go @@ -1291,7 +1291,7 @@ func genGroupMembers(r *rand.Rand, accounts []simtypes.Account) []group.Member { return []group.Member{ { Address: accounts[0].Address.String(), - Weight: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 5)), + Weight: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 10)), Metadata: simtypes.RandStringOfLength(r, 10), }, } @@ -1308,7 +1308,7 @@ func genGroupMembers(r *rand.Rand, accounts []simtypes.Account) []group.Member { for i := 0; i < membersLen; i++ { members[i] = group.Member{ Address: accounts[i].Address.String(), - Weight: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 5)), + Weight: fmt.Sprintf("%d", simtypes.RandIntBetween(r, 1, 10)), Metadata: simtypes.RandStringOfLength(r, 10), } } diff --git a/x/group/simulation/operations_test.go b/x/group/simulation/operations_test.go index ca00ecd8c924..7a517148a9a5 100644 --- a/x/group/simulation/operations_test.go +++ b/x/group/simulation/operations_test.go @@ -779,7 +779,7 @@ func (suite *SimTestSuite) TestSimulateLeaveGroup() { accountReq := &group.MsgCreateGroupPolicy{ Admin: admin.Address.String(), GroupId: groupRes.GroupId, - Metadata: nil, + Metadata: "", } require.NoError(accountReq.SetDecisionPolicy(group.NewThresholdDecisionPolicy("3", time.Hour))) _, err = suite.app.GroupKeeper.CreateGroupPolicy(ctx, accountReq) From bef38db640154ed307af1d6aea11c31f92e0243d Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Thu, 3 Mar 2022 18:23:48 +0530 Subject: [PATCH 26/32] chore: add test --- x/group/keeper/keeper_test.go | 65 ++++++++++++++++++++++++++++++++++- x/group/keeper/msg_server.go | 2 +- 2 files changed, 65 insertions(+), 2 deletions(-) diff --git a/x/group/keeper/keeper_test.go b/x/group/keeper/keeper_test.go index 0cfba52feb3f..f54f29a59ee9 100644 --- a/x/group/keeper/keeper_test.go +++ b/x/group/keeper/keeper_test.go @@ -2141,6 +2141,68 @@ func (s *TestSuite) TestVote() { spec.postRun(sdkCtx) }) } + + s.T().Log("test tally result should not take into account the member who left the group") + require := s.Require() + members = []group.Member{ + {Address: addr2.String(), Weight: "3", AddedAt: s.blockTime}, + {Address: addr3.String(), Weight: "2", AddedAt: s.blockTime}, + {Address: addr4.String(), Weight: "1", AddedAt: s.blockTime}, + } + reqCreate := &group.MsgCreateGroupWithPolicy{ + Admin: addr1.String(), + Members: members, + GroupMetadata: "metadata", + } + + policy = group.NewThresholdDecisionPolicy( + "4", + time.Duration(10), + 0, + ) + require.NoError(reqCreate.SetDecisionPolicy(policy)) + result, err := s.keeper.CreateGroupWithPolicy(s.ctx, reqCreate) + require.NoError(err) + require.NotNil(result) + + policyAddr := result.GroupPolicyAddress + groupID := result.GroupId + reqProposal := &group.MsgSubmitProposal{ + Address: policyAddr, + Proposers: []string{addr4.String()}, + } + require.NoError(reqProposal.SetMsgs([]sdk.Msg{&banktypes.MsgSend{ + FromAddress: policyAddr, + ToAddress: addr5.String(), + Amount: sdk.Coins{sdk.NewInt64Coin("test", 100)}, + }})) + + resSubmitProposal, err := s.keeper.SubmitProposal(s.ctx, reqProposal) + require.NoError(err) + require.NotNil(resSubmitProposal) + proposalID := resSubmitProposal.ProposalId + + for _, voter := range []string{addr4.String(), addr3.String(), addr2.String()} { + _, err := s.keeper.Vote(s.ctx, + &group.MsgVote{ProposalId: proposalID, Voter: voter, Option: group.VOTE_OPTION_YES}, + ) + require.NoError(err) + } + + qProposals, err := s.keeper.Proposal(s.ctx, &group.QueryProposalRequest{ + ProposalId: proposalID, + }) + require.NoError(err) + + tallyResult, err := s.keeper.Tally(s.sdkCtx, *qProposals.Proposal, groupID) + require.NoError(err) + + _, err = s.keeper.LeaveGroup(s.ctx, &group.MsgLeaveGroup{Address: addr4.String(), GroupId: groupID}) + require.NoError(err) + + tallyResult1, err := s.keeper.Tally(s.sdkCtx, *qProposals.Proposal, groupID) + require.NoError(err) + require.NotEqual(tallyResult.String(), tallyResult1.String()) } func (s *TestSuite) TestExecProposal() { @@ -2434,6 +2496,7 @@ func (s *TestSuite) TestLeaveGroup() { policy := group.NewThresholdDecisionPolicy( "3", time.Hour, + time.Hour, ) require.NoError(groupPolicy.SetDecisionPolicy(policy)) require.NoError(err) @@ -2449,7 +2512,7 @@ func (s *TestSuite) TestLeaveGroup() { } pPolicy := &group.PercentageDecisionPolicy{ Percentage: "0.5", - Timeout: time.Hour, + Windows: &group.DecisionPolicyWindows{VotingPeriod: time.Hour}, } require.NoError(groupPolicy.SetDecisionPolicy(pPolicy)) require.NoError(err) diff --git a/x/group/keeper/msg_server.go b/x/group/keeper/msg_server.go index d1b799b9e5f3..06767714fcea 100644 --- a/x/group/keeper/msg_server.go +++ b/x/group/keeper/msg_server.go @@ -855,7 +855,7 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr return nil, sdkerrors.ErrInvalidRequest.Wrapf("expected %T, got %T", (group.DecisionPolicy)(nil), groupPolicy.DecisionPolicy.GetCachedValue()) } - if err := policyI.Validate(groupInfo); err != nil { + if err := policyI.Validate(groupInfo, k.config); err != nil { return nil, err } } From 413dbeb54a474510148acfb8d8d04f7b8fd25e45 Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Thu, 3 Mar 2022 18:53:37 +0530 Subject: [PATCH 27/32] fix test --- x/group/simulation/operations_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/group/simulation/operations_test.go b/x/group/simulation/operations_test.go index f35692ee0f25..f7f7fcf31aa2 100644 --- a/x/group/simulation/operations_test.go +++ b/x/group/simulation/operations_test.go @@ -782,7 +782,7 @@ func (suite *SimTestSuite) TestSimulateLeaveGroup() { GroupId: groupRes.GroupId, Metadata: "", } - require.NoError(accountReq.SetDecisionPolicy(group.NewThresholdDecisionPolicy("3", time.Hour))) + require.NoError(accountReq.SetDecisionPolicy(group.NewThresholdDecisionPolicy("3", time.Hour, time.Hour))) _, err = suite.app.GroupKeeper.CreateGroupPolicy(ctx, accountReq) require.NoError(err) From 7e612405b5c45d7ec0c812473c27accd627d6960 Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Fri, 4 Mar 2022 11:23:39 +0530 Subject: [PATCH 28/32] review changes --- x/group/client/testutil/tx.go | 6 +++--- x/group/keeper/keeper_test.go | 10 +++++----- x/group/keeper/msg_server.go | 33 ++------------------------------ x/group/simulation/operations.go | 4 ---- x/group/spec/03_messages.md | 1 - 5 files changed, 10 insertions(+), 44 deletions(-) diff --git a/x/group/client/testutil/tx.go b/x/group/client/testutil/tx.go index 730a598b7ff7..456f08dd0485 100644 --- a/x/group/client/testutil/tx.go +++ b/x/group/client/testutil/tx.go @@ -2246,7 +2246,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { "is not part of group", }, { - "error: cannot leave group (breaks policy threshold)", + "error: can leave group policy threshold is more than group weight", append( []string{ members[1], @@ -2255,8 +2255,8 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { }, commonFlags..., ), - true, - "should not be greater than the total group weight", + false, + "", }, } diff --git a/x/group/keeper/keeper_test.go b/x/group/keeper/keeper_test.go index f54f29a59ee9..a1a0f0a3aab7 100644 --- a/x/group/keeper/keeper_test.go +++ b/x/group/keeper/keeper_test.go @@ -2560,7 +2560,7 @@ func (s *TestSuite) TestLeaveGroup() { 0, }, { - "valid testcase", + "valid testcase: threshold decision policy", &group.MsgLeaveGroup{ GroupId: groupId, Address: member3.String(), @@ -2570,14 +2570,14 @@ func (s *TestSuite) TestLeaveGroup() { 2, }, { - "valid request: cannot leave group", + "valid request: can leave group policy threshold more than group weight", &group.MsgLeaveGroup{ GroupId: groupId, Address: member2.String(), }, - true, - "should not be greater than the total group weight", - 0, + false, + "", + 1, }, { "valid request: can leave group (percentage decision policy)", diff --git a/x/group/keeper/msg_server.go b/x/group/keeper/msg_server.go index 06767714fcea..c55b4773ec20 100644 --- a/x/group/keeper/msg_server.go +++ b/x/group/keeper/msg_server.go @@ -829,42 +829,13 @@ func (k Keeper) LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*gr return nil, err } - iter, err := k.getGroupPoliciesByGroup(ctx, req.GroupId, nil) - if err != nil { - return nil, err - } - defer iter.Close() - - // update group weight and increment group version - groupInfo.TotalWeight = updatedWeight.String() - groupInfo.Version++ - - var groupPolicy group.GroupPolicyInfo - for { - ctx.GasMeter().ConsumeGas(gasCostPerIteration, "group policy") - if _, err := iter.LoadNext(&groupPolicy); err != nil { - if errors.ErrORMIteratorDone.Is(err) { - break - } - - return nil, err - } - - policyI := groupPolicy.GetDecisionPolicy() - if policyI == nil { - return nil, sdkerrors.ErrInvalidRequest.Wrapf("expected %T, got %T", (group.DecisionPolicy)(nil), groupPolicy.DecisionPolicy.GetCachedValue()) - } - - if err := policyI.Validate(groupInfo, k.config); err != nil { - return nil, err - } - } - // delete group member in the groupMemberTable. if err := k.groupMemberTable.Delete(ctx.KVStore(k.key), gm); err != nil { return nil, sdkerrors.Wrap(err, "group member") } + // update group weight + groupInfo.TotalWeight = updatedWeight.String() if err := k.groupTable.Update(ctx.KVStore(k.key), groupInfo.Id, &groupInfo); err != nil { return nil, err } diff --git a/x/group/simulation/operations.go b/x/group/simulation/operations.go index 8f25c4e29d65..e0d1bd537733 100644 --- a/x/group/simulation/operations.go +++ b/x/group/simulation/operations.go @@ -1170,10 +1170,6 @@ func SimulateMsgLeaveGroup(k keeper.Keeper, ak group.AccountKeeper, bk group.Ban _, _, err = app.SimDeliver(txGen.TxEncoder(), tx) if err != nil { - if strings.Contains(err.Error(), "should not be greater than the total group weight") { - return simtypes.NoOpMsg(group.ModuleName, TypeMsgLeaveGroup, err.Error()), nil, nil - } - return simtypes.NoOpMsg(group.ModuleName, msg.Type(), err.Error()), nil, err } diff --git a/x/group/spec/03_messages.md b/x/group/spec/03_messages.md index 3c4e2a59a32a..cc4d2c96f860 100644 --- a/x/group/spec/03_messages.md +++ b/x/group/spec/03_messages.md @@ -139,4 +139,3 @@ The `MsgLeaveGroup` allows group member to leave the group. It's expecting to fail if: * the group member is not part of the group. -* group weight updates that breaks decision policy. \ No newline at end of file From 2addb6343deb95beab6fbc99b902598db1df8e85 Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Fri, 4 Mar 2022 12:24:46 +0530 Subject: [PATCH 29/32] chore: fix cli test --- x/group/client/testutil/tx.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/group/client/testutil/tx.go b/x/group/client/testutil/tx.go index 456f08dd0485..bcae42346dbe 100644 --- a/x/group/client/testutil/tx.go +++ b/x/group/client/testutil/tx.go @@ -2173,7 +2173,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { val.Address.String(), "4", "AQ==", - "{\"@type\":\"/cosmos.group.v1beta1.ThresholdDecisionPolicy\", \"threshold\":\"3\", \"timeout\":\"30000s\"}", + "{\"@type\":\"/cosmos.group.v1beta1.ThresholdDecisionPolicy\", \"threshold\":\"3\", \"windows\":{\"voting_period\":\"1s\"}}", }, commonFlags..., ), From e95daee2f11c18e0a34d1d1560eed793db5f811c Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Fri, 4 Mar 2022 15:16:15 +0530 Subject: [PATCH 30/32] review changes --- x/group/keeper/keeper_test.go | 218 +++++++++++++++++----------------- 1 file changed, 110 insertions(+), 108 deletions(-) diff --git a/x/group/keeper/keeper_test.go b/x/group/keeper/keeper_test.go index a1a0f0a3aab7..4cc95f6d1422 100644 --- a/x/group/keeper/keeper_test.go +++ b/x/group/keeper/keeper_test.go @@ -18,6 +18,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/bank/testutil" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/group" + "github.com/cosmos/cosmos-sdk/x/group/internal/math" "github.com/cosmos/cosmos-sdk/x/group/keeper" ) @@ -1018,7 +1019,12 @@ func (s *TestSuite) TestUpdateGroupPolicyAdmin() { addr5 := addrs[4] admin, newAdmin := addr1, addr2 - groupPolicyAddr, myGroupID, policy := createGroupAndGroupPolicy(admin, s) + policy := group.NewThresholdDecisionPolicy( + "1", + time.Second, + 0, + ) + groupPolicyAddr, myGroupID := s.createGroupAndGroupPolicy(admin, nil, policy) specs := map[string]struct { req *group.MsgUpdateGroupPolicyAdmin @@ -1101,7 +1107,12 @@ func (s *TestSuite) TestUpdateGroupPolicyMetadata() { addr5 := addrs[4] admin := addr1 - groupPolicyAddr, myGroupID, policy := createGroupAndGroupPolicy(admin, s) + policy := group.NewThresholdDecisionPolicy( + "1", + time.Second, + 0, + ) + groupPolicyAddr, myGroupID := s.createGroupAndGroupPolicy(admin, nil, policy) specs := map[string]struct { req *group.MsgUpdateGroupPolicyMetadata @@ -1175,10 +1186,15 @@ func (s *TestSuite) TestUpdateGroupPolicyDecisionPolicy() { addr5 := addrs[4] admin := addr1 - groupPolicyAddr, myGroupID, policy := createGroupAndGroupPolicy(admin, s) + policy := group.NewThresholdDecisionPolicy( + "1", + time.Second, + 0, + ) + groupPolicyAddr, myGroupID := s.createGroupAndGroupPolicy(admin, nil, policy) specs := map[string]struct { - preRun func(admin sdk.AccAddress, s *TestSuite) (policyAddr string, groupId uint64, policy group.DecisionPolicy) + preRun func(admin sdk.AccAddress) (policyAddr string, groupId uint64) req *group.MsgUpdateGroupPolicyDecisionPolicy policy group.DecisionPolicy expGroupPolicy *group.GroupPolicyInfo @@ -1223,8 +1239,8 @@ func (s *TestSuite) TestUpdateGroupPolicyDecisionPolicy() { expErr: false, }, "correct data with percentage decision policy": { - preRun: func(admin sdk.AccAddress, s *TestSuite) (policyAddr string, groupId uint64, policy group.DecisionPolicy) { - return createGroupAndGroupPolicy(admin, s) + preRun: func(admin sdk.AccAddress) (string, uint64) { + return s.createGroupAndGroupPolicy(admin, nil, policy) }, req: &group.MsgUpdateGroupPolicyDecisionPolicy{ Admin: admin.String(), @@ -1250,7 +1266,7 @@ func (s *TestSuite) TestUpdateGroupPolicyDecisionPolicy() { err := spec.expGroupPolicy.SetDecisionPolicy(spec.policy) s.Require().NoError(err) if spec.preRun != nil { - policyAddr1, groupId, _ := spec.preRun(admin, s) + policyAddr1, groupId := spec.preRun(admin) policyAddr = policyAddr1 // update the expected info with new group policy details @@ -2419,115 +2435,79 @@ func (s *TestSuite) TestExecProposal() { func (s *TestSuite) TestLeaveGroup() { addrs := simapp.AddTestAddrsIncremental(s.app, s.sdkCtx, 7, sdk.NewInt(3000000)) - admin := addrs[0] + admin1 := addrs[0] member1 := addrs[1] member2 := addrs[2] member3 := addrs[3] member4 := addrs[4] admin2 := addrs[5] admin3 := addrs[6] - require := s.Require() - res, err := s.keeper.CreateGroup(s.ctx, &group.MsgCreateGroup{ - Admin: admin.String(), - Members: []group.Member{ - { - Address: member1.String(), - Weight: "1", - Metadata: "metadata", - AddedAt: s.sdkCtx.BlockTime(), - }, - { - Address: member2.String(), - Weight: "2", - Metadata: "metadata", - AddedAt: s.sdkCtx.BlockTime(), - }, - { - Address: member3.String(), - Weight: "3", - Metadata: "metadata", - AddedAt: s.sdkCtx.BlockTime(), - }, - }, - }) - require.NoError(err) - require.NotNil(res) - res1, err := s.keeper.CreateGroup(s.ctx, &group.MsgCreateGroup{ - Admin: admin2.String(), - Members: []group.Member{ - { - Address: member1.String(), - Weight: "1", - Metadata: "metadata", - AddedAt: s.sdkCtx.BlockTime(), - }, + members := []group.Member{ + { + Address: member1.String(), + Weight: "1", + Metadata: "metadata", + AddedAt: s.sdkCtx.BlockTime(), }, - }) - require.NoError(err) - require.NotNil(res1) - - res2, err := s.keeper.CreateGroup(s.ctx, &group.MsgCreateGroup{ - Admin: admin3.String(), - Members: []group.Member{ - { - Address: member1.String(), - Weight: "1", - Metadata: "metadata", - AddedAt: s.sdkCtx.BlockTime(), - }, - { - Address: member2.String(), - Weight: "2", - Metadata: "metadata", - AddedAt: s.sdkCtx.BlockTime(), - }, + { + Address: member2.String(), + Weight: "2", + Metadata: "metadata", + AddedAt: s.sdkCtx.BlockTime(), + }, + { + Address: member3.String(), + Weight: "3", + Metadata: "metadata", + AddedAt: s.sdkCtx.BlockTime(), }, - }) - require.NoError(err) - require.NotNil(res2) - - groupPolicy := &group.MsgCreateGroupPolicy{ - Admin: admin.String(), - GroupId: res.GroupId, - Metadata: "metadata", } policy := group.NewThresholdDecisionPolicy( "3", time.Hour, time.Hour, ) - require.NoError(groupPolicy.SetDecisionPolicy(policy)) - require.NoError(err) + _, groupID1 := s.createGroupAndGroupPolicy(admin1, members, policy) - policyRes, err := s.keeper.CreateGroupPolicy(s.ctx, groupPolicy) - require.NoError(err) - require.NotNil(policyRes) + members = []group.Member{ + { + Address: member1.String(), + Weight: "1", + Metadata: "metadata", + AddedAt: s.sdkCtx.BlockTime(), + }, + } + _, groupID2 := s.createGroupAndGroupPolicy(admin2, members, nil) - groupPolicy = &group.MsgCreateGroupPolicy{ - Admin: admin3.String(), - GroupId: res2.GroupId, - Metadata: "metadata", + members = []group.Member{ + { + Address: member1.String(), + Weight: "1", + Metadata: "metadata", + AddedAt: s.sdkCtx.BlockTime(), + }, + { + Address: member2.String(), + Weight: "2", + Metadata: "metadata", + AddedAt: s.sdkCtx.BlockTime(), + }, } - pPolicy := &group.PercentageDecisionPolicy{ + policy = &group.PercentageDecisionPolicy{ Percentage: "0.5", Windows: &group.DecisionPolicyWindows{VotingPeriod: time.Hour}, } - require.NoError(groupPolicy.SetDecisionPolicy(pPolicy)) - require.NoError(err) - policyRes1, err := s.keeper.CreateGroupPolicy(s.ctx, groupPolicy) - require.NoError(err) - require.NotNil(policyRes1) - - groupId := res.GroupId + _, groupID3 := s.createGroupAndGroupPolicy(admin3, members, policy) testCases := []struct { name string req *group.MsgLeaveGroup expErr bool errMsg string expMembersSize int + memberWeight math.Dec }{ { "expect error: group not found", @@ -2538,61 +2518,75 @@ func (s *TestSuite) TestLeaveGroup() { true, "group: not found", 0, + math.NewDecFromInt64(0), }, { "expect error: member not part of group", &group.MsgLeaveGroup{ - GroupId: groupId, + GroupId: groupID1, Address: member4.String(), }, true, "not part of group", 0, + math.NewDecFromInt64(0), }, { "valid testcase: decision policy is not present", &group.MsgLeaveGroup{ - GroupId: res1.GroupId, + GroupId: groupID2, Address: member1.String(), }, false, "", 0, + math.NewDecFromInt64(1), }, { "valid testcase: threshold decision policy", &group.MsgLeaveGroup{ - GroupId: groupId, + GroupId: groupID1, Address: member3.String(), }, false, "", 2, + math.NewDecFromInt64(3), }, { "valid request: can leave group policy threshold more than group weight", &group.MsgLeaveGroup{ - GroupId: groupId, + GroupId: groupID1, Address: member2.String(), }, false, "", 1, + math.NewDecFromInt64(2), }, { "valid request: can leave group (percentage decision policy)", &group.MsgLeaveGroup{ - GroupId: res2.GroupId, + GroupId: groupID3, Address: member2.String(), }, false, "", 1, + math.NewDecFromInt64(2), }, } for _, tc := range testCases { s.Run(tc.name, func() { + var groupWeight1 math.Dec + if !tc.expErr { + groupRes, err := s.keeper.GroupInfo(s.ctx, &group.QueryGroupInfoRequest{GroupId: tc.req.GroupId}) + require.NoError(err) + groupWeight1, err = math.NewNonNegativeDecFromString(groupRes.Info.TotalWeight) + require.NoError(err) + } + res, err := s.keeper.LeaveGroup(s.ctx, tc.req) if tc.expErr { require.Error(err) @@ -2605,6 +2599,15 @@ func (s *TestSuite) TestLeaveGroup() { }) require.NoError(err) require.Len(res.Members, tc.expMembersSize) + + groupRes, err := s.keeper.GroupInfo(s.ctx, &group.QueryGroupInfoRequest{GroupId: tc.req.GroupId}) + require.NoError(err) + groupWeight2, err := math.NewNonNegativeDecFromString(groupRes.Info.TotalWeight) + require.NoError(err) + + rWeight, err := groupWeight1.Sub(tc.memberWeight) + require.NoError(err) + require.Equal(rWeight.Cmp(groupWeight2), 0) } }) } @@ -2640,32 +2643,31 @@ func submitProposalAndVote( return myProposalID } -func createGroupAndGroupPolicy( +func (s *TestSuite) createGroupAndGroupPolicy( admin sdk.AccAddress, - s *TestSuite, -) (string, uint64, group.DecisionPolicy) { + members []group.Member, + policy group.DecisionPolicy, +) (policyAddr string, groupID uint64) { groupRes, err := s.keeper.CreateGroup(s.ctx, &group.MsgCreateGroup{ Admin: admin.String(), - Members: nil, + Members: members, }) s.Require().NoError(err) - myGroupID := groupRes.GroupId + groupID = groupRes.GroupId groupPolicy := &group.MsgCreateGroupPolicy{ Admin: admin.String(), - GroupId: myGroupID, + GroupId: groupID, } - policy := group.NewThresholdDecisionPolicy( - "1", - time.Second, - 0, - ) - err = groupPolicy.SetDecisionPolicy(policy) - s.Require().NoError(err) + if policy != nil { + err = groupPolicy.SetDecisionPolicy(policy) + s.Require().NoError(err) - groupPolicyRes, err := s.keeper.CreateGroupPolicy(s.ctx, groupPolicy) - s.Require().NoError(err) + groupPolicyRes, err := s.keeper.CreateGroupPolicy(s.ctx, groupPolicy) + s.Require().NoError(err) + policyAddr = groupPolicyRes.Address + } - return groupPolicyRes.Address, myGroupID, policy + return policyAddr, groupID } From 0d23961f6bf6e177a52ab6080b69db85cfc55388 Mon Sep 17 00:00:00 2001 From: aleem1314 Date: Fri, 4 Mar 2022 15:51:12 +0530 Subject: [PATCH 31/32] fix cli test --- x/group/client/testutil/tx.go | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/x/group/client/testutil/tx.go b/x/group/client/testutil/tx.go index bcae42346dbe..5fa3f077de65 100644 --- a/x/group/client/testutil/tx.go +++ b/x/group/client/testutil/tx.go @@ -2165,13 +2165,16 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { ), ) require.NoError(err, out.String()) + var txResp sdk.TxResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String()) + groupID := s.getGroupIdFromTxResponse(txResp) // create group policy out, err = cli.ExecTestCLICmd(clientCtx, client.MsgCreateGroupPolicyCmd(), append( []string{ val.Address.String(), - "4", + groupID, "AQ==", "{\"@type\":\"/cosmos.group.v1beta1.ThresholdDecisionPolicy\", \"threshold\":\"3\", \"windows\":{\"voting_period\":\"1s\"}}", }, @@ -2180,7 +2183,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { ) require.NoError(err, out.String()) - out, err = cli.ExecTestCLICmd(clientCtx, client.QueryGroupPoliciesByGroupCmd(), []string{"4", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) + out, err = cli.ExecTestCLICmd(clientCtx, client.QueryGroupPoliciesByGroupCmd(), []string{groupID, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) require.NoError(err, out.String()) require.NotNil(out) var resp group.QueryGroupPoliciesByGroupResponse @@ -2198,7 +2201,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { append( []string{ "address", - "4", + groupID, fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), }, commonFlags..., @@ -2224,7 +2227,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { append( []string{ members[2], - "4", + groupID, fmt.Sprintf("--%s=%s", flags.FlagFrom, members[2]), }, commonFlags..., @@ -2237,7 +2240,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { append( []string{ members[2], - "4", + groupID, fmt.Sprintf("--%s=%s", flags.FlagFrom, members[2]), }, commonFlags..., @@ -2246,11 +2249,11 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { "is not part of group", }, { - "error: can leave group policy threshold is more than group weight", + "can leave group policy threshold is more than group weight", append( []string{ members[1], - "4", + groupID, fmt.Sprintf("--%s=%s", flags.FlagFrom, members[1]), }, commonFlags..., @@ -2277,6 +2280,21 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { } } +func (s *IntegrationTestSuite) getGroupIdFromTxResponse(txResp sdk.TxResponse) string { + s.Require().Greater(len(txResp.Logs), 0) + s.Require().NotNil(txResp.Logs[0].Events) + events := txResp.Logs[0].Events + createProposalEvent, _ := sdk.TypedEventToEvent(&group.EventCreateGroup{}) + + for _, e := range events { + if e.Type == createProposalEvent.Type { + return strings.ReplaceAll(e.Attributes[0].Value, "\"", "") + } + } + + return "" +} + // createCLIProposal writes a CLI proposal with a MsgSend to a file. Returns // the path to the JSON file. func (s *IntegrationTestSuite) createCLIProposal(groupPolicyAddress, proposer, sendFrom, sendTo, metadata string) string { From ea82a8c480e79805cb95d26ab52af4c9a745acbc Mon Sep 17 00:00:00 2001 From: MD Aleem <72057206+aleem1314@users.noreply.github.com> Date: Fri, 4 Mar 2022 18:36:02 +0530 Subject: [PATCH 32/32] Update x/group/spec/03_messages.md Co-authored-by: Marie Gauthier --- x/group/spec/03_messages.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/group/spec/03_messages.md b/x/group/spec/03_messages.md index cc4d2c96f860..20ba40cfbc01 100644 --- a/x/group/spec/03_messages.md +++ b/x/group/spec/03_messages.md @@ -132,7 +132,7 @@ The messages that are part of this proposal won't be executed if: ## Msg/LeaveGroup -The `MsgLeaveGroup` allows group member to leave the group. +The `MsgLeaveGroup` allows group member to leave a group. +++ https://github.com/cosmos/cosmos-sdk/blob/a635fd78663d04c5de23f4d032e5a3abea1b005a/proto/cosmos/group/v1beta1/tx.proto#L352-L361