From 9aedc0691d039edb6b0d6dad7868e4b14c7a826d Mon Sep 17 00:00:00 2001 From: Dmitriy Khaustov aka xDimon Date: Mon, 14 Oct 2024 11:18:01 +0300 Subject: [PATCH 1/2] fix: allowance of participation in dispute Signed-off-by: Dmitriy Khaustov aka xDimon --- .../dispute_coordinator/impl/dispute_coordinator_impl.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/dispute_coordinator/impl/dispute_coordinator_impl.cpp b/core/dispute_coordinator/impl/dispute_coordinator_impl.cpp index 7fafa9277b..f25d4c42ed 100644 --- a/core/dispute_coordinator/impl/dispute_coordinator_impl.cpp +++ b/core/dispute_coordinator/impl/dispute_coordinator_impl.cpp @@ -1463,12 +1463,10 @@ namespace kagome::dispute { // - `is_included` lands in prioritized queue // - `is_confirmed` | `is_backed` lands in the best effort queue // We don't participate in disputes escalated by disabled validators only. - // We don't participate in disputes on finalized candidates. - // see: {polkadot}/node/core/dispute-coordinator/src/initialized.rs:907 + // see: + // https://github.com/paritytech/polkadot-sdk/blob/b16237ad6f019667a59b0e3e726f6ac20e2d0a1c/polkadot/node/core/dispute-coordinator/src/initialized.rs#L1184 - if (own_vote_missing // - and is_disputed and not is_postponed // - and allow_participation) { + if (own_vote_missing and is_disputed and allow_participation) { auto priority = static_cast(is_included); auto &receipt = new_state.votes.candidate_receipt; From 4b2ded6d6b58d2f6cb3dbf32eac54e4128fe5ba5 Mon Sep 17 00:00:00 2001 From: Dmitriy Khaustov aka xDimon Date: Mon, 14 Oct 2024 11:34:15 +0300 Subject: [PATCH 2/2] fix: review issue Signed-off-by: Dmitriy Khaustov aka xDimon --- .../impl/dispute_coordinator_impl.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/core/dispute_coordinator/impl/dispute_coordinator_impl.cpp b/core/dispute_coordinator/impl/dispute_coordinator_impl.cpp index f25d4c42ed..5fd93564ce 100644 --- a/core/dispute_coordinator/impl/dispute_coordinator_impl.cpp +++ b/core/dispute_coordinator/impl/dispute_coordinator_impl.cpp @@ -1477,11 +1477,26 @@ namespace kagome::dispute { auto res = participation_->queue_participation(priority, request); if (res.has_error()) { - SL_ERROR(log_, "Error of participation: {}", res.error()); + SL_ERROR(log_, + "Error of participation for candidate " + "(session={}, candidate={}): {}", + session, + candidate_hash, + res.error()); + } else { + SL_TRACE(log_, + "Trying to participate for candidate " + "(session={}, candidate={})", + session, + candidate_hash); } } else { - SL_DEBUG(log_, "Will not queue participation for candidate"); + SL_DEBUG(log_, + "Will not queue participation for candidate " + "(session={}, candidate={})", + session, + candidate_hash); } // Also send any already existing approval vote on new disputes: