Skip to content

Commit

Permalink
Merge branch 'main' into bump-core
Browse files Browse the repository at this point in the history
  • Loading branch information
mpetrun5 authored Oct 17, 2023
2 parents 7fecaa3 + 17f796f commit ac4abb3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

 
Expand Down
6 changes: 3 additions & 3 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}{
Expand Down Expand Up @@ -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{}{
Expand Down Expand Up @@ -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{}{{
Expand Down
2 changes: 1 addition & 1 deletion config/relayer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
11 changes: 7 additions & 4 deletions tss/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit ac4abb3

Please sign in to comment.