Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade to Polkadot v0.9.25 #381

Merged
merged 1 commit into from
Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,056 changes: 580 additions & 476 deletions Cargo.lock

Large diffs are not rendered by default.

122 changes: 62 additions & 60 deletions nodes/parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name = "kilt-parachain"
path = "src/main.rs"

[build-dependencies]
substrate-build-script-utils = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
substrate-build-script-utils = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}

[dependencies]

Expand All @@ -23,81 +23,82 @@ spiritnet-runtime = {path = "../../runtimes/spiritnet"}
pallet-did-lookup = {path = "../../pallets/pallet-did-lookup"}

# External dependencies
clap = {version = "3.1.18", features = ["derive"]}
codec = {package = "parity-scale-codec", version = "3.1.2"}
clap = {version = "3.2.10", features = ["derive"]}
codec = {package = "parity-scale-codec", version = "3.1.5"}
derive_more = "0.99.17"
futures = {version = "0.3.21", features = ["compat"]}
hex-literal = "0.3.4"
jsonrpsee = {version = "0.13.1", features = ["server"]}
jsonrpsee = {version = "0.14.0", features = ["server"]}
log = "0.4.17"
parking_lot = "0.12.0"
parking_lot = "0.12.1"
serde = {version = "1.0.137", features = ["derive"]}
serde_json = "1.0.79"

# Substrate dependencies
frame-rpc-system = {package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
pallet-transaction-payment-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-basic-authorship = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-chain-spec = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-cli = {git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.24"}
sc-client-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-executor = {git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.24"}
sc-keystore = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-network = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-rpc-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-service = {git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.24"}
sc-sysinfo = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-telemetry = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-tracing = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-transaction-pool-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-block-builder = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-blockchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-consensus-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-core = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-inherents = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-keystore = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-offchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-runtime = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-session = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-timestamp = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
substrate-prometheus-endpoint = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
frame-rpc-system = {package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
pallet-transaction-payment-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sc-basic-authorship = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sc-chain-spec = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sc-cli = {git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.25"}
sc-client-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sc-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sc-executor = {git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.25"}
sc-keystore = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sc-network = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sc-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sc-rpc-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sc-service = {git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.25"}
sc-sysinfo = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sc-telemetry = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sc-tracing = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sc-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sc-transaction-pool-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sp-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sp-block-builder = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sp-blockchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sp-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sp-consensus-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sp-core = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sp-inherents = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sp-keystore = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sp-offchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sp-runtime = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sp-session = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sp-timestamp = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
sp-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
substrate-prometheus-endpoint = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}

# Cumulus dependencies
cumulus-client-cli = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.24"}
cumulus-client-collator = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.24"}
cumulus-client-consensus-aura = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.24"}
cumulus-client-consensus-common = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.24"}
cumulus-client-consensus-relay-chain = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.24"}
cumulus-client-network = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.24"}
cumulus-client-service = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.24"}
cumulus-primitives-core = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.24"}
cumulus-primitives-parachain-inherent = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.24"}
cumulus-relay-chain-inprocess-interface = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.24"}
cumulus-relay-chain-interface = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.24"}
cumulus-relay-chain-rpc-interface = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.24"}
cumulus-client-cli = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}
cumulus-client-collator = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}
cumulus-client-consensus-aura = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}
cumulus-client-consensus-common = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}
cumulus-client-consensus-relay-chain = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}
cumulus-client-network = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}
cumulus-client-service = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}
cumulus-primitives-core = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}
cumulus-primitives-parachain-inherent = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}
cumulus-relay-chain-inprocess-interface = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}
cumulus-relay-chain-interface = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}
cumulus-relay-chain-rpc-interface = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25"}

# Polkadot dependencies
polkadot-cli = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.24"}
polkadot-parachain = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.24"}
polkadot-primitives = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.24"}
polkadot-service = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.24"}
xcm = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.24"}
polkadot-cli = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.25"}
polkadot-parachain = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.25"}
polkadot-primitives = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.25"}
polkadot-service = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.25"}
xcm = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.25"}

# Benchmarking
frame-benchmarking = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
frame-benchmarking-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
frame-benchmarking = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}
frame-benchmarking-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25"}

# Runtime tests
node-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24", optional = true}
pallet-conviction-voting = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24", optional = true}
pallet-referenda = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24", optional = true}
try-runtime-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24", optional = true}
node-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25", optional = true}
pallet-conviction-voting = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25", optional = true}
pallet-ranked-collective = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25", optional = true}
pallet-referenda = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25", optional = true}
try-runtime-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.25", optional = true}

[features]
default = []
Expand All @@ -108,6 +109,7 @@ fast-gov = [
runtime-benchmarks = [
"pallet-conviction-voting/runtime-benchmarks",
"pallet-did-lookup/runtime-benchmarks",
"pallet-ranked-collective/runtime-benchmarks",
"pallet-referenda/runtime-benchmarks",
"polkadot-service/runtime-benchmarks",
"peregrine-runtime/runtime-benchmarks",
Expand Down
61 changes: 11 additions & 50 deletions nodes/parachain/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

// If you feel like getting in touch with us, you can do so at info@botlabs.org

use crate::chain_spec;
use clap::Parser;
use std::{ops::Deref, path::PathBuf};

Expand All @@ -25,14 +24,6 @@ pub(crate) const DEFAULT_RUNTIME: &str = "peregrine";
/// Sub-commands supported by the collator.
#[derive(Debug, Parser)]
pub(crate) enum Subcommand {
/// Export the genesis state of the parachain.
#[clap(name = "export-genesis-state")]
ExportGenesisState(ExportGenesisStateCommand),

/// Export the genesis wasm of the parachain.
#[clap(name = "export-genesis-wasm")]
ExportGenesisWasm(ExportGenesisWasmCommand),

/// Build a chain specification.
BuildSpec(BuildSpecCmd),

Expand All @@ -48,11 +39,17 @@ pub(crate) enum Subcommand {
/// Import blocks.
ImportBlocks(sc_cli::ImportBlocksCmd),

/// Revert the chain to a previous state.
Revert(sc_cli::RevertCmd),

/// Remove the whole chain.
PurgeChain(cumulus_client_cli::PurgeChainCmd),

/// Revert the chain to a previous state.
Revert(sc_cli::RevertCmd),
/// Export the genesis state of the parachain.
ExportGenesisState(cumulus_client_cli::ExportGenesisStateCommand),

/// Export the genesis wasm of the parachain.
ExportGenesisWasm(cumulus_client_cli::ExportGenesisWasmCommand),

/// Sub-commands concerned with benchmarking.
/// The pallet benchmarking moved to the `pallet` sub-command.
Expand Down Expand Up @@ -88,43 +85,7 @@ impl Deref for BuildSpecCmd {
}
}

/// Command for exporting the genesis state of the parachain
#[derive(Debug, Parser)]
pub(crate) struct ExportGenesisStateCommand {
/// Output file name or stdout if unspecified.
#[clap(parse(from_os_str))]
pub(crate) output: Option<PathBuf>,

/// Write output in binary. Default is to write in hex.
#[clap(short, long)]
pub(crate) raw: bool,

/// The name of the chain for that the genesis state should be exported.
#[clap(long)]
pub(crate) chain: Option<String>,

/// The name of the runtime which should get executed.
#[clap(long, default_value = DEFAULT_RUNTIME)]
pub(crate) runtime: String,
}

/// Command for exporting the genesis wasm file.
#[derive(Debug, Parser)]
pub(crate) struct ExportGenesisWasmCommand {
/// Output file name or stdout if unspecified.
#[clap(parse(from_os_str))]
pub(crate) output: Option<PathBuf>,

/// Write output in binary. Default is to write in hex.
#[clap(short, long)]
pub(crate) raw: bool,

/// The name of the chain for that the genesis wasm file should be exported.
#[clap(long)]
pub(crate) chain: Option<String>,
}

#[derive(Debug, Parser)]
#[derive(Debug, clap::Parser)]
#[clap(
propagate_version = true,
args_conflicts_with_subcommands = true,
Expand Down Expand Up @@ -175,13 +136,13 @@ impl RelayChainCli {
para_config: &sc_service::Configuration,
relay_chain_args: impl Iterator<Item = &'a String>,
) -> Self {
let extension = chain_spec::Extensions::try_get(&*para_config.chain_spec);
let extension = crate::chain_spec::Extensions::try_get(&*para_config.chain_spec);
let chain_id = extension.map(|e| e.relay_chain.clone());
let base_path = para_config.base_path.as_ref().map(|x| x.path().join("polkadot"));
Self {
base_path,
chain_id,
base: polkadot_cli::RunCmd::parse_from(relay_chain_args),
base: clap::Parser::parse_from(relay_chain_args),
}
}
}
Loading