Punish peers for duplicate GRANDPA neighbor messages (#12462)
* Decrease peer reputation for duplicate GRANDPA neighbor messages. * Fix comparison * Fix update_peer_state() validity condition * Add negative test * Rework update_peer_state() validity condition, add tests * update_peer_state() validity condition: invert comparison * Split InvalidViewChange and DuplicateNeighborMessage misbehaviors * Enforce rate-limiting of duplicate GRANDPA neighbor packets * Update client/finality-grandpa/src/communication/gossip.rs Co-authored-by:André Silva <123550+andresilva@users.noreply.github.com> * Make rolling clock back in a test safer Co-authored-by:
André Silva <123550+andresilva@users.noreply.github.com>
Showing
- substrate/client/finality-grandpa/src/communication/gossip.rs 108 additions, 43 deletions...trate/client/finality-grandpa/src/communication/gossip.rs
- substrate/client/finality-grandpa/src/communication/mod.rs 7 additions, 1 deletionsubstrate/client/finality-grandpa/src/communication/mod.rs
- substrate/client/finality-grandpa/src/communication/periodic.rs 9 additions, 8 deletions...ate/client/finality-grandpa/src/communication/periodic.rs
Please register or sign in to comment