diff --git a/README.md b/README.md index 2507b6cd..0974ef98 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,6 @@   -:construction: *This is still unstable MVP implementation of Sygma* :construction: - Sygma bridge uses [chainbridge-core](https://github.com/ChainSafe/chainbridge-core) framework and replaces the relayer voting mechanism with the MPC signing process.   diff --git a/config/config_test.go b/config/config_test.go index 143abaab..c3fb8106 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -109,7 +109,7 @@ func (s *GetConfigTestSuite) Test_GetConfigFromENV() { PingBackOff: 1 * time.Second, PingInterval: 1 * time.Second, ElectionWaitTime: 2 * time.Second, - BullyWaitTime: 25 * time.Second, + BullyWaitTime: 3 * time.Minute, }, }, ChainConfigs: []map[string]interface{}{ @@ -214,7 +214,7 @@ func (s *GetConfigTestSuite) Test_SharedConfigLengthMismatch() { PingBackOff: 1 * time.Second, PingInterval: 1 * time.Second, ElectionWaitTime: 2 * time.Second, - BullyWaitTime: 25 * time.Second, + BullyWaitTime: 3 * time.Minute, }, }, ChainConfigs: []map[string]interface{}{ @@ -411,7 +411,7 @@ func (s *GetConfigTestSuite) Test_GetConfigFromFile() { PingBackOff: 1 * time.Second, PingInterval: 1 * time.Second, ElectionWaitTime: 2 * time.Second, - BullyWaitTime: 25 * time.Second, + BullyWaitTime: 3 * time.Minute, }, }, ChainConfigs: []map[string]interface{}{{ diff --git a/config/relayer/config.go b/config/relayer/config.go index cfe119de..160cf07e 100644 --- a/config/relayer/config.go +++ b/config/relayer/config.go @@ -67,7 +67,7 @@ type RawBullyConfig struct { PingBackOff string `mapstructure:"PingBackOff" json:"pingBackOff" default:"1s"` PingInterval string `mapstructure:"PingInterval" json:"pingInterval" default:"1s"` ElectionWaitTime string `mapstructure:"ElectionWaitTime" json:"electionWaitTime" default:"2s"` - BullyWaitTime string `mapstructure:"BullyWaitTime" json:"bullyWaitTime" default:"25s"` + BullyWaitTime string `mapstructure:"BullyWaitTime" json:"bullyWaitTime" default:"3m"` } func (c *RawRelayerConfig) Validate() error { diff --git a/tss/coordinator.go b/tss/coordinator.go index d97fab06..64ea6eb8 100644 --- a/tss/coordinator.go +++ b/tss/coordinator.go @@ -298,6 +298,11 @@ func (c *Coordinator) waitForStart( select { case wMsg := <-msgChan: { + if coordinator != "" && wMsg.From != coordinator { + log.Warn().Msgf("Received initate message from a peer %s that is not the coordinator %s", wMsg.From.Pretty(), coordinator.Pretty()) + continue + } + coordinatorTimeoutTicker.Reset(timeout) log.Debug().Str("SessionID", tssProcess.SessionID()).Msgf("sent ready message to %s", wMsg.From) @@ -312,10 +317,8 @@ func (c *Coordinator) waitForStart( // having startMsg.From as "" is special case when peer is not selected in subset // but should wait for start message if existing singing process fails if coordinator != "" && startMsg.From != coordinator { - return fmt.Errorf( - "start message received from peer %s that is not coordinator %s", - startMsg.From.Pretty(), coordinator.Pretty(), - ) + log.Warn().Msgf("Received start message from a peer %s that is not the coordinator %s", startMsg.From.Pretty(), coordinator.Pretty()) + continue } msg, err := common.UnmarshalStartMessage(startMsg.Payload)