From af15cb939e4c28b442ea8b56bfcccdd4c67174d4 Mon Sep 17 00:00:00 2001 From: Tsvetomir Dimitrov Date: Tue, 10 Jan 2023 09:24:54 +0200 Subject: [PATCH 1/2] Add a paragraph about slashing in runtime disputes section from the guide --- .../implementers-guide/src/runtime/disputes.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/roadmap/implementers-guide/src/runtime/disputes.md b/roadmap/implementers-guide/src/runtime/disputes.md index 1f1debee9cd4..abfc43c7bb48 100644 --- a/roadmap/implementers-guide/src/runtime/disputes.md +++ b/roadmap/implementers-guide/src/runtime/disputes.md @@ -123,4 +123,17 @@ applied: as a measure not to import one sided disputes. A dispute is raised only if there are two opposing votes so if the client is not sending them the dispute is a potential spam. 4. Remove unconfirmed disputes - if a dispute contains less votes than the byzantine threshold it is removed. This is - also a spam precaution. A legitimate client will send only confirmed disputes to the runtime. \ No newline at end of file + also a spam precaution. A legitimate client will send only confirmed disputes to the runtime. + +# Rewards and slashing + +After the disputes are filtered the validators participating in the disputes are rewarded and more importantly the +offenders are slashed. Generally there can be two types of punishments: +* "against valid" - the offender claimed that a valid candidate is invalid. +* "for invalid" - the offender claimed that an invalid candidate is valid. + +Validators participating in inconclusive disputes are not slashed. Thanks to the applied filtering (described in the +previous section) one can be confident that there are no spam disputes in the runtime. So if a validator is not voting it +is due to another reason (e.g. being under DoS attack). There is no reason to punish such validators with a slash. + +*Implementation note*: Slashing is performed in `process_checked_dispute_data` from `Disputes` pallet. \ No newline at end of file From 76cda3fb58f29059c36b2d48e055e7ac2218de2b Mon Sep 17 00:00:00 2001 From: Tsvetomir Dimitrov Date: Wed, 11 Jan 2023 09:27:47 +0200 Subject: [PATCH 2/2] Add definition for inconclusive --- roadmap/implementers-guide/src/runtime/disputes.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/roadmap/implementers-guide/src/runtime/disputes.md b/roadmap/implementers-guide/src/runtime/disputes.md index abfc43c7bb48..b775bfbfcf0e 100644 --- a/roadmap/implementers-guide/src/runtime/disputes.md +++ b/roadmap/implementers-guide/src/runtime/disputes.md @@ -132,8 +132,10 @@ offenders are slashed. Generally there can be two types of punishments: * "against valid" - the offender claimed that a valid candidate is invalid. * "for invalid" - the offender claimed that an invalid candidate is valid. -Validators participating in inconclusive disputes are not slashed. Thanks to the applied filtering (described in the -previous section) one can be confident that there are no spam disputes in the runtime. So if a validator is not voting it -is due to another reason (e.g. being under DoS attack). There is no reason to punish such validators with a slash. +A dispute might be inconclusive. This means that it has timed out without being confirmed. A confirmed dispute is one +containing votes more than the byzantine threshold (1/3 of the active validators). Validators participating in +inconclusive disputes are not slashed. Thanks to the applied filtering (described in the previous section) one can be +confident that there are no spam disputes in the runtime. So if a validator is not voting it is due to another reason +(e.g. being under DoS attack). There is no reason to punish such validators with a slash. *Implementation note*: Slashing is performed in `process_checked_dispute_data` from `Disputes` pallet. \ No newline at end of file