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
-1
View File
@@ -18,7 +18,6 @@ availability_store = { package = "polkadot-availability-store", path = "../avail
parachain = { package = "polkadot-parachain", path = "../parachain" }
polkadot-primitives = { path = "../primitives" }
polkadot-erasure-coding = { path = "../erasure-coding" }
polkadot-runtime = { path = "../runtime" }
table = { package = "polkadot-statement-table", path = "../statement-table" }
grandpa = { package = "sc-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
+2 -2
View File
@@ -49,7 +49,7 @@ use polkadot_primitives::parachain::{
Id as ParaId, Chain, DutyRoster, CandidateReceipt,
ParachainHost, AttestedCandidate, Statement as PrimitiveStatement, Message, OutgoingMessages,
Collation, PoVBlock, ErasureChunk, ValidatorSignature, ValidatorIndex,
ValidatorPair, ValidatorId,
ValidatorPair, ValidatorId, NEW_HEADS_IDENTIFIER,
};
use primitives::Pair;
use runtime_primitives::traits::{ProvideRuntimeApi, DigestFor};
@@ -717,7 +717,7 @@ impl<C, TxPool> CreateProposalData<C, TxPool> where
let mut inherent_data = self.inherent_data
.take()
.expect("CreateProposal is not polled after finishing; qed");
inherent_data.put_data(polkadot_runtime::NEW_HEADS_IDENTIFIER, &candidates)
inherent_data.put_data(NEW_HEADS_IDENTIFIER, &candidates)
.map_err(Error::InherentError)?;
let runtime_api = self.client.runtime_api();