Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Whitelist from benchmarking XCM storage keys read each block #6871

Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f21e3ef
Whitelist from benchmarking XCM storage keys read each block
franciscoaguirre Mar 8, 2023
6c5c8db
".git/.scripts/commands/bench/bench.sh" runtime polkadot pallet_xcm
Mar 13, 2023
f93c640
Merge branch 'master' of https://github.com/paritytech/polkadot into …
Mar 13, 2023
6ab6612
".git/.scripts/commands/bench/bench.sh" runtime polkadot pallet_xcm
Mar 13, 2023
c8f288d
".git/.scripts/commands/bench/bench.sh" runtime westend pallet_xcm
Mar 13, 2023
5abcb3c
Merge branch 'master' of https://github.com/paritytech/polkadot into …
Mar 13, 2023
4249c19
".git/.scripts/commands/bench/bench.sh" runtime rococo pallet_xcm
Mar 13, 2023
a97194f
Remove XcmPallet SupportedVersion from the benchmark whitelist
franciscoaguirre Mar 15, 2023
ad9c58f
Merge branch 'master' of https://github.com/paritytech/polkadot into …
Mar 15, 2023
d0a78a2
".git/.scripts/commands/bench/bench.sh" runtime polkadot pallet_xcm
Mar 15, 2023
61b12f4
Merge branch 'master' of https://github.com/paritytech/polkadot into …
Mar 15, 2023
3e8d4c5
".git/.scripts/commands/bench/bench.sh" runtime kusama pallet_xcm
Mar 15, 2023
6d9648e
Merge branch 'master' of https://github.com/paritytech/polkadot into …
Mar 15, 2023
db5798a
".git/.scripts/commands/bench/bench.sh" runtime westend pallet_xcm
Mar 15, 2023
f6b9fed
Merge branch 'master' of https://github.com/paritytech/polkadot into …
Mar 15, 2023
9655bf1
".git/.scripts/commands/bench/bench.sh" runtime rococo pallet_xcm
Mar 15, 2023
a68e3ec
Merge remote-tracking branch 'origin/master' into cisco-whitelist-xcm…
Mar 15, 2023
8fded20
WIP
franciscoaguirre Mar 16, 2023
6bdc093
Merge branch 'master' into cisco-whitelist-xcm-storage
franciscoaguirre Apr 4, 2023
aa80b22
Add necessary traits, remove unnecessary whitelisted keys
franciscoaguirre Apr 8, 2023
1861356
Merge branch 'master' into cisco-whitelist-xcm-storage
franciscoaguirre Jun 13, 2023
344c283
Fix tests
franciscoaguirre Jun 13, 2023
f982eac
Remove unused file
franciscoaguirre Jun 13, 2023
30287f7
Remove unused import
franciscoaguirre Jun 14, 2023
79ba68a
Merge branch 'cisco-polkadot-xcm-weight-info-bound' into cisco-whitel…
franciscoaguirre Jun 23, 2023
091bf08
Merge remote-tracking branch 'origin/cisco-polkadot-xcm-weight-info-b…
Jul 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2104,6 +2104,10 @@ sp_api::impl_runtime_apis! {
hex_literal::hex!("06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385").to_vec().into(),
// The transactional storage limit.
hex_literal::hex!("3a7472616e73616374696f6e5f6c6576656c3a").to_vec().into(),
// XcmPallet VersionDiscoveryQueue
hex_literal::hex!("1405f2411d0af5a7ff397e7c9dc68d194a222ba0333561192e474c59ed8e30e1").to_vec().into(),
KiChjang marked this conversation as resolved.
Show resolved Hide resolved
// XcmPallet SafeXcmVersion
hex_literal::hex!("1405f2411d0af5a7ff397e7c9dc68d196323ae84c43568be0d1394d5d0d522c4").to_vec().into(),
franciscoaguirre marked this conversation as resolved.
Show resolved Hide resolved
];

franciscoaguirre marked this conversation as resolved.
Show resolved Hide resolved
let mut batches = Vec::<BenchmarkBatch>::new();
Expand Down
175 changes: 77 additions & 98 deletions runtime/kusama/src/weights/pallet_xcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,24 @@
//! Autogenerated weights for `pallet_xcm`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-02-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-03-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024

// Executed Command:
// ./target/production/polkadot
// target/production/polkadot
// benchmark
// pallet
// --chain=kusama-dev
// --steps=50
// --repeat=20
// --pallet=pallet_xcm
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/polkadot/.git/.artifacts/bench.json
// --pallet=pallet_xcm
// --chain=kusama-dev
// --header=./file_header.txt
// --output=./runtime/kusama/src/weights/

Expand All @@ -47,46 +49,42 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
fn send() -> Weight {
// Proof Size summary in bytes:
// Measured: `211`
// Estimated: `9470`
// Minimum execution time: 32_654 nanoseconds.
Weight::from_parts(33_637_000, 0)
.saturating_add(Weight::from_parts(0, 9470))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(3))
// Measured: `42`
// Estimated: `10521`
// Minimum execution time: 30_029_000 picoseconds.
Weight::from_parts(30_680_000, 0)
.saturating_add(Weight::from_parts(0, 10521))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
fn teleport_assets() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 20_880 nanoseconds.
Weight::from_parts(21_414_000, 0)
// Minimum execution time: 22_239_000 picoseconds.
Weight::from_parts(22_397_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn reserve_transfer_assets() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 20_092 nanoseconds.
Weight::from_parts(20_469_000, 0)
// Minimum execution time: 21_123_000 picoseconds.
Weight::from_parts(21_552_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn execute() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 9_530 nanoseconds.
Weight::from_parts(9_860_000, 0)
// Minimum execution time: 10_687_000 picoseconds.
Weight::from_parts(10_925_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: XcmPallet SupportedVersion (r:0 w:1)
Expand All @@ -95,32 +93,25 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 9_614 nanoseconds.
Weight::from_parts(9_843_000, 0)
// Minimum execution time: 10_424_000 picoseconds.
Weight::from_parts(10_682_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: XcmPallet SafeXcmVersion (r:0 w:1)
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
fn force_default_xcm_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_572 nanoseconds.
Weight::from_parts(2_799_000, 0)
// Minimum execution time: 3_046_000 picoseconds.
Weight::from_parts(3_255_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: XcmPallet VersionNotifiers (r:1 w:1)
/// Proof Skipped: XcmPallet VersionNotifiers (max_values: None, max_size: None, mode: Measured)
/// Storage: XcmPallet QueryCounter (r:1 w:1)
/// Proof Skipped: XcmPallet QueryCounter (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
Expand All @@ -129,22 +120,18 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
/// Proof Skipped: XcmPallet Queries (max_values: None, max_size: None, mode: Measured)
fn force_subscribe_version_notify() -> Weight {
// Proof Size summary in bytes:
// Measured: `211`
// Estimated: `13073`
// Minimum execution time: 36_553 nanoseconds.
Weight::from_parts(37_631_000, 0)
.saturating_add(Weight::from_parts(0, 13073))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(6))
// Measured: `42`
// Estimated: `15597`
// Minimum execution time: 33_828_000 picoseconds.
Weight::from_parts(34_081_000, 0)
.saturating_add(Weight::from_parts(0, 15597))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: XcmPallet VersionNotifiers (r:1 w:1)
/// Proof Skipped: XcmPallet VersionNotifiers (max_values: None, max_size: None, mode: Measured)
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
Expand All @@ -153,114 +140,106 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
/// Proof Skipped: XcmPallet Queries (max_values: None, max_size: None, mode: Measured)
fn force_unsubscribe_version_notify() -> Weight {
// Proof Size summary in bytes:
// Measured: `483`
// Estimated: `14271`
// Minimum execution time: 39_477 nanoseconds.
Weight::from_parts(40_134_000, 0)
.saturating_add(Weight::from_parts(0, 14271))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(5))
// Measured: `187`
// Estimated: `14795`
// Minimum execution time: 35_090_000 picoseconds.
Weight::from_parts(35_601_000, 0)
.saturating_add(Weight::from_parts(0, 14795))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: XcmPallet SupportedVersion (r:4 w:2)
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
fn migrate_supported_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `229`
// Estimated: `10129`
// Minimum execution time: 16_354 nanoseconds.
Weight::from_parts(16_766_000, 0)
.saturating_add(Weight::from_parts(0, 10129))
// Measured: `26`
// Estimated: `10916`
// Minimum execution time: 14_679_000 picoseconds.
Weight::from_parts(15_068_000, 0)
.saturating_add(Weight::from_parts(0, 10916))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: XcmPallet VersionNotifiers (r:4 w:2)
/// Proof Skipped: XcmPallet VersionNotifiers (max_values: None, max_size: None, mode: Measured)
fn migrate_version_notifiers() -> Weight {
// Proof Size summary in bytes:
// Measured: `233`
// Estimated: `10133`
// Minimum execution time: 16_054 nanoseconds.
Weight::from_parts(16_663_000, 0)
.saturating_add(Weight::from_parts(0, 10133))
// Measured: `30`
// Estimated: `10920`
// Minimum execution time: 14_620_000 picoseconds.
Weight::from_parts(25_374_000, 0)
.saturating_add(Weight::from_parts(0, 10920))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: XcmPallet VersionNotifyTargets (r:5 w:0)
/// Proof Skipped: XcmPallet VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
fn already_notified_target() -> Weight {
// Proof Size summary in bytes:
// Measured: `243`
// Estimated: `12618`
// Minimum execution time: 18_607 nanoseconds.
Weight::from_parts(19_085_000, 0)
.saturating_add(Weight::from_parts(0, 12618))
// Measured: `40`
// Estimated: `13405`
// Minimum execution time: 15_649_000 picoseconds.
Weight::from_parts(16_035_000, 0)
.saturating_add(Weight::from_parts(0, 13405))
.saturating_add(T::DbWeight::get().reads(5))
}
/// Storage: XcmPallet VersionNotifyTargets (r:2 w:1)
/// Proof Skipped: XcmPallet VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
fn notify_current_targets() -> Weight {
// Proof Size summary in bytes:
// Measured: `281`
// Estimated: `15051`
// Minimum execution time: 33_703 nanoseconds.
Weight::from_parts(34_331_000, 0)
.saturating_add(Weight::from_parts(0, 15051))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
// Measured: `78`
// Estimated: `16647`
// Minimum execution time: 30_966_000 picoseconds.
Weight::from_parts(31_587_000, 0)
.saturating_add(Weight::from_parts(0, 16647))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: XcmPallet VersionNotifyTargets (r:3 w:0)
/// Proof Skipped: XcmPallet VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
fn notify_target_migration_fail() -> Weight {
// Proof Size summary in bytes:
// Measured: `272`
// Estimated: `7697`
// Minimum execution time: 8_596 nanoseconds.
Weight::from_parts(8_843_000, 0)
.saturating_add(Weight::from_parts(0, 7697))
// Measured: `69`
// Estimated: `8484`
// Minimum execution time: 9_228_000 picoseconds.
Weight::from_parts(9_451_000, 0)
.saturating_add(Weight::from_parts(0, 8484))
.saturating_add(T::DbWeight::get().reads(3))
}
/// Storage: XcmPallet VersionNotifyTargets (r:4 w:2)
/// Proof Skipped: XcmPallet VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
fn migrate_version_notify_targets() -> Weight {
// Proof Size summary in bytes:
// Measured: `240`
// Estimated: `10140`
// Minimum execution time: 16_717 nanoseconds.
Weight::from_parts(17_265_000, 0)
.saturating_add(Weight::from_parts(0, 10140))
// Measured: `37`
// Estimated: `10927`
// Minimum execution time: 15_129_000 picoseconds.
Weight::from_parts(15_698_000, 0)
.saturating_add(Weight::from_parts(0, 10927))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: XcmPallet VersionNotifyTargets (r:4 w:2)
/// Proof Skipped: XcmPallet VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
fn migrate_and_notify_old_targets() -> Weight {
// Proof Size summary in bytes:
// Measured: `285`
// Estimated: `20025`
// Minimum execution time: 40_617 nanoseconds.
Weight::from_parts(41_066_000, 0)
.saturating_add(Weight::from_parts(0, 20025))
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(5))
// Measured: `82`
// Estimated: `21613`
// Minimum execution time: 37_921_000 picoseconds.
Weight::from_parts(38_728_000, 0)
.saturating_add(Weight::from_parts(0, 21613))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
}
}
4 changes: 4 additions & 0 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2142,6 +2142,10 @@ sp_api::impl_runtime_apis! {
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),
// Treasury Account
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da95ecffd7b6c0f78751baa9d281e0bfa3a6d6f646c70792f74727372790000000000000000000000000000000000000000").to_vec().into(),
franciscoaguirre marked this conversation as resolved.
Show resolved Hide resolved
// XcmPallet VersionDiscoveryQueue
hex_literal::hex!("1405f2411d0af5a7ff397e7c9dc68d194a222ba0333561192e474c59ed8e30e1").to_vec().into(),
// XcmPallet SafeXcmVersion
hex_literal::hex!("1405f2411d0af5a7ff397e7c9dc68d196323ae84c43568be0d1394d5d0d522c4").to_vec().into(),
];

let mut batches = Vec::<BenchmarkBatch>::new();
Expand Down
Loading