From 67ee4bedd37dc08ea00b7889bfce15fc97f1a36e Mon Sep 17 00:00:00 2001 From: Daniel Shiposha Date: Fri, 24 May 2024 17:08:54 +0000 Subject: [PATCH] fix: benchmarks+try-runtime --- --- a/node/cli/src/command.rs +++ b/node/cli/src/command.rs @@ -352,11 +352,14 @@ use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE}; use polkadot_cli::Block; + type Header = ::Header; + type Hasher =
::Hashing; + let runner = cli.create_runner(cmd)?; // Switch on the concrete benchmark sub-command- match cmd { BenchmarkCmd::Pallet(cmd) => { - runner.sync_run(|config| cmd.run::(config)) + runner.sync_run(|config| cmd.run::(config)) } BenchmarkCmd::Block(cmd) => runner.sync_run(|config| { let partials = new_partial::< --- a/pallets/foreign-assets/src/benchmarking.rs +++ b/pallets/foreign-assets/src/benchmarking.rs @@ -32,8 +32,7 @@ #[benchmark] fn force_register_foreign_asset() -> Result<(), BenchmarkError> { - let location = - Location::from((Parachain(1000), PalletInstance(42), GeneralIndex(1)).into()); + let asset_id: AssetId = (Parachain(1000), PalletInstance(42), GeneralIndex(1)).into(); let name = create_u16_data::(); let token_prefix = create_data::(); let mode = ForeignCollectionMode::NFT; @@ -41,7 +40,7 @@ #[extrinsic_call] _( RawOrigin::Root, - Box::new(location.into()), + Box::new(asset_id.into()), name, token_prefix, mode, --- a/runtime/common/config/governance/fellowship.rs +++ b/runtime/common/config/governance/fellowship.rs @@ -73,6 +73,9 @@ type Polls = FellowshipReferenda; type MinRankOfClass = ClassToRankMapper; type VoteWeight = pallet_ranked_collective::Geometric; + + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkSetup = (); } pub struct EnsureFellowshipProposition; --- a/runtime/common/config/xcm.rs +++ b/runtime/common/config/xcm.rs @@ -194,11 +194,6 @@ type TransactionalProcessor = FrameTransactionalProcessor; } -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; @@ -223,10 +218,21 @@ type AdminOrigin = EnsureRoot; type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; } +#[cfg(feature = "runtime-benchmarks")] +impl pallet_xcm::benchmarking::Config for Runtime { + type DeliveryHelper = (); + + fn reachable_dest() -> Option { + Some(Parent.into()) + } + + fn get_asset() -> Asset { + (Location::here(), 1_000_000_000_000_000_000u128).into() + } +} + impl cumulus_pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor>; --- a/runtime/common/runtime_apis.rs +++ b/runtime/common/runtime_apis.rs @@ -535,9 +535,10 @@ ) { use frame_benchmarking::{list_benchmark, Benchmarking, BenchmarkList}; use frame_support::traits::StorageInfoTrait; + use pallet_xcm::benchmarking::Pallet as PalletXcmBenchmarks; let mut list = Vec::::new(); - list_benchmark!(list, extra, pallet_xcm, PolkadotXcm); + list_benchmark!(list, extra, pallet_xcm, PalletXcmBenchmarks::); list_benchmark!(list, extra, pallet_evm_migration, EvmMigration); list_benchmark!(list, extra, pallet_common, Common); @@ -578,6 +579,7 @@ ) -> Result, sp_runtime::RuntimeString> { use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark}; use sp_storage::TrackedStorageKey; + use pallet_xcm::benchmarking::Pallet as PalletXcmBenchmarks; let allowlist: Vec = vec![ // Total Issuance @@ -601,8 +603,9 @@ let mut batches = Vec::::new(); let params = (&config, &allowlist); - add_benchmark!(params, batches, pallet_xcm, PolkadotXcm); + add_benchmark!(params, batches, pallet_xcm, PalletXcmBenchmarks::); + add_benchmark!(params, batches, pallet_evm_migration, EvmMigration); add_benchmark!(params, batches, pallet_common, Common); add_benchmark!(params, batches, pallet_unique, Unique); --- a/runtime/common/weights/xcm.rs +++ b/runtime/common/weights/xcm.rs @@ -2,8 +2,8 @@ //! Autogenerated weights for pallet_xcm //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 29.0.0 -//! DATE: 2023-11-29, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 35.0.1 +//! DATE: 2024-05-24, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 @@ -35,61 +35,57 @@ /// Weights for pallet_xcm using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl pallet_xcm::WeightInfo for SubstrateWeight { - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn send() -> Weight { // Proof Size summary in bytes: - // Measured: `278` - // Estimated: `3743` - // Minimum execution time: 22_693_000 picoseconds. - Weight::from_parts(23_155_000, 3743) - .saturating_add(T::DbWeight::get().reads(5_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) } - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn teleport_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `169` - // Estimated: `1489` - // Minimum execution time: 21_165_000 picoseconds. - Weight::from_parts(21_568_000, 1489) - .saturating_add(T::DbWeight::get().reads(1_u64)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) } - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn reserve_transfer_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `169` - // Estimated: `1489` - // Minimum execution time: 20_929_000 picoseconds. - Weight::from_parts(21_295_000, 1489) - .saturating_add(T::DbWeight::get().reads(1_u64)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) } + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + } fn execute() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_580_000 picoseconds. - Weight::from_parts(7_829_000, 0) + // Minimum execution time: 3_230_000 picoseconds. + Weight::from_parts(3_390_000, 0) } - /// Storage: `PolkadotXcm::SupportedVersion` (r:0 w:1) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_xcm_version() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_503_000 picoseconds. - Weight::from_parts(7_703_000, 0) - .saturating_add(T::DbWeight::get().writes(1_u64)) + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) } /// Storage: `PolkadotXcm::SafeXcmVersion` (r:0 w:1) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -97,57 +93,27 @@ // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_505_000 picoseconds. - Weight::from_parts(2_619_000, 0) + // Minimum execution time: 1_020_000 picoseconds. + Weight::from_parts(1_120_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) - /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::Queries` (r:0 w:1) - /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_subscribe_version_notify() -> Weight { // Proof Size summary in bytes: - // Measured: `278` - // Estimated: `3743` - // Minimum execution time: 26_213_000 picoseconds. - Weight::from_parts(26_652_000, 3743) - .saturating_add(T::DbWeight::get().reads(7_u64)) - .saturating_add(T::DbWeight::get().writes(5_u64)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) } - /// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::Queries` (r:0 w:1) - /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_unsubscribe_version_notify() -> Weight { // Proof Size summary in bytes: - // Measured: `461` - // Estimated: `3926` - // Minimum execution time: 27_648_000 picoseconds. - Weight::from_parts(28_084_000, 3926) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) } /// Storage: `PolkadotXcm::XcmExecutionSuspended` (r:0 w:1) /// Proof: `PolkadotXcm::XcmExecutionSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -155,124 +121,118 @@ // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_529_000 picoseconds. - Weight::from_parts(2_650_000, 0) + // Minimum execution time: 1_050_000 picoseconds. + Weight::from_parts(1_150_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: `PolkadotXcm::SupportedVersion` (r:4 w:2) + /// Storage: `PolkadotXcm::SupportedVersion` (r:5 w:2) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_supported_version() -> Weight { // Proof Size summary in bytes: - // Measured: `196` - // Estimated: `11086` - // Minimum execution time: 15_973_000 picoseconds. - Weight::from_parts(16_358_000, 11086) - .saturating_add(T::DbWeight::get().reads(4_u64)) + // Measured: `192` + // Estimated: `13557` + // Minimum execution time: 13_400_000 picoseconds. + Weight::from_parts(13_670_000, 13557) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } - /// Storage: `PolkadotXcm::VersionNotifiers` (r:4 w:2) + /// Storage: `PolkadotXcm::VersionNotifiers` (r:5 w:2) /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_version_notifiers() -> Weight { // Proof Size summary in bytes: - // Measured: `200` - // Estimated: `11090` - // Minimum execution time: 16_027_000 picoseconds. - Weight::from_parts(16_585_000, 11090) - .saturating_add(T::DbWeight::get().reads(4_u64)) + // Measured: `196` + // Estimated: `13561` + // Minimum execution time: 13_160_000 picoseconds. + Weight::from_parts(13_650_000, 13561) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } - /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:0) - /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn already_notified_target() -> Weight { // Proof Size summary in bytes: - // Measured: `207` - // Estimated: `13572` - // Minimum execution time: 16_817_000 picoseconds. - Weight::from_parts(17_137_000, 13572) - .saturating_add(T::DbWeight::get().reads(5_u64)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 25_000_000 picoseconds. + Weight::from_parts(25_000_000, 0) } - /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:2 w:1) - /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn notify_current_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `345` - // Estimated: `6285` - // Minimum execution time: 24_551_000 picoseconds. - Weight::from_parts(24_975_000, 6285) - .saturating_add(T::DbWeight::get().reads(7_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 325_000_000 picoseconds. + Weight::from_parts(325_000_000, 0) } - /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:3 w:0) + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:0) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) fn notify_target_migration_fail() -> Weight { // Proof Size summary in bytes: // Measured: `239` - // Estimated: `8654` - // Minimum execution time: 8_412_000 picoseconds. - Weight::from_parts(8_710_000, 8654) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Estimated: `11129` + // Minimum execution time: 8_250_000 picoseconds. + Weight::from_parts(8_780_000, 11129) + .saturating_add(T::DbWeight::get().reads(4_u64)) } - /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:2) + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_version_notify_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `207` - // Estimated: `11097` - // Minimum execution time: 16_427_000 picoseconds. - Weight::from_parts(16_774_000, 11097) - .saturating_add(T::DbWeight::get().reads(4_u64)) + // Measured: `203` + // Estimated: `13568` + // Minimum execution time: 13_240_000 picoseconds. + Weight::from_parts(13_650_000, 13568) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } - /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:2) - /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_and_notify_old_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `349` - // Estimated: `11239` - // Minimum execution time: 30_394_000 picoseconds. - Weight::from_parts(30_868_000, 11239) - .saturating_add(T::DbWeight::get().reads(9_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 325_000_000 picoseconds. + Weight::from_parts(325_000_000, 0) } - - fn transfer_assets() -> Weight { - // TODO! - Self::send() - } - + /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) + /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::Queries` (r:0 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn new_query() -> Weight { - // TODO! - Self::send() - } - + // Proof Size summary in bytes: + // Measured: `136` + // Estimated: `1621` + // Minimum execution time: 3_440_000 picoseconds. + Weight::from_parts(3_560_000, 1621) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: `PolkadotXcm::Queries` (r:1 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn take_response() -> Weight { - // TODO! - Self::send() - } - + // Proof Size summary in bytes: + // Measured: `7773` + // Estimated: `11238` + // Minimum execution time: 19_230_000 picoseconds. + Weight::from_parts(19_550_000, 11238) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `PolkadotXcm::AssetTraps` (r:1 w:1) + /// Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ForeignAssets::ForeignAssetToCollection` (r:1 w:0) + /// Proof: `ForeignAssets::ForeignAssetToCollection` (`max_values`: None, `max_size`: Some(614), added: 3089, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn claim_assets() -> Weight { - // TODO! - Self::send() - } + // Proof Size summary in bytes: + // Measured: `366` + // Estimated: `4079` + // Minimum execution time: 25_540_000 picoseconds. + Weight::from_parts(26_250_000, 4079) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } } -- gitstuff