Skip to content

Commit 2e35155

Browse files
authored
Update deps to polkadot-v0.9.11 (#362)
* update deps to polkadot-v0.9.11 * fix tests * update orml
1 parent 2e7db6c commit 2e35155

File tree

79 files changed

+2314
-2958
lines changed

Some content is hidden

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

79 files changed

+2314
-2958
lines changed

Cargo.lock

Lines changed: 967 additions & 1558 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 113 additions & 117 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ cd -
8383
```bash
8484
git clone -n https://github.com/paritytech/polkadot.git /tmp/polkadot
8585
cd /tmp/polkadot
86-
git checkout release-v0.9.10
86+
git checkout release-v0.9.11
8787
cargo build --release
8888
cd -
8989
```

integration-tests/Cargo.toml

Lines changed: 65 additions & 65 deletions
Large diffs are not rendered by default.

node/cli/Cargo.toml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,37 +22,37 @@ log = "0.4.8"
2222
structopt = { version = "0.3.8", optional = true }
2323

2424
# primitives
25-
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
26-
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
25+
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11" }
26+
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11" }
2727

2828
# client dependencies
29-
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", optional = true }
30-
sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
31-
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
29+
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11", optional = true }
30+
sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11" }
31+
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11" }
3232

3333
# node-specific dependencies
3434
node-service = { path = "../service", default-features = false }
3535
node-primitives = { path = "../primitives" }
3636

3737
# CLI-specific dependencies
38-
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", optional = true }
39-
try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", optional = true }
40-
frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", optional = true }
41-
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", optional = true }
42-
node-inspect = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", optional = true }
38+
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11", optional = true }
39+
try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11", optional = true }
40+
frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11", optional = true }
41+
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11", optional = true }
42+
node-inspect = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11", optional = true }
4343

4444
# Cumulus dependencies
45-
cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" }
46-
cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" }
47-
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" }
45+
cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11" }
46+
cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11" }
47+
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11" }
4848

4949
# Polkadot dependencies
50-
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" }
51-
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" }
52-
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10" }
50+
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.11" }
51+
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.11" }
52+
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.11" }
5353

5454
[build-dependencies]
55-
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", optional = true }
55+
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11", optional = true }
5656

5757
[features]
5858
default = [ "wasmtime", "cli" ]

node/cli/src/command.rs

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -224,16 +224,18 @@ macro_rules! construct_async_run {
224224
let runner = $cli.create_runner($cmd)?;
225225
#[cfg(feature = "with-asgard-runtime")]
226226
return runner.async_run(|$config| {
227-
let $components = crate::service::collator::new_partial::<asgard_runtime::RuntimeApi, AsgardExecutor>(
227+
let $components = crate::service::collator::new_partial::<asgard_runtime::RuntimeApi, AsgardExecutor, _>(
228228
&$config,
229+
crate::service::collator::parachain_build_import_queue,
229230
)?;
230231
let task_manager = $components.task_manager;
231232
{ $( $code )* }.map(|v| (v, task_manager))
232233
});
233234
#[cfg(feature = "with-bifrost-runtime")]
234235
return runner.async_run(|$config| {
235-
let $components = crate::service::collator::new_partial::<bifrost_runtime::RuntimeApi, BifrostExecutor>(
236+
let $components = crate::service::collator::new_partial::<bifrost_runtime::RuntimeApi, BifrostExecutor, _>(
236237
&$config,
238+
crate::service::collator::parachain_build_import_queue,
237239
)?;
238240
let task_manager = $components.task_manager;
239241
{ $( $code )* }.map(|v| (v, task_manager))
@@ -329,9 +331,9 @@ pub fn run() -> Result<()> {
329331
generate_genesis_block(&config.chain_spec).map_err(|e| format!("{:?}", e))?;
330332
let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header().encode()));
331333

332-
let task_executor = config.task_executor.clone();
334+
let tokio_handle = config.tokio_handle.clone();
333335
let polkadot_config =
334-
SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, task_executor)
336+
SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, tokio_handle)
335337
.map_err(|err| format!("Relay chain argument error: {}", err))?;
336338

337339
info!("Parachain id: {:?}", id);
@@ -418,7 +420,7 @@ pub fn run() -> Result<()> {
418420
let polkadot_config = SubstrateCli::create_configuration(
419421
&polkadot_cli,
420422
&polkadot_cli,
421-
config.task_executor.clone(),
423+
config.tokio_handle.clone(),
422424
)
423425
.map_err(|err| format!("Relay chain argument error: {}", err))?;
424426

@@ -486,7 +488,7 @@ pub fn run() -> Result<()> {
486488
return runner.async_run(|config| {
487489
let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry);
488490
let task_manager =
489-
sc_service::TaskManager::new(config.task_executor.clone(), registry)
491+
sc_service::TaskManager::new(config.tokio_handle.clone(), registry)
490492
.map_err(|e| {
491493
sc_cli::Error::Service(sc_service::Error::Prometheus(e))
492494
})?;
@@ -585,18 +587,10 @@ impl CliConfiguration<Self> for RelayChainCli {
585587
self.base.base.rpc_ws_max_connections()
586588
}
587589

588-
fn rpc_http_threads(&self) -> Result<Option<usize>> {
589-
self.base.base.rpc_http_threads()
590-
}
591-
592590
fn rpc_cors(&self, is_dev: bool) -> Result<Option<Vec<String>>> {
593591
self.base.base.rpc_cors(is_dev)
594592
}
595593

596-
fn telemetry_external_transport(&self) -> Result<Option<sc_service::config::ExtTransport>> {
597-
self.base.base.telemetry_external_transport()
598-
}
599-
600594
fn default_heap_pages(&self) -> Result<Option<u64>> {
601595
self.base.base.default_heap_pages()
602596
}

node/inspect/Cargo.toml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
[package]
22
name = "node-inspect"
33
version = "0.8.0"
4-
authors = ["Jamie <djptux@gmail.com>"]
4+
authors = ["Liebi Technologies <bifrost@liebi.com>"]
55
edition = "2018"
66

77
[dependencies]
88
codec = { package = "parity-scale-codec", version = "2.0.0" }
99
derive_more = "0.99"
10-
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
11-
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
12-
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }
13-
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
14-
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
15-
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
16-
structopt = "0.3.8"
10+
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11" }
11+
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11" }
12+
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11" }
13+
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11", default-features = false }
14+
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11" }
15+
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11" }
16+
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11" }
17+
structopt = "0.3.8"

node/inspect/src/command.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use std::str::FromStr;
2222

2323
use sc_cli::{CliConfiguration, ImportParams, Result, SharedParams};
24+
use sc_executor::NativeElseWasmExecutor;
2425
use sc_service::{new_full_client, Configuration, NativeExecutionDispatch};
2526
use sp_runtime::traits::Block;
2627

@@ -38,7 +39,13 @@ impl InspectCmd {
3839
RA: Send + Sync + 'static,
3940
EX: NativeExecutionDispatch + 'static,
4041
{
41-
let client = new_full_client::<B, RA, EX>(&config, None)?;
42+
let executor = NativeElseWasmExecutor::<EX>::new(
43+
config.wasm_method,
44+
config.default_heap_pages,
45+
config.max_runtime_instances,
46+
);
47+
48+
let client = new_full_client::<B, RA, _>(&config, None, executor)?;
4249
let inspect = Inspector::<B>::new(client);
4350

4451
match &self.command {

node/inspect/src/lib.rs

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl<TBlock: Block> PrettyPrinter<TBlock> for DebugPrinter {
7272
fmt: &mut fmt::Formatter,
7373
extrinsic: &TBlock::Extrinsic,
7474
) -> fmt::Result {
75-
writeln!(fmt, " {:?}", extrinsic)?;
75+
writeln!(fmt, " {:#?}", extrinsic)?;
7676
writeln!(fmt, " Bytes: {:?}", HexDisplay::from(&extrinsic.encode()))?;
7777
Ok(())
7878
}
@@ -269,3 +269,52 @@ impl<Hash: FromStr + Debug, Number: FromStr + Debug> FromStr for ExtrinsicAddres
269269
Ok(Self::Block(block, index))
270270
}
271271
}
272+
273+
#[cfg(test)]
274+
mod tests {
275+
use sp_core::hash::H160 as Hash;
276+
277+
use super::*;
278+
279+
#[test]
280+
fn should_parse_block_strings() {
281+
type BlockAddress = super::BlockAddress<Hash, u64>;
282+
283+
let b0 = BlockAddress::from_str("3BfC20f0B9aFcAcE800D73D2191166FF16540258");
284+
let b1 = BlockAddress::from_str("1234");
285+
let b2 = BlockAddress::from_str("0");
286+
let b3 = BlockAddress::from_str("0x0012345f");
287+
288+
assert_eq!(
289+
b0,
290+
Ok(BlockAddress::Hash("3BfC20f0B9aFcAcE800D73D2191166FF16540258".parse().unwrap()))
291+
);
292+
assert_eq!(b1, Ok(BlockAddress::Number(1234)));
293+
assert_eq!(b2, Ok(BlockAddress::Number(0)));
294+
assert_eq!(b3, Ok(BlockAddress::Bytes(vec![0, 0x12, 0x34, 0x5f])));
295+
}
296+
297+
#[test]
298+
fn should_parse_extrinsic_address() {
299+
type BlockAddress = super::BlockAddress<Hash, u64>;
300+
type ExtrinsicAddress = super::ExtrinsicAddress<Hash, u64>;
301+
302+
let e0 = ExtrinsicAddress::from_str("1234");
303+
let b0 = ExtrinsicAddress::from_str("3BfC20f0B9aFcAcE800D73D2191166FF16540258:5");
304+
let b1 = ExtrinsicAddress::from_str("1234:0");
305+
let b2 = ExtrinsicAddress::from_str("0 0");
306+
let b3 = ExtrinsicAddress::from_str("0x0012345f");
307+
308+
assert_eq!(e0, Err("Extrinsic index missing: example \"5:0\"".into()));
309+
assert_eq!(
310+
b0,
311+
Ok(ExtrinsicAddress::Block(
312+
BlockAddress::Hash("3BfC20f0B9aFcAcE800D73D2191166FF16540258".parse().unwrap()),
313+
5
314+
))
315+
);
316+
assert_eq!(b1, Ok(ExtrinsicAddress::Block(BlockAddress::Number(1234), 0)));
317+
assert_eq!(b2, Ok(ExtrinsicAddress::Block(BlockAddress::Number(0), 0)));
318+
assert_eq!(b3, Ok(ExtrinsicAddress::Bytes(vec![0, 0x12, 0x34, 0x5f])));
319+
}
320+
}

node/primitives/Cargo.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ edition = "2018"
77
[dependencies]
88
bstringify = "0.1.2"
99
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
10+
scale-info = { version = "1.0.0", default-features = false, features = ["derive"] }
1011
serde = { version = "1.0.123", optional = true, features = ["derive"] }
11-
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }
12-
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }
13-
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }
14-
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }
15-
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }
12+
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11", default-features = false }
13+
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11", default-features = false }
14+
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11", default-features = false }
15+
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11", default-features = false }
16+
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11", default-features = false }
1617
zenlink-protocol = { version = "*", default-features = false }
1718

1819
[features]
@@ -21,6 +22,7 @@ std = [
2122
"codec/std",
2223
"frame-system/std",
2324
"frame-support/std",
25+
"scale-info/std",
2426
"serde",
2527
"sp-core/std",
2628
"sp-runtime/std",

0 commit comments

Comments
 (0)