Remove v0 parachains runtime (#1501)

* remove v0 parachains modules and switch to v1 primitives

* get tests compiling for runtime-common

* remove registrar module

* Add a dummy module

* remove runtime-parachains

* mostly remove old parachains code from polkadot-runtime

* remove slots::Trait implementation

* remove sp_std prelude import

* add a ZeroSizedTypeDifferentiator to dummy

* finish porting over polkadot runtime

* ZeroSizedTypeDifferentiator was actually unnecessary

* westend

* kusama

* test-runtime (no dummy modules)

* fix warning

* fix chain-specs

* fix test-service

* test-client

* remove dead import

* remove unused needed_extrinsics parameter

* runtimes compile

* remove rococo-v0

* remove remaining references to Rococo

* bump versions
This commit is contained in:
Robert Habermeier
2020-08-13 15:55:27 +02:00
committed by GitHub
parent e6688620b5
commit 57aef8eef5
34 changed files with 415 additions and 8140 deletions
+4 -8
View File
@@ -79,7 +79,7 @@ use sp_runtime::{ModuleId,
use crate::slots;
use codec::{Encode, Decode};
use sp_std::vec::Vec;
use primitives::v0::{Id as ParaId, HeadData};
use primitives::v1::{Id as ParaId, HeadData};
pub type BalanceOf<T> =
<<T as slots::Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::Balance;
@@ -568,14 +568,14 @@ mod tests {
};
use frame_support::traits::{Contains, ContainsLengthBound};
use sp_core::H256;
use primitives::v0::{Info as ParaInfo, Id as ParaId, Scheduling, ValidationCode};
use primitives::v1::{Id as ParaId, ValidationCode};
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are requried.
use sp_runtime::{
Perbill, Permill, Percent, testing::Header, DispatchResult,
traits::{BlakeTwo256, IdentityLookup},
};
use crate::registrar::Registrar;
use crate::slots::Registrar;
impl_outer_origin! {
pub enum Origin for Test {}
@@ -699,13 +699,9 @@ mod tests {
code_size <= MAX_CODE_SIZE
}
fn para_info(_id: ParaId) -> Option<ParaInfo> {
Some(ParaInfo { scheduling: Scheduling::Always })
}
fn register_para(
id: ParaId,
_info: ParaInfo,
_parachain: bool,
code: ValidationCode,
initial_head_data: HeadData,
) -> DispatchResult {