HomePhabricator

[avalanche] Limit the conflicting proof rate

Description

[avalanche] Limit the conflicting proof rate

Summary:
This is a cooldown feature that prevents 2 consecutives conflicting proofs for the same utxo from being added to a pool in under 1 minute. This will make it impossible for an attacker to generate a large number of votes by suppying conflicting proofs in series. The value of 1 minute is chosen so that it is much larger than the expected convergence time for an avalanche vote, but low enough that it won't prevent a legit proof from being voted on.

This cooldown will later be expanded to prevent a proof that has been voted and accepted from being overriden during a larger time (probably 1h). This will prevent an attacker from messing with our peer set by replacing the proof every minute (see above cooldown).

Ref T1854.

Depends on D10773.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, tyler-smith

Reviewed By: #bitcoin_abc, tyler-smith

Subscribers: tyler-smith

Maniphest Tasks: T1854

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

Details

Provenance
FabienAuthored on Jan 7 2022, 09:37
FabienPushed on Feb 9 2022, 08:33
Reviewer
Restricted Project
Differential Revision
D10714: [avalanche] Limit the conflicting proof rate
Parents
rABCc8e2c0dccbc8: [avalanche] Fix a reversed lock order in ReattemptInitialBroadcast
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task