Skip to content

Commit

Permalink
fix: update go-tss with known fixes (v19) (#2849)
Browse files Browse the repository at this point in the history
* fix: update go-tss with known fixes (v19)

* manually cherry pick #2843

* manually cherry pick remediation for schedule 0 value

---------

Co-authored-by: skosito <[email protected]>
  • Loading branch information
gartnera and skosito authored Sep 7, 2024
1 parent 5eb5eb0 commit de1471b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
14 changes: 7 additions & 7 deletions zetaclient/orchestrator/orchestrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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++ {
Expand All @@ -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
Expand Down

0 comments on commit de1471b

Please sign in to comment.