From 82ef03db95906144102110fa57fadafbe56d6e95 Mon Sep 17 00:00:00 2001 From: atheesh Date: Mon, 7 Nov 2022 18:08:17 +0530 Subject: [PATCH 01/20] add changes --- CHANGELOG.md | 1 + api/cosmos/auth/v1beta1/query.pulsar.go | 325 ++++++++++++++---------- proto/cosmos/auth/v1beta1/query.proto | 7 + x/auth/client/cli/query.go | 11 +- x/auth/keeper/grpc_query.go | 11 +- x/auth/keeper/grpc_query_test.go | 20 ++ x/auth/types/query.pb.go | 175 ++++++++----- x/auth/types/query.pb.gw.go | 18 ++ 8 files changed, 368 insertions(+), 200 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd68cefd5a2d..2af34bd404f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,6 +85,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#13236](https://github.com/cosmos/cosmos-sdk/pull/13236) Integrate Filter Logging * [#13528](https://github.com/cosmos/cosmos-sdk/pull/13528) Update `ValidateMemoDecorator` to only check memo against `MaxMemoCharacters` param when a memo is present. * [#13651](https://github.com/cosmos/cosmos-sdk/pull/13651) Update `server/config/config.GetConfig` function. +* [#xxxxx](https://github.com/cosmos/cosmos-sdk/pull/xxxxx) `int64` type for `id` in `AccountAddressByID` grpc query is now deprecated, update to use account-id(type of uint64) to request `AccountAddressByID`. ### State Machine Breaking diff --git a/api/cosmos/auth/v1beta1/query.pulsar.go b/api/cosmos/auth/v1beta1/query.pulsar.go index cea8222a35fe..88f5d938ba58 100644 --- a/api/cosmos/auth/v1beta1/query.pulsar.go +++ b/api/cosmos/auth/v1beta1/query.pulsar.go @@ -6838,14 +6838,16 @@ func (x *fastReflection_AddressStringToBytesResponse) ProtoMethods() *protoiface } var ( - md_QueryAccountAddressByIDRequest protoreflect.MessageDescriptor - fd_QueryAccountAddressByIDRequest_id protoreflect.FieldDescriptor + md_QueryAccountAddressByIDRequest protoreflect.MessageDescriptor + fd_QueryAccountAddressByIDRequest_id protoreflect.FieldDescriptor + fd_QueryAccountAddressByIDRequest_account_id protoreflect.FieldDescriptor ) func init() { file_cosmos_auth_v1beta1_query_proto_init() md_QueryAccountAddressByIDRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountAddressByIDRequest") fd_QueryAccountAddressByIDRequest_id = md_QueryAccountAddressByIDRequest.Fields().ByName("id") + fd_QueryAccountAddressByIDRequest_account_id = md_QueryAccountAddressByIDRequest.Fields().ByName("account_id") } var _ protoreflect.Message = (*fastReflection_QueryAccountAddressByIDRequest)(nil) @@ -6919,6 +6921,12 @@ func (x *fastReflection_QueryAccountAddressByIDRequest) Range(f func(protoreflec return } } + if x.AccountId != uint64(0) { + value := protoreflect.ValueOfUint64(x.AccountId) + if !f(fd_QueryAccountAddressByIDRequest_account_id, value) { + return + } + } } // Has reports whether a field is populated. @@ -6936,6 +6944,8 @@ func (x *fastReflection_QueryAccountAddressByIDRequest) Has(fd protoreflect.Fiel switch fd.FullName() { case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": return x.Id != int64(0) + case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.account_id": + return x.AccountId != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) @@ -6954,6 +6964,8 @@ func (x *fastReflection_QueryAccountAddressByIDRequest) Clear(fd protoreflect.Fi switch fd.FullName() { case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": x.Id = int64(0) + case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.account_id": + x.AccountId = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) @@ -6973,6 +6985,9 @@ func (x *fastReflection_QueryAccountAddressByIDRequest) Get(descriptor protorefl case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": value := x.Id return protoreflect.ValueOfInt64(value) + case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.account_id": + value := x.AccountId + return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) @@ -6995,6 +7010,8 @@ func (x *fastReflection_QueryAccountAddressByIDRequest) Set(fd protoreflect.Fiel switch fd.FullName() { case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": x.Id = value.Int() + case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.account_id": + x.AccountId = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) @@ -7017,6 +7034,8 @@ func (x *fastReflection_QueryAccountAddressByIDRequest) Mutable(fd protoreflect. switch fd.FullName() { case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": panic(fmt.Errorf("field id of message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest is not mutable")) + case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.account_id": + panic(fmt.Errorf("field account_id of message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) @@ -7032,6 +7051,8 @@ func (x *fastReflection_QueryAccountAddressByIDRequest) NewField(fd protoreflect switch fd.FullName() { case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.account_id": + return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) @@ -7104,6 +7125,9 @@ func (x *fastReflection_QueryAccountAddressByIDRequest) ProtoMethods() *protoifa if x.Id != 0 { n += 1 + runtime.Sov(uint64(x.Id)) } + if x.AccountId != 0 { + n += 1 + runtime.Sov(uint64(x.AccountId)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -7133,6 +7157,11 @@ func (x *fastReflection_QueryAccountAddressByIDRequest) ProtoMethods() *protoifa i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.AccountId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.AccountId)) + i-- + dAtA[i] = 0x10 + } if x.Id != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) i-- @@ -7206,6 +7235,25 @@ func (x *fastReflection_QueryAccountAddressByIDRequest) ProtoMethods() *protoifa break } } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AccountId", wireType) + } + x.AccountId = 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.AccountId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -9120,10 +9168,16 @@ type QueryAccountAddressByIDRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Deprecated, use account_id instead + // // id is the account number of the address to be queried. This field // should have been an uint64 (like all account numbers), and will be // updated to uint64 in a future version of the auth query. Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // account_id is the account number of the address to be queried. This field + // should have been an uint64 (like all account numbers), and will be + // updated to uint64 in a future version of the auth query. + AccountId uint64 `protobuf:"varint,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` } func (x *QueryAccountAddressByIDRequest) Reset() { @@ -9153,6 +9207,13 @@ func (x *QueryAccountAddressByIDRequest) GetId() int64 { return 0 } +func (x *QueryAccountAddressByIDRequest) GetAccountId() uint64 { + if x != nil { + return x.AccountId + } + return 0 +} + // QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method // // Since: cosmos-sdk 0.46.2 @@ -9362,143 +9423,145 @@ var file_cosmos_auth_v1beta1_query_proto_rawDesc = []byte{ 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x30, 0x0a, 0x1e, 0x51, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x4f, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x64, 0x0a, - 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x41, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x22, 0x4d, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x50, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, - 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x04, - 0x69, 0x6e, 0x66, 0x6f, 0x32, 0xef, 0x0c, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x8d, - 0x01, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x63, 0x6f, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x64, 0x0a, 0x1f, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x41, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0x4d, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x50, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, + 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x2a, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, - 0x1d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x94, - 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, + 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x04, 0x69, + 0x6e, 0x66, 0x6f, 0x32, 0xef, 0x0c, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x8d, 0x01, + 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x34, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xb5, 0x01, 0x0a, 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x64, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x85, 0x01, - 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x88, 0xe7, 0xb0, - 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xa6, 0x01, 0x0a, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x2a, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x94, 0x01, + 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x88, 0xe7, 0xb0, - 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0xbc, - 0x01, 0x0a, 0x13, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, - 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, - 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x88, 0x01, - 0x0a, 0x0c, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x28, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, - 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, + 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x12, 0xb0, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, - 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x7d, 0x12, 0xb1, 0x01, 0x0a, 0x14, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, - 0x79, 0x74, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x12, - 0xa4, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, + 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x7d, 0x12, 0xb5, 0x01, 0x0a, 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x64, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x85, 0x01, 0x0a, + 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x88, 0xe7, 0xb0, 0x2a, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0xa6, 0x01, 0x0a, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x88, 0xe7, 0xb0, 0x2a, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0xbc, 0x01, + 0x0a, 0x13, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, + 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x88, 0x01, 0x0a, + 0x0c, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, - 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x7b, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x42, 0xc5, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, + 0x74, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x65, + 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x12, 0xb0, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x7d, 0x12, 0xb1, 0x01, 0x0a, 0x14, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, + 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x12, 0xa4, + 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2c, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, - 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x5c, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, - 0x74, 0x68, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, - 0x3a, 0x41, 0x75, 0x74, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, 0xb0, + 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x7b, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x7d, 0x42, 0xc5, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x5c, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, + 0x68, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, + 0x41, 0x75, 0x74, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto index 77c25f3edf0a..aa0ea305bb8a 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -197,10 +197,17 @@ message AddressStringToBytesResponse { // // Since: cosmos-sdk 0.46.2 message QueryAccountAddressByIDRequest { + // Deprecated, use account_id instead + // // id is the account number of the address to be queried. This field // should have been an uint64 (like all account numbers), and will be // updated to uint64 in a future version of the auth query. int64 id = 1; + + // account_id is the account number of the address to be queried. This field + // should have been an uint64 (like all account numbers), and will be + // updated to uint64 in a future version of the auth query. + uint64 account_id = 2; } // QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method diff --git a/x/auth/client/cli/query.go b/x/auth/client/cli/query.go index 7af525b6be58..0197df166979 100644 --- a/x/auth/client/cli/query.go +++ b/x/auth/client/cli/query.go @@ -146,8 +146,17 @@ func GetAccountAddressByIDCmd() *cobra.Command { return err } + accNumUint, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.AccountAddressByID(cmd.Context(), &types.QueryAccountAddressByIDRequest{Id: accNum}) + res, err := queryClient.AccountAddressByID(cmd.Context(), &types.QueryAccountAddressByIDRequest{ + Id: accNum, + AccountId: accNumUint, + }) + if err != nil { return err } diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 2d5ac8cde223..70d42f7f83bd 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -28,8 +28,17 @@ func (ak AccountKeeper) AccountAddressByID(c context.Context, req *types.QueryAc return nil, status.Error(codes.InvalidArgument, "invalid account number") } + var accId uint64 + if req.AccountId > 0 && req.Id > 0 && req.AccountId != uint64(req.Id) { + return nil, status.Errorf(codes.InvalidArgument, "different values passed for id (%d) & account-id (%d)", req.Id, req.AccountId) + } else if req.AccountId > 0 { + accId = req.AccountId + } else if req.Id > 0 { + accId = uint64(req.Id) + } + ctx := sdk.UnwrapSDKContext(c) - address := ak.GetAccountAddressByID(ctx, uint64(req.GetId())) + address := ak.GetAccountAddressByID(ctx, accId) if len(address) == 0 { return nil, status.Errorf(codes.NotFound, "account address not found with account number %d", req.Id) } diff --git a/x/auth/keeper/grpc_query_test.go b/x/auth/keeper/grpc_query_test.go index a1bc322a778a..e2ed16c4eb52 100644 --- a/x/auth/keeper/grpc_query_test.go +++ b/x/auth/keeper/grpc_query_test.go @@ -174,6 +174,14 @@ func (suite *KeeperTestSuite) TestGRPCQueryAccountAddressByID() { false, func(res *types.QueryAccountAddressByIDResponse) {}, }, + { + "invalid: account-id, id are not same", + func() { + req = &types.QueryAccountAddressByIDRequest{AccountId: 0, Id: 1} + }, + false, + func(res *types.QueryAccountAddressByIDResponse) {}, + }, { "account address not found", func() { @@ -182,6 +190,18 @@ func (suite *KeeperTestSuite) TestGRPCQueryAccountAddressByID() { false, func(res *types.QueryAccountAddressByIDResponse) {}, }, + { + "valid account-id", + func() { + account := suite.accountKeeper.NewAccountWithAddress(suite.ctx, addr) + suite.accountKeeper.SetAccount(suite.ctx, account) + req = &types.QueryAccountAddressByIDRequest{AccountId: account.GetAccountNumber()} + }, + true, + func(res *types.QueryAccountAddressByIDResponse) { + suite.Require().NotNil(res.AccountAddress) + }, + }, { "valid request", func() { diff --git a/x/auth/types/query.pb.go b/x/auth/types/query.pb.go index af198a88c18c..f7c68b7cf08b 100644 --- a/x/auth/types/query.pb.go +++ b/x/auth/types/query.pb.go @@ -759,10 +759,16 @@ func (m *AddressStringToBytesResponse) GetAddressBytes() []byte { // // Since: cosmos-sdk 0.46.2 type QueryAccountAddressByIDRequest struct { + // Deprecated, use account_id instead + // // id is the account number of the address to be queried. This field // should have been an uint64 (like all account numbers), and will be // updated to uint64 in a future version of the auth query. Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // account_id is the account number of the address to be queried. This field + // should have been an uint64 (like all account numbers), and will be + // updated to uint64 in a future version of the auth query. + AccountId uint64 `protobuf:"varint,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` } func (m *QueryAccountAddressByIDRequest) Reset() { *m = QueryAccountAddressByIDRequest{} } @@ -805,6 +811,13 @@ func (m *QueryAccountAddressByIDRequest) GetId() int64 { return 0 } +func (m *QueryAccountAddressByIDRequest) GetAccountId() uint64 { + if m != nil { + return m.AccountId + } + return 0 +} + // QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method // // Since: cosmos-sdk 0.46.2 @@ -974,73 +987,74 @@ func init() { func init() { proto.RegisterFile("cosmos/auth/v1beta1/query.proto", fileDescriptor_c451370b3929a27c) } var fileDescriptor_c451370b3929a27c = []byte{ - // 1043 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0xbd, 0x69, 0x48, 0xc2, 0x8b, 0x1b, 0xa4, 0x89, 0x2b, 0xc2, 0x3a, 0xb5, 0xa3, 0x0d, - 0x34, 0x4e, 0xa8, 0x77, 0x1b, 0xc7, 0x95, 0xf8, 0x25, 0xa4, 0x6c, 0x03, 0x28, 0x87, 0x22, 0xe3, - 0xe6, 0xc4, 0x01, 0x6b, 0xed, 0x5d, 0x3b, 0x2b, 0xea, 0x1d, 0xd7, 0xbb, 0x46, 0xb5, 0x22, 0x5f, - 0x90, 0x90, 0x72, 0x41, 0x42, 0x82, 0x3f, 0x20, 0x07, 0xc4, 0xb9, 0x48, 0xe1, 0xc6, 0x1f, 0x50, - 0xf5, 0x14, 0xc1, 0x85, 0x13, 0x42, 0x09, 0x12, 0xdc, 0xf8, 0x17, 0x90, 0x67, 0xde, 0xac, 0x77, - 0x93, 0xb1, 0xbd, 0x51, 0x4f, 0x59, 0xcf, 0xbc, 0xf7, 0x7d, 0x9f, 0x99, 0x79, 0x33, 0xdf, 0x40, - 0xbe, 0x41, 0xfd, 0x36, 0xf5, 0x0d, 0xab, 0x17, 0x1c, 0x1a, 0x5f, 0x6d, 0xd7, 0x9d, 0xc0, 0xda, - 0x36, 0x9e, 0xf4, 0x9c, 0x6e, 0x5f, 0xef, 0x74, 0x69, 0x40, 0xc9, 0x32, 0x0f, 0xd0, 0x87, 0x01, - 0x3a, 0x06, 0xa8, 0x5b, 0x98, 0x55, 0xb7, 0x7c, 0x87, 0x47, 0x87, 0xb9, 0x1d, 0xab, 0xe5, 0x7a, - 0x56, 0xe0, 0x52, 0x8f, 0x0b, 0xa8, 0x99, 0x16, 0x6d, 0x51, 0xf6, 0x69, 0x0c, 0xbf,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 0xdc, 0x36, - 0xa4, 0x76, 0x25, 0x10, 0x7e, 0x50, 0x60, 0x1e, 0x05, 0x48, 0x61, 0x6a, 0x0d, 0x41, 0xb3, 0x99, - 0x20, 0x12, 0x61, 0xca, 0x23, 0x98, 0x4d, 0xb2, 0x31, 0x11, 0xc6, 0x38, 0xc2, 0x13, 0x18, 0x90, - 0x5f, 0x14, 0x20, 0x57, 0x7b, 0x86, 0xec, 0x4c, 0xad, 0x7b, 0xb5, 0x27, 0xd5, 0xf2, 0xf5, 0x92, - 0xae, 0xc1, 0x1d, 0x5e, 0x98, 0x9a, 0x6b, 0x1b, 0x47, 0xae, 0x3d, 0x20, 0xdf, 0x28, 0x30, 0xc7, - 0x9f, 0x71, 0xb2, 0x31, 0xbe, 0x6c, 0xcc, 0x33, 0xd4, 0xc2, 0xf4, 0x40, 0x64, 0x2a, 0x8c, 0x98, - 0x6e, 0x93, 0xac, 0x94, 0x89, 0xbb, 0x06, 0xf9, 0x49, 0x81, 0xf8, 0x7b, 0xe9, 0x13, 0x63, 0x7c, - 0x19, 0xa9, 0xb7, 0xa8, 0xf7, 0x92, 0x27, 0x20, 0xdf, 0xf6, 0x88, 0xef, 0x0e, 0x79, 0x53, 0xca, - 0xd7, 0x66, 0x99, 0xb5, 0xb0, 0xff, 0x7e, 0x55, 0x60, 0x59, 0x62, 0x10, 0xa4, 0x9c, 0xb0, 0x78, - 0xcc, 0x86, 0xd4, 0xfb, 0xd7, 0xcc, 0x42, 0xee, 0x77, 0x46, 0xdc, 0x45, 0xf2, 0x76, 0x12, 0x6e, - 0xe3, 0x68, 0x68, 0x71, 0x03, 0x72, 0xac, 0x40, 0x3a, 0xea, 0x32, 0x63, 0xee, 0x90, 0xc4, 0x9f, - 0xc6, 0xdc, 0x21, 0x99, 0x65, 0x69, 0xeb, 0x13, 0x8f, 0x9c, 0x1b, 0x17, 0x79, 0xa6, 0x40, 0x46, - 0xe6, 0x37, 0x44, 0x7e, 0x8e, 0x13, 0xec, 0x4d, 0xdd, 0xbe, 0x46, 0x06, 0x22, 0xee, 0x4c, 0xdc, - 0x3d, 0x8e, 0x18, 0xde, 0x6f, 0x6e, 0x31, 0x03, 0xf2, 0xf3, 0x08, 0x39, 0xe6, 0x4a, 0x93, 0x91, - 0x65, 0x36, 0x38, 0x19, 0x59, 0x6a, 0x79, 0x5a, 0x99, 0x21, 0xeb, 0xe4, 0x6e, 0x22, 0x64, 0x6e, - 0xae, 0x03, 0xf2, 0xa3, 0x02, 0x8b, 0x11, 0x63, 0x20, 0x77, 0xa7, 0xbe, 0x2e, 0x11, 0x3b, 0x52, - 0x8b, 0x09, 0xa3, 0x93, 0x37, 0xa6, 0xf0, 0xce, 0xa1, 0xcf, 0x8c, 0x1e, 0x50, 0xf3, 0xc1, 0xf3, - 0xf3, 0x9c, 0x72, 0x76, 0x9e, 0x53, 0xfe, 0x3a, 0xcf, 0x29, 0xdf, 0x5d, 0xe4, 0x52, 0x67, 0x17, - 0xb9, 0xd4, 0x1f, 0x17, 0xb9, 0xd4, 0xe7, 0x9b, 0x2d, 0x37, 0x38, 0xec, 0xd5, 0xf5, 0x06, 0x6d, - 0x0b, 0x41, 0xfe, 0xa7, 0xe8, 0xdb, 0x5f, 0x1a, 0x4f, 0xb9, 0x7a, 0xd0, 0xef, 0x38, 0x7e, 0x7d, - 0x8e, 0xfd, 0x13, 0xb6, 0xf3, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x32, 0x86, 0xd7, 0x16, 0xa3, - 0x0d, 0x00, 0x00, + // 1057 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0xc7, 0xe3, 0x6e, 0x69, 0xbb, 0xaf, 0xd9, 0x22, 0x4d, 0xb3, 0xa2, 0xb8, 0x6d, 0x52, 0xb9, + 0xb0, 0xfd, 0xc1, 0xc6, 0xa6, 0x69, 0x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f, 0xa1, 0xf0, 0x81, 0x43, 0xca, 0xe4, 0x04, 0x4a, 0x4a, + 0x95, 0xfb, 0x11, 0xcc, 0x25, 0x95, 0xe1, 0xae, 0x4c, 0x5e, 0xd1, 0x27, 0x90, 0x8f, 0xdf, 0xa4, + 0x68, 0x75, 0x07, 0xfb, 0x82, 0x66, 0x01, 0xa6, 0x3c, 0x87, 0xe5, 0xde, 0xb0, 0xa6, 0x3c, 0x87, + 0xac, 0x02, 0xe0, 0x31, 0x55, 0x3d, 0x87, 0xbd, 0x0c, 0xd3, 0xd6, 0x4d, 0x1c, 0x39, 0x70, 0x34, + 0x07, 0x3b, 0x4b, 0x26, 0x88, 0x60, 0x7b, 0xf0, 0xb2, 0x50, 0x48, 0xfb, 0x06, 0x2c, 0xd8, 0x09, + 0x39, 0xed, 0x01, 0xbc, 0x12, 0xaf, 0x72, 0xe0, 0x37, 0xe8, 0xff, 0x78, 0x59, 0xb4, 0x0a, 0x2c, + 0x5d, 0x95, 0x43, 0xda, 0x32, 0x4c, 0x7b, 0x7e, 0x83, 0x62, 0x33, 0xaf, 0x49, 0xaf, 0xb9, 0x69, + 0x07, 0xa2, 0x8b, 0x2d, 0x16, 0x5d, 0xfa, 0x37, 0x0b, 0x2f, 0x31, 0x49, 0xf2, 0x8d, 0x02, 0xe2, + 0xad, 0x09, 0xc8, 0x96, 0x34, 0x5d, 0xe6, 0x11, 0xea, 0x76, 0x9a, 0x50, 0xce, 0xa8, 0x6d, 0x9f, + 0xfc, 0xfd, 0x74, 0x5b, 0xf9, 0xea, 0xb7, 0xbf, 0xbe, 0x9b, 0x2a, 0x90, 0x55, 0x43, 0xea, 0x66, + 0x02, 0xe1, 0x7b, 0x05, 0x66, 0x51, 0x80, 0x6c, 0x4e, 0xac, 0x21, 0x68, 0xb6, 0x52, 0x44, 0x22, + 0x4c, 0x79, 0x08, 0xb3, 0x45, 0x36, 0xc6, 0xc2, 0x18, 0xc7, 0x78, 0x02, 0x7d, 0xf2, 0xb3, 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x99, 0x21, 0xeb, 0xe4, 0x6e, 0x2a, 0x64, 0xee, 0xbd, 0x7d, + 0xf2, 0x83, 0x02, 0xf3, 0x31, 0x63, 0x20, 0x77, 0x27, 0xbe, 0x2e, 0x31, 0x3b, 0x52, 0x8b, 0x29, + 0xa3, 0xd3, 0x37, 0x66, 0xe4, 0xbe, 0x7e, 0x83, 0x0e, 0x1f, 0x50, 0xf3, 0xfe, 0xb3, 0xf3, 0xbc, + 0xf2, 0xe2, 0x3c, 0xaf, 0xfc, 0x79, 0x9e, 0x57, 0xbe, 0xbd, 0xc8, 0x67, 0x5e, 0x5c, 0xe4, 0x33, + 0xbf, 0x5f, 0xe4, 0x33, 0x9f, 0x6d, 0x35, 0xbd, 0xf0, 0xa8, 0x5b, 0xd3, 0xeb, 0xb4, 0x25, 0x04, + 0xf9, 0x9f, 0x62, 0xe0, 0x7c, 0x61, 0x3c, 0xe1, 0xea, 0x61, 0xaf, 0xed, 0x06, 0xb5, 0x19, 0xf6, + 0x3f, 0xda, 0xee, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4d, 0x96, 0xf5, 0xf2, 0xc2, 0x0d, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2024,6 +2038,11 @@ func (m *QueryAccountAddressByIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l + if m.AccountId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.AccountId)) + i-- + dAtA[i] = 0x10 + } if m.Id != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.Id)) i-- @@ -2349,6 +2368,9 @@ func (m *QueryAccountAddressByIDRequest) Size() (n int) { if m.Id != 0 { n += 1 + sovQuery(uint64(m.Id)) } + if m.AccountId != 0 { + n += 1 + sovQuery(uint64(m.AccountId)) + } return n } @@ -3718,6 +3740,25 @@ func (m *QueryAccountAddressByIDRequest) Unmarshal(dAtA []byte) error { break } } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountId", wireType) + } + m.AccountId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AccountId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/x/auth/types/query.pb.gw.go b/x/auth/types/query.pb.gw.go index 2ba4a2871084..36c34cb6602a 100644 --- a/x/auth/types/query.pb.gw.go +++ b/x/auth/types/query.pb.gw.go @@ -123,6 +123,10 @@ func local_request_Query_Account_0(ctx context.Context, marshaler runtime.Marsha } +var ( + filter_Query_AccountAddressByID_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + func request_Query_AccountAddressByID_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryAccountAddressByIDRequest var metadata runtime.ServerMetadata @@ -145,6 +149,13 @@ func request_Query_AccountAddressByID_0(ctx context.Context, marshaler runtime.M return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AccountAddressByID_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.AccountAddressByID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -172,6 +183,13 @@ func local_request_Query_AccountAddressByID_0(ctx context.Context, marshaler run return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AccountAddressByID_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.AccountAddressByID(ctx, &protoReq) return msg, metadata, err From 335db34528fa81d38c8f943488ca458d53441440 Mon Sep 17 00:00:00 2001 From: atheeshp <59333759+atheeshp@users.noreply.github.com> Date: Mon, 7 Nov 2022 18:15:16 +0530 Subject: [PATCH 02/20] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c44a7f000234..e5e488ef4efe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,7 +85,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#13236](https://github.com/cosmos/cosmos-sdk/pull/13236) Integrate Filter Logging * [#13528](https://github.com/cosmos/cosmos-sdk/pull/13528) Update `ValidateMemoDecorator` to only check memo against `MaxMemoCharacters` param when a memo is present. * [#13651](https://github.com/cosmos/cosmos-sdk/pull/13651) Update `server/config/config.GetConfig` function. -* [#xxxxx](https://github.com/cosmos/cosmos-sdk/pull/xxxxx) `int64` type for `id` in `AccountAddressByID` grpc query is now deprecated, update to use account-id(type of uint64) to request `AccountAddressByID`. +* [#13780](https://github.com/cosmos/cosmos-sdk/pull/13780) `int64` type for `id` in `AccountAddressByID` grpc query is now deprecated, update to use account-id(type of uint64) to request `AccountAddressByID`. ### State Machine Breaking From 4b944b84d532d7342bed61f751e6c9bbde274cbf Mon Sep 17 00:00:00 2001 From: atheeshp <59333759+atheeshp@users.noreply.github.com> Date: Mon, 7 Nov 2022 18:16:12 +0530 Subject: [PATCH 03/20] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5e488ef4efe..8935de0848ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,7 +85,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#13236](https://github.com/cosmos/cosmos-sdk/pull/13236) Integrate Filter Logging * [#13528](https://github.com/cosmos/cosmos-sdk/pull/13528) Update `ValidateMemoDecorator` to only check memo against `MaxMemoCharacters` param when a memo is present. * [#13651](https://github.com/cosmos/cosmos-sdk/pull/13651) Update `server/config/config.GetConfig` function. -* [#13780](https://github.com/cosmos/cosmos-sdk/pull/13780) `int64` type for `id` in `AccountAddressByID` grpc query is now deprecated, update to use account-id(type of uint64) to request `AccountAddressByID`. +* [#13780](https://github.com/cosmos/cosmos-sdk/pull/13780) `id` (type of int64) in `AccountAddressByID` grpc query is now deprecated, update to use account-id(type of uint64) to request `AccountAddressByID`. ### State Machine Breaking From 228944157d88d59056273baf40631404331d9e3e Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 10 Nov 2022 15:50:30 +0530 Subject: [PATCH 04/20] review changes --- proto/cosmos/auth/v1beta1/query.proto | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto index aa0ea305bb8a..c4598e24fee4 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -202,11 +202,13 @@ message QueryAccountAddressByIDRequest { // id is the account number of the address to be queried. This field // should have been an uint64 (like all account numbers), and will be // updated to uint64 in a future version of the auth query. - int64 id = 1; + int64 id = 1 [deprecated = true]; // account_id is the account number of the address to be queried. This field // should have been an uint64 (like all account numbers), and will be // updated to uint64 in a future version of the auth query. + // + // Since: cosmos-sdk 0.47 uint64 account_id = 2; } From 7f468bb96943ead055fec820c8d6942b1a4c4807 Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 10 Nov 2022 17:01:57 +0530 Subject: [PATCH 05/20] add test --- x/auth/keeper/grpc_query.go | 2 +- x/auth/keeper/grpc_query_test.go | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 70d42f7f83bd..1ced8175da13 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -25,7 +25,7 @@ func (ak AccountKeeper) AccountAddressByID(c context.Context, req *types.QueryAc } if req.Id < 0 { - return nil, status.Error(codes.InvalidArgument, "invalid account number") + return nil, status.Errorf(codes.InvalidArgument, "invalid account number %d", req.Id) } var accId uint64 diff --git a/x/auth/keeper/grpc_query_test.go b/x/auth/keeper/grpc_query_test.go index e2ed16c4eb52..00ede07b623f 100644 --- a/x/auth/keeper/grpc_query_test.go +++ b/x/auth/keeper/grpc_query_test.go @@ -182,6 +182,14 @@ func (suite *KeeperTestSuite) TestGRPCQueryAccountAddressByID() { false, func(res *types.QueryAccountAddressByIDResponse) {}, }, + { + "invalid: account-id, id are not same", + func() { + req = &types.QueryAccountAddressByIDRequest{AccountId: 1, Id: -1} + }, + false, + func(res *types.QueryAccountAddressByIDResponse) {}, + }, { "account address not found", func() { From a272769085832a84fbe3c996b3061f91fb7c308e Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 10 Nov 2022 17:47:01 +0530 Subject: [PATCH 06/20] fix static check --- x/auth/keeper/grpc_query.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 1ced8175da13..1a39cff42c1f 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -29,12 +29,15 @@ func (ak AccountKeeper) AccountAddressByID(c context.Context, req *types.QueryAc } var accId uint64 - if req.AccountId > 0 && req.Id > 0 && req.AccountId != uint64(req.Id) { + switch { + case req.AccountId > 0 && req.Id > 0 && req.AccountId != uint64(req.Id): return nil, status.Errorf(codes.InvalidArgument, "different values passed for id (%d) & account-id (%d)", req.Id, req.AccountId) - } else if req.AccountId > 0 { + case req.AccountId > 0: accId = req.AccountId - } else if req.Id > 0 { + case req.Id > 0: accId = uint64(req.Id) + default: + accId = 0 } ctx := sdk.UnwrapSDKContext(c) From dd4d69f34bb63cef4ac48545d3d87be62b22f824 Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 10 Nov 2022 18:00:10 +0530 Subject: [PATCH 07/20] fix lint --- x/auth/keeper/grpc_query.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 1a39cff42c1f..2f1b8649b5e0 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -30,14 +30,12 @@ func (ak AccountKeeper) AccountAddressByID(c context.Context, req *types.QueryAc var accId uint64 switch { - case req.AccountId > 0 && req.Id > 0 && req.AccountId != uint64(req.Id): + case req.AccountId > 0 && req.Id > 0 && req.AccountId != uint64(req.Id): //nolint:gosec return nil, status.Errorf(codes.InvalidArgument, "different values passed for id (%d) & account-id (%d)", req.Id, req.AccountId) case req.AccountId > 0: accId = req.AccountId case req.Id > 0: - accId = uint64(req.Id) - default: - accId = 0 + accId = uint64(req.Id) //nolint:gosec } ctx := sdk.UnwrapSDKContext(c) From 98b9113efbd0c265576d0de580853aec24633559 Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 10 Nov 2022 18:19:42 +0530 Subject: [PATCH 08/20] fix lint --- x/auth/keeper/grpc_query.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 2f1b8649b5e0..fcf4ce5ad4b6 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -30,12 +30,14 @@ func (ak AccountKeeper) AccountAddressByID(c context.Context, req *types.QueryAc var accId uint64 switch { - case req.AccountId > 0 && req.Id > 0 && req.AccountId != uint64(req.Id): //nolint:gosec + //nolint:gosec + case req.AccountId > 0 && req.Id > 0 && req.AccountId != uint64(req.Id): return nil, status.Errorf(codes.InvalidArgument, "different values passed for id (%d) & account-id (%d)", req.Id, req.AccountId) case req.AccountId > 0: accId = req.AccountId case req.Id > 0: - accId = uint64(req.Id) //nolint:gosec + //nolint:gosec + accId = uint64(req.Id) } ctx := sdk.UnwrapSDKContext(c) From 7e09506897326ecf70baa7a66bf4bf52492b77b0 Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 10 Nov 2022 18:24:13 +0530 Subject: [PATCH 09/20] fix lint --- x/auth/keeper/grpc_query.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index fcf4ce5ad4b6..61f2143891e7 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -30,13 +30,11 @@ func (ak AccountKeeper) AccountAddressByID(c context.Context, req *types.QueryAc var accId uint64 switch { - //nolint:gosec case req.AccountId > 0 && req.Id > 0 && req.AccountId != uint64(req.Id): return nil, status.Errorf(codes.InvalidArgument, "different values passed for id (%d) & account-id (%d)", req.Id, req.AccountId) case req.AccountId > 0: accId = req.AccountId case req.Id > 0: - //nolint:gosec accId = uint64(req.Id) } From 8a622ea47f68ec8ce8aba74aead31db2cecba6b4 Mon Sep 17 00:00:00 2001 From: atheesh Date: Mon, 14 Nov 2022 15:47:04 +0530 Subject: [PATCH 10/20] review changes --- x/auth/client/cli/query.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/x/auth/client/cli/query.go b/x/auth/client/cli/query.go index 0197df166979..6c34777f4db6 100644 --- a/x/auth/client/cli/query.go +++ b/x/auth/client/cli/query.go @@ -141,20 +141,14 @@ func GetAccountAddressByIDCmd() *cobra.Command { return err } - accNum, err := strconv.ParseInt(args[0], 10, 64) - if err != nil { - return err - } - - accNumUint, err := strconv.ParseUint(args[0], 10, 64) + accNum, err := strconv.ParseUint(args[0], 10, 64) if err != nil { return err } queryClient := types.NewQueryClient(clientCtx) res, err := queryClient.AccountAddressByID(cmd.Context(), &types.QueryAccountAddressByIDRequest{ - Id: accNum, - AccountId: accNumUint, + AccountId: accNum, }) if err != nil { From 6302d2933884425cab4182993fb95d3132aac255 Mon Sep 17 00:00:00 2001 From: atheesh Date: Wed, 16 Nov 2022 10:17:45 +0530 Subject: [PATCH 11/20] review changes --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78be66953726..ee021f2d9b7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -86,7 +86,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#13236](https://github.com/cosmos/cosmos-sdk/pull/13236) Integrate Filter Logging * [#13528](https://github.com/cosmos/cosmos-sdk/pull/13528) Update `ValidateMemoDecorator` to only check memo against `MaxMemoCharacters` param when a memo is present. * [#13651](https://github.com/cosmos/cosmos-sdk/pull/13651) Update `server/config/config.GetConfig` function. -* [#13780](https://github.com/cosmos/cosmos-sdk/pull/13780) `id` (type of int64) in `AccountAddressByID` grpc query is now deprecated, update to use account-id(type of uint64) to request `AccountAddressByID`. * [#13781](https://github.com/cosmos/cosmos-sdk/pull/13781) Remove `client/keys.KeysCdc`. * [#13803](https://github.com/cosmos/cosmos-sdk/pull/13803) Add an error log if iavl set operation failed. * [#13802](https://github.com/cosmos/cosmos-sdk/pull/13802) Add --output-document flag to the export CLI command to allow writing genesis state to a file. @@ -110,6 +109,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/gov) [#12771](https://github.com/cosmos/cosmos-sdk/pull/12771) Initial deposit requirement for proposals at submission time. * (x/staking) [#12967](https://github.com/cosmos/cosmos-sdk/pull/12967) `unbond` now creates only one unbonding delegation entry when multiple unbondings exist at a single height (e.g. through multiple messages in a transaction). * (x/auth/vesting) [#13502](https://github.com/cosmos/cosmos-sdk/pull/13502) Add Amino Msg registration for `MsgCreatePeriodicVestingAccount`. +* (x/auth)[#13780](https://github.com/cosmos/cosmos-sdk/pull/13780) `id` (type of int64) in `AccountAddressByID` grpc query is now deprecated, update to use account-id(type of uint64) to request `AccountAddressByID`. ### API Breaking Changes From bdbaaa2544ebebadd9d6b322b0fa18b703c539e5 Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 17 Nov 2022 15:40:17 +0530 Subject: [PATCH 12/20] review changes --- CHANGELOG.md | 1 + x/auth/keeper/grpc_query.go | 10 ++-------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 389155470137..a4ec346831f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -172,6 +172,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ extension interfaces. `module.Manager.Modules` is now of type `map[string]interface{}` to support in parallel the new `cosmossdk.io/core/appmodule.AppModule` API. * (x/group) [#13876](https://github.com/cosmos/cosmos-sdk/pull/13876) Add `GetMinExecutionPeriod` method on DecisionPolicy interface. +* (x/auth)[#13780](https://github.com/cosmos/cosmos-sdk/pull/13780) querying with `id` (type of int64) in `AccountAddressByID` grpc query is now throws error, update to use account-id(type of uint64) to request `AccountAddressByID`. ### CLI Breaking Changes diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 61f2143891e7..e0923ca4f392 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -24,18 +24,12 @@ func (ak AccountKeeper) AccountAddressByID(c context.Context, req *types.QueryAc return nil, status.Errorf(codes.InvalidArgument, "empty request") } - if req.Id < 0 { - return nil, status.Errorf(codes.InvalidArgument, "invalid account number %d", req.Id) - } - var accId uint64 switch { - case req.AccountId > 0 && req.Id > 0 && req.AccountId != uint64(req.Id): - return nil, status.Errorf(codes.InvalidArgument, "different values passed for id (%d) & account-id (%d)", req.Id, req.AccountId) + case req.Id > 0: //ignoring `0` case since it is default value. + return nil, status.Errorf(codes.InvalidArgument, "requesting with id isn't supported, try to request using account-id") case req.AccountId > 0: accId = req.AccountId - case req.Id > 0: - accId = uint64(req.Id) } ctx := sdk.UnwrapSDKContext(c) From c270cec0fce7de0b426043b51cac5dc3f64b6370 Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 17 Nov 2022 15:53:56 +0530 Subject: [PATCH 13/20] review changes --- x/auth/keeper/grpc_query.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index e0923ca4f392..21142fd1b8a1 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -24,14 +24,12 @@ func (ak AccountKeeper) AccountAddressByID(c context.Context, req *types.QueryAc return nil, status.Errorf(codes.InvalidArgument, "empty request") } - var accId uint64 - switch { - case req.Id > 0: //ignoring `0` case since it is default value. + if req.Id > 0 { //ignoring `0` case since it is default value. return nil, status.Errorf(codes.InvalidArgument, "requesting with id isn't supported, try to request using account-id") - case req.AccountId > 0: - accId = req.AccountId } + accId := req.AccountId + ctx := sdk.UnwrapSDKContext(c) address := ak.GetAccountAddressByID(ctx, accId) if len(address) == 0 { From 03b5bd04d50f03ae53acb101aa1d98d591b12a7e Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 17 Nov 2022 18:14:58 +0530 Subject: [PATCH 14/20] fix tests --- x/auth/keeper/deterministic_test.go | 12 ++++++------ x/auth/keeper/grpc_query.go | 4 ++-- x/auth/keeper/grpc_query_test.go | 26 ++++---------------------- 3 files changed, 12 insertions(+), 30 deletions(-) diff --git a/x/auth/keeper/deterministic_test.go b/x/auth/keeper/deterministic_test.go index 440de458e7c7..829f2073172a 100644 --- a/x/auth/keeper/deterministic_test.go +++ b/x/auth/keeper/deterministic_test.go @@ -164,24 +164,24 @@ func (suite *DeterministicTestSuite) TestGRPCQueryAccountAddressByID() { pub := pubkeyGenerator(t).Draw(t, "pubkey") addr := sdk.AccAddress(pub.Address()) - accNum := rapid.Int64Min(0).Draw(t, "account-number") + accNum := rapid.Uint64().Draw(t, "account-number") seq := rapid.Uint64().Draw(t, "sequence") - acc1 := types.NewBaseAccount(addr, &pub, uint64(accNum), seq) + acc1 := types.NewBaseAccount(addr, &pub, accNum, seq) suite.accountKeeper.SetAccount(suite.ctx, acc1) - req := &types.QueryAccountAddressByIDRequest{Id: accNum} + req := &types.QueryAccountAddressByIDRequest{AccountId: accNum} testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.AccountAddressByID, 0, true) }) // Regression test - accNum := int64(10087) + accNum := uint64(10087) seq := uint64(0) - acc1 := types.NewBaseAccount(addr, &secp256k1.PubKey{Key: pub}, uint64(accNum), seq) + acc1 := types.NewBaseAccount(addr, &secp256k1.PubKey{Key: pub}, accNum, seq) suite.accountKeeper.SetAccount(suite.ctx, acc1) - req := &types.QueryAccountAddressByIDRequest{Id: accNum} + req := &types.QueryAccountAddressByIDRequest{AccountId: accNum} testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.AccountAddressByID, 1123, false) } diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 21142fd1b8a1..167bdd6bf6b0 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -24,8 +24,8 @@ func (ak AccountKeeper) AccountAddressByID(c context.Context, req *types.QueryAc return nil, status.Errorf(codes.InvalidArgument, "empty request") } - if req.Id > 0 { //ignoring `0` case since it is default value. - return nil, status.Errorf(codes.InvalidArgument, "requesting with id isn't supported, try to request using account-id") + if req.Id > 0 || req.Id < 0 { //ignoring `0` case since it is default value. + return nil, status.Error(codes.InvalidArgument, "requesting with id isn't supported, try to request using account-id") } accId := req.AccountId diff --git a/x/auth/keeper/grpc_query_test.go b/x/auth/keeper/grpc_query_test.go index 00ede07b623f..5a9ebbd2ea22 100644 --- a/x/auth/keeper/grpc_query_test.go +++ b/x/auth/keeper/grpc_query_test.go @@ -174,22 +174,6 @@ func (suite *KeeperTestSuite) TestGRPCQueryAccountAddressByID() { false, func(res *types.QueryAccountAddressByIDResponse) {}, }, - { - "invalid: account-id, id are not same", - func() { - req = &types.QueryAccountAddressByIDRequest{AccountId: 0, Id: 1} - }, - false, - func(res *types.QueryAccountAddressByIDResponse) {}, - }, - { - "invalid: account-id, id are not same", - func() { - req = &types.QueryAccountAddressByIDRequest{AccountId: 1, Id: -1} - }, - false, - func(res *types.QueryAccountAddressByIDResponse) {}, - }, { "account address not found", func() { @@ -211,16 +195,14 @@ func (suite *KeeperTestSuite) TestGRPCQueryAccountAddressByID() { }, }, { - "valid request", + "invalid request", func() { account := suite.accountKeeper.NewAccountWithAddress(suite.ctx, addr) suite.accountKeeper.SetAccount(suite.ctx, account) - req = &types.QueryAccountAddressByIDRequest{Id: int64(account.GetAccountNumber())} - }, - true, - func(res *types.QueryAccountAddressByIDResponse) { - suite.Require().NotNil(res.AccountAddress) + req = &types.QueryAccountAddressByIDRequest{Id: 1} }, + false, + func(res *types.QueryAccountAddressByIDResponse) {}, }, } From 2b329339a53835d3d29a3f146d399ff83ced4dd9 Mon Sep 17 00:00:00 2001 From: atheeshp <59333759+atheeshp@users.noreply.github.com> Date: Thu, 17 Nov 2022 18:17:32 +0530 Subject: [PATCH 15/20] Update CHANGELOG.md Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4ec346831f1..830dfad21eff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -114,7 +114,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/gov) [#12771](https://github.com/cosmos/cosmos-sdk/pull/12771) Initial deposit requirement for proposals at submission time. * (x/staking) [#12967](https://github.com/cosmos/cosmos-sdk/pull/12967) `unbond` now creates only one unbonding delegation entry when multiple unbondings exist at a single height (e.g. through multiple messages in a transaction). * (x/auth/vesting) [#13502](https://github.com/cosmos/cosmos-sdk/pull/13502) Add Amino Msg registration for `MsgCreatePeriodicVestingAccount`. -* (x/auth)[#13780](https://github.com/cosmos/cosmos-sdk/pull/13780) `id` (type of int64) in `AccountAddressByID` grpc query is now deprecated, update to use account-id(type of uint64) to request `AccountAddressByID`. +* (x/auth)[#13780](https://github.com/cosmos/cosmos-sdk/pull/13780) `id` (type of int64) in `AccountAddressByID` grpc query is now deprecated, update to account-id(type of uint64) to use `AccountAddressByID`. * (x/group) [#13876](https://github.com/cosmos/cosmos-sdk/pull/13876) Fix group MinExecutionPeriod that is checked on execution now, instead of voting period end. ### API Breaking Changes From 037b354eacc98080c55594ff3c56ce1abf3d0b23 Mon Sep 17 00:00:00 2001 From: atheeshp <59333759+atheeshp@users.noreply.github.com> Date: Thu, 17 Nov 2022 18:17:47 +0530 Subject: [PATCH 16/20] Update CHANGELOG.md Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 830dfad21eff..c4721c50b4b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -172,7 +172,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ extension interfaces. `module.Manager.Modules` is now of type `map[string]interface{}` to support in parallel the new `cosmossdk.io/core/appmodule.AppModule` API. * (x/group) [#13876](https://github.com/cosmos/cosmos-sdk/pull/13876) Add `GetMinExecutionPeriod` method on DecisionPolicy interface. -* (x/auth)[#13780](https://github.com/cosmos/cosmos-sdk/pull/13780) querying with `id` (type of int64) in `AccountAddressByID` grpc query is now throws error, update to use account-id(type of uint64) to request `AccountAddressByID`. +* (x/auth)[#13780](https://github.com/cosmos/cosmos-sdk/pull/13780) Querying with `id` (type of int64) in `AccountAddressByID` grpc query now throws error, use account-id(type of uint64) instead. ### CLI Breaking Changes From 78d46b9aa3a7c3b89efceae5eb8d7f4d76847ea3 Mon Sep 17 00:00:00 2001 From: atheeshp <59333759+atheeshp@users.noreply.github.com> Date: Thu, 17 Nov 2022 18:18:44 +0530 Subject: [PATCH 17/20] Update proto/cosmos/auth/v1beta1/query.proto Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com> --- proto/cosmos/auth/v1beta1/query.proto | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto index c4598e24fee4..b37082bc1aad 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -204,9 +204,7 @@ message QueryAccountAddressByIDRequest { // updated to uint64 in a future version of the auth query. int64 id = 1 [deprecated = true]; - // account_id is the account number of the address to be queried. This field - // should have been an uint64 (like all account numbers), and will be - // updated to uint64 in a future version of the auth query. + // account_id is the account number of the address to be queried. // // Since: cosmos-sdk 0.47 uint64 account_id = 2; From 34130b508cd258857abc4e2231f8495ef9a0f7f5 Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 17 Nov 2022 18:20:41 +0530 Subject: [PATCH 18/20] review changes --- x/auth/keeper/grpc_query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 167bdd6bf6b0..901aeb2ab306 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -24,7 +24,7 @@ func (ak AccountKeeper) AccountAddressByID(c context.Context, req *types.QueryAc return nil, status.Errorf(codes.InvalidArgument, "empty request") } - if req.Id > 0 || req.Id < 0 { //ignoring `0` case since it is default value. + if req.Id > 0 || req.Id < 0 { // ignoring `0` case since it is default value. return nil, status.Error(codes.InvalidArgument, "requesting with id isn't supported, try to request using account-id") } From 1d680e75b37bfc61e2a8509ccdb7d4a84d7a8c41 Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 17 Nov 2022 18:26:33 +0530 Subject: [PATCH 19/20] lint --- x/auth/client/cli/query.go | 1 - 1 file changed, 1 deletion(-) diff --git a/x/auth/client/cli/query.go b/x/auth/client/cli/query.go index 6c34777f4db6..11f22e8dde74 100644 --- a/x/auth/client/cli/query.go +++ b/x/auth/client/cli/query.go @@ -150,7 +150,6 @@ func GetAccountAddressByIDCmd() *cobra.Command { res, err := queryClient.AccountAddressByID(cmd.Context(), &types.QueryAccountAddressByIDRequest{ AccountId: accNum, }) - if err != nil { return err } From 718c752e315903aaa45acbf102db343b54347f38 Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 17 Nov 2022 21:19:43 +0530 Subject: [PATCH 20/20] review changes --- x/auth/keeper/grpc_query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 901aeb2ab306..983da9c5a3a8 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -24,7 +24,7 @@ func (ak AccountKeeper) AccountAddressByID(c context.Context, req *types.QueryAc return nil, status.Errorf(codes.InvalidArgument, "empty request") } - if req.Id > 0 || req.Id < 0 { // ignoring `0` case since it is default value. + if req.Id != 0 { // ignoring `0` case since it is default value. return nil, status.Error(codes.InvalidArgument, "requesting with id isn't supported, try to request using account-id") }