ignore instead of reject duplicate sync msgs (#2903)

The P2P spec defines how certain error classes should be handled through
either IGNORE or REJECT verdicts. For sync committee message, the spec
defines that only the first message from each validator per subcommittee
and slot shall be accepted, the rest is ignored. However, current code
rejects those messages instead of ignoring them. Fixed to match spec.
This commit is contained in:
Etan Kissling 2021-09-27 16:36:28 +02:00 committed by GitHub
parent 2b2846b468
commit ba3884f449
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -796,7 +796,7 @@ proc validateSyncCommitteeMessage*(
committeeIdx: syncCommitteeIdx)
if msgKey in syncCommitteeMsgPool.seenSyncMsgByAuthor:
return errReject("SyncCommitteeMessage: duplicate message")
return errIgnore("SyncCommitteeMessage: duplicate message")
else:
syncCommitteeMsgPool.seenSyncMsgByAuthor.incl msgKey