Skip to content

Commit 0fd934b

Browse files
Updated repository url and branch to v1.3.0 for all polkadot related dependencies. Added cumulus-client-collator and cumulus-client-consensus-proposer debendencies to the node crate. Updated all hashed pallet dependencies to use the v1.3.0 branch. Updated the runtime-benchmark features for the node crate. Updated the try-runtime features for the node crate. Updated the node cli file. Updated the node commmand file. Updated the node service file. Added polkadot-parachain-primitives as dependency for the runtime crate. Added Hash to the opaque types of the runtime. Added the RuntimeFreezeReason type to the pallet balances configuration. Added ConsensusHook type to the cumulus_pallet_parachain_system configuration. Added PriceForSiblingDelivery type to the cumulus_pallet_xcmp_queue configuration. Added SlotDuration type to the aura pallet configuration. Added AssetKind, Beneficiary, BeneficiaryLookup, Paymaster, BalanceConverter and PayoutPeriod types to the treasury pallet configuration. Added IdentityInformation type to the indentity pallet configuration. Updated the xcm_config runtime file.
1 parent c1c8839 commit 0fd934b

File tree

9 files changed

+2063
-1255
lines changed

9 files changed

+2063
-1255
lines changed

Cargo.lock

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

node/Cargo.toml

Lines changed: 55 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ edition = "2021"
1010
build = "build.rs"
1111

1212
[dependencies]
13-
clap = { version = "4.3.12", features = ["derive"] }
14-
log = "0.4.19"
13+
clap = { version = "4.4.6", features = ["derive"] }
14+
log = "0.4.20"
1515
codec = { package = "parity-scale-codec", version = "3.0.0" }
16-
serde = { version = "1.0.171", features = ["derive"] }
16+
serde = { version = "1.0.188", features = ["derive"] }
1717
jsonrpsee = { version = "0.16.2", features = ["server"] }
1818
futures = "0.3.28"
1919
hex-literal = { version = "0.4.1" }
@@ -24,63 +24,71 @@ smallvec = "1.11.0"
2424
hashed-parachain-runtime = { path = "../runtime" }
2525

2626
# Substrate
27-
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
28-
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
29-
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
30-
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
31-
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
32-
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
33-
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
34-
sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
35-
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
36-
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
37-
sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
38-
sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
39-
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
40-
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
41-
sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
42-
sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
43-
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
44-
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
45-
sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
46-
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
47-
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
48-
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
49-
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
50-
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
51-
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
52-
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
53-
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
54-
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
55-
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
56-
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
57-
try-runtime-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v1.0.0" }
27+
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
28+
frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
29+
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
30+
sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
31+
sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
32+
sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
33+
sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
34+
sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
35+
sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
36+
sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
37+
sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
38+
sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
39+
sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
40+
sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
41+
sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
42+
sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
43+
sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
44+
sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
45+
sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
46+
sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
47+
sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
48+
sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
49+
sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
50+
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
51+
sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
52+
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
53+
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
54+
sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
55+
substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
56+
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
57+
try-runtime-cli = { git = "https://github.com/paritytech/polkadot-sdk", optional = true, branch = "release-polkadot-v1.3.0" }
5858

5959
# Polkadot
60-
polkadot-cli = { git = "https://github.com/paritytech/polkadot", features = ["rococo-native"], branch = "release-v1.0.0" }
61-
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v1.0.0" }
62-
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v1.0.0" }
60+
polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", features = ["rococo-native"], branch = "release-polkadot-v1.3.0" }
61+
polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
62+
xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.3.0" }
6363

6464
# Cumulus
65-
cumulus-client-cli = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v1.0.0" }
66-
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v1.0.0" }
67-
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v1.0.0" }
68-
cumulus-client-service = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v1.0.0" }
69-
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v1.0.0" }
70-
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v1.0.0" }
71-
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v1.0.0" }
65+
cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
66+
cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
67+
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
68+
cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
69+
cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
70+
cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
71+
cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
72+
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
73+
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
7274
color-print = "0.3.4"
7375

7476
[build-dependencies]
75-
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
77+
substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0" }
7678

7779
[features]
7880
default = []
7981
runtime-benchmarks = [
8082
"hashed-parachain-runtime/runtime-benchmarks",
83+
"frame-benchmarking-cli/runtime-benchmarks",
84+
"frame-benchmarking/runtime-benchmarks",
8185
"polkadot-cli/runtime-benchmarks",
86+
"polkadot-primitives/runtime-benchmarks",
87+
"sc-service/runtime-benchmarks",
88+
"sp-runtime/runtime-benchmarks",
8289
]
8390
try-runtime = [
84-
"try-runtime-cli/try-runtime",
85-
"hashed-parachain-runtime/try-runtime"
91+
"hashed-parachain-runtime/try-runtime",
92+
"polkadot-cli/try-runtime",
93+
"sp-runtime/try-runtime",
8694
]

node/src/cli.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,9 @@ pub enum Subcommand {
3535
#[command(subcommand)]
3636
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
3737

38-
/// Try some testing command against a specified runtime state.
39-
#[cfg(feature = "try-runtime")]
40-
TryRuntime(try_runtime_cli::TryRuntimeCmd),
41-
42-
/// Errors since the binary was not build with `--features try-runtime`.
43-
#[cfg(not(feature = "try-runtime"))]
38+
/// Try-runtime has migrated to a standalone
39+
/// [CLI](<https://github.com/paritytech/try-runtime-cli>). The subcommand exists as a stub and
40+
/// deprecation notice. It will be removed entirely some time after Janurary 2024.
4441
TryRuntime,
4542
}
4643

node/src/command.rs

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
use std::net::SocketAddr;
22

3-
43
use cumulus_primitives_core::ParaId;
54
use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};
5+
use log::info;
66
use hashed_parachain_runtime::Block;
7-
use log::{info, warn};
87
use sc_cli::{
98
ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams,
109
NetworkParams, Result, SharedParams, SubstrateCli,
1110
};
1211
use sc_service::config::{BasePath, PrometheusConfig};
13-
use sp_runtime::traits::{AccountIdConversion};
12+
use sp_runtime::traits::AccountIdConversion;
1413

1514
use crate::{
1615
chain_spec,
@@ -63,7 +62,6 @@ impl SubstrateCli for Cli {
6362
fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
6463
load_spec(id)
6564
}
66-
6765
}
6866

6967
impl SubstrateCli for RelayChainCli {
@@ -220,32 +218,7 @@ pub fn run() -> Result<()> {
220218
_ => Err("Benchmarking sub-command unsupported".into()),
221219
}
222220
},
223-
#[cfg(feature = "try-runtime")]
224-
Some(Subcommand::TryRuntime(cmd)) => {
225-
use parachain_template_runtime::MILLISECS_PER_BLOCK;
226-
use try_runtime_cli::block_building_info::timestamp_with_aura_info;
227-
228-
let runner = cli.create_runner(cmd)?;
229-
230-
type HostFunctions =
231-
(sp_io::SubstrateHostFunctions, frame_benchmarking::benchmarking::HostFunctions);
232-
233-
// grab the task manager.
234-
let registry = &runner.config().prometheus_config.as_ref().map(|cfg| &cfg.registry);
235-
let task_manager =
236-
sc_service::TaskManager::new(runner.config().tokio_handle.clone(), *registry)
237-
.map_err(|e| format!("Error: {:?}", e))?;
238-
239-
let info_provider = timestamp_with_aura_info(MILLISECS_PER_BLOCK);
240-
241-
runner.async_run(|_| {
242-
Ok((cmd.run::<Block, HostFunctions, _>(Some(info_provider)), task_manager))
243-
})
244-
},
245-
#[cfg(not(feature = "try-runtime"))]
246-
Some(Subcommand::TryRuntime) => Err("Try-runtime was not enabled when building the node. \
247-
You can enable it with `--features try-runtime`."
248-
.into()),
221+
Some(Subcommand::TryRuntime) => Err("The `try-runtime` subcommand has been migrated to a standalone CLI (https://github.com/paritytech/try-runtime-cli). It is no longer being maintained here and will be removed entirely some time after January 2024. Please remove this subcommand from your runtime and use the standalone CLI.".into()),
249222
None => {
250223
let runner = cli.create_runner(&cli.run.normalize())?;
251224
let collator_options = cli.run.collator_options();
@@ -282,16 +255,6 @@ pub fn run() -> Result<()> {
282255
info!("Parachain Account: {parachain_account}");
283256
info!("Is collating: {}", if config.role.is_authority() { "yes" } else { "no" });
284257

285-
if !collator_options.relay_chain_rpc_urls.is_empty() &&
286-
!cli.relay_chain_args.is_empty()
287-
{
288-
warn!(
289-
"Detected relay chain node arguments together with --relay-chain-rpc-url. \
290-
This command starts a minimal Polkadot node that only uses a \
291-
network-related subset of all relay chain CLI options."
292-
);
293-
}
294-
295258
crate::service::start_parachain_node(
296259
config,
297260
polkadot_config,

0 commit comments

Comments
 (0)