Skip to content

Commit 3004222

Browse files
authored
Update the minimal template to stable2409 (#19)
The template has NOT been successfully built and needs to be inspected.
2 parents d7a09ba + f4c5759 commit 3004222

File tree

20 files changed

+12590
-4751
lines changed

20 files changed

+12590
-4751
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 5 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,51 +6,18 @@ repository = "https://github.com/paritytech/polkadot-sdk-minimal-template.git"
66
edition = "2021"
77

88
[workspace]
9-
members = [
10-
"node",
11-
"pallets/template",
12-
"runtime",
13-
]
9+
members = ["node", "pallets/template", "runtime"]
1410
resolver = "2"
1511

1612
[workspace.dependencies]
1713
minimal-template-runtime = { path = "./runtime", default-features = false }
1814
pallet-minimal-template = { path = "./pallets/template", default-features = false }
19-
clap = { version = "4.5.3" }
15+
clap = { version = "4.5.10" }
2016
docify = { version = "0.2.8" }
21-
frame = { version = "0.6.0", default-features = false, package = "polkadot-sdk-frame" }
2217
futures = { version = "0.3.30" }
2318
futures-timer = { version = "3.0.2" }
24-
jsonrpsee = { version = "0.23.2" }
25-
sc-basic-authorship = { version = "0.44.0", default-features = false }
26-
sc-cli = { version = "0.46.0", default-features = false }
27-
sc-client-api = { version = "37.0.0", default-features = false }
28-
sc-consensus = { version = "0.43.0", default-features = false }
29-
sc-consensus-manual-seal = { version = "0.45.0", default-features = false }
30-
sc-executor = { version = "0.40.0", default-features = false }
31-
sc-network = { version = "0.44.0", default-features = false }
32-
sc-offchain = { version = "39.0.0", default-features = false }
33-
sc-rpc-api = { version = "0.43.0", default-features = false }
34-
sc-service = { version = "0.45.0", default-features = false }
35-
sc-telemetry = { version = "24.0.0", default-features = false }
36-
sc-transaction-pool = { version = "37.0.0", default-features = false }
37-
sc-transaction-pool-api = { version = "37.0.0", default-features = false }
38-
serde_json = { version = "1.0.114", default-features = false }
39-
sp-api = { version = "34.0.0", default-features = false }
40-
sp-block-builder = { version = "34.0.0", default-features = false }
41-
sp-blockchain = { version = "37.0.0", default-features = false }
42-
sp-io = { version = "38.0.0", default-features = false }
43-
sp-keyring = { version = "39.0.0", default-features = false }
44-
sp-runtime = { version = "39.0.0", default-features = false }
45-
sp-timestamp = { version = "34.0.0", default-features = false }
46-
substrate-frame-rpc-system = { version = "38.0.0", default-features = false }
47-
substrate-build-script-utils = { version = "11.0.0", default-features = false }
19+
jsonrpsee = { version = "0.24.3" }
20+
polkadot-sdk = { version = "0.7.0", default-features = false }
21+
serde_json = { version = "1.0.127", default-features = false }
4822
codec = { version = "3.6.12", default-features = false, package = "parity-scale-codec" }
49-
pallet-balances = { version = "38.0.0", default-features = false }
50-
pallet-sudo = { version = "37.0.0", default-features = false }
51-
pallet-timestamp = { version = "36.0.0", default-features = false }
52-
pallet-transaction-payment = { version = "37.0.0", default-features = false }
53-
pallet-transaction-payment-rpc-runtime-api = { version = "37.0.0", default-features = false }
5423
scale-info = { version = "2.11.1", default-features = false }
55-
sp-genesis-builder = { version = "0.15.0", default-features = false }
56-
substrate-wasm-builder = { version = "24.0.0", default-features = false }

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ packages required to compile this template - please take note of the Rust compil
4242
🔨 Use the following command to build the node without launching it:
4343

4444
```sh
45-
cargo build --package minimal-template-node --release
45+
cargo build --release
4646
```
4747

4848
🐳 Alternatively, build the docker image:

node/Cargo.toml

Lines changed: 4 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "minimal-template-node"
3-
description = "A minimal Substrate-based Substrate node, ready for hacking. (polkadot v1.15.0)"
3+
description = "A minimal Substrate-based Substrate node, ready for hacking."
44
version = "0.1.0"
55
license = "Unlicense"
66
authors.workspace = true
@@ -20,57 +20,15 @@ futures = { features = ["thread-pool"], workspace = true }
2020
futures-timer = { workspace = true }
2121
jsonrpsee = { features = ["server"], workspace = true }
2222
serde_json = { workspace = true, default-features = true }
23-
sc-cli.workspace = true
24-
sc-cli.default-features = true
25-
sc-executor.workspace = true
26-
sc-executor.default-features = true
27-
sc-network.workspace = true
28-
sc-network.default-features = true
29-
sc-service.workspace = true
30-
sc-service.default-features = true
31-
sc-telemetry.workspace = true
32-
sc-telemetry.default-features = true
33-
sc-transaction-pool.workspace = true
34-
sc-transaction-pool.default-features = true
35-
sc-transaction-pool-api.workspace = true
36-
sc-transaction-pool-api.default-features = true
37-
sc-consensus.workspace = true
38-
sc-consensus.default-features = true
39-
sc-consensus-manual-seal.workspace = true
40-
sc-consensus-manual-seal.default-features = true
41-
sc-rpc-api.workspace = true
42-
sc-rpc-api.default-features = true
43-
sc-basic-authorship.workspace = true
44-
sc-basic-authorship.default-features = true
45-
sc-offchain.workspace = true
46-
sc-offchain.default-features = true
47-
sc-client-api.workspace = true
48-
sc-client-api.default-features = true
49-
sp-timestamp.workspace = true
50-
sp-timestamp.default-features = true
51-
sp-keyring.workspace = true
52-
sp-keyring.default-features = true
53-
sp-api.workspace = true
54-
sp-api.default-features = true
55-
sp-blockchain.workspace = true
56-
sp-blockchain.default-features = true
57-
sp-block-builder.workspace = true
58-
sp-block-builder.default-features = true
59-
sp-io.workspace = true
60-
sp-io.default-features = true
61-
sp-runtime.workspace = true
62-
sp-runtime.default-features = true
63-
substrate-frame-rpc-system.workspace = true
64-
substrate-frame-rpc-system.default-features = true
65-
frame = { features = ["experimental", "runtime"], workspace = true, default-features = true }
23+
polkadot-sdk = { workspace = true, features = ["experimental", "node"] }
6624
minimal-template-runtime.workspace = true
6725

6826
[build-dependencies]
69-
substrate-build-script-utils.workspace = true
70-
substrate-build-script-utils.default-features = true
27+
polkadot-sdk = { workspace = true, features = ["substrate-build-script-utils"] }
7128

7229
[features]
7330
default = ["std"]
7431
std = [
7532
"minimal-template-runtime/std",
33+
"polkadot-sdk/std",
7634
]

node/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,8 @@
1616
initial (genesis) state.
1717
- [`service.rs`](./src/service.rs): This file defines the node implementation.
1818
It's a place to configure consensus-related topics. In favor of minimalism, this template has no consensus configured.
19+
20+
21+
## Release
22+
23+
Polkadot SDK stable2409

node/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// See the License for the specific language governing permissions and
1616
// limitations under the License.
1717

18-
use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
18+
use polkadot_sdk::substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
1919

2020
fn main() {
2121
generate_cargo_keys();

node/src/chain_spec.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@
1616
// limitations under the License.
1717

1818
use minimal_template_runtime::{BalancesConfig, SudoConfig, WASM_BINARY};
19-
use sc_service::{ChainType, Properties};
19+
use polkadot_sdk::{
20+
sc_service::{ChainType, Properties},
21+
sp_keyring::AccountKeyring,
22+
*,
23+
};
2024
use serde_json::{json, Value};
21-
use sp_keyring::AccountKeyring;
2225

2326
/// This is a specialization of the general Substrate ChainSpec type.
2427
pub type ChainSpec = sc_service::GenericChainSpec;
@@ -42,8 +45,8 @@ pub fn development_config() -> Result<ChainSpec, String> {
4245

4346
/// Configure initial storage state for FRAME pallets.
4447
fn testnet_genesis() -> Value {
45-
use frame::traits::Get;
4648
use minimal_template_runtime::interface::{Balance, MinimumBalance};
49+
use polkadot_sdk::polkadot_sdk_frame::traits::Get;
4750
let endowment = <MinimumBalance as Get<Balance>>::get().max(1) * 1000;
4851
let balances = AccountKeyring::iter()
4952
.map(|a| (a.to_account_id(), endowment))

node/src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// See the License for the specific language governing permissions and
1616
// limitations under the License.
1717

18-
use sc_cli::RunCmd;
18+
use polkadot_sdk::{sc_cli::RunCmd, *};
1919

2020
#[derive(Debug, Clone)]
2121
pub enum Consensus {

node/src/command.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ use crate::{
2020
cli::{Cli, Subcommand},
2121
service,
2222
};
23-
use sc_cli::SubstrateCli;
24-
use sc_service::PartialComponents;
25-
26-
#[cfg(feature = "try-runtime")]
27-
use try_runtime_cli::block_building_info::timestamp_with_aura_info;
23+
use polkadot_sdk::{sc_cli::SubstrateCli, sc_service::PartialComponents, *};
2824

2925
impl SubstrateCli for Cli {
3026
fn impl_name() -> String {

node/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ mod command;
2424
mod rpc;
2525
mod service;
2626

27-
fn main() -> sc_cli::Result<()> {
27+
fn main() -> polkadot_sdk::sc_cli::Result<()> {
2828
command::run()
2929
}

0 commit comments

Comments
 (0)