Add parachains for rococo (#144)

* Add parachains for rococo

* Fix chain specs

* Update to revert log rotation

* Support selecting the chain in `export-genesis-state`

* Add subcommand for exporting the genesis wasm of a Parachain

* Update stuff

* Fix `export-genesis-wasm`

* Update the polkadot ref

* Add bootNodes address

* Add bootNodes address - track

* Add bootNodes address - trick

* Fix incorrect peer id (trick)

* Fixes https://github.com/paritytech/cumulus/issues/157

* Update chainspecs

* Update specs again

* Set correct sudo account

* Update properties

* Update readme

* Update `Cargo.lock`

* Switch to rococo-branch

Co-authored-by: Evaldo <contato@evaldofelipe.com>
Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com>
This commit is contained in:
Bastian Köcher
2020-08-04 17:33:20 +02:00
committed by GitHub
parent f5fbe3c195
commit 23c1954c74
39 changed files with 763 additions and 597 deletions
+9 -6
View File
@@ -6,16 +6,17 @@ edition = "2018"
[dependencies]
# Substrate dependencies
sp-std = { git = "https://github.com/paritytech/substrate", branch = "cumulus-branch", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "rococo-branch", default-features = false }
# Polkadot deps
polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch", default-features = false }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch", default-features = false }
polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", branch = "rococo-branch", default-features = false }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "rococo-branch", default-features = false }
# All these should be optional dependenices, but given the perfect Cargo, it is not possible.
polkadot-runtime = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch", default-features = false }
kusama-runtime = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch", default-features = false }
westend-runtime = { git = "https://github.com/paritytech/polkadot", branch = "cumulus-branch", default-features = false }
polkadot-runtime = { git = "https://github.com/paritytech/polkadot", branch = "rococo-branch", default-features = false }
kusama-runtime = { git = "https://github.com/paritytech/polkadot", branch = "rococo-branch", default-features = false }
westend-runtime = { git = "https://github.com/paritytech/polkadot", branch = "rococo-branch", default-features = false }
rococo-runtime = { git = "https://github.com/paritytech/polkadot", branch = "rococo-branch", default-features = false }
[features]
default = [ "std" ]
@@ -24,6 +25,7 @@ std = [
"polkadot-runtime/std",
"kusama-runtime/std",
"westend-runtime/std",
"rococo-runtime/std",
"polkadot-core-primitives/std",
"polkadot-parachain/std",
]
@@ -35,5 +37,6 @@ std = [
runtime-wasm = [
"polkadot-runtime/disable-runtime-api",
"westend-runtime/disable-runtime-api",
"rococo-runtime/disable-runtime-api",
"kusama-runtime/disable-runtime-api",
]
+1 -1
View File
@@ -17,8 +17,8 @@
//! Kusama upward message
use crate::*;
use polkadot_core_primitives::{Balance, AccountId};
use kusama_runtime::{BalancesCall, ParachainsCall};
use polkadot_core_primitives::{AccountId, Balance};
use sp_std::vec::Vec;
/// The Kusama upward message.
+5 -3
View File
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
//! Upward messages types and traits for Polkadot, Kusama and Westend.
//! Upward messages types and traits for Polkadot, Kusama, Rococo and Westend.
//!
//! As Cumulus needs to suits multiple Polkadot-like runtimes the upward message
//! type is different for each of them. To support all of them, Cumulus provides
@@ -25,12 +25,14 @@
use polkadot_parachain::primitives::Id as ParaId;
use sp_std::vec::Vec;
mod polkadot;
mod kusama;
mod polkadot;
mod rococo;
mod westend;
pub use polkadot::UpwardMessage as PolkadotUpwardMessage;
pub use kusama::UpwardMessage as KusamaUpwardMessage;
pub use polkadot::UpwardMessage as PolkadotUpwardMessage;
pub use rococo::UpwardMessage as RococoUpwardMessage;
pub use westend::UpwardMessage as WestendUpwardMessage;
/// A `Balances` related upward message.
+1 -1
View File
@@ -17,7 +17,7 @@
//! Polkadot upward message
use crate::*;
use polkadot_core_primitives::{Balance, AccountId};
use polkadot_core_primitives::{AccountId, Balance};
use polkadot_runtime::{BalancesCall, ParachainsCall};
use sp_std::vec::Vec;
+37
View File
@@ -0,0 +1,37 @@
// Copyright 2020 Parity Technologies (UK) Ltd.
// This file is part of Cumulus.
// Substrate is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Substrate is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
//! Rococo upward message
use crate::*;
use polkadot_core_primitives::{AccountId, Balance};
use rococo_runtime::{BalancesCall, ParachainsCall};
use sp_std::vec::Vec;
/// The Rococo upward message.
pub type UpwardMessage = rococo_runtime::Call;
impl BalancesMessage<AccountId, Balance> for UpwardMessage {
fn transfer(dest: AccountId, amount: Balance) -> Self {
BalancesCall::transfer(dest, amount).into()
}
}
impl XCMPMessage for UpwardMessage {
fn send_message(dest: ParaId, msg: Vec<u8>) -> Self {
ParachainsCall::send_xcmp_message(dest, msg).into()
}
}
+2 -2
View File
@@ -17,9 +17,9 @@
//! Westend upward message
use crate::*;
use polkadot_core_primitives::{Balance, AccountId};
use westend_runtime::{BalancesCall, ParachainsCall};
use polkadot_core_primitives::{AccountId, Balance};
use sp_std::vec::Vec;
use westend_runtime::{BalancesCall, ParachainsCall};
/// The Westend upward message.
pub type UpwardMessage = westend_runtime::Call;