fix: correct feature gates for storage-benchmark and metadata-hash
- StorageCmd: change cfg from runtime-benchmarks to storage-benchmark - enable_metadata_hash_in_wasm_builder: add cfg(feature = "metadata-hash") gate - Add storage-benchmark feature to pezkuwi-omni-node-lib Cargo.toml - Add metadata-hash feature to pezframe-metadata-hash-extension Cargo.toml These fixes resolve cargo-check-all-benches CI failures.
This commit is contained in:
@@ -66,3 +66,4 @@ serde = []
|
|||||||
experimental = []
|
experimental = []
|
||||||
with-tracing = []
|
with-tracing = []
|
||||||
tuples-96 = []
|
tuples-96 = []
|
||||||
|
metadata-hash = ["bizinikiwi-wasm-builder/metadata-hash"]
|
||||||
|
|||||||
@@ -172,6 +172,9 @@ mod docs {
|
|||||||
type PalletInfo = add_metadata_hash_extension::PalletInfo;
|
type PalletInfo = add_metadata_hash_extension::PalletInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// This function demonstrates how to enable metadata hash in WasmBuilder.
|
||||||
|
/// It is only available when the `metadata-hash` feature is enabled on `bizinikiwi-wasm-builder`.
|
||||||
|
#[cfg(feature = "metadata-hash")]
|
||||||
#[docify::export]
|
#[docify::export]
|
||||||
fn enable_metadata_hash_in_wasm_builder() {
|
fn enable_metadata_hash_in_wasm_builder() {
|
||||||
bizinikiwi_wasm_builder::WasmBuilder::init_with_defaults()
|
bizinikiwi_wasm_builder::WasmBuilder::init_with_defaults()
|
||||||
|
|||||||
@@ -241,6 +241,7 @@ try-runtime = [
|
|||||||
"pezsp-version/try-runtime",
|
"pezsp-version/try-runtime",
|
||||||
"teyrchains-common/try-runtime",
|
"teyrchains-common/try-runtime",
|
||||||
]
|
]
|
||||||
|
storage-benchmark = ["pezframe-benchmarking-cli/storage-benchmark"]
|
||||||
std = [
|
std = [
|
||||||
"bizinikiwi-frame-rpc-system/std",
|
"bizinikiwi-frame-rpc-system/std",
|
||||||
"bizinikiwi-state-trie-migration-rpc/std",
|
"bizinikiwi-state-trie-migration-rpc/std",
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ where
|
|||||||
node.run_benchmark_block_cmd(config, cmd)
|
node.run_benchmark_block_cmd(config, cmd)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
#[cfg(feature = "runtime-benchmarks")]
|
#[cfg(feature = "storage-benchmark")]
|
||||||
BenchmarkCmd::Storage(cmd) => {
|
BenchmarkCmd::Storage(cmd) => {
|
||||||
// The command needs the full node configuration because it uses the node
|
// The command needs the full node configuration because it uses the node
|
||||||
// client and the database API, storage and shared_trie_cache. It requires
|
// client and the database API, storage and shared_trie_cache. It requires
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
use crate::common::spec::BaseNodeSpec;
|
use crate::common::spec::BaseNodeSpec;
|
||||||
use pezcumulus_client_cli::ExportGenesisHeadCommand;
|
use pezcumulus_client_cli::ExportGenesisHeadCommand;
|
||||||
use pezframe_benchmarking_cli::BlockCmd;
|
use pezframe_benchmarking_cli::BlockCmd;
|
||||||
#[cfg(any(feature = "runtime-benchmarks"))]
|
#[cfg(feature = "storage-benchmark")]
|
||||||
use pezframe_benchmarking_cli::StorageCmd;
|
use pezframe_benchmarking_cli::StorageCmd;
|
||||||
use pezsc_cli::{CheckBlockCmd, ExportBlocksCmd, ExportStateCmd, ImportBlocksCmd, RevertCmd};
|
use pezsc_cli::{CheckBlockCmd, ExportBlocksCmd, ExportStateCmd, ImportBlocksCmd, RevertCmd};
|
||||||
use pezsc_service::{Configuration, TaskManager};
|
use pezsc_service::{Configuration, TaskManager};
|
||||||
@@ -71,7 +71,7 @@ pub trait NodeCommandRunner {
|
|||||||
cmd: &BlockCmd,
|
cmd: &BlockCmd,
|
||||||
) -> SyncCmdResult;
|
) -> SyncCmdResult;
|
||||||
|
|
||||||
#[cfg(any(feature = "runtime-benchmarks"))]
|
#[cfg(feature = "storage-benchmark")]
|
||||||
fn run_benchmark_storage_cmd(
|
fn run_benchmark_storage_cmd(
|
||||||
self: Box<Self>,
|
self: Box<Self>,
|
||||||
config: Configuration,
|
config: Configuration,
|
||||||
@@ -146,7 +146,7 @@ where
|
|||||||
cmd.run(partial.client)
|
cmd.run(partial.client)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "runtime-benchmarks"))]
|
#[cfg(feature = "storage-benchmark")]
|
||||||
fn run_benchmark_storage_cmd(
|
fn run_benchmark_storage_cmd(
|
||||||
self: Box<Self>,
|
self: Box<Self>,
|
||||||
config: Configuration,
|
config: Configuration,
|
||||||
|
|||||||
Reference in New Issue
Block a user