From 9c1364d40956f24ea568a1395b103f7305ecb5ea Mon Sep 17 00:00:00 2001 From: charliec Date: Fri, 22 Sep 2023 14:27:15 -0500 Subject: [PATCH] bypass 0 amount in cctx and corrected Mumbai's chain_id --- zetaclient/btc_signer.go | 7 ++++++- zetaclient/evm_client.go | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/zetaclient/btc_signer.go b/zetaclient/btc_signer.go index 50cdba4815..a0020424b5 100644 --- a/zetaclient/btc_signer.go +++ b/zetaclient/btc_signer.go @@ -108,7 +108,12 @@ func (signer *BTCSigner) SignWithdrawTx(to *btcutil.AddressWitnessPubKeyHash, am remaining := total - amount remainingSats, err := getSatoshis(remaining) if err != nil { - return nil, err + // TODO: amount validation should be done in zeta core to block invalid cctx + // We ignore invalid amount for now, otherwise it will block all other cctxes + // 'remaining' is supposed to be > 0 as we have checked total >= amount + fees + validSendSofar = false + signer.logger.Error().Err(err).Msgf("SignWithdrawTx: cannot convert remaining amount %f to satoshis", remaining) + //return nil, err } remainingSats -= fees.Int64() remainingSats -= nonceMark diff --git a/zetaclient/evm_client.go b/zetaclient/evm_client.go index 5e5781f5c0..1ee4b8032d 100644 --- a/zetaclient/evm_client.go +++ b/zetaclient/evm_client.go @@ -408,9 +408,9 @@ func (ob *EVMChainClient) IsSendOutTxProcessed(sendHash string, nonce uint64, co // The lowest nonce we observe outTx for each chain var lowestOutTxNonceToObserve = map[int64]uint64{ - 5: 70000, // Goerli - 97: 95000, // BSC testnet - 8001: 120000, // Matic + 5: 70000, // Goerli + 97: 95000, // BSC testnet + 80001: 120000, // Matic } // FIXME: there's a chance that a txhash in OutTxChan may not deliver when Stop() is called