Unverified Commit 37793976 authored by André Silva's avatar André Silva Committed by GitHub
Browse files

runtime: update grandpa equivocation reporting api (#1407)



* runtime: update grandpa equivocation reporting api

* Bump
Co-authored-by: default avatarGav Wood <gavin@parity.io>
parent 28c26d69
Pipeline #100812 passed with stages
in 26 minutes and 33 seconds
This diff is collapsed.
......@@ -560,12 +560,7 @@ impl grandpa::Trait for Runtime {
GrandpaId,
)>>::IdentificationTuple;
type HandleEquivocation = grandpa::EquivocationHandler<
Self::KeyOwnerIdentification,
primitives::v0::fisherman::FishermanAppCrypto,
Runtime,
Offences,
>;
type HandleEquivocation = grandpa::EquivocationHandler<Self::KeyOwnerIdentification, Offences>;
}
parameter_types! {
......@@ -653,7 +648,6 @@ impl<LocalCall> system::offchain::CreateSignedTransaction<LocalCall> for Runtime
transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
registrar::LimitParathreadCommits::<Runtime>::new(),
parachains::ValidateDoubleVoteReports::<Runtime>::new(),
grandpa::ValidateEquivocationReport::<Runtime>::new(),
);
let raw_payload = SignedPayload::new(call, extra).map_err(|e| {
debug::warn!("Unable to create signed payload: {:?}", e);
......@@ -963,7 +957,7 @@ construct_runtime! {
Historical: session_historical::{Module},
Session: session::{Module, Call, Storage, Event, Config<T>},
FinalityTracker: finality_tracker::{Module, Call, Storage, Inherent},
Grandpa: grandpa::{Module, Call, Storage, Config, Event},
Grandpa: grandpa::{Module, Call, Storage, Config, Event, ValidateUnsigned},
ImOnline: im_online::{Module, Call, Storage, Event<T>, ValidateUnsigned, Config<T>},
AuthorityDiscovery: authority_discovery::{Module, Call, Config},
......@@ -1032,7 +1026,6 @@ pub type SignedExtra = (
transaction_payment::ChargeTransactionPayment<Runtime>,
registrar::LimitParathreadCommits<Runtime>,
parachains::ValidateDoubleVoteReports<Runtime>,
grandpa::ValidateEquivocationReport<Runtime>,
);
/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;
......@@ -1159,7 +1152,7 @@ sp_api::impl_runtime_apis! {
Grandpa::grandpa_authorities()
}
fn submit_report_equivocation_extrinsic(
fn submit_report_equivocation_unsigned_extrinsic(
equivocation_proof: fg_primitives::EquivocationProof<
<Block as BlockT>::Hash,
sp_runtime::traits::NumberFor<Block>,
......@@ -1168,7 +1161,7 @@ sp_api::impl_runtime_apis! {
) -> Option<()> {
let key_owner_proof = key_owner_proof.decode()?;
Grandpa::submit_report_equivocation_extrinsic(
Grandpa::submit_unsigned_equivocation_report(
equivocation_proof,
key_owner_proof,
)
......
......@@ -626,12 +626,7 @@ impl grandpa::Trait for Runtime {
type KeyOwnerProofSystem = Historical;
type HandleEquivocation = grandpa::EquivocationHandler<
Self::KeyOwnerIdentification,
primitives::v0::fisherman::FishermanAppCrypto,
Runtime,
Offences,
>;
type HandleEquivocation = grandpa::EquivocationHandler<Self::KeyOwnerIdentification, Offences>;
}
parameter_types! {
......@@ -720,7 +715,6 @@ impl<LocalCall> system::offchain::CreateSignedTransaction<LocalCall> for Runtime
transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
registrar::LimitParathreadCommits::<Runtime>::new(),
parachains::ValidateDoubleVoteReports::<Runtime>::new(),
grandpa::ValidateEquivocationReport::<Runtime>::new(),
claims::PrevalidateAttests::<Runtime>::new(),
);
let raw_payload = SignedPayload::new(call, extra).map_err(|e| {
......@@ -976,7 +970,7 @@ construct_runtime! {
Historical: session_historical::{Module},
Session: session::{Module, Call, Storage, Event, Config<T>},
FinalityTracker: finality_tracker::{Module, Call, Storage, Inherent},
Grandpa: grandpa::{Module, Call, Storage, Config, Event},
Grandpa: grandpa::{Module, Call, Storage, Config, Event, ValidateUnsigned},
ImOnline: im_online::{Module, Call, Storage, Event<T>, ValidateUnsigned, Config<T>},
AuthorityDiscovery: authority_discovery::{Module, Call, Config},
......@@ -1042,7 +1036,6 @@ pub type SignedExtra = (
transaction_payment::ChargeTransactionPayment<Runtime>,
registrar::LimitParathreadCommits<Runtime>,
parachains::ValidateDoubleVoteReports<Runtime>,
grandpa::ValidateEquivocationReport<Runtime>,
claims::PrevalidateAttests<Runtime>,
);
/// Unchecked extrinsic type as expected by this runtime.
......@@ -1170,7 +1163,7 @@ sp_api::impl_runtime_apis! {
Grandpa::grandpa_authorities()
}
fn submit_report_equivocation_extrinsic(
fn submit_report_equivocation_unsigned_extrinsic(
equivocation_proof: fg_primitives::EquivocationProof<
<Block as BlockT>::Hash,
sp_runtime::traits::NumberFor<Block>,
......@@ -1179,7 +1172,7 @@ sp_api::impl_runtime_apis! {
) -> Option<()> {
let key_owner_proof = key_owner_proof.decode()?;
Grandpa::submit_report_equivocation_extrinsic(
Grandpa::submit_unsigned_equivocation_report(
equivocation_proof,
key_owner_proof,
)
......
......@@ -713,7 +713,7 @@ sp_api::impl_runtime_apis! {
Grandpa::grandpa_authorities()
}
fn submit_report_equivocation_extrinsic(
fn submit_report_equivocation_unsigned_extrinsic(
_equivocation_proof: fg_primitives::EquivocationProof<
<Block as BlockT>::Hash,
sp_runtime::traits::NumberFor<Block>,
......
......@@ -384,12 +384,7 @@ impl grandpa::Trait for Runtime {
GrandpaId,
)>>::IdentificationTuple;
type HandleEquivocation = grandpa::EquivocationHandler<
Self::KeyOwnerIdentification,
primitives::v0::fisherman::FishermanAppCrypto,
Runtime,
Offences,
>;
type HandleEquivocation = grandpa::EquivocationHandler<Self::KeyOwnerIdentification, Offences>;
}
parameter_types! {
......@@ -477,7 +472,6 @@ impl<LocalCall> system::offchain::CreateSignedTransaction<LocalCall> for Runtime
transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
registrar::LimitParathreadCommits::<Runtime>::new(),
parachains::ValidateDoubleVoteReports::<Runtime>::new(),
grandpa::ValidateEquivocationReport::<Runtime>::new(),
);
let raw_payload = SignedPayload::new(call, extra).map_err(|e| {
debug::warn!("Unable to create signed payload: {:?}", e);
......@@ -721,7 +715,7 @@ construct_runtime! {
Historical: session_historical::{Module},
Session: session::{Module, Call, Storage, Event, Config<T>},
FinalityTracker: finality_tracker::{Module, Call, Storage, Inherent},
Grandpa: grandpa::{Module, Call, Storage, Config, Event},
Grandpa: grandpa::{Module, Call, Storage, Config, Event, ValidateUnsigned},
ImOnline: im_online::{Module, Call, Storage, Event<T>, ValidateUnsigned, Config<T>},
AuthorityDiscovery: authority_discovery::{Module, Call, Config},
......@@ -778,7 +772,6 @@ pub type SignedExtra = (
transaction_payment::ChargeTransactionPayment<Runtime>,
registrar::LimitParathreadCommits<Runtime>,
parachains::ValidateDoubleVoteReports<Runtime>,
grandpa::ValidateEquivocationReport<Runtime>,
);
/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;
......@@ -898,7 +891,7 @@ sp_api::impl_runtime_apis! {
Grandpa::grandpa_authorities()
}
fn submit_report_equivocation_extrinsic(
fn submit_report_equivocation_unsigned_extrinsic(
equivocation_proof: fg_primitives::EquivocationProof<
<Block as BlockT>::Hash,
sp_runtime::traits::NumberFor<Block>,
......@@ -907,7 +900,7 @@ sp_api::impl_runtime_apis! {
) -> Option<()> {
let key_owner_proof = key_owner_proof.decode()?;
Grandpa::submit_report_equivocation_extrinsic(
Grandpa::submit_unsigned_equivocation_report(
equivocation_proof,
key_owner_proof,
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment