Skip to content

Commit b6fca46

Browse files
authored
refactor(crosschain): remove deprecated GetTSSAddress (#1948)
* change proto * remove query * changelog
1 parent 3d738ee commit b6fca46

File tree

7 files changed

+163
-741
lines changed

7 files changed

+163
-741
lines changed

changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* [1885](https://github.com/zeta-chain/node/pull/1885) - change important metrics on port 8123 to be prometheus compatible
2121
* [1863](https://github.com/zeta-chain/node/pull/1863) - remove duplicate ValidateChainParams function
2222
* [1914](https://github.com/zeta-chain/node/pull/1914) - move crosschain flags to core context in zetaclient
23+
* [1948](https://github.com/zeta-chain/node/pull/1948) - remove deprecated GetTSSAddress query in crosschain module
2324
* [1936](https://github.com/zeta-chain/node/pull/1936) - refactor common package into subpackages and rename to pkg
2425

2526
### Features

docs/openapi/openapi.swagger.yaml

+8-38
Original file line numberDiff line numberDiff line change
@@ -26711,25 +26711,6 @@ paths:
2671126711
type: string
2671226712
tags:
2671326713
- Query
26714-
/zeta-chain/crosschain/get_tss_address:
26715-
get:
26716-
summary: |-
26717-
GetTssAddress queries the tss address of the module.
26718-
Deprecated: Moved to observer
26719-
TODO: remove after v12 once upgrade testing is no longer needed with v11
26720-
https://github.com/zeta-chain/node/issues/1547
26721-
operationId: Query_GetTssAddress
26722-
responses:
26723-
"200":
26724-
description: A successful response.
26725-
schema:
26726-
$ref: '#/definitions/zetacorecrosschainQueryGetTssAddressResponse'
26727-
default:
26728-
description: An unexpected error response.
26729-
schema:
26730-
$ref: '#/definitions/googlerpcStatus'
26731-
tags:
26732-
- Query
2673326714
/zeta-chain/crosschain/in_tx_hash_to_cctx_data/{inTxHash}:
2673426715
get:
2673526716
summary: Queries a InTxHashToCctx data by index.
@@ -27840,7 +27821,7 @@ paths:
2784027821
"200":
2784127822
description: A successful response.
2784227823
schema:
27843-
$ref: '#/definitions/zetacoreobserverQueryGetTssAddressResponse'
27824+
$ref: '#/definitions/observerQueryGetTssAddressResponse'
2784427825
default:
2784527826
description: An unexpected error response.
2784627827
schema:
@@ -54554,6 +54535,13 @@ definitions:
5455454535
type: string
5455554536
btc:
5455654537
type: string
54538+
observerQueryGetTssAddressResponse:
54539+
type: object
54540+
properties:
54541+
eth:
54542+
type: string
54543+
btc:
54544+
type: string
5455754545
observerQueryHasVotedResponse:
5455854546
type: object
5455954547
properties:
@@ -54749,17 +54737,6 @@ definitions:
5474954737
enabled:
5475054738
type: boolean
5475154739
description: Params defines the parameters for the module.
54752-
zetacorecrosschainQueryGetTssAddressResponse:
54753-
type: object
54754-
properties:
54755-
eth:
54756-
type: string
54757-
btc:
54758-
type: string
54759-
title: |-
54760-
Deprecated: Moved to observer
54761-
TODO: remove after v12 once upgrade testing is no longer needed with v11
54762-
https://github.com/zeta-chain/node/issues/1547
5476354740
zetacorecrosschainQueryParamsResponse:
5476454741
type: object
5476554742
properties:
@@ -54837,13 +54814,6 @@ definitions:
5483754814
type: string
5483854815
format: int64
5483954816
description: Params defines the parameters for the module.
54840-
zetacoreobserverQueryGetTssAddressResponse:
54841-
type: object
54842-
properties:
54843-
eth:
54844-
type: string
54845-
btc:
54846-
type: string
5484754817
zetacoreobserverQueryParamsResponse:
5484854818
type: object
5484954819
properties:

proto/crosschain/query.proto

-21
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@ option go_package = "github.com/zeta-chain/zetacore/x/crosschain/types";
1616

1717
// Query defines the gRPC querier service.
1818
service Query {
19-
// GetTssAddress queries the tss address of the module.
20-
// Deprecated: Moved to observer
21-
// TODO: remove after v12 once upgrade testing is no longer needed with v11
22-
// https://github.com/zeta-chain/node/issues/1547
23-
rpc GetTssAddress(QueryGetTssAddressRequest) returns (QueryGetTssAddressResponse) {
24-
option (google.api.http).get = "/zeta-chain/crosschain/get_tss_address";
25-
}
26-
2719
// Parameters queries the parameters of the module.
2820
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
2921
option (google.api.http).get = "/zeta-chain/crosschain/params";
@@ -122,19 +114,6 @@ service Query {
122114
}
123115
}
124116

125-
// Deprecated: Moved to observer
126-
// TODO: remove after v12 once upgrade testing is no longer needed with v11
127-
// https://github.com/zeta-chain/node/issues/1547
128-
message QueryGetTssAddressRequest {}
129-
130-
// Deprecated: Moved to observer
131-
// TODO: remove after v12 once upgrade testing is no longer needed with v11
132-
// https://github.com/zeta-chain/node/issues/1547
133-
message QueryGetTssAddressResponse {
134-
string eth = 1;
135-
string btc = 2;
136-
}
137-
138117
message QueryZetaAccountingRequest {}
139118

140119
message QueryZetaAccountingResponse {

typescript/crosschain/query_pb.d.ts

-56
Original file line numberDiff line numberDiff line change
@@ -14,62 +14,6 @@ import type { CrossChainTx } from "./cross_chain_tx_pb.js";
1414
import type { GasPrice } from "./gas_price_pb.js";
1515
import type { LastBlockHeight } from "./last_block_height_pb.js";
1616

17-
/**
18-
* Deprecated: Moved to observer
19-
* TODO: remove after v12 once upgrade testing is no longer needed with v11
20-
* https://github.com/zeta-chain/node/issues/1547
21-
*
22-
* @generated from message zetachain.zetacore.crosschain.QueryGetTssAddressRequest
23-
*/
24-
export declare class QueryGetTssAddressRequest extends Message<QueryGetTssAddressRequest> {
25-
constructor(data?: PartialMessage<QueryGetTssAddressRequest>);
26-
27-
static readonly runtime: typeof proto3;
28-
static readonly typeName = "zetachain.zetacore.crosschain.QueryGetTssAddressRequest";
29-
static readonly fields: FieldList;
30-
31-
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): QueryGetTssAddressRequest;
32-
33-
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): QueryGetTssAddressRequest;
34-
35-
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): QueryGetTssAddressRequest;
36-
37-
static equals(a: QueryGetTssAddressRequest | PlainMessage<QueryGetTssAddressRequest> | undefined, b: QueryGetTssAddressRequest | PlainMessage<QueryGetTssAddressRequest> | undefined): boolean;
38-
}
39-
40-
/**
41-
* Deprecated: Moved to observer
42-
* TODO: remove after v12 once upgrade testing is no longer needed with v11
43-
* https://github.com/zeta-chain/node/issues/1547
44-
*
45-
* @generated from message zetachain.zetacore.crosschain.QueryGetTssAddressResponse
46-
*/
47-
export declare class QueryGetTssAddressResponse extends Message<QueryGetTssAddressResponse> {
48-
/**
49-
* @generated from field: string eth = 1;
50-
*/
51-
eth: string;
52-
53-
/**
54-
* @generated from field: string btc = 2;
55-
*/
56-
btc: string;
57-
58-
constructor(data?: PartialMessage<QueryGetTssAddressResponse>);
59-
60-
static readonly runtime: typeof proto3;
61-
static readonly typeName = "zetachain.zetacore.crosschain.QueryGetTssAddressResponse";
62-
static readonly fields: FieldList;
63-
64-
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): QueryGetTssAddressResponse;
65-
66-
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): QueryGetTssAddressResponse;
67-
68-
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): QueryGetTssAddressResponse;
69-
70-
static equals(a: QueryGetTssAddressResponse | PlainMessage<QueryGetTssAddressResponse> | undefined, b: QueryGetTssAddressResponse | PlainMessage<QueryGetTssAddressResponse> | undefined): boolean;
71-
}
72-
7317
/**
7418
* @generated from message zetachain.zetacore.crosschain.QueryZetaAccountingRequest
7519
*/

x/crosschain/keeper/grpc_query.go

-12
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
package keeper
22

33
import (
4-
"context"
5-
64
"github.com/zeta-chain/zetacore/x/crosschain/types"
7-
"google.golang.org/grpc/codes"
8-
"google.golang.org/grpc/status"
95
)
106

117
var _ types.QueryServer = Keeper{}
12-
13-
// GetTssAddress returns the tss address
14-
// Deprecated: GetTssAddress returns the tss address
15-
// TODO: remove after v12 once upgrade testing is no longer needed with v11
16-
// https://github.com/zeta-chain/node/issues/1547
17-
func (k Keeper) GetTssAddress(_ context.Context, _ *types.QueryGetTssAddressRequest) (*types.QueryGetTssAddressResponse, error) {
18-
return nil, status.Error(codes.Unimplemented, "Deprecated")
19-
}

0 commit comments

Comments
 (0)