From 0bebbf3d98128f8ac19cd955ab647a80614b13a3 Mon Sep 17 00:00:00 2001 From: Amaury M <1293565+amaurym@users.noreply.github.com> Date: Wed, 4 Aug 2021 13:05:20 +0200 Subject: [PATCH] revert: Mark upgrade query field as deprecated instead of reserved --- docs/core/proto-docs.md | 5 +- proto/cosmos/upgrade/v1beta1/query.proto | 6 +- x/auth/types/query.pb.go | 4 +- x/group/types.pb.go | 6 +- x/upgrade/types/query.pb.go | 164 ++++++++++++++++------- 5 files changed, 126 insertions(+), 59 deletions(-) diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 6b68c21ae232..6abe1fcab9bc 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -966,7 +966,7 @@ Query defines the gRPC querier service. | `Accounts` | [QueryAccountsRequest](#cosmos.auth.v1beta1.QueryAccountsRequest) | [QueryAccountsResponse](#cosmos.auth.v1beta1.QueryAccountsResponse) | Accounts returns all the existing accounts | GET|/cosmos/auth/v1beta1/accounts| | `Account` | [QueryAccountRequest](#cosmos.auth.v1beta1.QueryAccountRequest) | [QueryAccountResponse](#cosmos.auth.v1beta1.QueryAccountResponse) | Account returns account details based on address. | GET|/cosmos/auth/v1beta1/accounts/{address}| | `Params` | [QueryParamsRequest](#cosmos.auth.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.auth.v1beta1.QueryParamsResponse) | Params queries all parameters. | GET|/cosmos/auth/v1beta1/params| -| `ModuleAccounts` | [QueryModuleAccountsRequest](#cosmos.auth.v1beta1.QueryModuleAccountsRequest) | [QueryModuleAccountsResponse](#cosmos.auth.v1beta1.QueryModuleAccountsResponse) | ModuleAccounts returns all the existing Module Accounts. | GET|/cosmos/auth/v1beta1/module_accounts| +| `ModuleAccounts` | [QueryModuleAccountsRequest](#cosmos.auth.v1beta1.QueryModuleAccountsRequest) | [QueryModuleAccountsResponse](#cosmos.auth.v1beta1.QueryModuleAccountsResponse) | ModuleAccounts returns all the existing module accounts. | GET|/cosmos/auth/v1beta1/module_accounts| @@ -9204,7 +9204,8 @@ RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `upgraded_consensus_state` | [bytes](#bytes) | | | +| `upgraded_consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | **Deprecated.** Deprecated: Please use the bytes field instead. This field will always be empty in v0.43+. | +| `upgraded_consensus_state_bytes` | [bytes](#bytes) | | | diff --git a/proto/cosmos/upgrade/v1beta1/query.proto b/proto/cosmos/upgrade/v1beta1/query.proto index 166a22406e94..327d1979f84e 100644 --- a/proto/cosmos/upgrade/v1beta1/query.proto +++ b/proto/cosmos/upgrade/v1beta1/query.proto @@ -69,9 +69,11 @@ message QueryUpgradedConsensusStateRequest { // QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState // RPC method. message QueryUpgradedConsensusStateResponse { - reserved 1; + // Deprecated: Please use the bytes field instead. This field will always be + // empty in v0.43+. + google.protobuf.Any upgraded_consensus_state = 1 [deprecated = true]; - bytes upgraded_consensus_state = 2; + bytes upgraded_consensus_state_bytes = 2; } // QueryModuleVersionsRequest is the request type for the Query/ModuleVersions diff --git a/x/auth/types/query.pb.go b/x/auth/types/query.pb.go index 61c7041a6a9d..c3712a26cf79 100644 --- a/x/auth/types/query.pb.go +++ b/x/auth/types/query.pb.go @@ -456,7 +456,7 @@ type QueryClient interface { Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) // Params queries all parameters. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // ModuleAccounts returns all the existing Module Accounts. + // ModuleAccounts returns all the existing module accounts. ModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, error) } @@ -512,7 +512,7 @@ type QueryServer interface { Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) // Params queries all parameters. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // ModuleAccounts returns all the existing Module Accounts. + // ModuleAccounts returns all the existing module accounts. ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) } diff --git a/x/group/types.pb.go b/x/group/types.pb.go index 56fbe2286f4f..c0e5cf2d5e75 100644 --- a/x/group/types.pb.go +++ b/x/group/types.pb.go @@ -567,9 +567,9 @@ type Proposal struct { Result Proposal_Result `protobuf:"varint,9,opt,name=result,proto3,enum=cosmos.group.v1beta1.Proposal_Result" json:"result,omitempty"` // vote_state contains the sums of all weighted votes for this proposal. VoteState Tally `protobuf:"bytes,10,opt,name=vote_state,json=voteState,proto3" json:"vote_state"` - // timeout is the timestamp of the block where the proposal execution times out. Header times of the votes and execution messages - // must be before this end time to be included in the election. After the timeout timestamp the proposal can not be - // executed anymore and should be considered pending delete. + // timeout is the timestamp of the block where the proposal execution times out. Header times of the votes and + // execution messages must be before this end time to be included in the election. After the timeout timestamp the + // proposal can not be executed anymore and should be considered pending delete. Timeout time.Time `protobuf:"bytes,11,opt,name=timeout,proto3,stdtime" json:"timeout"` // executor_result is the final result based on the votes and election rule. Initial value is NotRun. ExecutorResult Proposal_ExecutorResult `protobuf:"varint,12,opt,name=executor_result,json=executorResult,proto3,enum=cosmos.group.v1beta1.Proposal_ExecutorResult" json:"executor_result,omitempty"` diff --git a/x/upgrade/types/query.pb.go b/x/upgrade/types/query.pb.go index 4f5c22a87677..c547e5f60c46 100644 --- a/x/upgrade/types/query.pb.go +++ b/x/upgrade/types/query.pb.go @@ -6,7 +6,7 @@ package types import ( context "context" fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/codec/types" + types "github.com/cosmos/cosmos-sdk/codec/types" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -259,7 +259,10 @@ func (m *QueryUpgradedConsensusStateRequest) GetLastHeight() int64 { // QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState // RPC method. type QueryUpgradedConsensusStateResponse struct { - UpgradedConsensusState []byte `protobuf:"bytes,2,opt,name=upgraded_consensus_state,json=upgradedConsensusState,proto3" json:"upgraded_consensus_state,omitempty"` + // Deprecated: Please use the bytes field instead. This field will always be + // empty in v0.43+. + UpgradedConsensusState *types.Any `protobuf:"bytes,1,opt,name=upgraded_consensus_state,json=upgradedConsensusState,proto3" json:"upgraded_consensus_state,omitempty"` // Deprecated: Do not use. + UpgradedConsensusStateBytes []byte `protobuf:"bytes,2,opt,name=upgraded_consensus_state_bytes,json=upgradedConsensusStateBytes,proto3" json:"upgraded_consensus_state_bytes,omitempty"` } func (m *QueryUpgradedConsensusStateResponse) Reset() { *m = QueryUpgradedConsensusStateResponse{} } @@ -295,13 +298,21 @@ func (m *QueryUpgradedConsensusStateResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryUpgradedConsensusStateResponse proto.InternalMessageInfo -func (m *QueryUpgradedConsensusStateResponse) GetUpgradedConsensusState() []byte { +// Deprecated: Do not use. +func (m *QueryUpgradedConsensusStateResponse) GetUpgradedConsensusState() *types.Any { if m != nil { return m.UpgradedConsensusState } return nil } +func (m *QueryUpgradedConsensusStateResponse) GetUpgradedConsensusStateBytes() []byte { + if m != nil { + return m.UpgradedConsensusStateBytes + } + return nil +} + // QueryModuleVersionsRequest is the request type for the Query/ModuleVersions // RPC method. type QueryModuleVersionsRequest struct { @@ -414,44 +425,45 @@ func init() { } var fileDescriptor_4a334d07ad8374f0 = []byte{ - // 578 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xbf, 0x6e, 0xd3, 0x40, - 0x18, 0xcf, 0xa5, 0x69, 0x05, 0x5f, 0x50, 0x41, 0x37, 0x84, 0xd4, 0x54, 0x26, 0x32, 0x05, 0x82, - 0x68, 0x7c, 0x6d, 0xb2, 0x20, 0x10, 0x08, 0xa8, 0xa8, 0x10, 0x82, 0x0a, 0x82,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d, 0x84, 0xd4, 0x89, 0x9b, 0x86, 0xbf, - 0x20, 0x28, 0xa7, 0x6a, 0x73, 0x42, 0xc0, 0xd9, 0x3e, 0x9e, 0x10, 0x30, 0xa3, 0x91, 0x56, 0x4b, - 0x05, 0x6c, 0xe0, 0x9b, 0x79, 0x01, 0x69, 0x42, 0x52, 0x01, 0xc9, 0x41, 0x7c, 0xa4, 0x87, 0xf8, - 0x18, 0x41, 0x25, 0xbb, 0x63, 0xf8, 0xf6, 0xdc, 0x04, 0x73, 0xfb, 0x6d, 0xdc, 0x39, 0x15, 0x57, - 0x2f, 0xb2, 0xad, 0x16, 0xb9, 0x8f, 0xef, 0x91, 0xf9, 0x5f, 0x8f, 0x99, 0xca, 0x93, 0x83, 0xd4, - 0xa5, 0x3a, 0xc4, 0x5f, 0x11, 0x2c, 0x4f, 0x37, 0x13, 0x37, 0xe7, 0xe6, 0xca, 0xbc, 0x05, 0x46, - 0xeb, 0xbf, 0x38, 0x7a, 0x07, 0xa2, 0x76, 0xb8, 0x81, 0xaf, 0xe7, 0xed, 0xf0, 0xd7, 0xc5, 0x78, - 0xb8, 0xfd, 0x6d, 0x64, 0xa2, 0xa3, 0x91, 0x89, 0x7e, 0x8e, 0x4c, 0xf4, 0x71, 0x6c, 0x16, 0x8e, - 0xc6, 0x66, 0xe1, 0xc7, 0xd8, 0x2c, 0xbc, 0x59, 0xef, 0x0f, 0xe5, 0x20, 0xea, 0xda, 0x3d, 0xee, - 0x4d, 0xc4, 0x92, 0x3f, 0x0d, 0xe1, 0xbc, 0x23, 0xef, 0xff, 0x28, 0xcb, 0xfd, 0x80, 0x89, 0xee, - 0x92, 0xfa, 0xa4, 0xb6, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x02, 0x71, 0xd9, 0xc3, 0xef, 0x05, - 0x00, 0x00, + // 607 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xbf, 0x6f, 0xd3, 0x40, + 0x18, 0xcd, 0xa5, 0x3f, 0x24, 0x2e, 0xa8, 0x48, 0x27, 0x14, 0x5c, 0xb7, 0x32, 0x91, 0x29, 0x10, + 0x44, 0xe3, 0x6b, 0x93, 0x0d, 0x04, 0xa2, 0x89, 0xa8, 0x18, 0xa0, 0x02, 0x23, 0x18, 0x58, 0xac, + 0x4b, 0x7c, 0x24, 0x11, 0xb6, 0xcf, 0xf5, 0x9d, 0x2b, 0xa2, 0xaa, 0x0b, 0x7f, 0x01, 0x12, 0x3b, + 0x1b, 0x0b, 0x7f, 0x04, 0x33, 0x63, 0x25, 0x16, 0xba, 0xa1, 0x84, 0x3f, 0x04, 0xf9, 0x7c, 0x41, + 0x0e, 0xb1, 0x53, 0x60, 0x4a, 0xec, 0xef, 0xbd, 0xf7, 0xbd, 0xef, 0xee, 0x7d, 0x86, 0x66, 0x8f, + 0x71, 0x9f, 0x71, 0x1c, 0x87, 0xfd, 0x88, 0xb8, 0x14, 0x1f, 0xed, 0x76, 0xa9, 0x20, 0xbb, 0xf8, + 0x30, 0xa6, 0xd1, 0xc8, 0x0a, 0x23, 0x26, 0x18, 0xaa, 0xa6, 0x18, 0x4b, 0x61, 0x2c, 0x85, 0xd1, + 0xd7, 0xfb, 0x8c, 0xf5, 0x3d, 0x8a, 0x25, 0xaa, 0x1b, 0xbf, 0xc6, 0x24, 0x50, 0x14, 0x7d, 0x53, + 0x95, 0x48, 0x38, 0xc4, 0x24, 0x08, 0x98, 0x20, 0x62, 0xc8, 0x02, 0xae, 0xaa, 0x5b, 0x05, 0x4d, + 0xa7, 0x0d, 0x24, 0xca, 0x5c, 0x87, 0x57, 0x9e, 0x25, 0x2e, 0x3a, 0x71, 0x14, 0xd1, 0x40, 0x3c, + 0xf5, 0x48, 0x60, 0xd3, 0xc3, 0x98, 0x72, 0x61, 0x3e, 0x86, 0xda, 0x7c, 0x89, 0x87, 0x2c, 0xe0, + 0x14, 0xed, 0xc0, 0x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 0xc4, 0x28, + 0x7d, 0x9f, 0x18, 0xa5, 0x57, 0xdb, 0xfd, 0xa1, 0x18, 0xc4, 0x5d, 0xab, 0xc7, 0xfc, 0xa9, 0x58, + 0xfa, 0xd3, 0xe0, 0xee, 0x1b, 0xfc, 0xf6, 0xb7, 0xb2, 0x18, 0x85, 0x94, 0x77, 0x57, 0xe5, 0x07, + 0xa4, 0xf5, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x83, 0x93, 0x90, 0x49, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -820,13 +832,25 @@ func (m *QueryUpgradedConsensusStateResponse) MarshalToSizedBuffer(dAtA []byte) _ = i var l int _ = l - if len(m.UpgradedConsensusState) > 0 { - i -= len(m.UpgradedConsensusState) - copy(dAtA[i:], m.UpgradedConsensusState) - i = encodeVarintQuery(dAtA, i, uint64(len(m.UpgradedConsensusState))) + if len(m.UpgradedConsensusStateBytes) > 0 { + i -= len(m.UpgradedConsensusStateBytes) + copy(dAtA[i:], m.UpgradedConsensusStateBytes) + i = encodeVarintQuery(dAtA, i, uint64(len(m.UpgradedConsensusStateBytes))) i-- dAtA[i] = 0x12 } + if m.UpgradedConsensusState != nil { + { + size, err := m.UpgradedConsensusState.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -973,7 +997,11 @@ func (m *QueryUpgradedConsensusStateResponse) Size() (n int) { } var l int _ = l - l = len(m.UpgradedConsensusState) + if m.UpgradedConsensusState != nil { + l = m.UpgradedConsensusState.Size() + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.UpgradedConsensusStateBytes) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -1399,10 +1427,46 @@ func (m *QueryUpgradedConsensusStateResponse) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: QueryUpgradedConsensusStateResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 2: + case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UpgradedConsensusState", wireType) } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UpgradedConsensusState == nil { + m.UpgradedConsensusState = &types.Any{} + } + if err := m.UpgradedConsensusState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpgradedConsensusStateBytes", wireType) + } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { @@ -1428,9 +1492,9 @@ func (m *QueryUpgradedConsensusStateResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.UpgradedConsensusState = append(m.UpgradedConsensusState[:0], dAtA[iNdEx:postIndex]...) - if m.UpgradedConsensusState == nil { - m.UpgradedConsensusState = []byte{} + m.UpgradedConsensusStateBytes = append(m.UpgradedConsensusStateBytes[:0], dAtA[iNdEx:postIndex]...) + if m.UpgradedConsensusStateBytes == nil { + m.UpgradedConsensusStateBytes = []byte{} } iNdEx = postIndex default: