From de1471b3412a987dc4f299d729f3a531045cb75b Mon Sep 17 00:00:00 2001 From: Alex Gartner Date: Sat, 7 Sep 2024 10:44:52 -0700 Subject: [PATCH] fix: update go-tss with known fixes (v19) (#2849) * fix: update go-tss with known fixes (v19) * manually cherry pick https://github.com/zeta-chain/node/pull/2843 * manually cherry pick remediation for schedule 0 value --------- Co-authored-by: skosito --- go.mod | 2 +- go.sum | 4 ++-- zetaclient/orchestrator/orchestrator.go | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 1536062b7f..5b11b12973 100644 --- a/go.mod +++ b/go.mod @@ -365,4 +365,4 @@ replace github.com/evmos/ethermint => github.com/zeta-chain/ethermint v0.0.0-202 replace github.com/libp2p/go-libp2p => github.com/zeta-chain/go-libp2p v0.0.0-20240710192637-567fbaacc2b4 -replace gitlab.com/thorchain/tss/go-tss => github.com/zeta-chain/go-tss v0.0.0-20240729195411-9f5ae8189449 +replace gitlab.com/thorchain/tss/go-tss => github.com/zeta-chain/go-tss v0.0.0-20240907163312-b576693642e0 diff --git a/go.sum b/go.sum index 725305dc70..045a9a1acb 100644 --- a/go.sum +++ b/go.sum @@ -1740,8 +1740,8 @@ github.com/zeta-chain/ethermint v0.0.0-20240531172701-61d040058c94 h1:M54ljayJvy github.com/zeta-chain/ethermint v0.0.0-20240531172701-61d040058c94/go.mod h1:s1zA6OpXv3Tb5I0M6M6j5fo/AssaZL/pgkc7G0W2kN8= github.com/zeta-chain/go-libp2p v0.0.0-20240710192637-567fbaacc2b4 h1:FmO3HfVdZ7LzxBUfg6sVzV7ilKElQU2DZm8PxJ7KcYI= github.com/zeta-chain/go-libp2p v0.0.0-20240710192637-567fbaacc2b4/go.mod h1:TBv5NY/CqWYIfUstXO1fDWrt4bDoqgCw79yihqBspg8= -github.com/zeta-chain/go-tss v0.0.0-20240729195411-9f5ae8189449 h1:4U+4g2QQjbrmeLU1ZdCDU6CYsE5kbwMOKZ/PACR/vN8= -github.com/zeta-chain/go-tss v0.0.0-20240729195411-9f5ae8189449/go.mod h1:LN1IBRN8xQkKgdgLhl5BDGZyPm70QOTbVLejdS2FVpo= +github.com/zeta-chain/go-tss v0.0.0-20240907163312-b576693642e0 h1:OMuw0XgFcX0RQ8+B3gtreV4H/JPglCSfG2PfVi7bONM= +github.com/zeta-chain/go-tss v0.0.0-20240907163312-b576693642e0/go.mod h1:LN1IBRN8xQkKgdgLhl5BDGZyPm70QOTbVLejdS2FVpo= github.com/zeta-chain/keystone/keys v0.0.0-20231105174229-903bc9405da2 h1:gd2uE0X+ZbdFJ8DubxNqLbOVlCB12EgWdzSNRAR82tM= github.com/zeta-chain/keystone/keys v0.0.0-20231105174229-903bc9405da2/go.mod h1:x7Bkwbzt2W2lQfjOirnff0Dj+tykdbTG1FMJPVPZsvE= github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20240418181724-c222fd3ae1f5 h1:ljM7xka3WZvth9k1uYxrG3/FKQQTkR96FZlIjUKOoYw= diff --git a/zetaclient/orchestrator/orchestrator.go b/zetaclient/orchestrator/orchestrator.go index 93b3af3893..a66e90aad6 100644 --- a/zetaclient/orchestrator/orchestrator.go +++ b/zetaclient/orchestrator/orchestrator.go @@ -449,6 +449,11 @@ func (oc *Orchestrator) ScheduleCctxEVM( outboundScheduleLookback := uint64(float64(outboundScheduleLookahead) * evmOutboundLookbackFactor) // #nosec G115 positive outboundScheduleInterval := uint64(observer.GetChainParams().OutboundScheduleInterval) + // determining critical outbound; if it satisfies following criteria + // 1. it's the first pending outbound for this chain + // 2. the following 5 nonces have been in tracker + criticalInterval := uint64(10) // for critical pending outbound we reduce re-try interval + nonCriticalInterval := outboundScheduleInterval * 2 // for non-critical pending outbound we increase re-try interval for idx, cctx := range cctxList { params := cctx.GetCurrentOutboundParam() @@ -480,11 +485,6 @@ func (oc *Orchestrator) ScheduleCctxEVM( continue } - // determining critical outbound; if it satisfies following criteria - // 1. it's the first pending outbound for this chain - // 2. the following 5 nonces have been in tracker - criticalInterval := uint64(10) // for critical pending outbound we reduce re-try interval - nonCriticalInterval := outboundScheduleInterval * 2 // for non-critical pending outbound we increase re-try interval if nonce%criticalInterval == zetaHeight%criticalInterval { count := 0 for i := nonce + 1; i <= nonce+10; i++ { @@ -506,8 +506,8 @@ func (oc *Orchestrator) ScheduleCctxEVM( // logging observer chain params to help with debugging if issue happens again oc.logger.Error(). Interface("observer.chain_params", observer.GetChainParams()). - Msgf("ScheduleCctxEVM: outboundScheduleInterval set to 0 for chain %d", chainID) - return + Msgf("ScheduleCctxEVM: outboundScheduleInterval set to 0 for chain %d, hardcoding to 64", chainID) + outboundScheduleInterval = 64 } // otherwise, the normal interval is used