diff --git a/node/service/src/fake_runtime_api.rs b/node/service/src/fake_runtime_api.rs index d9553afa024b..418217997385 100644 --- a/node/service/src/fake_runtime_api.rs +++ b/node/service/src/fake_runtime_api.rs @@ -240,8 +240,8 @@ sp_api::impl_runtime_apis! { unimplemented!() } - fn submit_report_equivocation_unsigned_extrinsic( - _: beefy_primitives::EquivocationProof< + fn submit_report_vote_equivocation_unsigned_extrinsic( + _: beefy_primitives::VoteEquivocationProof< BlockNumber, BeefyId, BeefySignature, @@ -251,6 +251,13 @@ sp_api::impl_runtime_apis! { unimplemented!() } + fn submit_report_fork_equivocation_unsigned_extrinsic( + _: beefy_primitives::ForkEquivocationProof::Header>, + _: Vec, + ) -> Option<()> { + unimplemented!() + } + fn generate_key_ownership_proof( _: beefy_primitives::ValidatorSetId, _: BeefyId, diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index c4458076cb3d..4b7b2cf6d942 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1833,14 +1833,23 @@ sp_api::impl_runtime_apis! { None } - fn submit_report_equivocation_unsigned_extrinsic( - _equivocation_proof: beefy_primitives::EquivocationProof< + fn submit_report_vote_equivocation_unsigned_extrinsic( + _vote_equivocation_proof: beefy_primitives::VoteEquivocationProof< BlockNumber, BeefyId, BeefySignature, >, _key_owner_proof: beefy_primitives::OpaqueKeyOwnershipProof, ) -> Option<()> { + // dummy implementation due to lack of BEEFY pallet. + None + } + + fn submit_report_fork_equivocation_unsigned_extrinsic( + _fork_equivocation_proof: beefy_primitives::ForkEquivocationProof, + _key_owner_proofs: Vec, + ) -> Option<()> { + // dummy implementation due to lack of BEEFY pallet. None } @@ -1848,6 +1857,7 @@ sp_api::impl_runtime_apis! { _set_id: beefy_primitives::ValidatorSetId, _authority_id: BeefyId, ) -> Option { + // dummy implementation due to lack of BEEFY pallet. None } } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 6894bd7bbf44..33a581ece87d 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1856,8 +1856,8 @@ sp_api::impl_runtime_apis! { Beefy::validator_set() } - fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: beefy_primitives::EquivocationProof< + fn submit_report_vote_equivocation_unsigned_extrinsic( + vote_equivocation_proof: beefy_primitives::VoteEquivocationProof< BlockNumber, BeefyId, BeefySignature, @@ -1866,12 +1866,24 @@ sp_api::impl_runtime_apis! { ) -> Option<()> { let key_owner_proof = key_owner_proof.decode()?; - Beefy::submit_unsigned_equivocation_report( - equivocation_proof, + Beefy::submit_unsigned_vote_equivocation_report( + vote_equivocation_proof, key_owner_proof, ) } + fn submit_report_fork_equivocation_unsigned_extrinsic( + fork_equivocation_proof: beefy_primitives::ForkEquivocationProof, + key_owner_proofs: Vec, + ) -> Option<()> { + let key_owner_proofs = key_owner_proofs.iter().cloned().map(|p| p.decode()).collect::>>()?; + + Beefy::submit_unsigned_fork_equivocation_report( + fork_equivocation_proof, + key_owner_proofs, + ) + } + fn generate_key_ownership_proof( _set_id: beefy_primitives::ValidatorSetId, authority_id: BeefyId, diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index b2397299430d..1dd069a6c974 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -961,8 +961,8 @@ sp_api::impl_runtime_apis! { None } - fn submit_report_equivocation_unsigned_extrinsic( - _equivocation_proof: beefy_primitives::EquivocationProof< + fn submit_report_vote_equivocation_unsigned_extrinsic( + _vote_equivocation_proof: beefy_primitives::VoteEquivocationProof< BlockNumber, BeefyId, BeefySignature, @@ -972,6 +972,13 @@ sp_api::impl_runtime_apis! { None } + fn submit_report_fork_equivocation_unsigned_extrinsic( + _fork_equivocation_proof: beefy_primitives::ForkEquivocationProof, + _key_owner_proofs: Vec, + ) -> Option<()> { + None + } + fn generate_key_ownership_proof( _set_id: beefy_primitives::ValidatorSetId, _authority_id: BeefyId, diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 9ae30c376010..ad345118f129 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1718,6 +1718,13 @@ sp_api::impl_runtime_apis! { ) } + fn submit_report_fork_equivocation_unsigned_extrinsic( + _fork_equivocation_proof: beefy_primitives::ForkEquivocationProof, + _key_owner_proofs: Vec, + ) -> Option<()> { + None + } + fn generate_key_ownership_proof( _set_id: beefy_primitives::ValidatorSetId, authority_id: BeefyId,