babe: enable equivocation reporting on all runtimes (#1330)

* enable BABE equivocation reporting on all runtimes

* runtime: fix parachains mock test runtime

* cargo update -p sp-io

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
André Silva
2020-07-04 14:19:58 +01:00
committed by GitHub
parent f77b8139c0
commit 19ef40a7c9
8 changed files with 329 additions and 143 deletions
+28
View File
@@ -175,6 +175,20 @@ impl babe::Trait for Runtime {
// session module is the trigger
type EpochChangeTrigger = babe::ExternalTrigger;
type KeyOwnerProofSystem = ();
type KeyOwnerProof = <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(
KeyTypeId,
babe::AuthorityId,
)>>::Proof;
type KeyOwnerIdentification = <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(
KeyTypeId,
babe::AuthorityId,
)>>::IdentificationTuple;
type HandleEquivocation = ();
}
parameter_types! {
@@ -704,6 +718,20 @@ sp_api::impl_runtime_apis! {
fn current_epoch_start() -> babe_primitives::SlotNumber {
Babe::current_epoch_start()
}
fn generate_key_ownership_proof(
_slot_number: babe_primitives::SlotNumber,
_authority_id: babe_primitives::AuthorityId,
) -> Option<babe_primitives::OpaqueKeyOwnershipProof> {
None
}
fn submit_report_equivocation_unsigned_extrinsic(
_equivocation_proof: babe_primitives::EquivocationProof<<Block as BlockT>::Header>,
_key_owner_proof: babe_primitives::OpaqueKeyOwnershipProof,
) -> Option<()> {
None
}
}
impl sp_session::SessionKeys<Block> for Runtime {