From 6c6d4f183638c1d6c105cff99a49363c7d04e6d4 Mon Sep 17 00:00:00 2001 From: eskimor Date: Sat, 17 Aug 2024 10:26:20 +0200 Subject: [PATCH 1/2] Don't disconnect on invalid imports. There are numerous reasons for invalid imports, most of them are likely caused by bugs. On the other side dispute distribution handles all connections fairly, thus there is little harm in keeping a problematic connection open. --- .../node/network/dispute-distribution/src/receiver/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/polkadot/node/network/dispute-distribution/src/receiver/mod.rs b/polkadot/node/network/dispute-distribution/src/receiver/mod.rs index 2409e6994f60..77c1e41aac05 100644 --- a/polkadot/node/network/dispute-distribution/src/receiver/mod.rs +++ b/polkadot/node/network/dispute-distribution/src/receiver/mod.rs @@ -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 From 6f215a7a24d89b11f3c3722795e6c2cee270a0d1 Mon Sep 17 00:00:00 2001 From: eskimor Date: Mon, 19 Aug 2024 19:27:34 +0200 Subject: [PATCH 2/2] Add prdoc --- prdoc/pr_5392.prdoc | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 prdoc/pr_5392.prdoc diff --git a/prdoc/pr_5392.prdoc b/prdoc/pr_5392.prdoc new file mode 100644 index 000000000000..aeeb05de0bc3 --- /dev/null +++ b/prdoc/pr_5392.prdoc @@ -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