Module pallet_subspace::equivocation

source ·
Expand description

An opt-in utility module for reporting equivocations.

This module defines an offence type for Subspace equivocations and some utility traits to wire together:

  • a system for reporting offences;
  • a system for submitting unsigned transactions;
  • a way to get the current block author;

These can be used in an offchain context in order to submit equivocation reporting extrinsics (from the client that’s import Subspace blocks). And in a runtime context, so that the Subspace pallet can validate the equivocation proofs in the extrinsic and report the offences.

IMPORTANT: When using this module for enabling equivocation reporting it is required that the ValidateUnsigned for the Subspace pallet is used in the runtime definition.

Structs§

  • Generic equivocation handler. This type implements HandleEquivocation using existing subsystems that are part of frame (type bounds described below) and will dispatch to them directly, it’s only purpose is to wire all subsystems together.
  • A Subspace equivocation offence report.

Traits§

  • A trait with utility methods for handling equivocation reports in Subspace. 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).