Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Updated dependencies to 0.9.32 (#120)
Browse files Browse the repository at this point in the history
* Updated dependencies to 0.9.32

* Fix formatting issue

* Fix XCM simulator tests

* removed unnecessary dependency
  • Loading branch information
ayushmishra2005 authored Jan 25, 2023
1 parent 32f273c commit b3e1677
Show file tree
Hide file tree
Showing 22 changed files with 1,737 additions and 1,967 deletions.
2,591 changes: 1,277 additions & 1,314 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ edition = "2021"
targets = ["x86_64-unknown-linux-gnu"]

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

[[bin]]
name = "trappist-collator"
path = "src/main.rs"

[dependencies]
async-trait = "0.1.57"
clap = { version = "3.2.17", features = ["derive"] }
derive_more = "0.99.2"
clap = { version = "4.0.9", features = ["derive"] }
log = "0.4.17"
futures = { version = "0.3.1", features = ["compat"] }
trappist-cli = { path = "cli" }
Expand All @@ -44,4 +43,4 @@ with-trappist-runtime = [
with-base-runtime = [
"trappist-service/with-base-runtime",
"trappist-cli/with-base-runtime",
]
]
60 changes: 29 additions & 31 deletions node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@ build = "build.rs"
targets = ["x86_64-unknown-linux-gnu"]

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

[dependencies]
async-trait = "0.1.57"
clap = { version = "3.2.17", features = ["derive"] }
derive_more = "0.99.2"
clap = { version = "4.0.17", features = ["derive"] }
log = "0.4.17"
codec = { package = "parity-scale-codec", version = "3.0.0" }
serde = { version = "1.0.140", features = ["derive"] }
hex-literal = "0.3.4"
serde = { version = "1.0.145", features = ["derive"] }
futures = { version = "0.3.1", features = ["compat"] }

# RPC related Dependencies
Expand All @@ -33,40 +31,40 @@ trappist-runtime = { path = "../../runtime/trappist" }
base-runtime = { path = "../../runtime/base" }

# Substrate Dependencies
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", optional = true }
try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", optional = true }
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", optional = true }
try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", optional = true }

## Substrate Client Dependencies
sc-cli = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.30", optional = true}
sc-service = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.30", optional = true }
sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sc-cli = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.32", optional = true}
sc-service = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.32", optional = true }
sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }

## Substrate Primitive Dependencies
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" , optional = true}
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" , optional = true}
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }

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

parachains-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.30", default-features = false }
parachains-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32", default-features = false }

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

service = { package = "trappist-service", path = "../service", default-features = false, optional = true }

Expand Down Expand Up @@ -98,4 +96,4 @@ with-trappist-runtime = [
]
with-base-runtime = [
"service/with-base-runtime",
]
]
12 changes: 6 additions & 6 deletions node/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,24 @@ pub enum Subcommand {

/// Sub-commands concerned with benchmarking.
/// The pallet benchmarking moved to the `pallet` sub-command.
#[clap(subcommand)]
#[command(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),

/// Try some testing command against a specified runtime state.
TryRuntime(try_runtime_cli::TryRuntimeCmd),
}

#[derive(Debug, clap::Parser)]
#[clap(
#[command(
propagate_version = true,
args_conflicts_with_subcommands = true,
subcommand_negates_reqs = true
)]
pub struct Cli {
#[clap(subcommand)]
#[command(subcommand)]
pub subcommand: Option<Subcommand>,

#[clap(flatten)]
#[command(flatten)]
pub run: cumulus_client_cli::RunCmd,

/// Disable automatic hardware benchmarks.
Expand All @@ -80,11 +80,11 @@ pub struct Cli {
///
/// The results are then printed out in the logs, and also sent as part of
/// telemetry, if telemetry is enabled.
#[clap(long)]
#[arg(long)]
pub no_hardware_benchmarks: bool,

/// Relay chain arguments
#[clap(raw = true)]
#[arg(raw = true)]
pub relay_chain_args: Vec<String>,
}

Expand Down
35 changes: 13 additions & 22 deletions node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use codec::Encode;
use cumulus_client_cli::generate_genesis_block;
use cumulus_primitives_core::ParaId;
use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};
use log::info;
use log::{info, warn};
use sc_cli::{
ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams,
NetworkParams, Result, RuntimeVersion, SharedParams, SubstrateCli,
Expand All @@ -17,12 +17,12 @@ use sp_core::hexdisplay::HexDisplay;
use sp_runtime::traits::{AccountIdConversion, Block as BlockT};

#[cfg(feature = "with-base-runtime")]
use base_runtime::{Block, RuntimeApi};
use base_runtime::Block;
#[cfg(feature = "with-trappist-runtime")]
use trappist_runtime::{Block, RuntimeApi};
use trappist_runtime::Block;

use crate::cli::{Cli, RelayChainCli, Subcommand};
use service::{chain_spec, new_partial, RuntimeExecutor};
use service::{chain_spec, new_partial, NativeExecutor};

#[cfg(feature = "with-base-runtime")]
use service::chain_spec::base::{
Expand Down Expand Up @@ -123,14 +123,7 @@ macro_rules! construct_async_run {
(|$components:ident, $cli:ident, $cmd:ident, $config:ident| $( $code:tt )* ) => {{
let runner = $cli.create_runner($cmd)?;
runner.async_run(|$config| {
let $components = new_partial::<
RuntimeApi,
RuntimeExecutor,
_
>(
&$config,
service::parachain_build_import_queue,
)?;
let $components = new_partial(&$config)?;
let task_manager = $components.task_manager;
{ $( $code )* }.map(|v| (v, task_manager))
})
Expand Down Expand Up @@ -211,17 +204,14 @@ pub fn run() -> Result<()> {
match cmd {
BenchmarkCmd::Pallet(cmd) =>
if cfg!(feature = "runtime-benchmarks") {
runner.sync_run(|config| cmd.run::<Block, RuntimeExecutor>(config))
runner.sync_run(|config| cmd.run::<Block, NativeExecutor>(config))
} else {
Err("Benchmarking wasn't enabled when building the node. \
You can enable it with `--features runtime-benchmarks`."
.into())
},
BenchmarkCmd::Block(cmd) => runner.sync_run(|config| {
let partials = new_partial::<RuntimeApi, RuntimeExecutor, _>(
&config,
service::parachain_build_import_queue,
)?;
let partials = new_partial(&config)?;
cmd.run(partials.client)
}),
#[cfg(not(feature = "runtime-benchmarks"))]
Expand All @@ -234,10 +224,7 @@ pub fn run() -> Result<()> {
.into()),
#[cfg(feature = "runtime-benchmarks")]
BenchmarkCmd::Storage(cmd) => runner.sync_run(|config| {
let partials = new_partial::<RuntimeApi, RuntimeExecutor, _>(
&config,
service::parachain_build_import_queue,
)?;
let partials = new_partial(&config)?;
let db = partials.backend.expose_db();
let storage = partials.backend.expose_storage();

Expand All @@ -262,7 +249,7 @@ pub fn run() -> Result<()> {
.map_err(|e| format!("Error: {:?}", e))?;

runner.async_run(|config| {
Ok((cmd.run::<Block, RuntimeExecutor>(config), task_manager))
Ok((cmd.run::<Block, NativeExecutor>(config), task_manager))
})
} else {
Err("Try-runtime must be enabled by `--features try-runtime`.".into())
Expand Down Expand Up @@ -311,6 +298,10 @@ pub fn run() -> Result<()> {
info!("Parachain genesis state: {}", genesis_state);
info!("Is collating: {}", if config.role.is_authority() { "yes" } else { "no" });

if collator_options.relay_chain_rpc_url.is_some() && cli.relay_chain_args.len() > 0 {
warn!("Detected relay chain node arguments together with --relay-chain-rpc-url. This command starts a minimal Polkadot node that only uses a network-related subset of all relay chain CLI options.");
}

service::start_parachain_node(
config,
polkadot_config,
Expand Down
Loading

0 comments on commit b3e1677

Please sign in to comment.