Support both polkadot and kusama runtimes (#704)

* Allow both polkadot and kusama runtimes

* Allow both polkadot and kusama runtimes

* Make `collator` build

* Removed kusama runtime

* Introduced common runtime

* Updated for latest substrate

* Updated CI targets

* Updated CI version check

* Removed unused dependency

* Pulled latests substrate

* Pulled latest substrate

* Fixed version

* Apply suggestions from code review

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>

* NEW_HEADS_IDENTIFIER moved to primitives

* Updated CI check script

* Fixed script

* Set epoch duration for polkadot

* ci: check_runtime for both runtimes

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: gabriel klawitter <gabreal@users.noreply.github.com>
This commit is contained in:
Arkadiy Paronyan
2020-01-03 19:31:39 +01:00
committed by Gavin Wood
parent 9a9bbd1c2d
commit a00d74d825
42 changed files with 1954 additions and 646 deletions
+2
View File
@@ -8,6 +8,7 @@ edition = "2018"
serde = { version = "1.0.102", optional = true, features = ["derive"] }
parity-scale-codec = { version = "1.1.0", default-features = false, features = ["bit-vec", "derive"] }
primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
application-crypto = { package = "sp-application-crypto", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
@@ -27,6 +28,7 @@ default = ["std"]
std = [
"parity-scale-codec/std",
"primitives/std",
"inherents/std",
"trie/std",
"sp-api/std",
"rstd/std",
+5
View File
@@ -28,6 +28,7 @@ use serde::{Serialize, Deserialize};
#[cfg(feature = "std")]
use primitives::bytes;
use primitives::RuntimeDebug;
use inherents::InherentIdentifier;
use application_crypto::KeyTypeId;
#[cfg(feature = "std")]
@@ -40,6 +41,10 @@ pub use polkadot_parachain::{
/// The key type ID for a collator key.
pub const COLLATOR_KEY_TYPE_ID: KeyTypeId = KeyTypeId(*b"coll");
/// An identifier for inherent data that provides new minimally-attested
/// parachain heads.
pub const NEW_HEADS_IDENTIFIER: InherentIdentifier = *b"newheads";
mod collator_app {
use application_crypto::{app_crypto, sr25519};
app_crypto!(sr25519, super::COLLATOR_KEY_TYPE_ID);