Skip to content

Commit

Permalink
Don't disconnect on invalid imports. (#5392)
Browse files Browse the repository at this point in the history
There are numerous reasons for invalid imports, most of them would
likely be caused by bugs. On the other side, dispute distribution
handles all connections fairly, thus there is little harm in keeping a
problematic connection open.

---------

Co-authored-by: eskimor <[email protected]>
Co-authored-by: ordian <[email protected]>
  • Loading branch information
3 people authored Aug 22, 2024
1 parent e600b74 commit b2ec017
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ use self::{

const COST_INVALID_REQUEST: Rep = Rep::CostMajor("Received message could not be decoded.");
const COST_INVALID_SIGNATURE: Rep = Rep::Malicious("Signatures were invalid.");
const COST_INVALID_IMPORT: Rep =
Rep::Malicious("Import was deemed invalid by dispute-coordinator.");
const COST_NOT_A_VALIDATOR: Rep = Rep::CostMajor("Reporting peer was not a validator.");

/// Invalid imports can be caused by flooding, e.g. by a disabled validator.
const COST_INVALID_IMPORT: Rep =
Rep::CostMinor("Import was deemed invalid by dispute-coordinator.");

/// Mildly punish peers exceeding their rate limit.
///
/// For honest peers this should rarely happen, but if it happens we would not want to disconnect
Expand Down
11 changes: 11 additions & 0 deletions prdoc/pr_5392.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title: "Don't disconnect disabled nodes sending us dispute messages"

doc:
- audience: Node Operator
description: |
No longer disconnect peers which we consider disabled when raising
disputes as this will affect the approval process and thus finality.

crates:
- name: polkadot-dispute-distribution
bump: patch

0 comments on commit b2ec017

Please sign in to comment.