From c7a6e32c962b74790561309746c0cd967801d3c6 Mon Sep 17 00:00:00 2001 From: vyzo Date: Wed, 19 Aug 2020 13:20:16 +0300 Subject: [PATCH] ignore, don't reject messages with nonce that is too low we seem to have a problem with this leading to many rejected messages and negative scores for potentially innocent peers. --- chain/sub/incoming.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chain/sub/incoming.go b/chain/sub/incoming.go index 8bc8cce0e..561d2c3f1 100644 --- a/chain/sub/incoming.go +++ b/chain/sub/incoming.go @@ -546,7 +546,11 @@ func (mv *MessageValidator) Validate(ctx context.Context, pid peer.ID, msg *pubs ) stats.Record(ctx, metrics.MessageValidationFailure.M(1)) switch { - case xerrors.Is(err, messagepool.ErrBroadcastAnyway) || xerrors.Is(err, messagepool.ErrRBFTooLowPremium): + case xerrors.Is(err, messagepool.ErrBroadcastAnyway): + fallthrough + case xerrors.Is(err, messagepool.ErrRBFTooLowPremium): + fallthrough + case xerrors.Is(err, messagepool.ErrNonceTooLow): return pubsub.ValidationIgnore default: return pubsub.ValidationReject