Trait pallet_babe::HandleEquivocation[][src]

pub trait HandleEquivocation<T: Config> {
    type ReportLongevity: Get<u64>;
    fn report_offence(
        reporters: Vec<T::AccountId>,
        offence: BabeEquivocationOffence<T::KeyOwnerIdentification>
    ) -> Result<(), OffenceError>;
fn is_known_offence(
        offenders: &[T::KeyOwnerIdentification],
        time_slot: &Slot
    ) -> bool;
fn submit_unsigned_equivocation_report(
        equivocation_proof: EquivocationProof<T::Header>,
        key_owner_proof: T::KeyOwnerProof
    ) -> DispatchResult;
fn block_author() -> Option<T::AccountId>; }
Expand description

A trait with utility methods for handling equivocation reports in BABE. The trait provides methods for reporting an offence triggered by a valid equivocation report, checking the current block author (to declare as the reporter), and also for creating and submitting equivocation report extrinsics (useful only in offchain context).

Associated Types

The longevity, in blocks, that the equivocation report is valid for. When using the staking pallet this should be equal to the bonding duration (in blocks, not eras).

Required methods

Report an offence proved by the given reporters.

Returns true if all of the offenders at the given time slot have already been reported.

Create and dispatch an equivocation report extrinsic.

Fetch the current block author id, if defined.

Implementations on Foreign Types

Implementors