diff --git a/Cargo.lock b/Cargo.lock index 8306b74a..87bb9f3b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1088,17 +1088,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" -[[package]] -name = "comfy-table" -version = "7.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" -dependencies = [ - "strum 0.25.0", - "strum_macros 0.25.3", - "unicode-width", -] - [[package]] name = "concurrent-queue" version = "2.3.0" @@ -2595,54 +2584,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "frame-benchmarking-cli" -version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#1036864670acffb8a308908268a6ed3fc4cb7259" -dependencies = [ - "Inflector", - "array-bytes", - "chrono", - "clap", - "comfy-table", - "frame-benchmarking", - "frame-support", - "frame-system", - "gethostname", - "handlebars", - "itertools 0.10.5", - "lazy_static", - "linked-hash-map", - "log", - "parity-scale-codec", - "rand", - "rand_pcg", - "sc-block-builder", - "sc-cli", - "sc-client-api", - "sc-client-db", - "sc-executor", - "sc-service", - "sc-sysinfo", - "serde", - "serde_json", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-database", - "sp-externalities", - "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", - "sp-state-machine", - "sp-storage", - "sp-trie", - "sp-wasm-interface", - "thiserror", - "thousands", -] - [[package]] name = "frame-executive" version = "4.0.0-dev" @@ -3044,16 +2985,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "gethostname" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" -dependencies = [ - "libc", - "windows-targets", -] - [[package]] name = "getrandom" version = "0.2.10" @@ -3155,20 +3086,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "handlebars" -version = "4.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c39b3bc2a8f715298032cf5087e58573809374b08160aa7d750582bdb82d2683" -dependencies = [ - "log", - "pest", - "pest_derive", - "serde", - "serde_json", - "thiserror", -] - [[package]] name = "hash-db" version = "0.16.0" @@ -5721,51 +5638,6 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" -[[package]] -name = "pest" -version = "2.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" -dependencies = [ - "memchr", - "thiserror", - "ucd-trie", -] - -[[package]] -name = "pest_derive" -version = "2.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2" -dependencies = [ - "pest", - "pest_generator", -] - -[[package]] -name = "pest_generator" -version = "2.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227" -dependencies = [ - "pest", - "pest_meta", - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "pest_meta" -version = "2.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" -dependencies = [ - "once_cell", - "pest", - "sha2", -] - [[package]] name = "petgraph" version = "0.6.4" @@ -8338,7 +8210,6 @@ version = "0.1.0" dependencies = [ "clap", "frame-benchmarking", - "frame-benchmarking-cli", "futures", "jsonrpsee", "pallet-transaction-payment-rpc", @@ -9919,12 +9790,6 @@ dependencies = [ "syn 2.0.39", ] -[[package]] -name = "thousands" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" - [[package]] name = "thread_local" version = "1.1.7" @@ -10429,12 +10294,6 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "ucd-trie" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" - [[package]] name = "uint" version = "0.9.5" diff --git a/substrate/node/Cargo.toml b/substrate/node/Cargo.toml index deeb0202..bb57df94 100644 --- a/substrate/node/Cargo.toml +++ b/substrate/node/Cargo.toml @@ -26,7 +26,6 @@ sp-block-builder = { git = "https://github.com/serai-dex/substrate" } sp-consensus-babe = { git = "https://github.com/serai-dex/substrate" } frame-benchmarking = { git = "https://github.com/serai-dex/substrate" } -frame-benchmarking-cli = { git = "https://github.com/serai-dex/substrate" } serai-runtime = { path = "../runtime", features = ["std"] } @@ -60,7 +59,6 @@ substrate-build-script-utils = { git = "https://github.com/serai-dex/substrate" default = [] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", - "frame-benchmarking-cli/runtime-benchmarks", "serai-runtime/runtime-benchmarks", ] diff --git a/substrate/node/src/cli.rs b/substrate/node/src/cli.rs index e8bf2d34..00bc66d1 100644 --- a/substrate/node/src/cli.rs +++ b/substrate/node/src/cli.rs @@ -37,10 +37,6 @@ pub enum Subcommand { // Revert the chain to a previous state Revert(sc_cli::RevertCmd), - // Sub-commands concerned with benchmarking - #[clap(subcommand)] - Benchmark(frame_benchmarking_cli::BenchmarkCmd), - // DB meta columns information ChainInfo(sc_cli::ChainInfoCmd), } diff --git a/substrate/node/src/command.rs b/substrate/node/src/command.rs index 00d20fe2..a6141180 100644 --- a/substrate/node/src/command.rs +++ b/substrate/node/src/command.rs @@ -5,7 +5,6 @@ use serai_runtime::Block; use sc_service::{PruningMode, PartialComponents}; use sc_cli::SubstrateCli; -use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE}; use crate::{ chain_spec, @@ -93,29 +92,6 @@ pub fn run() -> sc_cli::Result<()> { Ok((cmd.run(client, backend, Some(aux_revert)), task_manager)) }), - Some(Subcommand::Benchmark(cmd)) => cli.create_runner(cmd)?.sync_run(|config| match cmd { - BenchmarkCmd::Pallet(cmd) => cmd.run::(config), - - BenchmarkCmd::Block(cmd) => cmd.run(service::new_partial(&config)?.client), - - #[cfg(not(feature = "runtime-benchmarks"))] - BenchmarkCmd::Storage(_) => { - Err("Storage benchmarking can be enabled with `--features runtime-benchmarks`.".into()) - } - - #[cfg(feature = "runtime-benchmarks")] - BenchmarkCmd::Storage(cmd) => { - let PartialComponents { client, backend, .. } = service::new_partial(&config)?; - cmd.run(config, client, backend.expose_db(), backend.expose_storage()) - } - - BenchmarkCmd::Overhead(_) => Err("Overhead benchmarking isn't supported.".into()), - - BenchmarkCmd::Extrinsic(_) => Err("Extrinsic benchmarking isn't supported.".into()), - - BenchmarkCmd::Machine(cmd) => cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone()), - }), - Some(Subcommand::ChainInfo(cmd)) => { cli.create_runner(cmd)?.sync_run(|config| cmd.run::(&config)) }