Skip to content

Commit 690181c

Browse files
authored
Migrate to the polkadot-sdk umbrella crate (#48)
* migrate to umbrella crate * bump versions
1 parent a72c2cb commit 690181c

Some content is hidden

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

60 files changed

+552
-774
lines changed

Cargo.toml

+9-141
Original file line numberDiff line numberDiff line change
@@ -22,150 +22,18 @@ members = [
2222
[workspace.dependencies]
2323
codec = { version = "3.1.3", package = "parity-scale-codec", default-features = false }
2424
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
25+
jsonrpsee = "0.24"
26+
try-runtime-cli = "0.41.0"
27+
polkadot-sdk = { version = "0.7.0", default-features = false }
2528

26-
# wasm
27-
frame-benchmarking = { version = "38.0.0", default-features = false }
28-
frame-executive = { version = "38.0.0", default-features = false }
29-
frame-election-provider-support = { version = "38.0.0", default-features = false }
30-
frame-support = { version = "38.0.0", default-features = false }
31-
frame-system = { version = "38.0.0", default-features = false }
32-
frame-system-benchmarking = { version = "38.0.0", default-features = false }
33-
frame-system-rpc-runtime-api = { version = "34.0.0", default-features = false }
34-
frame-try-runtime = { version = "0.44.0", default-features = false }
35-
pallet-aura = { version = "37.0.0", default-features = false }
36-
pallet-grandpa = { version = "38.0.0", default-features = false }
37-
pallet-babe = { version = "38.0.0", default-features = false }
38-
pallet-offences = { version = "37.0.0", default-features = false }
39-
pallet-authorship = { version = "38.0.0", default-features = false }
40-
pallet-balances = { version = "39.0.0", default-features = false }
41-
pallet-session = { version = "38.0.0", default-features = false }
42-
pallet-staking = { version = "38.0.0", default-features = false }
43-
pallet-session-benchmarking = { version = "38.0.0", default-features = false }
44-
pallet-sudo = { version = "38.0.0", default-features = false }
45-
pallet-timestamp = { version = "37.0.0", default-features = false }
46-
pallet-transaction-payment = { version = "38.0.0", default-features = false }
47-
pallet-transaction-payment-rpc-runtime-api = { version = "38.0.0", default-features = false }
48-
pallet-message-queue = { version = "41.0.2", default-features = false }
49-
pallet-beefy-mmr = { version = "39.0.0", default-features = false }
50-
pallet-assets = { version = "40.0.0", default-features = false }
51-
pallet-staking-reward-curve = { version = "12.0.0" }
52-
53-
sp-api = { version = "34.0.0", default-features = false }
54-
sp-blockchain = { version = "37.0.1", default-features = false }
55-
sp-io = { version = "38.0.0", default-features = false }
56-
sp-trie = { version = "37.0.0", default-features = false }
57-
sp-block-builder = { version = "34.0.0", default-features = false }
58-
sp-consensus-aura = { version = "0.40.0", default-features = false }
59-
sp-consensus-babe = { version = "0.40.0", default-features = false }
60-
sp-consensus-grandpa = { version = "21.0.0", default-features = false }
61-
sp-consensus-slots = { version = "0.40.1", default-features = false }
62-
sp-consensus = { version = "0.40.0", default-features = false }
63-
sp-consensus-beefy = { version = "22.1.0", default-features = false }
29+
# crates which cannot be used from polkadot-sdk
6430
sp-core = { version = "34.0.0", default-features = false }
65-
sp-inherents = { version = "34.0.0", default-features = false }
66-
sp-externalities = { version = "0.29.0", default-features = false }
67-
sp-offchain = { version = "34.0.0", default-features = false }
68-
sp-keyring = { version = "39.0.0", default-features = false }
69-
sp-runtime = { version = "39.0.1", default-features = false }
7031
sp-runtime-interface = { version = "28.0.0", default-features = false }
71-
sp-timestamp = { version = "34.0.0", default-features = false }
72-
sp-keystore = { version = "0.40.0", default-features = false }
73-
sp-mmr-primitives = { version = "34.1.0", default-features = false }
74-
sp-state-machine = { version = "0.43.0", default-features = false }
75-
sp-storage = { version = "21.0.0", default-features = false }
76-
sp-staking = { version = "36.0.0", default-features = false }
77-
sp-session = { version = "36.0.0", default-features = false }
78-
sp-std = { version = "14.0.0", default-features = false }
79-
sp-transaction-pool = { version = "34.0.0", default-features = false }
80-
sp-version = { version = "37.0.0", default-features = false }
81-
sp-genesis-builder = { version = "0.15.1", default-features = false }
82-
sp-wasm-interface = { version = "21.0.1", default-features = false }
83-
sp-transaction-storage-proof = { version = "34.0.0", default-features = false }
84-
85-
pallet-xcm = { version = "17.0.1", default-features = false }
86-
polkadot-parachain-primitives = { version = "14.0.0", default-features = false }
87-
polkadot-runtime-common = { version = "17.0.0", default-features = false }
88-
staging-xcm = { version = "14.2.0", default-features = false }
89-
staging-xcm-builder = { version = "17.0.1", default-features = false }
90-
staging-xcm-executor = { version = "17.0.0", default-features = false }
91-
92-
cumulus-primitives-aura = { version = "0.15.0", default-features = false }
93-
cumulus-pallet-session-benchmarking = { version = "19.0.0", default-features = false }
94-
cumulus-pallet-aura-ext = { version = "0.17.0", default-features = false }
95-
cumulus-pallet-dmp-queue = { version = "0.17.0", default-features = false }
9632
cumulus-pallet-parachain-system = { version = "0.17.1", default-features = false }
97-
cumulus-pallet-xcm = { version = "0.17.0", default-features = false }
98-
cumulus-pallet-xcmp-queue = { version = "0.17.0", default-features = false }
99-
cumulus-primitives-core = { version = "0.16.0", default-features = false }
100-
101-
cumulus-primitives-timestamp = { version = "0.16.0", default-features = false }
102-
cumulus-primitives-utility = { version = "0.17.0", default-features = false }
103-
pallet-collator-selection = { version = "19.0.0", default-features = false }
104-
parachain-info = { version = "0.17.0", package = "staging-parachain-info", default-features = false }
105-
parachains-common = { version = "18.0.0", default-features = false }
106-
107-
108-
# client
109-
parachain-inherent = { version = "0.16.0", package = "cumulus-primitives-parachain-inherent" }
110-
sproof-builder = { version = "0.16.0", package = "cumulus-test-relay-sproof-builder" }
111-
frame-benchmarking-cli = "43.0.0"
112-
113-
pallet-transaction-payment-rpc = "41.0.0"
114-
sc-basic-authorship = "0.45.0"
115-
116-
sc-chain-spec = "38.0.0"
117-
sc-cli = "0.47.0"
118-
sc-keystore = "33.0.0"
119-
sc-informant = "0.44.0"
120-
sc-block-builder = "0.42.0"
121-
sc-client-api = "37.0.0"
122-
sc-client-db = "0.44.1"
123-
sc-consensus = "0.44.0"
124-
sc-consensus-aura = "0.45.0"
125-
sc-consensus-grandpa = "0.30.0"
126-
sc-consensus-babe = "0.45.0"
127-
sc-consensus-epochs = "0.44.0"
128-
sc-consensus-slots = "0.44.0"
129-
sc-executor = "0.40.1"
130-
sc-network = "0.45.1"
131-
sc-network-sync = "0.44.1"
132-
sc-network-common = "0.44.0"
133-
sc-rpc = "40.0.0"
134-
sc-rpc-api = "0.44.0"
135-
sc-rpc-server = "17.1.0"
136-
sc-rpc-spec-v2 = "0.45.0"
137-
substrate-state-trie-migration-rpc = "38.0.0"
138-
sc-consensus-babe-rpc = "0.45.0"
139-
sc-consensus-grandpa-rpc = "0.30.0"
140-
sc-sync-state-rpc = "0.45.0"
33+
substrate-wasm-builder = "24.0.1"
14134
sc-service = "0.46.0"
142-
sc-sysinfo = "38.0.0"
143-
sc-storage-monitor = "0.22.0"
144-
sc-telemetry = "25.0.0"
14535
sc-tracing = "37.0.1"
146-
sc-transaction-pool = "37.0.0"
147-
sc-transaction-pool-api = "37.0.0"
148-
sc-offchain = "40.0.0"
149-
manual-seal = { version = "0.46.0", package = "sc-consensus-manual-seal" }
150-
substrate-frame-rpc-system = "39.0.0"
151-
substrate-prometheus-endpoint = "0.17.0"
152-
try-runtime-cli = "0.41.0"
153-
polkadot-cli = "19.0.0"
154-
polkadot-primitives = "16.0.0"
155-
polkadot-service = "19.0.0"
156-
cumulus-client-cli = "0.18.0"
157-
cumulus-client-consensus-aura = "0.18.0"
158-
cumulus-client-consensus-common = "0.18.0"
159-
cumulus-client-network = "0.18.0"
160-
cumulus-client-service = "0.19.0"
161-
cumulus-primitives-parachain-inherent = "0.16.0"
162-
cumulus-relay-chain-interface = "0.18.0"
163-
cumulus-client-consensus-proposer = "0.16.0"
164-
cumulus-client-collator = "0.18.0"
165-
substrate-wasm-builder = { version = "24.0.1" }
166-
mmr-rpc = { version = "38.0.0" }
167-
xcm-simulator-example = "17.0.0"
168-
xcm-simulator = "17.0.0"
169-
polkadot-runtime-parachains = "17.0.1"
170-
substrate-build-script-utils = "11.0.0"
171-
jsonrpsee = "0.24"
36+
37+
# local crates
38+
simnode-runtime-api = { path = "./runtime-api", version = "16.0.0", default-features = false }
39+
sc-simnode = { path = "./simnode", version = "16.0.0" }

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ Installation and integration guides can be found in the [book](https://simnode.p
2424

2525
## Releases
2626

27-
`sc-simnode` exclusively follows the official [paritytech/polkadot-sdk](https://github.com/paritytech/polkadot-sdk/releases) stable releases. Therefore new versions of this crate will be published with the same semver version of the corresponding polkadot-sdk stable release.
27+
`sc-simnode` exclusively follows the official [paritytech/polkadot-sdk](https://github.com/paritytech/polkadot-sdk/releases) stable releases. Therefore new versions of this crate will be published as a new major release for the minor version of the corresponding polkadot-sdk stable release.
28+
E.g [`polkadot-stable2409`](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2409) corresponds to the [`polkadot-sdk-v1.160`](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.16.0) tag, which is supported by the `v16.0.0` version of this crate. Subsequent stable releases will see a major version bump in this crate.
2829

2930
## License
3031

examples/aura/node/Cargo.toml

+49-48
Original file line numberDiff line numberDiff line change
@@ -19,66 +19,67 @@ name = "aura-node"
1919
[dependencies]
2020
clap = { version = "4.0.9", features = ["derive"] }
2121
futures = { version = "0.3.21", features = ["thread-pool"] }
22-
23-
sc-cli = { workspace = true }
24-
sp-core = { workspace = true }
25-
sc-executor = { workspace = true }
26-
sc-service = { workspace = true }
27-
sc-network = { workspace = true }
28-
sc-offchain = { workspace = true }
29-
sc-telemetry = { workspace = true }
30-
sc-keystore = { workspace = true }
31-
sc-transaction-pool = { workspace = true }
32-
sc-transaction-pool-api = { workspace = true }
33-
sc-consensus-aura = { workspace = true }
34-
sp-consensus-aura = { workspace = true }
35-
sp-consensus = { workspace = true }
36-
sc-consensus = { workspace = true }
37-
sc-consensus-grandpa = { workspace = true }
38-
sp-consensus-grandpa = { workspace = true }
39-
sc-client-api = { workspace = true }
40-
sp-runtime = { workspace = true }
41-
sp-io = { workspace = true, default-features = true }
42-
sp-timestamp = { workspace = true }
43-
sp-inherents = { workspace = true }
44-
sp-keyring = { workspace = true }
45-
frame-system = { workspace = true }
46-
pallet-transaction-payment = { default-features = false, workspace = true }
47-
48-
# These dependencies are used for the node template's RPCs
4922
jsonrpsee = { workspace = true, features = ["server"] }
50-
sc-rpc = { workspace = true }
51-
sp-api = { workspace = true }
52-
sc-rpc-api = { workspace = true }
53-
sp-blockchain = { workspace = true }
54-
sp-block-builder = { workspace = true }
55-
sc-basic-authorship = { workspace = true }
56-
substrate-frame-rpc-system = { workspace = true }
57-
pallet-transaction-payment-rpc = { workspace = true }
58-
59-
# These dependencies are used for runtime benchmarking
60-
frame-benchmarking = { workspace = true }
61-
frame-benchmarking-cli = { workspace = true }
23+
try-runtime-cli = { optional = true, workspace = true }
24+
serde_json = "1.0"
6225

63-
# Local Dependencies
6426
aura-runtime = { path = "../runtime" }
65-
sc-simnode = { path = "../../../simnode", features = ["aura"] }
27+
sc-simnode = { workspace = true, features = ["aura"] }
6628

67-
# CLI-specific dependencies
68-
try-runtime-cli = { optional = true, workspace = true }
69-
serde_json = "1.0"
29+
[dependencies.polkadot-sdk]
30+
workspace = true
31+
default-features = false
32+
features = [
33+
"sp-io",
34+
"sc-cli",
35+
"sp-core",
36+
"sc-executor",
37+
"sc-service",
38+
"sc-network",
39+
"sc-offchain",
40+
"sc-telemetry",
41+
"sc-keystore",
42+
"sc-transaction-pool",
43+
"sc-transaction-pool-api",
44+
"sc-consensus-aura",
45+
"sp-consensus-aura",
46+
"sp-consensus",
47+
"sc-consensus",
48+
"sc-consensus-grandpa",
49+
"sp-consensus-grandpa",
50+
"sc-client-api",
51+
"sp-runtime",
52+
"sp-timestamp",
53+
"sp-inherents",
54+
"sp-keyring",
55+
"frame-system",
56+
"sc-rpc",
57+
"sp-api",
58+
"sc-rpc-api",
59+
"sp-blockchain",
60+
"sp-block-builder",
61+
"sc-basic-authorship",
62+
"substrate-frame-rpc-system",
63+
"pallet-transaction-payment",
64+
"pallet-transaction-payment-rpc",
65+
"frame-benchmarking",
66+
"frame-benchmarking-cli",
67+
]
7068

7169
[build-dependencies]
72-
substrate-build-script-utils = { workspace = true }
70+
polkadot-sdk = { workspace = true, default-features = true, features = ["substrate-build-script-utils"] }
7371

7472
[features]
7573
default = []
7674
# Dependencies that are only required if runtime benchmarking should be build.
7775
runtime-benchmarks = [
7876
"aura-runtime/runtime-benchmarks",
79-
"frame-benchmarking/runtime-benchmarks",
80-
"frame-benchmarking-cli/runtime-benchmarks",
77+
"polkadot-sdk/runtime-benchmarks",
8178
]
8279
# Enable features that allow the runtime to be tried and debugged. Name might be subject to change
8380
# in the near future.
84-
try-runtime = ["aura-runtime/try-runtime", "try-runtime-cli/try-runtime"]
81+
try-runtime = [
82+
"aura-runtime/try-runtime",
83+
"polkadot-sdk/try-runtime",
84+
"try-runtime-cli/try-runtime"
85+
]

examples/aura/node/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
1+
use polkadot_sdk::substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
22

33
fn main() {
44
generate_cargo_keys();

examples/aura/node/src/benchmarking.rs

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
//!
33
//! Should only be used for benchmarking as it may break in other contexts.
44
5+
use polkadot_sdk::*;
6+
57
use crate::service::FullClient;
68

79
use aura_runtime as runtime;

examples/aura/node/src/chain_spec.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use polkadot_sdk::*;
2+
13
use aura_runtime::{AccountId, Signature, WASM_BINARY};
24
use sc_service::ChainType;
35
use sp_consensus_aura::sr25519::AuthorityId as AuraId;

examples/aura/node/src/cli.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use polkadot_sdk::*;
2+
13
use sc_cli::RunCmd;
24

35
#[derive(Debug, clap::Parser)]

examples/aura/node/src/command.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use polkadot_sdk::*;
2+
13
use crate::{
24
benchmarking::{inherent_benchmark_data, RemarkBuilder, TransferKeepAliveBuilder},
35
chain_spec,

examples/aura/node/src/main.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
//! Substrate Node Template CLI library.
22
#![warn(missing_docs)]
33

4+
use polkadot_sdk::*;
5+
46
mod chain_spec;
57
#[macro_use]
68
mod service;

examples/aura/node/src/rpc.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//! capabilities that are specific to this project's runtime configuration.
55
66
#![warn(missing_docs)]
7+
use polkadot_sdk::*;
78

89
use std::sync::Arc;
910

examples/aura/node/src/service.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.
22
3+
use polkadot_sdk::*;
4+
35
use aura_runtime::{self, opaque::Block, RuntimeApi};
46
use futures::FutureExt;
57
use sc_client_api::{Backend, BlockBackend};

0 commit comments

Comments
 (0)