pub trait DisputesHandler<BlockNumber: Ord> {
    fn is_frozen() -> bool;
    fn filter_dispute_data(
        statement_set: DisputeStatementSet,
        max_spam_slots: u32,
        post_conclusion_acceptance_period: BlockNumber,
        verify_sigs: VerifyDisputeSignatures
    ) -> Option<CheckedDisputeStatementSet>; fn process_checked_multi_dispute_data(
        statement_sets: CheckedMultiDisputeStatementSet
    ) -> Result<Vec<(SessionIndex, CandidateHash)>, DispatchError>; fn note_included(
        session: SessionIndex,
        candidate_hash: CandidateHash,
        included_in: BlockNumber
    ); fn included_state(
        session: SessionIndex,
        candidate_hash: CandidateHash
    ) -> Option<BlockNumber>; fn concluded_invalid(
        session: SessionIndex,
        candidate_hash: CandidateHash
    ) -> bool; fn initializer_initialize(now: BlockNumber) -> Weight; fn initializer_finalize(); fn initializer_on_new_session(
        notification: &SessionChangeNotification<BlockNumber>
    ); fn assure_deduplicated_and_sorted(
        statement_sets: &MultiDisputeStatementSet
    ) -> Result<(), ()> { ... } fn deduplicate_and_sort_dispute_data(
        statement_sets: &mut MultiDisputeStatementSet
    ) -> Result<(), ()> { ... } }
Expand description

Hook into disputes handling.

Allows decoupling parachains handling from disputes so that it can potentially be disabled when instantiating a specific runtime.

Required Methods§

Whether the chain is frozen, if the chain is frozen it will not accept any new parachain blocks for backing or inclusion.

Filter a single dispute statement set.

Used in cases where more granular control is required, i.e. when accounting for maximum block weight.

Handle sets of dispute statements corresponding to 0 or more candidates. Returns a vector of freshly created disputes.

Note that the given candidate has been included.

Retrieve the included state of a given candidate in a particular session. If it returns Some, then we have a local dispute for the given candidate_hash.

Whether the given candidate concluded invalid in a dispute with supermajority.

Called by the initializer to initialize the disputes pallet.

Called by the initializer to finalize the disputes pallet.

Called by the initializer to note that a new session has started.

Provided Methods§

Assure sanity

Remove dispute statement duplicates and sort the non-duplicates based on local (lower indicies) vs remotes (higher indices) and age (older with lower indices).

Returns Ok(()) if no duplicates were present, Err(()) otherwise.

Unsorted data does not change the return value, while the node side is generally expected to pass them in sorted.

Implementations on Foreign Types§

Implementors§