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: move relayer key check after tss keysign #3250

Merged
merged 2 commits into from
Dec 6, 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
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 @@
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 @@
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
}

Check warning on line 169 in zetaclient/chains/solana/signer/signer.go

View check run for this annotation

Codecov / codecov/patch

zetaclient/chains/solana/signer/signer.go#L166-L169

Added lines #L166 - L169 were not covered by tests

// 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
Loading