Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: allowance of participation in dispute #2240

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions core/dispute_coordinator/impl/dispute_coordinator_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<ParticipationPriority>(is_included);
xDimon marked this conversation as resolved.
Show resolved Hide resolved

auto &receipt = new_state.votes.candidate_receipt;
Expand All @@ -1479,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:
Expand Down