Skip to content

Commit

Permalink
update Polkadot v0.9.32 (#1043)
Browse files Browse the repository at this point in the history
* update deps to polkaodt-v0.9.31

* update node cli

* fix some test code

* update to polkadot-v0.9.32

* fix buuld benchmark failed and run test failed issues

* fix node code

* [benchmarking bot] Auto commit generated weights files (#1046)

Co-authored-by: Chengcheng Shi <chengcheng@litentry.com>
  • Loading branch information
Marky-Shi and Chengcheng Shi authored Dec 1, 2022
1 parent 7dbd2f7 commit 01ab120
Show file tree
Hide file tree
Showing 95 changed files with 3,237 additions and 3,363 deletions.
1,949 changes: 969 additions & 980 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions mock-tee-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ hex = { version = "0.4.3", default-features = false, optional = true }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }

parentchain-primitives = { package = "primitives", path = "../primitives", default-features = false }

Expand Down
111 changes: 57 additions & 54 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ targets = ['x86_64-unknown-linux-gnu']

[dependencies]
async-trait = "0.1.57"
clap = { version = "3.2", features = ["derive"] }
clap = { version = "4.0.17", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "3.0.0" }
futures = { version = "0.3.24", features = ["compat"] }
hex-literal = "0.3.4"
Expand All @@ -26,69 +26,70 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

# Substrate dependencies
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
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-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", features = ["wasmtime"] }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", features = ["wasmtime"] }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", features = ["wasmtime"] }
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" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }

# RPC related dependencies
frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
jsonrpsee = "0.15.1"
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-transaction-pool-api = { 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-collator = { 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-common = { 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-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-collator = { 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-common = { 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-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-minimal-node = { 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" }

# 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" }
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, 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" }
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.32" }

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

# TryRuntime
try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }

# Local dependencies
litentry-parachain-runtime = { path = "../runtime/litentry" }
Expand All @@ -97,7 +98,7 @@ primitives = { path = "../primitives" }
rococo-parachain-runtime = { path = "../runtime/rococo" }

[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" }

[features]
default = []
Expand All @@ -111,12 +112,14 @@ runtime-benchmarks = [
"litmus-parachain-runtime/runtime-benchmarks",
"rococo-parachain-runtime/runtime-benchmarks",
"polkadot-service/runtime-benchmarks",
"polkadot-cli/runtime-benchmarks",
]
try-runtime = [
"litentry-parachain-runtime/try-runtime",
"litmus-parachain-runtime/try-runtime",
"rococo-parachain-runtime/try-runtime",
"polkadot-service/try-runtime",
"polkadot-cli/try-runtime",
]
# allow workers to register without remote attestation for dev purposes
# currently only available on litmus and rococo
Expand Down
16 changes: 8 additions & 8 deletions node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,29 +51,29 @@ pub enum Subcommand {
Revert(sc_cli::RevertCmd),

/// Key management cli utilities
#[clap(subcommand)]
#[command(subcommand)]
Key(sc_cli::KeySubcommand),

/// 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, Parser)]
#[clap(
#[derive(Debug, clap::Parser)]
#[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 @@ -83,11 +83,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, conflicts_with = "relay-chain-rpc-url")]
#[arg(raw = true, conflicts_with = "relay-chain-rpc-url")]
pub relay_chain_args: Vec<String>,
}

Expand Down
5 changes: 4 additions & 1 deletion node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use crate::{
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 Down Expand Up @@ -480,6 +480,9 @@ 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.is_empty() {
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.");
}
if config.chain_spec.is_litmus() {
crate::service::start_node::<litmus_parachain_runtime::RuntimeApi>(
config,
Expand Down
Loading

0 comments on commit 01ab120

Please sign in to comment.