Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(crosschain): remove deprecated GetTSSAddress #1948

Merged
merged 4 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* [1885](https://github.com/zeta-chain/node/pull/1885) - change important metrics on port 8123 to be prometheus compatible
* [1863](https://github.com/zeta-chain/node/pull/1863) - remove duplicate ValidateChainParams function
* [1914](https://github.com/zeta-chain/node/pull/1914) - move crosschain flags to core context in zetaclient
* [1948](https://github.com/zeta-chain/node/pull/1948) - remove deprecated GetTSSAddress query in crosschain module

### Features

Expand Down
46 changes: 8 additions & 38 deletions docs/openapi/openapi.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26711,25 +26711,6 @@ paths:
type: string
tags:
- Query
/zeta-chain/crosschain/get_tss_address:
get:
summary: |-
GetTssAddress queries the tss address of the module.
Deprecated: Moved to observer
TODO: remove after v12 once upgrade testing is no longer needed with v11
https://github.com/zeta-chain/node/issues/1547
operationId: Query_GetTssAddress
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/zetacorecrosschainQueryGetTssAddressResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
tags:
- Query
/zeta-chain/crosschain/in_tx_hash_to_cctx_data/{inTxHash}:
get:
summary: Queries a InTxHashToCctx data by index.
Expand Down Expand Up @@ -27840,7 +27821,7 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/zetacoreobserverQueryGetTssAddressResponse'
$ref: '#/definitions/observerQueryGetTssAddressResponse'
default:
description: An unexpected error response.
schema:
Expand Down Expand Up @@ -54585,6 +54566,13 @@ definitions:
type: string
btc:
type: string
observerQueryGetTssAddressResponse:
type: object
properties:
eth:
type: string
btc:
type: string
observerQueryHasVotedResponse:
type: object
properties:
Expand Down Expand Up @@ -54744,17 +54732,6 @@ definitions:
enabled:
type: boolean
description: Params defines the parameters for the module.
zetacorecrosschainQueryGetTssAddressResponse:
type: object
properties:
eth:
type: string
btc:
type: string
title: |-
Deprecated: Moved to observer
TODO: remove after v12 once upgrade testing is no longer needed with v11
https://github.com/zeta-chain/node/issues/1547
zetacorecrosschainQueryParamsResponse:
type: object
properties:
Expand Down Expand Up @@ -54832,13 +54809,6 @@ definitions:
type: string
format: int64
description: Params defines the parameters for the module.
zetacoreobserverQueryGetTssAddressResponse:
type: object
properties:
eth:
type: string
btc:
type: string
zetacoreobserverQueryParamsResponse:
type: object
properties:
Expand Down
21 changes: 0 additions & 21 deletions proto/crosschain/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ option go_package = "github.com/zeta-chain/zetacore/x/crosschain/types";

// Query defines the gRPC querier service.
service Query {
// GetTssAddress queries the tss address of the module.
// Deprecated: Moved to observer
// TODO: remove after v12 once upgrade testing is no longer needed with v11
// https://github.com/zeta-chain/node/issues/1547
rpc GetTssAddress(QueryGetTssAddressRequest) returns (QueryGetTssAddressResponse) {
option (google.api.http).get = "/zeta-chain/crosschain/get_tss_address";
}

// Parameters queries the parameters of the module.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/zeta-chain/crosschain/params";
Expand Down Expand Up @@ -122,19 +114,6 @@ service Query {
}
}

// Deprecated: Moved to observer
// TODO: remove after v12 once upgrade testing is no longer needed with v11
// https://github.com/zeta-chain/node/issues/1547
message QueryGetTssAddressRequest {}

// Deprecated: Moved to observer
// TODO: remove after v12 once upgrade testing is no longer needed with v11
// https://github.com/zeta-chain/node/issues/1547
message QueryGetTssAddressResponse {
string eth = 1;
string btc = 2;
}

message QueryZetaAccountingRequest {}

message QueryZetaAccountingResponse {
Expand Down
56 changes: 0 additions & 56 deletions typescript/crosschain/query_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,62 +14,6 @@ import type { CrossChainTx } from "./cross_chain_tx_pb.js";
import type { GasPrice } from "./gas_price_pb.js";
import type { LastBlockHeight } from "./last_block_height_pb.js";

/**
* Deprecated: Moved to observer
* TODO: remove after v12 once upgrade testing is no longer needed with v11
* https://github.com/zeta-chain/node/issues/1547
*
* @generated from message zetachain.zetacore.crosschain.QueryGetTssAddressRequest
*/
export declare class QueryGetTssAddressRequest extends Message<QueryGetTssAddressRequest> {
constructor(data?: PartialMessage<QueryGetTssAddressRequest>);

static readonly runtime: typeof proto3;
static readonly typeName = "zetachain.zetacore.crosschain.QueryGetTssAddressRequest";
static readonly fields: FieldList;

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): QueryGetTssAddressRequest;

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): QueryGetTssAddressRequest;

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): QueryGetTssAddressRequest;

static equals(a: QueryGetTssAddressRequest | PlainMessage<QueryGetTssAddressRequest> | undefined, b: QueryGetTssAddressRequest | PlainMessage<QueryGetTssAddressRequest> | undefined): boolean;
}

/**
* Deprecated: Moved to observer
* TODO: remove after v12 once upgrade testing is no longer needed with v11
* https://github.com/zeta-chain/node/issues/1547
*
* @generated from message zetachain.zetacore.crosschain.QueryGetTssAddressResponse
*/
export declare class QueryGetTssAddressResponse extends Message<QueryGetTssAddressResponse> {
/**
* @generated from field: string eth = 1;
*/
eth: string;

/**
* @generated from field: string btc = 2;
*/
btc: string;

constructor(data?: PartialMessage<QueryGetTssAddressResponse>);

static readonly runtime: typeof proto3;
static readonly typeName = "zetachain.zetacore.crosschain.QueryGetTssAddressResponse";
static readonly fields: FieldList;

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): QueryGetTssAddressResponse;

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): QueryGetTssAddressResponse;

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): QueryGetTssAddressResponse;

static equals(a: QueryGetTssAddressResponse | PlainMessage<QueryGetTssAddressResponse> | undefined, b: QueryGetTssAddressResponse | PlainMessage<QueryGetTssAddressResponse> | undefined): boolean;
}

/**
* @generated from message zetachain.zetacore.crosschain.QueryZetaAccountingRequest
*/
Expand Down
12 changes: 0 additions & 12 deletions x/crosschain/keeper/grpc_query.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
package keeper

import (
"context"

"github.com/zeta-chain/zetacore/x/crosschain/types"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

var _ types.QueryServer = Keeper{}

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