Skip to content

Commit

Permalink
fix: move relayer key check after tss keysign (#3250)
Browse files Browse the repository at this point in the history
* move relayer key checking after the tss keysign to unblock Athens3

* print relayer key fileName if not found
  • Loading branch information
ws4charlie authored Dec 6, 2024
1 parent 2350ba1 commit 314db22
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 6 additions & 6 deletions zetaclient/chains/solana/signer/signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,6 @@ func (signer *Signer) TryProcessOutbound(
nonce := params.TssNonce
coinType := cctx.InboundParams.CoinType

// skip relaying the transaction if this signer hasn't set the relayer key
if !signer.HasRelayerKey() {
logger.Warn().Msgf("TryProcessOutbound: no relayer key configured")
return
}

var tx *solana.Transaction

switch coinType {
Expand Down Expand Up @@ -168,6 +162,12 @@ func (signer *Signer) TryProcessOutbound(
return
}

// skip relaying the transaction if this signer hasn't set the relayer key
if !signer.HasRelayerKey() {
logger.Warn().Msgf("TryProcessOutbound: no relayer key configured")
return
}

// set relayer balance metrics
signer.SetRelayerBalanceMetrics(ctx)

Expand Down
3 changes: 3 additions & 0 deletions zetaclient/keys/relayer_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"github.com/gagliardetto/solana-go"
"github.com/pkg/errors"
"github.com/rs/zerolog/log"

"github.com/zeta-chain/node/pkg/chains"
"github.com/zeta-chain/node/pkg/crypto"
Expand Down Expand Up @@ -68,6 +69,8 @@ func LoadRelayerKey(relayerKeyPath string, network chains.Network, password stri
return relayerKey, nil
}

log.Logger.Warn().Msgf("relayer key file not found: %s", fileName)

// relayer key is optional, so it's okay if the relayer key is not provided
return nil, nil
}
Expand Down

0 comments on commit 314db22

Please sign in to comment.