Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to polkadot v0.9.28 #665

Merged
merged 2 commits into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1,143 changes: 580 additions & 563 deletions Cargo.lock

Large diffs are not rendered by default.

117 changes: 58 additions & 59 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version = "2.0.22"
targets = ["x86_64-unknown-linux-gnu"]

[build-dependencies]
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }

[[bin]]
name = "nodle-parachain"
Expand All @@ -23,82 +23,81 @@ runtime-benchmarks = [
try-runtime = ["runtime-eden/try-runtime"]

[dependencies]
clap = { version = "3.1", features = ["derive"] }
clap = { version = "3.2.17", features = ["derive"] }
derive_more = "0.99.2"
log = "0.4.14"
log = "0.4.17"
codec = { package = "parity-scale-codec", version = "3.0.0" }
serde = { version = "1.0.132", features = ["derive"] }
serde = { version = "1.0.143", features = ["derive"] }
hex-literal = "0.3.4"

# RPC related Dependencies
jsonrpsee = { version = "0.14.0", features = ["server"] }
jsonrpsee = { version = "0.15.1", features = ["server"] }

# Local Dependencies
runtime-eden = { path = "../runtimes/eden" }
primitives = { version = "2.0.17", path = "../primitives" }

# Substrate Dependencies
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }

pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }

substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }

## Substrate Client Dependencies
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sc-service = { git = "https://github.com/paritytech/substrate", features = [
"wasmtime",
], branch = "polkadot-v0.9.27" }
sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-service = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.28" }
sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }

## Substrate Primitive Dependencies
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }

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

# Polkadot dependencies
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27" }
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.27" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.28" }
23 changes: 12 additions & 11 deletions node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
// std
use std::{sync::Arc, time::Duration};

// rpc
use jsonrpsee::RpcModule;
use polkadot_service::CollatorPair;

pub use primitives::{AccountId, Balance, Block, BlockNumber, Hash, Header, Index as Nonce};
Expand All @@ -37,21 +39,20 @@ use cumulus_primitives_core::ParaId;
use cumulus_client_cli::CollatorOptions;
use cumulus_relay_chain_inprocess_interface::build_inprocess_relay_chain;
use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface, RelayChainResult};
use cumulus_relay_chain_rpc_interface::RelayChainRPCInterface;
use cumulus_relay_chain_rpc_interface::{create_client_and_start_worker, RelayChainRpcInterface};

// Substrate Imports
use sc_client_api::ExecutorProvider;
use sc_executor::NativeElseWasmExecutor;
use sc_network::NetworkService;
use sc_network_common::service::NetworkBlock;
use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager};
use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle};
use sp_api::ConstructRuntimeApi;
use sp_keystore::SyncCryptoStorePtr;
use sp_runtime::traits::BlakeTwo256;
use substrate_prometheus_endpoint::Registry;

use jsonrpsee::RpcModule;

pub struct TemplateRuntimeExecutor;
impl sc_executor::NativeExecutionDispatch for TemplateRuntimeExecutor {
type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;
Expand Down Expand Up @@ -177,10 +178,10 @@ async fn build_relay_chain_interface(
hwbench: Option<sc_sysinfo::HwBench>,
) -> RelayChainResult<(Arc<(dyn RelayChainInterface + 'static)>, Option<CollatorPair>)> {
match collator_options.relay_chain_rpc_url {
Some(relay_chain_url) => Ok((
Arc::new(RelayChainRPCInterface::new(relay_chain_url).await?) as Arc<_>,
None,
)),
Some(relay_chain_url) => {
let client = create_client_and_start_worker(relay_chain_url, task_manager).await?;
Ok((Arc::new(RelayChainRpcInterface::new(client)) as Arc<_>,None))
},
None => build_inprocess_relay_chain(
polkadot_config,
parachain_config,
Expand Down Expand Up @@ -226,8 +227,8 @@ where
sc_client_api::StateBackendFor<TFullBackend<Block>, Block>: sp_api::StateBackend<BlakeTwo256>,
Executor: sc_executor::NativeExecutionDispatch + 'static,
RB: Fn(
Arc<TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>,
) -> Result<jsonrpsee::RpcModule<()>, sc_service::Error>
Arc<TFullClient<Block, RuntimeApi, Executor>>,
) -> Result<RpcModule<()>, sc_service::Error>
+ Send
+ 'static,
BIQ: FnOnce(
Expand Down Expand Up @@ -360,7 +361,7 @@ where
announce_block,
client: client.clone(),
task_manager: &mut task_manager,
relay_chain_interface: relay_chain_interface.clone(),
relay_chain_interface,
spawner,
parachain_consensus,
import_queue,
Expand Down Expand Up @@ -389,7 +390,7 @@ where
Ok((task_manager, client))
}

/// Build the import queue for the rococo parachain runtime.
/// Build the import queue for the parachain runtime.
#[allow(clippy::type_complexity)]
pub fn parachain_build_import_queue(
client: Arc<TFullClient<Block, runtime_eden::RuntimeApi, NativeElseWasmExecutor<TemplateRuntimeExecutor>>>,
Expand Down
20 changes: 10 additions & 10 deletions pallets/allocations/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ log = { version = "0.4.14", default-features = false }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.136", optional = true, features = ["derive"] }
scale-info = { version = "2.0.1", default-features = false, features = [ "derive",] }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.27" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" }
pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.28" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.28" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.28" }
pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.28" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.28" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.28" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.28" }
support = { path = "../../support" }

[dev-dependencies]
sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" }
pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" }
sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.28" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.28" }
pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.28" }