mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 22:11:01 +00:00
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
This commit is contained in:
@@ -16,7 +16,7 @@ path = "src/main.rs"
|
||||
[dependencies]
|
||||
clap = { version = "3.1", features = ["derive"] }
|
||||
derive_more = "0.99.2"
|
||||
log = "0.4.14"
|
||||
log = "0.4.16"
|
||||
codec = { package = "parity-scale-codec", version = "3.0.0" }
|
||||
serde = { version = "1.0.132", features = ["derive"] }
|
||||
hex-literal = "0.3.4"
|
||||
|
||||
@@ -34,8 +34,9 @@ pub enum Subcommand {
|
||||
/// Revert the chain to a previous state.
|
||||
Revert(sc_cli::RevertCmd),
|
||||
|
||||
/// The custom benchmark subcommmand benchmarking runtime pallets.
|
||||
#[clap(name = "benchmark", about = "Benchmark runtime pallets.")]
|
||||
/// Sub-commands concerned with benchmarking.
|
||||
/// The pallet benchmarking moved to the `pallet` sub-command.
|
||||
#[clap(subcommand)]
|
||||
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
|
||||
|
||||
/// Try some testing command against a specified runtime state.
|
||||
|
||||
@@ -6,6 +6,7 @@ use crate::{
|
||||
use codec::Encode;
|
||||
use cumulus_client_service::genesis::generate_genesis_block;
|
||||
use cumulus_primitives_core::ParaId;
|
||||
use frame_benchmarking_cli::BenchmarkCmd;
|
||||
use log::info;
|
||||
use parachain_template_runtime::{Block, RuntimeApi};
|
||||
use polkadot_parachain::primitives::AccountIdConversion;
|
||||
@@ -184,7 +185,7 @@ pub fn run() -> Result<()> {
|
||||
},
|
||||
Some(Subcommand::Revert(cmd)) => {
|
||||
construct_async_run!(|components, cli, cmd, config| {
|
||||
Ok(cmd.run(components.client, components.backend))
|
||||
Ok(cmd.run(components.client, components.backend, None))
|
||||
})
|
||||
},
|
||||
Some(Subcommand::ExportGenesisState(params)) => {
|
||||
@@ -231,16 +232,38 @@ pub fn run() -> Result<()> {
|
||||
|
||||
Ok(())
|
||||
},
|
||||
Some(Subcommand::Benchmark(cmd)) =>
|
||||
if cfg!(feature = "runtime-benchmarks") {
|
||||
let runner = cli.create_runner(cmd)?;
|
||||
Some(Subcommand::Benchmark(cmd)) => {
|
||||
let runner = cli.create_runner(cmd)?;
|
||||
// Switch on the concrete benchmark sub-command-
|
||||
match cmd {
|
||||
BenchmarkCmd::Pallet(cmd) =>
|
||||
if cfg!(feature = "runtime-benchmarks") {
|
||||
runner.sync_run(|config| cmd.run::<Block, TemplateRuntimeExecutor>(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, TemplateRuntimeExecutor, _>(
|
||||
&config,
|
||||
crate::service::parachain_build_import_queue,
|
||||
)?;
|
||||
cmd.run(partials.client)
|
||||
}),
|
||||
BenchmarkCmd::Storage(cmd) => runner.sync_run(|config| {
|
||||
let partials = new_partial::<RuntimeApi, TemplateRuntimeExecutor, _>(
|
||||
&config,
|
||||
crate::service::parachain_build_import_queue,
|
||||
)?;
|
||||
let db = partials.backend.expose_db();
|
||||
let storage = partials.backend.expose_storage();
|
||||
|
||||
runner.sync_run(|config| cmd.run::<Block, TemplateRuntimeExecutor>(config))
|
||||
} else {
|
||||
Err("Benchmarking wasn't enabled when building the node. \
|
||||
You can enable it with `--features runtime-benchmarks`."
|
||||
.into())
|
||||
},
|
||||
cmd.run(config, partials.client.clone(), db, storage)
|
||||
}),
|
||||
BenchmarkCmd::Overhead(_) => Err("Unsupported benchmarking command".into()),
|
||||
}
|
||||
},
|
||||
Some(Subcommand::TryRuntime(cmd)) => {
|
||||
if cfg!(feature = "try-runtime") {
|
||||
let runner = cli.create_runner(cmd)?;
|
||||
|
||||
@@ -17,8 +17,8 @@ substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", bran
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
|
||||
hex-literal = { version = "0.3.4", optional = true }
|
||||
log = { version = "0.4.14", default-features = false }
|
||||
scale-info = { version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
log = { version = "0.4.16", default-features = false }
|
||||
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
|
||||
serde = { version = "1.0.132", optional = true, features = ["derive"] }
|
||||
smallvec = "1.6.1"
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ use frame_support::{
|
||||
construct_runtime, parameter_types,
|
||||
traits::Everything,
|
||||
weights::{
|
||||
constants::WEIGHT_PER_SECOND, DispatchClass, Weight, WeightToFeeCoefficient,
|
||||
WeightToFeeCoefficients, WeightToFeePolynomial,
|
||||
constants::WEIGHT_PER_SECOND, ConstantMultiplier, DispatchClass, Weight,
|
||||
WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial,
|
||||
},
|
||||
PalletId,
|
||||
};
|
||||
@@ -354,8 +354,8 @@ parameter_types! {
|
||||
|
||||
impl pallet_transaction_payment::Config for Runtime {
|
||||
type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
|
||||
type TransactionByteFee = TransactionByteFee;
|
||||
type WeightToFee = WeightToFee;
|
||||
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
|
||||
type FeeMultiplierUpdate = SlowAdjustingFeeUpdate<Self>;
|
||||
type OperationalFeeMultiplier = OperationalFeeMultiplier;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user