From 737736b199438a0830da5d978da487fb14193d20 Mon Sep 17 00:00:00 2001 From: Charlie Chen Date: Fri, 12 Jan 2024 23:37:48 -0600 Subject: [PATCH] skip unsupported chain parameters --- changelog.md | 1 + zetaclient/zetacore_bridge.go | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/changelog.md b/changelog.md index 40b38a4322..f1f98788a0 100644 --- a/changelog.md +++ b/changelog.md @@ -21,6 +21,7 @@ ### Fixes +* [1575](https://github.com/zeta-chain/node/issues/1575) - Skip unsupported chain parameters by IsSupported flag * [1554](https://github.com/zeta-chain/node/pull/1554) - Screen out unconfirmed UTXOs that are not created by TSS itself * [1560](https://github.com/zeta-chain/node/issues/1560) - Zetaclient post evm-chain outtx hashes only when receipt is available * [1516](https://github.com/zeta-chain/node/issues/1516) - Unprivileged outtx tracker removal diff --git a/zetaclient/zetacore_bridge.go b/zetaclient/zetacore_bridge.go index 0a2b3b08c4..bf4466565c 100644 --- a/zetaclient/zetacore_bridge.go +++ b/zetaclient/zetacore_bridge.go @@ -196,7 +196,8 @@ func (b *ZetaCoreBridge) UpdateConfigFromCore(cfg *config.Config, init bool) err return err } if plan != nil && bn == plan.Height-1 { // stop zetaclients; notify operator to upgrade and restart - b.logger.Warn().Msgf("Active upgrade plan detected and upgrade height reached: %s at height %d; ZetaClient is stopped; please kill this process, replace zetaclientd binary with upgraded version, and restart zetaclientd", plan.Name, plan.Height) + b.logger.Warn().Msgf("Active upgrade plan detected and upgrade height reached: %s at height %d; ZetaClient is stopped;"+ + "please kill this process, replace zetaclientd binary with upgraded version, and restart zetaclientd", plan.Name, plan.Height) b.pause <- struct{}{} // notify CoreObserver to stop ChainClients, Signers, and CoreObservder itself } @@ -212,14 +213,16 @@ func (b *ZetaCoreBridge) UpdateConfigFromCore(cfg *config.Config, init bool) err for _, chainParam := range chainParams { err := config.ValidateChainParams(chainParam) if err != nil { - b.logger.Debug().Err(err).Msgf( - "Invalid core params for chain %s", - common.GetChainFromChainID(chainParam.ChainId).ChainName, - ) + b.logger.Warn().Err(err).Msgf("Invalid chain params for chain %d", chainParam.ChainId) + continue + } + if !chainParam.GetIsSupported() { + b.logger.Info().Msgf("Chain %d is not supported yet", chainParam.ChainId) + continue } if common.IsBitcoinChain(chainParam.ChainId) { newBTCParams = chainParam - } else { + } else if common.IsEVMChain(chainParam.ChainId) { newEVMParams[chainParam.ChainId] = chainParam } }