Dispute Participation

This subsystem is responsible for actually participating in disputes: when notified of a dispute, we need to recover the candidate data, validate the candidate, and cast our vote in the dispute.

Fortunately, most of that work is handled by other subsystems; this subsystem is just a small glue component for tying other subsystems together and issuing statements based on their validity.

Protocol

Input: DisputeParticipationMessage

Output:

Functionality

In-memory state:


#![allow(unused)]
fn main() {
struct State {
    recent_block_hash: Option<(BlockNumber, Hash)>
}
}

On OverseerSignal::ActiveLeavesUpdate

Update recent_block in in-memory state according to the highest observed active leaf.

On OverseerSignal::BlockFinalized

Do nothing.

On OverseerSignal::Conclude

Conclude.

On DisputeParticipationMessage::Participate

Cast Votes

This requires the parameters { candidate_receipt, candidate_hash, session, voted_indices } as well as a choice of either Valid or Invalid.

Invoke DisputeCoordinatorMessage::IssueLocalStatement with is_valid according to the parameterization,.