Trait polkadot_runtime_parachains::disputes::DisputesHandler [−][src]
pub trait DisputesHandler<BlockNumber> {
fn is_frozen() -> bool;
fn filter_multi_dispute_data(statement_sets: &mut MultiDisputeStatementSet);
fn provide_multi_dispute_data(
statement_sets: MultiDisputeStatementSet
) -> 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>
);
}
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.
fn filter_multi_dispute_data(statement_sets: &mut MultiDisputeStatementSet)
fn filter_multi_dispute_data(statement_sets: &mut MultiDisputeStatementSet)
Handler for filtering any dispute statements before including them as part of inherent data. This can be useful to filter out ancient and duplicate dispute statements.
fn provide_multi_dispute_data(
statement_sets: MultiDisputeStatementSet
) -> Result<Vec<(SessionIndex, CandidateHash)>, DispatchError>
fn provide_multi_dispute_data(
statement_sets: MultiDisputeStatementSet
) -> Result<Vec<(SessionIndex, CandidateHash)>, DispatchError>
Handle sets of dispute statements corresponding to 0 or more candidates. Returns a vector of freshly created disputes.
fn note_included(
session: SessionIndex,
candidate_hash: CandidateHash,
included_in: BlockNumber
)
fn note_included(
session: SessionIndex,
candidate_hash: CandidateHash,
included_in: BlockNumber
)
Note that the given candidate has been included.
fn included_state(
session: SessionIndex,
candidate_hash: CandidateHash
) -> Option<BlockNumber>
fn included_state(
session: SessionIndex,
candidate_hash: CandidateHash
) -> Option<BlockNumber>
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
.
fn concluded_invalid(
session: SessionIndex,
candidate_hash: CandidateHash
) -> bool
fn concluded_invalid(
session: SessionIndex,
candidate_hash: CandidateHash
) -> bool
Whether the given candidate concluded invalid in a dispute with supermajority.
fn initializer_initialize(now: BlockNumber) -> Weight
fn initializer_initialize(now: BlockNumber) -> Weight
Called by the initializer to initialize the configuration module.
Called by the initializer to finalize the configuration module.
fn initializer_on_new_session(
notification: &SessionChangeNotification<BlockNumber>
)
fn initializer_on_new_session(
notification: &SessionChangeNotification<BlockNumber>
)
Called by the initializer to note that a new session has started.