Skip to content

Commit

Permalink
Polkadot v0.9.4 (#136)
Browse files Browse the repository at this point in the history
* bump deps

* ⬆️ ($ALL) Upgrade to polkadot-v0.9.4

* ⬆️ ($NODE) Upgrade asgard runtime to polkadot-v0.9.4

Co-authored-by: Allen Pocket <AllenPocketGamer@Gmail.com>
  • Loading branch information
ark930 and AllenPocketGamer authored Jun 9, 2021
1 parent dd6851b commit 702e38e
Show file tree
Hide file tree
Showing 13 changed files with 649 additions and 613 deletions.
891 changes: 470 additions & 421 deletions Cargo.lock

Large diffs are not rendered by default.

222 changes: 111 additions & 111 deletions Cargo.toml

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ wasm-bindgen = { version = "0.2.57", optional = true }
wasm-bindgen-futures = { version = "0.4.18", optional = true }

# Cumulus dependencies
cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.3" }
cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.3" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.3" }
cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.4" }
cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.4" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.4" }

# Polkadot dependencies
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.3" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.3" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.3" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.3" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.4" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.4" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.4" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.4" }

[target.'cfg(target_arch="x86_64")'.dependencies]
sc-cli = { version = "0.9.0", optional = true, features = [ "wasmtime" ] }
Expand Down
4 changes: 1 addition & 3 deletions node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,6 @@ pub fn run() -> Result<()> {
None => {
let runner = cli.create_runner(&cli.run.normalize())?;
runner.run_node_until_exit(|config| async move {
let key = sp_core::Pair::generate().0;

let para_id =
node_service::chain_spec::RelayExtensions::try_get(&*config.chain_spec).map(|e| e.para_id);

Expand Down Expand Up @@ -258,7 +256,7 @@ pub fn run() -> Result<()> {
}
);

service::collator::start_node(config, key, polkadot_config, id)
service::collator::start_node(config, polkadot_config, id)
.await
.map_err(Into::into)
})
Expand Down
28 changes: 14 additions & 14 deletions node/runtime/asgard/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,21 @@ pallet-scheduler = { version = "3.0.0", default-features = false }
pallet-aura = { version = "3.0.0", default-features = false }

# Cumulus dependencies
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.3" }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.3" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.3" }
cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.3" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.3" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.3" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.3" }
parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.3" }
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.4" }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.4" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.4" }
cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.4" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.4" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.4" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.4" }
parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.4" }

# Polkadot dependencies
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.3" }
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.3" }
xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.3" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.3" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.3" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.4" }
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.4" }
xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.4" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.4" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.4" }

# bifrost pallets
bifrost-assets = { path = "../../../pallets/assets", default-features = false }
Expand All @@ -85,7 +85,7 @@ zenlink-protocol = { version = "*", default-features = false }
zenlink-protocol-runtime-api = { version = "*", default-features = false }

[build-dependencies]
substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.3" }
substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.4" }

[dev-dependencies]
sp-io = { version = "3.0.0" }
Expand Down
2 changes: 1 addition & 1 deletion node/runtime/asgard/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ construct_runtime! {
Sudo: pallet_sudo::{Pallet, Call, Config<T>, Storage, Event<T>} = 3,
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Call, Storage} = 4,
TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 5,
Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event<T>} = 6,
Democracy: pallet_democracy::{Pallet, Call, Storage, Config<T>, Event<T>} = 6,
Council: pallet_collective::<Instance1>::{Pallet, Call, Storage, Origin<T>, Event<T>, Config<T>} = 7,
TechnicalCommittee: pallet_collective::<Instance2>::{Pallet, Call, Storage, Origin<T>, Event<T>, Config<T>} = 8,

Expand Down
28 changes: 14 additions & 14 deletions node/runtime/bifrost/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,24 @@ pallet-scheduler = { version = "3.0.0", default-features = false }
pallet-aura = { version = "3.0.0", default-features = false }

# Cumulus dependencies
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.3" }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.3" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.3" }
cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.3" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.3" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.3" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.3" }
parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.3" }
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.4" }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.4" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.4" }
cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.4" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.4" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.4" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.4" }
parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.4" }

# Polkadot dependencies
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.3" }
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.3" }
xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.3" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.3" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.3" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.4" }
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.4" }
xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.4" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.4" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.4" }

[build-dependencies]
substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.3" }
substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.4" }

[dev-dependencies]
sp-io = { version = "3.0.0" }
Expand Down
4 changes: 2 additions & 2 deletions node/runtime/bifrost/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,12 +539,12 @@ construct_runtime! {
Sudo: pallet_sudo::{Pallet, Call, Config<T>, Storage, Event<T>} = 3,
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Call, Storage} = 4,
TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 5,
Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event<T>} = 6,
Democracy: pallet_democracy::{Pallet, Call, Storage, Config<T>, Event<T>} = 6,
Council: pallet_collective::<Instance1>::{Pallet, Call, Storage, Origin<T>, Event<T>, Config<T>} = 7,
TechnicalCommittee: pallet_collective::<Instance2>::{Pallet, Call, Storage, Origin<T>, Event<T>, Config<T>} = 8,

// Parachain modules
ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Storage, Inherent, Event<T>, ValidateUnsigned} = 20,
ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned} = 20,
ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21,

Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 30,
Expand Down
20 changes: 10 additions & 10 deletions node/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ frame-system-rpc-runtime-api = { version = "3.0.0" }
prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.9.0" }

# Cumulus dependencies
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.3" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.3" }
cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.3" }
cumulus-client-collator = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.3" }
cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.3" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.3" }
cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.3" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.3" }
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.4" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.4" }
cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.4" }
cumulus-client-collator = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.4" }
cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.4" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.4" }
cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.4" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.4" }

# Polkadot dependencies
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.3" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.3" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.4" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.4" }

# External Crates
codec = { package = "parity-scale-codec", version = "2.0.1" }
Expand Down
1 change: 1 addition & 0 deletions node/service/src/chain_spec/bifrost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ pub fn testnet_genesis(
authorities: initial_authorities,
},
cumulus_pallet_aura_ext: Default::default(),
cumulus_pallet_parachain_system: Default::default(),
}
}

Expand Down
16 changes: 2 additions & 14 deletions node/service/src/collator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use cumulus_client_service::{
prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams,
};
use cumulus_primitives_core::ParaId;
use polkadot_primitives::v1::CollatorPair;

use sc_client_api::ExecutorProvider;
use sc_executor::native_executor_instance;
Expand Down Expand Up @@ -163,7 +162,6 @@ where
#[sc_tracing::logging::prefix_logs_with("Parachain🌈")]
async fn start_node_impl<RuntimeApi, Executor, RB, BIQ, BIC>(
parachain_config: Configuration,
collator_key: CollatorPair,
polkadot_config: Configuration,
id: ParaId,
rpc_ext_builder: RB,
Expand Down Expand Up @@ -212,7 +210,6 @@ async fn start_node_impl<RuntimeApi, Executor, RB, BIQ, BIC>(

let relay_chain_full_node = cumulus_client_service::build_polkadot_full_node(
polkadot_config,
collator_key.clone(),
telemetry_worker_handle,
)
.map_err(|e| match e {
Expand All @@ -235,7 +232,7 @@ async fn start_node_impl<RuntimeApi, Executor, RB, BIQ, BIC>(
let transaction_pool = params.transaction_pool.clone();
let mut task_manager = params.task_manager;
let import_queue = cumulus_client_service::SharedImportQueue::new(params.import_queue);
let (network, network_status_sinks, system_rpc_tx, start_network) =
let (network, system_rpc_tx, start_network) =
sc_service::build_network(sc_service::BuildNetworkParams {
config: &parachain_config,
client: client.clone(),
Expand All @@ -260,7 +257,6 @@ async fn start_node_impl<RuntimeApi, Executor, RB, BIQ, BIC>(
keystore: params.keystore_container.sync_keystore(),
backend: backend.clone(),
network: network.clone(),
network_status_sinks,
system_rpc_tx,
telemetry: telemetry.as_mut(),
})?;
Expand Down Expand Up @@ -291,7 +287,6 @@ async fn start_node_impl<RuntimeApi, Executor, RB, BIQ, BIC>(
announce_block,
client: client.clone(),
task_manager: &mut task_manager,
collator_key,
relay_chain_full_node,
spawner,
parachain_consensus,
Expand Down Expand Up @@ -323,7 +318,6 @@ async fn start_node_impl<RuntimeApi, Executor, RB, BIQ, BIC>(
#[sc_tracing::logging::prefix_logs_with("Parachain🌈")]
async fn PATCH_FOR_ASGARD_start_node_impl<RuntimeApi, Executor, RB, BIQ, BIC>(
parachain_config: Configuration,
collator_key: CollatorPair,
polkadot_config: Configuration,
id: ParaId,
_rpc_ext_builder: RB,
Expand Down Expand Up @@ -374,7 +368,6 @@ async fn PATCH_FOR_ASGARD_start_node_impl<RuntimeApi, Executor, RB, BIQ, BIC>(

let relay_chain_full_node = cumulus_client_service::build_polkadot_full_node(
polkadot_config,
collator_key.clone(),
telemetry_worker_handle,
)
.map_err(|e| match e {
Expand All @@ -397,7 +390,7 @@ async fn PATCH_FOR_ASGARD_start_node_impl<RuntimeApi, Executor, RB, BIQ, BIC>(
let transaction_pool = params.transaction_pool.clone();
let mut task_manager = params.task_manager;
let import_queue = cumulus_client_service::SharedImportQueue::new(params.import_queue);
let (network, network_status_sinks, system_rpc_tx, start_network) =
let (network, system_rpc_tx, start_network) =
sc_service::build_network(sc_service::BuildNetworkParams {
config: &parachain_config,
client: client.clone(),
Expand Down Expand Up @@ -434,7 +427,6 @@ async fn PATCH_FOR_ASGARD_start_node_impl<RuntimeApi, Executor, RB, BIQ, BIC>(
keystore: params.keystore_container.sync_keystore(),
backend: backend.clone(),
network: network.clone(),
network_status_sinks,
system_rpc_tx,
telemetry: telemetry.as_mut(),
})?;
Expand Down Expand Up @@ -465,7 +457,6 @@ async fn PATCH_FOR_ASGARD_start_node_impl<RuntimeApi, Executor, RB, BIQ, BIC>(
announce_block,
client: client.clone(),
task_manager: &mut task_manager,
collator_key,
relay_chain_full_node,
spawner,
parachain_consensus,
Expand Down Expand Up @@ -586,15 +577,13 @@ pub fn bifrost_parachain_build_import_queue(
/// Start a normal parachain node.
pub async fn start_node(
parachain_config: Configuration,
collator_key: CollatorPair,
polkadot_config: Configuration,
id: ParaId,
) -> sc_service::error::Result<TaskManager> {
if parachain_config.chain_spec.is_asgard() {
#[cfg(feature = "with-asgard-runtime")]
return PATCH_FOR_ASGARD_start_node_impl::<asgard_runtime::RuntimeApi, AsgardExecutor, _, _, _>(
parachain_config,
collator_key,
polkadot_config,
id,
|_| Default::default(),
Expand Down Expand Up @@ -680,7 +669,6 @@ pub async fn start_node(
#[cfg(feature = "with-bifrost-runtime")]
return start_node_impl::<bifrost_runtime::RuntimeApi, BifrostExecutor, _, _, _>(
parachain_config,
collator_key,
polkadot_config,
id,
|_| Default::default(),
Expand Down
Loading

0 comments on commit 702e38e

Please sign in to comment.