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

Change Fixed to WeightInfoBounds for Polkadot #7077

Merged
merged 67 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
6d2241f
Add polkadot XCM benchmarks
franciscoaguirre Apr 13, 2023
5135506
Add temp
franciscoaguirre Apr 13, 2023
557fa67
".git/.scripts/commands/bench/bench.sh" xcm polkadot pallet_xcm_bench…
Apr 13, 2023
4e7bc94
".git/.scripts/commands/bench/bench.sh" xcm polkadot pallet_xcm_bench…
Apr 13, 2023
477387c
Add weights to XCM on Polkadot
franciscoaguirre Apr 14, 2023
c82f5cc
Make CI fail on old files
ggwpez Apr 14, 2023
71983ac
Update template
ggwpez Apr 14, 2023
0113fd4
Add reserve_asset_deposited benchmark
franciscoaguirre Apr 14, 2023
7921a15
Merge branch 'oty-update-xcm-weights' into cisco-polkadot-xcm-weight-…
franciscoaguirre Apr 14, 2023
c7e31e2
".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchma…
Apr 14, 2023
7f4243e
Update weights
ggwpez Apr 14, 2023
6401da3
Change initiate_reserve_deposit in runtime weights
franciscoaguirre Apr 14, 2023
ad68740
Update weights
ggwpez Apr 14, 2023
47f82dd
Remove trusted reserves from runtimes
franciscoaguirre Apr 14, 2023
98fab3e
Fix pallet-xcm-benchmarks mock
franciscoaguirre Apr 14, 2023
8e9a998
Fix test
franciscoaguirre Apr 14, 2023
5a01b34
Change pallet xcm weigher in kusama
franciscoaguirre Apr 14, 2023
3d31f4c
Fix
franciscoaguirre Apr 14, 2023
b0f706f
Merge branch 'master' into cisco-polkadot-xcm-weight-info-bound
KiChjang May 3, 2023
33621de
Merge branch 'master' into cisco-polkadot-xcm-weight-info-bound
franciscoaguirre Jun 7, 2023
58241ba
Remove merge conflict artifact
franciscoaguirre Jun 7, 2023
8271b99
Remove initiate_reserve_withdraw from generic benchmarks
franciscoaguirre Jun 7, 2023
6af0b3b
Add missing implementation to XCM benchmark
franciscoaguirre Jun 7, 2023
c705e15
Fix failing karura test
franciscoaguirre Jun 7, 2023
6a81593
Remove dbg!
franciscoaguirre Jun 14, 2023
676f2d8
Fix fmt
franciscoaguirre Jun 14, 2023
1126ffe
Revert "Fix fmt"
franciscoaguirre Jun 14, 2023
1981d5a
Fix fmt
franciscoaguirre Jun 14, 2023
3e615de
Remove duplicated template code
franciscoaguirre Jun 20, 2023
625ecd9
Add back part of the template
franciscoaguirre Jun 20, 2023
38be9d5
Merge remote-tracking branch 'origin/master' into cisco-polkadot-xcm-…
Jun 20, 2023
d611870
".git/.scripts/commands/bench-vm/bench-vm.sh" xcm polkadot pallet_xcm…
Jun 20, 2023
ddaca53
Merge remote-tracking branch 'origin/master' into cisco-polkadot-xcm-…
Jun 22, 2023
ed9744c
Don't skip reserve asset deposited benchmark
franciscoaguirre Jun 23, 2023
89a350f
Remove call to non-generated benchmark yet
franciscoaguirre Jun 23, 2023
8ef3669
Underscore unused parameter
franciscoaguirre Jun 23, 2023
9351a3e
Skip not supported benchmarks and hardcode value
franciscoaguirre Jun 23, 2023
8c47dd6
Merge remote-tracking branch 'origin/master' into cisco-polkadot-xcm-…
Jun 23, 2023
4a032f1
Remove ReserveAssetDeposited benchmark
franciscoaguirre Jun 23, 2023
a34c96a
".git/.scripts/commands/bench-vm/bench-vm.sh" xcm polkadot pallet_xcm…
Jun 23, 2023
d3ef591
Add back ReserveAssetDeposited
franciscoaguirre Jun 23, 2023
7604826
".git/.scripts/commands/bench-vm/bench-vm.sh" xcm polkadot pallet_xcm…
Jun 23, 2023
d35c704
Use default benchmark for ReserveAssetDeposited
franciscoaguirre Jun 27, 2023
b91460a
Add missing parameter
franciscoaguirre Jun 27, 2023
87d916b
Revert reserve asset deposited benchmark
franciscoaguirre Jun 27, 2023
baf2a44
Merge branch 'master' of https://github.com/paritytech/polkadot into …
Jun 27, 2023
49c7d64
".git/.scripts/commands/bench-vm/bench-vm.sh" xcm kusama pallet_xcm_b…
Jun 27, 2023
63850bd
".git/.scripts/commands/bench-vm/bench-vm.sh" xcm westend pallet_xcm_…
Jun 27, 2023
15c4fe8
Merge branch 'master' of https://github.com/paritytech/polkadot into …
Jun 27, 2023
41f6b2c
".git/.scripts/commands/bench/bench.sh" xcm rococo pallet_xcm_benchma…
Jun 27, 2023
e8a1855
Add 'real' benchmarks
franciscoaguirre Jun 30, 2023
665e8d2
Add TrustedReserve to actual XcmConfig
franciscoaguirre Jul 2, 2023
e8774b9
Add TrustedReserve to actual XcmConfig (fix)
franciscoaguirre Jul 2, 2023
e804144
Whitelist from benchmarking XCM storage keys read each block (#6871)
franciscoaguirre Jul 2, 2023
43470bb
Merge remote-tracking branch 'origin/master' into cisco-polkadot-xcm-…
Jul 2, 2023
37bb831
".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchma…
Jul 2, 2023
3560d89
Merge branch 'master' of https://github.com/paritytech/polkadot into …
Jul 3, 2023
1541d37
".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchma…
Jul 3, 2023
e65e1ce
Merge branch 'master' into cisco-polkadot-xcm-weight-info-bound
franciscoaguirre Jul 17, 2023
76382a2
".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchma…
Jul 17, 2023
87b5fd9
".git/.scripts/commands/bench/bench.sh" xcm rococo pallet_xcm_benchma…
Jul 17, 2023
06033d3
".git/.scripts/commands/bench/bench.sh" xcm westend pallet_xcm_benchm…
Jul 17, 2023
8f7b545
Merge remote-tracking branch 'origin/master' into cisco-polkadot-xcm-…
Jul 18, 2023
f3ca7c2
Merge remote-tracking branch 'origin/master' into cisco-polkadot-xcm-…
Jul 18, 2023
3a29cb6
Fix spellchecker issues
franciscoaguirre Jul 18, 2023
0174438
Merge branch 'master' into cisco-polkadot-xcm-weight-info-bound
franciscoaguirre Jul 19, 2023
0aa22d0
Remove unused migration code
franciscoaguirre Jul 19, 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
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2045,13 +2045,15 @@ sp_api::impl_runtime_apis! {
Statemine::get(),
MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(TokenLocation::get()) },
));
pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None;
}

impl pallet_xcm_benchmarks::fungible::Config for Runtime {
type TransactAsset = Balances;

type CheckedAccount = LocalCheckAccount;
type TrustedTeleporter = TrustedTeleporter;
type TrustedReserve = TrustedReserve;

fn get_multi_asset() -> MultiAsset {
MultiAsset {
Expand Down
2 changes: 1 addition & 1 deletion runtime/kusama/src/weights/xcm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl<RuntimeCall> XcmWeightInfo<RuntimeCall> for KusamaXcmWeight<RuntimeCall> {
_reserve: &MultiLocation,
_xcm: &Xcm<()>,
) -> Weight {
assets.weigh_multi_assets(XcmGeneric::<Runtime>::initiate_reserve_withdraw())
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::initiate_reserve_withdraw())
}
fn initiate_teleport(
assets: &MultiAssetFilter,
Expand Down
158 changes: 117 additions & 41 deletions runtime/kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,24 @@
//! Autogenerated weights for `pallet_xcm_benchmarks::fungible`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-03-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-04-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024

// Executed Command:
// target/production/polkadot
// ./target/production/polkadot
// benchmark
// --chain=kusama-dev
// pallet
// --steps=50
// --repeat=20
// --pallet=pallet_xcm_benchmarks::fungible
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --pallet=pallet_xcm_benchmarks::fungible
// --chain=kusama-dev
// --header=./file_header.txt
// --template=./xcm/pallet-xcm-benchmarks/template.hbs
// --output=./runtime/kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs
// --output=./runtime/kusama/src/weights/xcm/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -46,67 +47,142 @@ use sp_std::marker::PhantomData;
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo<T> {
// Storage: System Account (r:1 w:1)
pub(crate) fn withdraw_asset() -> Weight {
Weight::from_parts(20_385_000 as u64, 0)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
pub fn withdraw_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `101`
// Estimated: `3593`
// Minimum execution time: 21_938_000 picoseconds.
Weight::from_parts(22_222_000, 3593)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: System Account (r:2 w:2)
pub(crate) fn transfer_asset() -> Weight {
Weight::from_parts(32_756_000 as u64, 0)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
pub fn transfer_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `101`
// Estimated: `6196`
// Minimum execution time: 45_662_000 picoseconds.
Weight::from_parts(46_305_000, 6196)
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: System Account (r:2 w:2)
// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
// 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)
// Storage: Configuration ActiveConfig (r:1 w:0)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
pub(crate) fn transfer_reserve_asset() -> Weight {
Weight::from_parts(50_645_000 as u64, 0)
.saturating_add(T::DbWeight::get().reads(8 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
// 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)
pub fn transfer_reserve_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `312`
// Estimated: `21121`
// Minimum execution time: 67_634_000 picoseconds.
Weight::from_parts(68_477_000, 21121)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(5))
}
// Storage: Benchmark Override (r:0 w:0)
pub(crate) fn reserve_asset_deposited() -> Weight {
Weight::from_parts(2_000_000_000_000 as u64, 0)
// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured)
pub fn reserve_asset_deposited() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_000_000_000_000 picoseconds.
Weight::from_parts(2_000_000_000_000, 0)
}
// 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)
pub fn initiate_reserve_withdraw() -> Weight {
// Proof Size summary in bytes:
// Measured: `211`
// Estimated: `14420`
// Minimum execution time: 27_863_000 picoseconds.
Weight::from_parts(28_394_000, 14420)
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: System Account (r:1 w:1)
pub(crate) fn receive_teleported_asset() -> Weight {
Weight::from_parts(19_595_000 as u64, 0)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
// Storage: Balances InactiveIssuance (r:1 w:1)
// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
pub fn receive_teleported_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `5094`
// Minimum execution time: 22_235_000 picoseconds.
Weight::from_parts(22_622_000, 5094)
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: System Account (r:1 w:1)
pub(crate) fn deposit_asset() -> Weight {
Weight::from_parts(21_763_000 as u64, 0)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
pub fn deposit_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 25_006_000 picoseconds.
Weight::from_parts(25_595_000, 3593)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: System Account (r:1 w:1)
// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
// 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)
// Storage: Configuration ActiveConfig (r:1 w:0)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
pub(crate) fn deposit_reserve_asset() -> Weight {
Weight::from_parts(40_930_000 as u64, 0)
.saturating_add(T::DbWeight::get().reads(7 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
// 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)
pub fn deposit_reserve_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `211`
// Estimated: `18013`
// Minimum execution time: 48_982_000 picoseconds.
Weight::from_parts(49_465_000, 18013)
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(4))
}
// Storage: System Account (r:1 w:1)
// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
// Storage: Balances InactiveIssuance (r:1 w:1)
// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
// 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)
// Storage: Configuration ActiveConfig (r:1 w:0)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
pub(crate) fn initiate_teleport() -> Weight {
Weight::from_parts(40_788_000 as u64, 0)
.saturating_add(T::DbWeight::get().reads(7 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
// 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)
pub fn initiate_teleport() -> Weight {
// Proof Size summary in bytes:
// Measured: `211`
// Estimated: `19514`
// Minimum execution time: 51_103_000 picoseconds.
Weight::from_parts(51_607_000, 19514)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(5))
}
}
Loading