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

fix: skip keygen loop #1625

Merged
merged 2 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* [1591](https://github.com/zeta-chain/node/pull/1591) - support lower gas limit for voting on inbound and outbound transactions
* [1592](https://github.com/zeta-chain/node/issues/1592) - check inbound tracker tx hash against Tss address and some refactor on inTx observation

### Fixes
* [1625](https://github.com/zeta-chain/node/pull/1625) - temporarily skip keygen check in zetaclient
## Version: v12.0.0

### Breaking Changes
Expand Down
4 changes: 4 additions & 0 deletions cmd/zetaclientd/keygen_tss.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/json"
"errors"
"fmt"
"math"
"time"

"github.com/rs/zerolog"
Expand Down Expand Up @@ -79,6 +80,9 @@ func GenerateTss(logger zerolog.Logger,
}
// Try generating TSS at keygen block , only when status is pending keygen and generation has not been tried at the block
if keyGen.Status == observertypes.KeygenStatus_PendingKeygen {
if keyGen.BlockNumber == math.MaxInt64 {
return tss, nil
}
// Return error if RPC is not working
currentBlock, err := zetaBridge.GetZetaBlockHeight()
if err != nil {
Expand Down
18 changes: 9 additions & 9 deletions cmd/zetaclientd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"path/filepath"
"strings"
"syscall"
"time"

"github.com/libp2p/go-libp2p/core"
maddr "github.com/multiformats/go-multiaddr"
Expand Down Expand Up @@ -173,14 +172,15 @@ func start(_ *cobra.Command, _ []string) error {

// Wait for TSS keygen to be successful before proceeding, This is a blocking thread only for a new keygen.
// For existing keygen, this should directly proceed to the next step
ticker := time.NewTicker(time.Second * 1)
for range ticker.C {
if cfg.Keygen.Status != observerTypes.KeygenStatus_KeyGenSuccess {
startLogger.Info().Msgf("Waiting for TSS Keygen to be a success, current status %s", cfg.Keygen.Status)
continue
}
break
}
// Temporarily allow zeta-client to proceed even if the keygen is set to pending
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it going to be put back for v12.1.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

//ticker := time.NewTicker(time.Second * 1)
//for range ticker.C {
// if cfg.Keygen.Status != observerTypes.KeygenStatus_KeyGenSuccess {
// startLogger.Info().Msgf("Waiting for TSS Keygen to be a success, current status %s", cfg.Keygen.Status)
// continue
// }
// break
//}

// Update Current TSS value from zetacore, if TSS keygen is successful, the TSS address is set on zeta-core
// Returns err if the RPC call fails as zeta client needs the current TSS address to be set
Expand Down
Loading