HomePhabricator

[avalanche] Ban peers that send conflicting proofs repeatidly

Description

[avalanche] Ban peers that send conflicting proofs repeatidly

Summary: Sending a conflicting proof is a normal situation, however a peer sending several conflicting proofs in a short time frame is very likely adversarial. This diff adds a small banscore in case a conflicting proof is received while the conflicting proofs cooldown is not elapsed, which indicates such a behavior and will eventually ban the bad peer.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, sdulfari

Reviewed By: #bitcoin_abc, sdulfari

Subscribers: sdulfari

Differential Revision: https://reviews.bitcoinabc.org/D11743