Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

the report mod and REPORTING keyType is no longer used #10679

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions bin/node/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,34 +64,3 @@ pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
pub type Block = generic::Block<Header, OpaqueExtrinsic>;
/// Block ID.
pub type BlockId = generic::BlockId<Block>;

/// App-specific crypto used for reporting equivocation/misbehavior in BABE and
/// GRANDPA. Any rewards for misbehavior reporting will be paid out to this
/// account.
pub mod report {
use super::{Signature, Verify};
use frame_system::offchain::AppCrypto;
use sp_core::crypto::{key_types, KeyTypeId};

/// Key type for the reporting module. Used for reporting BABE and GRANDPA
/// equivocations.
pub const KEY_TYPE: KeyTypeId = key_types::REPORTING;

mod app {
use sp_application_crypto::{app_crypto, sr25519};
app_crypto!(sr25519, super::KEY_TYPE);
}

/// Identity of the equivocation/misbehavior reporter.
pub type ReporterId = app::Public;

/// An `AppCrypto` type to allow submitting signed transactions using the reporting
/// application key as signer.
pub struct ReporterAppCrypto;

impl AppCrypto<<Signature as Verify>::Signer, Signature> for ReporterAppCrypto {
type RuntimeAppPublic = ReporterId;
type GenericSignature = sp_core::sr25519::Signature;
type GenericPublic = sp_core::sr25519::Public;
}
}
2 changes: 0 additions & 2 deletions primitives/core/src/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1121,8 +1121,6 @@ pub mod key_types {
pub const AUTHORITY_DISCOVERY: KeyTypeId = KeyTypeId(*b"audi");
/// Key type for staking, built-in. Identified as `stak`.
pub const STAKING: KeyTypeId = KeyTypeId(*b"stak");
/// Key type for equivocation reporting, built-in. Identified as `fish`.
pub const REPORTING: KeyTypeId = KeyTypeId(*b"fish");
/// A key type ID useful for tests.
pub const DUMMY: KeyTypeId = KeyTypeId(*b"dumy");
}
Expand Down