Disputes

DisputeStatementSet

#![allow(unused)]
fn main() {
/// A set of statements about a specific candidate.
struct DisputeStatementSet {
    candidate_hash: CandidateHash,
    session: SessionIndex,
    statements: Vec<(DisputeStatement, ValidatorIndex, ValidatorSignature)>,
}
}

DisputeStatement

#![allow(unused)]
fn main() {
/// A statement about a candidate, to be used within some dispute resolution process.
///
/// Statements are either in favor of the candidate's validity or against it.
enum DisputeStatement {
    /// A valid statement, of the given kind
    Valid(ValidDisputeStatementKind),
    /// An invalid statement, of the given kind.
    Invalid(InvalidDisputeStatementKind),
}

}

Dispute Statement Kinds

Kinds of dispute statements. Each of these can be combined with a candidate hash, session index, validator public key, and validator signature to reproduce and check the original statement.

#![allow(unused)]
fn main() {
enum ValidDisputeStatementKind {
    Explicit,
    BackingSeconded(Hash),
    BackingValid(Hash),
    ApprovalChecking,
}

enum InvalidDisputeStatementKind {
    Explicit,
}
}

ExplicitDisputeStatement

#![allow(unused)]
fn main() {
struct ExplicitDisputeStatement {
    valid: bool,
    candidate_hash: CandidateHash,
    session: SessionIndex,
}
}

MultiDisputeStatementSet

Sets of statements for many (zero or more) disputes.

#![allow(unused)]
fn main() {
type MultiDisputeStatementSet = Vec<DisputeStatementSet>;
}

DisputeState

#![allow(unused)]
fn main() {
struct DisputeState {
    validators_for: Bitfield, // one bit per validator.
    validators_against: Bitfield, // one bit per validator.
    start: BlockNumber,
    concluded_at: Option<BlockNumber>,
}
}

ScrapedOnChainVotes

#![allow(unused)]
fn main() {
/// Type for transcending recorded on-chain
/// dispute relevant votes and conclusions to
/// the off-chain `DisputesCoordinator`.
struct ScrapedOnChainVotes {
    /// The session index at which the block was included.
    session: SessionIndex,
    /// The backing and seconding validity attestations for all candidates, providing the full candidate receipt.
    backing_validators_per_candidate: Vec<(CandidateReceipt<H>, Vec<(ValidatorIndex, ValidityAttestation)>)>
    /// Set of concluded disputes that were recorded
    /// on chain within the inherent.
    disputes: MultiDisputeStatementSet,
}
}
Last change: 2024-12-21, commit: f9cdf41