Westend<>Rococo Headers Relay (#875)

* Add modules for Rococo<>Westend header sync

* Use mock Westend and Rococo finaltiy tx calls

* Add Westend<>Rococo variants to `init_bridge`

* Add Westend<>Rococo variants to `relay_headers`

* Simplify the Rococo and Westend signing params

* Add `submit_finality_proof` mock Call variant

* Add note to more closely match `initialize` Call variant

* Accidentally committed `cargo-expand`ed code 🤦

* Add `initialize` Call variant to Rococo mock

* Fix call enums.

* Add explainatory comment.

* clippy.

* Add issue number.

* De-duplicate metrics customisation.

* Add comments to Rococo/Westend runtimes.

* Add scale-encoding compatibility test.

* Fix tests.

* Clippy.

Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
This commit is contained in:
Hernando Castano
2021-04-15 11:00:35 -04:00
committed by Bastian Köcher
parent a69026af44
commit bca83fd020
18 changed files with 388 additions and 110 deletions
+2
View File
@@ -45,6 +45,7 @@ use sp_std::{fmt::Debug, marker::PhantomData, prelude::*};
/// Spec version type.
pub type SpecVersion = u32;
// TODO [#895] move to primitives
/// Origin of a Call when it is dispatched on the target chain.
///
/// The source chain can (and should) verify that the message can be dispatched on the target chain
@@ -89,6 +90,7 @@ pub enum CallOrigin<SourceChainAccountId, TargetChainAccountPublic, TargetChainS
SourceAccount(SourceChainAccountId),
}
// TODO [#895] move to primitives
/// Message payload type used by dispatch module.
#[derive(RuntimeDebug, Encode, Decode, Clone, PartialEq, Eq)]
pub struct MessagePayload<SourceChainAccountId, TargetChainAccountPublic, TargetChainSignature, Call> {