From 4d7f2baec96d1893c03e5b8fa0b79849ea3197c2 Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 6 Sep 2024 18:21:32 +0100 Subject: [PATCH] fix: move interval assignment out of cctx loop (#2843) * move interval assignment out of cctx loop * changelog --------- Co-authored-by: brewmaster012 <88689859+brewmaster012@users.noreply.github.com> --- changelog.md | 6 ++++++ zetaclient/orchestrator/orchestrator.go | 12 +++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/changelog.md b/changelog.md index a4c93d2baf..89a2cb9c61 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # CHANGELOG +## v19.1.4 + +### Fixes + +* [2843](https://github.com/zeta-chain/node/pull/2843) - move interval assignment out of cctx loop + ## v19.1.3 ### Fixes diff --git a/zetaclient/orchestrator/orchestrator.go b/zetaclient/orchestrator/orchestrator.go index fdd19550e6..a66e90aad6 100644 --- a/zetaclient/orchestrator/orchestrator.go +++ b/zetaclient/orchestrator/orchestrator.go @@ -449,8 +449,11 @@ func (oc *Orchestrator) ScheduleCctxEVM( outboundScheduleLookback := uint64(float64(outboundScheduleLookahead) * evmOutboundLookbackFactor) // #nosec G115 positive outboundScheduleInterval := uint64(observer.GetChainParams().OutboundScheduleInterval) - oc.logger.Info(). - Msgf("outboundScheduleInterval set to %d from params %d", outboundScheduleInterval, 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() @@ -482,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++ {