From e06711b63e7cc71e5999e4ba6674e7f27147478b Mon Sep 17 00:00:00 2001 From: Grant Zukel <80433392+gzukel@users.noreply.github.com> Date: Sat, 20 Jan 2024 22:49:04 -0700 Subject: [PATCH 1/2] ci: fix the cleanup step in the rc-release and publish-release pipelines (#1580) * fix: fix the cleanup step in the rc-release and publish-release pipelines * fix: fix the cleanup step in the rc-release and publish-release pipelines * Update rc-release.yml Co-authored-by: Lucas Bertrand --------- Co-authored-by: Charlie <31941002+CharlieMc0@users.noreply.github.com> Co-authored-by: Lucas Bertrand --- .github/workflows/publish-release.yml | 2 +- .github/workflows/rc-release.yml | 2 +- changelog.md | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 951f7a2888..fa01e0d4e4 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -133,4 +133,4 @@ jobs: - name: Clean Up Workspace if: always() shell: bash - run: rm -rf * \ No newline at end of file + run: sudo rm -rf * || echo "failed to cleanup workspace please investigate" \ No newline at end of file diff --git a/.github/workflows/rc-release.yml b/.github/workflows/rc-release.yml index fcd8faff9c..2e4fbfd194 100644 --- a/.github/workflows/rc-release.yml +++ b/.github/workflows/rc-release.yml @@ -85,4 +85,4 @@ jobs: - name: Clean Up Workspace if: always() shell: bash - run: rm -rf * \ No newline at end of file + run: sudo rm -rf * || echo "failed to clean workspace please investigate" \ No newline at end of file diff --git a/changelog.md b/changelog.md index 01b77c5681..0fd90f83af 100644 --- a/changelog.md +++ b/changelog.md @@ -13,6 +13,10 @@ * [1535](https://github.com/zeta-chain/node/issues/1535) - Avoid voting on wrong ballots due to false blockNumber in EVM tx receipt * [1588](https://github.com/zeta-chain/node/pull/1588) - fix chain params comparison logic +### CI + +* [1580](https://github.com/zeta-chain/node/pull/1580) - Fix release pipelines cleanup step. + ### Chores * [1585](https://github.com/zeta-chain/node/pull/1585) - Updated release instructions From d1abe7b8dced067e218b95ff4ee478b9fe8f5785 Mon Sep 17 00:00:00 2001 From: Tanmay Date: Sun, 21 Jan 2024 12:18:54 -0500 Subject: [PATCH 2/2] fix: get tss address cli (#1589) * add btc chain id to get tss address cli * add btc chain id to get tss address historical cli * use maximum args instead of exact args * add changelog * generate docs * lint issue --------- Co-authored-by: Lucas Bertrand --- changelog.md | 1 + ...ery_observer_get-historical-tss-address.md | 2 +- ...etacored_query_observer_get-tss-address.md | 2 +- .../client/cli/query_get_tss_address.go | 23 +++++++++++++++---- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/changelog.md b/changelog.md index 0fd90f83af..832f006123 100644 --- a/changelog.md +++ b/changelog.md @@ -80,6 +80,7 @@ Getting the correct TSS address for Bitcoin now requires proviidng the Bitcoin c * [1546](https://github.com/zeta-chain/node/pull/1546) - fix reset of pending nonces on genesis import * [1555](https://github.com/zeta-chain/node/pull/1555) - Reduce websocket message limit to 10MB * [1567](https://github.com/zeta-chain/node/pull/1567) - add bitcoin chain id to fetch the tss address rpc endpoint +* [1589](https://github.com/zeta-chain/node/pull/1589) - add bitcoin chain id to `get tss address` and `get tss address historical` cli query ### Refactoring diff --git a/docs/cli/zetacored/zetacored_query_observer_get-historical-tss-address.md b/docs/cli/zetacored/zetacored_query_observer_get-historical-tss-address.md index 83de26b9dd..d56798a084 100644 --- a/docs/cli/zetacored/zetacored_query_observer_get-historical-tss-address.md +++ b/docs/cli/zetacored/zetacored_query_observer_get-historical-tss-address.md @@ -3,7 +3,7 @@ Query tss address by finalized zeta height (for historical tss addresses) ``` -zetacored query observer get-historical-tss-address [finalizedZetaHeight] [flags] +zetacored query observer get-historical-tss-address [finalizedZetaHeight] [bitcoinChainId] [flags] ``` ### Options diff --git a/docs/cli/zetacored/zetacored_query_observer_get-tss-address.md b/docs/cli/zetacored/zetacored_query_observer_get-tss-address.md index cb763f8510..5c5e68bd14 100644 --- a/docs/cli/zetacored/zetacored_query_observer_get-tss-address.md +++ b/docs/cli/zetacored/zetacored_query_observer_get-tss-address.md @@ -3,7 +3,7 @@ Query current tss address ``` -zetacored query observer get-tss-address [flags] +zetacored query observer get-tss-address [bitcoinChainId]] [flags] ``` ### Options diff --git a/x/observer/client/cli/query_get_tss_address.go b/x/observer/client/cli/query_get_tss_address.go index 8bfac0e10f..d37fb95f0c 100644 --- a/x/observer/client/cli/query_get_tss_address.go +++ b/x/observer/client/cli/query_get_tss_address.go @@ -11,9 +11,9 @@ import ( func CmdGetTssAddress() *cobra.Command { cmd := &cobra.Command{ - Use: "get-tss-address", + Use: "get-tss-address [bitcoinChainId]]", Short: "Query current tss address", - Args: cobra.NoArgs, + Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) (err error) { clientCtx, err := client.GetClientTxContext(cmd) @@ -21,8 +21,14 @@ func CmdGetTssAddress() *cobra.Command { return err } queryClient := types.NewQueryClient(clientCtx) - params := &types.QueryGetTssAddressRequest{} + if len(args) == 1 { + bitcoinChainID, err := strconv.ParseInt(args[0], 10, 64) + if err != nil { + return err + } + params.BitcoinChainId = bitcoinChainID + } res, err := queryClient.GetTssAddress(cmd.Context(), params) if err != nil { @@ -40,9 +46,9 @@ func CmdGetTssAddress() *cobra.Command { func CmdGetTssAddressByFinalizedZetaHeight() *cobra.Command { cmd := &cobra.Command{ - Use: "get-historical-tss-address [finalizedZetaHeight]", + Use: "get-historical-tss-address [finalizedZetaHeight] [bitcoinChainId]", Short: "Query tss address by finalized zeta height (for historical tss addresses)", - Args: cobra.ExactArgs(1), + Args: cobra.MaximumNArgs(2), RunE: func(cmd *cobra.Command, args []string) (err error) { clientCtx, err := client.GetClientTxContext(cmd) @@ -58,6 +64,13 @@ func CmdGetTssAddressByFinalizedZetaHeight() *cobra.Command { params := &types.QueryGetTssAddressByFinalizedHeightRequest{ FinalizedZetaHeight: finalizedZetaHeight, } + if len(args) == 2 { + bitcoinChainID, err := strconv.ParseInt(args[1], 10, 64) + if err != nil { + return err + } + params.BitcoinChainId = bitcoinChainID + } res, err := queryClient.GetTssAddressByFinalizedHeight(cmd.Context(), params) if err != nil {