diff --git a/relayer/relays/beacon/config/config.go b/relayer/relays/beacon/config/config.go index e0e5895366..cd56105196 100644 --- a/relayer/relays/beacon/config/config.go +++ b/relayer/relays/beacon/config/config.go @@ -3,8 +3,6 @@ package config import ( "errors" "fmt" - - log "github.com/sirupsen/logrus" ) type Config struct { @@ -92,14 +90,12 @@ func (b BeaconConfig) Validate() error { } func (p ParachainConfig) Validate() error { - log.Info("validating parachain settings") if p.Endpoint == "" { return errors.New("[endpoint] is not set") } if p.MaxWatchedExtrinsics == 0 { return errors.New("[maxWatchedExtrinsics] is not set") } - log.WithField("HeaderRedundancy", p.HeaderRedundancy).Info("p.HeaderRedundancy is") if p.HeaderRedundancy == 0 { return errors.New("[headerRedundancy] is not set") } diff --git a/relayer/relays/execution/main.go b/relayer/relays/execution/main.go index afe722ca5f..5a3aed0e13 100644 --- a/relayer/relays/execution/main.go +++ b/relayer/relays/execution/main.go @@ -430,12 +430,21 @@ func (r *Relay) doSubmit(ctx context.Context, ev *contracts.GatewayOutboundMessa return fmt.Errorf("fetch execution header proof: %w", err) } + paraNonce, err := r.fetchLatestParachainNonce() + if err != nil { + return fmt.Errorf("fetch latest parachain nonce: %w", err) + } + if ev.Nonce <= paraNonce { + log.WithField("nonce", paraNonce).Info("message picked up by another relayer, skipped") + return nil + } + err = r.writeToParachain(ctx, proof, inboundMsg) if err != nil { return fmt.Errorf("write to parachain: %w", err) } - paraNonce, err := r.fetchLatestParachainNonce() + paraNonce, err = r.fetchLatestParachainNonce() if err != nil { return fmt.Errorf("fetch latest parachain nonce: %w", err) }