Skip to content

Commit 4ab24b8

Browse files
authored
chore: upgrade to polkadot 0.9.11 (#272)
* chore: update dependencies * fix: update vesting in launch pallet * fix: add TypeInfo * refactor: calls * refactor: remove unused TypeInfos * wip: try to fix compiling issues * fix: TypeInfo issues * fix: standalone client * fix: runtimes * wip: fix parachain client * fix: parachain client * fix: launch unit tests * fix: tests for all features * fix: clippy * refactor: rm redundant TypeInfo traits * fix: formatting * apply suggestion by Weichweichs review * refactor: bump pallet versions to 1.0.0 * chore: bump spec versions to 2800 Co-authored-by: kiltbot <>
1 parent 7dcf283 commit 4ab24b8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2400
-2559
lines changed

Cargo.lock

+1,043-1,440
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nodes/parachain/Cargo.toml

+54-54
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build = "build.rs"
44
description = "KILT parachain"
55
edition = "2018"
66
name = "kilt-parachain"
7-
version = "0.26.2"
7+
version = "1.0.0"
88

99
[[bin]]
1010
name = "kilt-parachain"
@@ -18,7 +18,7 @@ peregrine-runtime = {path = "../../runtimes/peregrine"}
1818
spiritnet-runtime = {path = "../../runtimes/spiritnet"}
1919

2020
# External dependencies
21-
codec = {package = "parity-scale-codec", version = "2.0.0"}
21+
codec = {package = "parity-scale-codec", version = "2.3.1"}
2222
derive_more = "0.15.0"
2323
exit-future = "0.1.4"
2424
futures = {version = "0.3.1", features = ["compat"]}
@@ -31,70 +31,70 @@ structopt = "0.3.3"
3131
trie-root = "0.15.2"
3232

3333
# Substrate dependencies
34-
sc-basic-authorship = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
35-
sc-chain-spec = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
36-
sc-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
37-
sc-client-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
38-
sc-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
39-
sc-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
40-
sc-finality-grandpa = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
41-
sc-network = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
42-
sc-service = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
43-
sc-telemetry = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
44-
sc-tracing = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
45-
sc-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
46-
sc-transaction-pool-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
47-
sp-block-builder = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
48-
sp-blockchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
49-
sp-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
50-
sp-consensus-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
51-
sp-core = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
52-
sp-inherents = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
53-
sp-io = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
54-
sp-keystore = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
55-
sp-offchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
56-
sp-runtime = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.10"}
57-
sp-session = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
58-
sp-timestamp = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
59-
sp-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
60-
sp-trie = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
61-
substrate-prometheus-endpoint = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
34+
sc-basic-authorship = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
35+
sc-chain-spec = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
36+
sc-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
37+
sc-client-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
38+
sc-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
39+
sc-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
40+
sc-finality-grandpa = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
41+
sc-network = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
42+
sc-service = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
43+
sc-telemetry = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
44+
sc-tracing = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
45+
sc-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
46+
sc-transaction-pool-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
47+
sp-block-builder = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
48+
sp-blockchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
49+
sp-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
50+
sp-consensus-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
51+
sp-core = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
52+
sp-inherents = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
53+
sp-io = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
54+
sp-keystore = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
55+
sp-offchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
56+
sp-runtime = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.11"}
57+
sp-session = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
58+
sp-timestamp = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
59+
sp-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
60+
sp-trie = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
61+
substrate-prometheus-endpoint = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
6262

6363
# RPC related dependencies
64-
frame-rpc-system = {package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
65-
jsonrpc-core = "15.1.0"
66-
pallet-transaction-payment-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
67-
sc-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
68-
sc-rpc-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
69-
sp-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
64+
frame-rpc-system = {package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
65+
jsonrpc-core = "18.0.0"
66+
pallet-transaction-payment-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
67+
sc-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
68+
sc-rpc-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
69+
sp-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
7070

7171
# Cumulus dependencies
72-
cumulus-client-cli = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10"}
73-
cumulus-client-collator = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10"}
74-
cumulus-client-consensus-aura = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10"}
75-
cumulus-client-consensus-common = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10"}
76-
cumulus-client-consensus-relay-chain = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10"}
77-
cumulus-client-network = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10"}
78-
cumulus-client-service = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10"}
79-
cumulus-primitives-core = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10"}
80-
cumulus-primitives-parachain-inherent = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10"}
72+
cumulus-client-cli = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11"}
73+
cumulus-client-collator = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11"}
74+
cumulus-client-consensus-aura = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11"}
75+
cumulus-client-consensus-common = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11"}
76+
cumulus-client-consensus-relay-chain = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11"}
77+
cumulus-client-network = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11"}
78+
cumulus-client-service = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11"}
79+
cumulus-primitives-core = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11"}
80+
cumulus-primitives-parachain-inherent = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11"}
8181

8282
# Polkadot dependencies
83-
polkadot-cli = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10"}
84-
polkadot-parachain = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10"}
85-
polkadot-primitives = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10"}
86-
polkadot-service = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10"}
83+
polkadot-cli = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.11"}
84+
polkadot-parachain = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.11"}
85+
polkadot-primitives = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.11"}
86+
polkadot-service = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.11"}
8787

8888
# Benchmarking
89-
frame-benchmarking = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
90-
frame-benchmarking-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
89+
frame-benchmarking = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
90+
frame-benchmarking-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
9191

9292
# Runtime tests
93-
node-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", optional = true}
94-
try-runtime-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", optional = true}
93+
node-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11", optional = true}
94+
try-runtime-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11", optional = true}
9595

9696
[build-dependencies]
97-
substrate-build-script-utils = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
97+
substrate-build-script-utils = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
9898

9999
[features]
100100
default = []

nodes/parachain/src/command.rs

+6-10
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use cumulus_primitives_core::ParaId;
2727
use kilt_primitives::Block;
2828
use log::info;
2929
#[cfg(feature = "try-runtime")]
30-
use node_executor::Executor;
30+
use node_executor::ExecutorDispatch;
3131
use polkadot_parachain::primitives::AccountIdConversion;
3232
use sc_cli::{
3333
ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams, NetworkParams, Result,
@@ -237,7 +237,7 @@ pub fn run() -> Result<()> {
237237
);
238238

239239
let polkadot_config =
240-
SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, config.task_executor.clone())
240+
SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, config.tokio_handle.clone())
241241
.map_err(|err| format!("Relay chain argument error: {}", err))?;
242242

243243
cmd.run(config, polkadot_config)
@@ -312,10 +312,10 @@ pub fn run() -> Result<()> {
312312
// we don't need any of the components of new_partial, just a runtime, or a task
313313
// manager to do `async_run`.
314314
let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry);
315-
let task_manager = sc_service::TaskManager::new(config.task_executor.clone(), registry)
315+
let task_manager = sc_service::TaskManager::new(config.tokio_handle.clone(), registry)
316316
.map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?;
317317

318-
Ok((cmd.run::<Block, Executor>(config), task_manager))
318+
Ok((cmd.run::<Block, ExecutorDispatch>(config), task_manager))
319319
})
320320
}
321321
#[cfg(not(feature = "try-runtime"))]
@@ -342,8 +342,8 @@ pub fn run() -> Result<()> {
342342
let block: Block = generate_genesis_block(&config.chain_spec).map_err(|e| format!("{:?}", e))?;
343343
let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header().encode()));
344344

345-
let task_executor = config.task_executor.clone();
346-
let polkadot_config = SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, task_executor)
345+
let tokio_handle = config.tokio_handle.clone();
346+
let polkadot_config = SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, tokio_handle)
347347
.map_err(|err| format!("Relay chain argument error: {}", err))?;
348348

349349
info!("Parachain id: {:?}", id);
@@ -474,10 +474,6 @@ impl CliConfiguration<Self> for RelayChainCli {
474474
self.base.base.rpc_cors(is_dev)
475475
}
476476

477-
fn telemetry_external_transport(&self) -> Result<Option<sc_service::config::ExtTransport>> {
478-
self.base.base.telemetry_external_transport()
479-
}
480-
481477
fn default_heap_pages(&self) -> Result<Option<u64>> {
482478
self.base.base.default_heap_pages()
483479
}

nodes/parachain/src/rpc.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use std::sync::Arc;
2727

2828
use kilt_primitives::{AccountId, Balance, Block, Index};
29+
use polkadot_service::AuxStore;
2930
use sc_service::Error;
3031
use sc_transaction_pool_api::TransactionPool;
3132
use sp_api::ProvideRuntimeApi;
@@ -48,12 +49,13 @@ pub struct FullDeps<C, P> {
4849
pub fn create_full<C, P>(deps: FullDeps<C, P>) -> Result<jsonrpc_core::IoHandler<sc_rpc::Metadata>, Error>
4950
where
5051
C: ProvideRuntimeApi<Block>,
52+
C: AuxStore,
5153
C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError> + 'static,
5254
C: Send + Sync + 'static,
5355
C::Api: frame_rpc_system::AccountNonceApi<Block, AccountId, Index>,
5456
C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
5557
C::Api: BlockBuilder<Block>,
56-
P: TransactionPool + 'static,
58+
P: TransactionPool + Sync + Send + 'static,
5759
{
5860
use frame_rpc_system::{FullSystem, SystemApi};
5961
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApi};

0 commit comments

Comments
 (0)