Skip to content

Commit

Permalink
Merge branch 'develop' into feat/read-chain-info
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis authored Jun 26, 2024
2 parents 075091f + 57457fd commit bc9ff69
Show file tree
Hide file tree
Showing 53 changed files with 1,851 additions and 253 deletions.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* [2325](https://github.com/zeta-chain/node/pull/2325) - revert telemetry server changes
* [2339](https://github.com/zeta-chain/node/pull/2339) - add binaries related question to syncing issue form
* [2366](https://github.com/zeta-chain/node/pull/2366) - add migration script for adding authorizations table
* [2372](https://github.com/zeta-chain/node/pull/2372) - add queries for tss fund migration info

### Refactor

Expand Down Expand Up @@ -98,6 +99,10 @@
* [2335](https://github.com/zeta-chain/node/pull/2335) - ci: updated the artillery report to publish to artillery cloud
* [2377](https://github.com/zeta-chain/node/pull/2377) - ci: adjusted sast-linters.yml to not scan itself, nor alert on removal of nosec.

### Documentation

* [2321](https://github.com/zeta-chain/node/pull/2321) - improve documentation for ZetaClient functions and packages

## v17.0.0

### Fixes
Expand Down
2 changes: 2 additions & 0 deletions docs/cli/zetacored/zetacored_query_observer.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ zetacored query observer [flags]
* [zetacored query observer list-node-account](zetacored_query_observer_list-node-account.md) - list all NodeAccount
* [zetacored query observer list-observer-set](zetacored_query_observer_list-observer-set.md) - Query observer set
* [zetacored query observer list-pending-nonces](zetacored_query_observer_list-pending-nonces.md) - shows a chainNonces
* [zetacored query observer list-tss-funds-migrator](zetacored_query_observer_list-tss-funds-migrator.md) - list all tss funds migrators
* [zetacored query observer list-tss-history](zetacored_query_observer_list-tss-history.md) - show historical list of TSS
* [zetacored query observer show-ballot](zetacored_query_observer_show-ballot.md) - Query BallotByIdentifier
* [zetacored query observer show-blame](zetacored_query_observer_show-blame.md) - Query BlameByIdentifier
Expand All @@ -46,4 +47,5 @@ zetacored query observer [flags]
* [zetacored query observer show-node-account](zetacored_query_observer_show-node-account.md) - shows a NodeAccount
* [zetacored query observer show-observer-count](zetacored_query_observer_show-observer-count.md) - Query show-observer-count
* [zetacored query observer show-tss](zetacored_query_observer_show-tss.md) - shows a TSS
* [zetacored query observer show-tss-funds-migrator](zetacored_query_observer_show-tss-funds-migrator.md) - show the tss funds migrator for a chain

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# query observer list-tss-funds-migrator

list all tss funds migrators

```
zetacored query observer list-tss-funds-migrator [flags]
```

### Options

```
--count-total count total number of records in list-tss-funds-migrator to query for
--grpc-addr string the gRPC endpoint to use for this chain
--grpc-insecure allow gRPC over insecure channels, if not TLS the server must use TLS
--height int Use a specific height to query state at (this can error if the node is pruning state)
-h, --help help for list-tss-funds-migrator
--limit uint pagination limit of list-tss-funds-migrator to query for (default 100)
--node string [host]:[port] to Tendermint RPC interface for this chain
--offset uint pagination offset of list-tss-funds-migrator to query for
-o, --output string Output format (text|json)
--page uint pagination page of list-tss-funds-migrator to query for. This sets offset to a multiple of limit (default 1)
--page-key string pagination page-key of list-tss-funds-migrator to query for
--reverse results are sorted in descending order
```

### Options inherited from parent commands

```
--chain-id string The network chain ID
--home string directory for config and data
--log_format string The logging format (json|plain)
--log_level string The logging level (trace|debug|info|warn|error|fatal|panic)
--log_no_color Disable colored logs
--trace print out full stack trace on errors
```

### SEE ALSO

* [zetacored query observer](zetacored_query_observer.md) - Querying commands for the observer module

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# query observer show-tss-funds-migrator

show the tss funds migrator for a chain

```
zetacored query observer show-tss-funds-migrator [chain-id] [flags]
```

### Options

```
--count-total count total number of records in show-tss-funds-migrator [chain-id] to query for
--grpc-addr string the gRPC endpoint to use for this chain
--grpc-insecure allow gRPC over insecure channels, if not TLS the server must use TLS
--height int Use a specific height to query state at (this can error if the node is pruning state)
-h, --help help for show-tss-funds-migrator
--limit uint pagination limit of show-tss-funds-migrator [chain-id] to query for (default 100)
--node string [host]:[port] to Tendermint RPC interface for this chain
--offset uint pagination offset of show-tss-funds-migrator [chain-id] to query for
-o, --output string Output format (text|json)
--page uint pagination page of show-tss-funds-migrator [chain-id] to query for. This sets offset to a multiple of limit (default 1)
--page-key string pagination page-key of show-tss-funds-migrator [chain-id] to query for
--reverse results are sorted in descending order
```

### Options inherited from parent commands

```
--chain-id string The network chain ID
--home string directory for config and data
--log_format string The logging format (json|plain)
--log_level string The logging level (trace|debug|info|warn|error|fatal|panic)
--log_no_color Disable colored logs
--trace print out full stack trace on errors
```

### SEE ALSO

* [zetacored query observer](zetacored_query_observer.md) - Querying commands for the observer module

57 changes: 57 additions & 0 deletions docs/openapi/openapi.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30252,6 +30252,42 @@ paths:
format: int64
tags:
- Query
/zeta-chain/observer/getAllTssFundsMigrators:
get:
summary: Queries all TssFundMigratorInfo
operationId: Query_TssFundsMigratorInfoAll
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/observerQueryTssFundsMigratorInfoAllResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
tags:
- Query
/zeta-chain/observer/getTssFundsMigrator:
get:
summary: Queries the TssFundMigratorInfo for a specific chain
operationId: Query_TssFundsMigratorInfo
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/observerQueryTssFundsMigratorInfoResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: chain_id
in: query
required: false
type: string
format: int64
tags:
- Query
/zeta-chain/observer/has_voted/{ballot_identifier}/{voter_address}:
get:
summary: Query if a voter has voted for a ballot
Expand Down Expand Up @@ -58111,6 +58147,19 @@ definitions:
items:
type: object
$ref: '#/definitions/chainsChain'
observerQueryTssFundsMigratorInfoAllResponse:
type: object
properties:
tss_funds_migrators:
type: array
items:
type: object
$ref: '#/definitions/observerTssFundMigratorInfo'
observerQueryTssFundsMigratorInfoResponse:
type: object
properties:
tss_funds_migrator:
$ref: '#/definitions/observerTssFundMigratorInfo'
observerQueryTssHistoryResponse:
type: object
properties:
Expand Down Expand Up @@ -58140,6 +58189,14 @@ definitions:
keyGenZetaHeight:
type: string
format: int64
observerTssFundMigratorInfo:
type: object
properties:
chain_id:
type: string
format: int64
migration_cctx_index:
type: string
observerVoteType:
type: string
enum:
Expand Down
25 changes: 25 additions & 0 deletions proto/zetachain/zetacore/observer/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import "zetachain/zetacore/observer/pending_nonces.proto";
import "zetachain/zetacore/observer/tss.proto";
import "zetachain/zetacore/pkg/chains/chains.proto";
import "zetachain/zetacore/pkg/proofs/proofs.proto";
import "zetachain/zetacore/observer/tss_funds_migrator.proto";

option go_package = "github.com/zeta-chain/zetacore/x/observer/types";

Expand Down Expand Up @@ -150,6 +151,30 @@ service Query {
returns (QueryAllChainNoncesResponse) {
option (google.api.http).get = "/zeta-chain/observer/chainNonces";
}
// Queries the TssFundMigratorInfo for a specific chain
rpc TssFundsMigratorInfo(QueryTssFundsMigratorInfoRequest)
returns (QueryTssFundsMigratorInfoResponse) {
option (google.api.http).get = "/zeta-chain/observer/getTssFundsMigrator";
}

// Queries all TssFundMigratorInfo
rpc TssFundsMigratorInfoAll(QueryTssFundsMigratorInfoAllRequest)
returns (QueryTssFundsMigratorInfoAllResponse) {
option (google.api.http).get =
"/zeta-chain/observer/getAllTssFundsMigrators";
}
}

message QueryTssFundsMigratorInfoAllRequest {}

message QueryTssFundsMigratorInfoAllResponse {
repeated TssFundMigratorInfo tss_funds_migrators = 1
[ (gogoproto.nullable) = false ];
}

message QueryTssFundsMigratorInfoRequest { int64 chain_id = 1; }
message QueryTssFundsMigratorInfoResponse {
TssFundMigratorInfo tss_funds_migrator = 1 [ (gogoproto.nullable) = false ];
}

message QueryGetChainNoncesRequest { string index = 1; }
Expand Down
92 changes: 92 additions & 0 deletions typescript/zetachain/zetacore/observer/query_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import type { TssFundMigratorInfo } from "./tss_funds_migrator_pb.js";
import type { ChainNonces } from "./chain_nonces_pb.js";
import type { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination_pb.js";
import type { PendingNonces } from "./pending_nonces_pb.js";
Expand All @@ -18,6 +19,97 @@ import type { CrosschainFlags } from "./crosschain_flags_pb.js";
import type { Keygen } from "./keygen_pb.js";
import type { Blame } from "./blame_pb.js";

/**
* @generated from message zetachain.zetacore.observer.QueryTssFundsMigratorInfoAllRequest
*/
export declare class QueryTssFundsMigratorInfoAllRequest extends Message<QueryTssFundsMigratorInfoAllRequest> {
constructor(data?: PartialMessage<QueryTssFundsMigratorInfoAllRequest>);

static readonly runtime: typeof proto3;
static readonly typeName = "zetachain.zetacore.observer.QueryTssFundsMigratorInfoAllRequest";
static readonly fields: FieldList;

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

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

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

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

/**
* @generated from message zetachain.zetacore.observer.QueryTssFundsMigratorInfoAllResponse
*/
export declare class QueryTssFundsMigratorInfoAllResponse extends Message<QueryTssFundsMigratorInfoAllResponse> {
/**
* @generated from field: repeated zetachain.zetacore.observer.TssFundMigratorInfo tss_funds_migrators = 1;
*/
tssFundsMigrators: TssFundMigratorInfo[];

constructor(data?: PartialMessage<QueryTssFundsMigratorInfoAllResponse>);

static readonly runtime: typeof proto3;
static readonly typeName = "zetachain.zetacore.observer.QueryTssFundsMigratorInfoAllResponse";
static readonly fields: FieldList;

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

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

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

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

/**
* @generated from message zetachain.zetacore.observer.QueryTssFundsMigratorInfoRequest
*/
export declare class QueryTssFundsMigratorInfoRequest extends Message<QueryTssFundsMigratorInfoRequest> {
/**
* @generated from field: int64 chain_id = 1;
*/
chainId: bigint;

constructor(data?: PartialMessage<QueryTssFundsMigratorInfoRequest>);

static readonly runtime: typeof proto3;
static readonly typeName = "zetachain.zetacore.observer.QueryTssFundsMigratorInfoRequest";
static readonly fields: FieldList;

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

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

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

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

/**
* @generated from message zetachain.zetacore.observer.QueryTssFundsMigratorInfoResponse
*/
export declare class QueryTssFundsMigratorInfoResponse extends Message<QueryTssFundsMigratorInfoResponse> {
/**
* @generated from field: zetachain.zetacore.observer.TssFundMigratorInfo tss_funds_migrator = 1;
*/
tssFundsMigrator?: TssFundMigratorInfo;

constructor(data?: PartialMessage<QueryTssFundsMigratorInfoResponse>);

static readonly runtime: typeof proto3;
static readonly typeName = "zetachain.zetacore.observer.QueryTssFundsMigratorInfoResponse";
static readonly fields: FieldList;

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

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

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

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

/**
* @generated from message zetachain.zetacore.observer.QueryGetChainNoncesRequest
*/
Expand Down
2 changes: 2 additions & 0 deletions x/observer/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ func GetQueryCmd(_ string) *cobra.Command {
CmdListChainNonces(),
CmdShowChainNonces(),
CmdListPendingNonces(),
CmdGetAllTssFundsMigrator(),
CmdGetTssFundsMigrator(),
)

return cmd
Expand Down
Loading

0 comments on commit bc9ff69

Please sign in to comment.