mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 02:21:14 +00:00
Fix benchmarks after Parachain Template (#677)
* updates weights * pallet_unique benchmarks added + weights upstream from v4 * benchmarks fix for parachain template
This commit is contained in:
Generated
+721
-794
File diff suppressed because it is too large
Load Diff
@@ -88,7 +88,7 @@ fn register_validators<T: Config + session::Config>(count: u32) {
|
|||||||
let validators = (0..count).map(|c| validator::<T>(c)).collect::<Vec<_>>();
|
let validators = (0..count).map(|c| validator::<T>(c)).collect::<Vec<_>>();
|
||||||
|
|
||||||
for (who, keys) in validators {
|
for (who, keys) in validators {
|
||||||
<session::Module<T>>::set_keys(RawOrigin::Signed(who).into(), keys, vec![]).unwrap();
|
<session::Pallet<T>>::set_keys(RawOrigin::Signed(who).into(), keys, vec![]).unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ benchmarks! {
|
|||||||
let bond: BalanceOf<T> = T::Currency::minimum_balance() * 2u32.into();
|
let bond: BalanceOf<T> = T::Currency::minimum_balance() * 2u32.into();
|
||||||
T::Currency::make_free_balance_be(&caller, bond.clone());
|
T::Currency::make_free_balance_be(&caller, bond.clone());
|
||||||
|
|
||||||
<session::Module<T>>::set_keys(
|
<session::Pallet<T>>::set_keys(
|
||||||
RawOrigin::Signed(caller.clone()).into(),
|
RawOrigin::Signed(caller.clone()).into(),
|
||||||
keys::<T>(c + 1),
|
keys::<T>(c + 1),
|
||||||
vec![]
|
vec![]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
use crate::Module as Template;
|
use crate::Pallet as Template;
|
||||||
use frame_benchmarking::{benchmarks, impl_benchmark_test_suite, whitelisted_caller};
|
use frame_benchmarking::{benchmarks, impl_benchmark_test_suite, whitelisted_caller};
|
||||||
use frame_system::RawOrigin;
|
use frame_system::RawOrigin;
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
|||||||
substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11" }
|
substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11" }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
hex-literal = { version = '0.3.1', optional = true }
|
||||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"]}
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"]}
|
||||||
log = { version = "0.4.14", default-features = false }
|
log = { version = "0.4.14", default-features = false }
|
||||||
scale-info = { version = "1.0.0", default-features = false, features = ["derive"] }
|
scale-info = { version = "1.0.0", default-features = false, features = ["derive"] }
|
||||||
@@ -69,6 +70,7 @@ cumulus-primitives-timestamp = { path = "../../primitives/timestamp", default-fe
|
|||||||
cumulus-primitives-utility = { path = "../../primitives/utility", default-features = false }
|
cumulus-primitives-utility = { path = "../../primitives/utility", default-features = false }
|
||||||
pallet-collator-selection = { path = "../../pallets/collator-selection", default-features = false }
|
pallet-collator-selection = { path = "../../pallets/collator-selection", default-features = false }
|
||||||
parachain-info = { path = "../../polkadot-parachains/pallets/parachain-info", default-features = false }
|
parachain-info = { path = "../../polkadot-parachains/pallets/parachain-info", default-features = false }
|
||||||
|
cumulus-pallet-session-benchmarking = {path = "../../pallets/session-benchmarking", default-features = false, version = "3.0.0"}
|
||||||
|
|
||||||
# Polkadot Dependencies
|
# Polkadot Dependencies
|
||||||
pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.11" }
|
pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.11" }
|
||||||
@@ -130,6 +132,7 @@ std = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
runtime-benchmarks = [
|
runtime-benchmarks = [
|
||||||
|
'hex-literal',
|
||||||
"sp-runtime/runtime-benchmarks",
|
"sp-runtime/runtime-benchmarks",
|
||||||
"xcm-builder/runtime-benchmarks",
|
"xcm-builder/runtime-benchmarks",
|
||||||
"frame-benchmarking",
|
"frame-benchmarking",
|
||||||
@@ -141,4 +144,5 @@ runtime-benchmarks = [
|
|||||||
"pallet-template/runtime-benchmarks",
|
"pallet-template/runtime-benchmarks",
|
||||||
"pallet-timestamp/runtime-benchmarks",
|
"pallet-timestamp/runtime-benchmarks",
|
||||||
"pallet-xcm/runtime-benchmarks",
|
"pallet-xcm/runtime-benchmarks",
|
||||||
|
'cumulus-pallet-session-benchmarking/runtime-benchmarks',
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -770,6 +770,7 @@ impl_runtime_apis! {
|
|||||||
|
|
||||||
list_benchmark!(list, extra, frame_system, SystemBench::<Runtime>);
|
list_benchmark!(list, extra, frame_system, SystemBench::<Runtime>);
|
||||||
list_benchmark!(list, extra, pallet_balances, Balances);
|
list_benchmark!(list, extra, pallet_balances, Balances);
|
||||||
|
list_benchmark!(list, extra, pallet_session, SessionBench::<Runtime>);
|
||||||
list_benchmark!(list, extra, pallet_timestamp, Timestamp);
|
list_benchmark!(list, extra, pallet_timestamp, Timestamp);
|
||||||
list_benchmark!(list, extra, pallet_collator_selection, CollatorSelection);
|
list_benchmark!(list, extra, pallet_collator_selection, CollatorSelection);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user