difftreelog
fix benchmarks+try-runtime
in: master
6 files changed
node/cli/src/command.rsdiffbeforeafterboth--- 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 = <Block as sp_runtime::traits::Block>::Header;
+ type Hasher = <Header as sp_runtime::traits::Header>::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::<Block, ParachainHostFunctions>(config))
+ runner.sync_run(|config| cmd.run::<Hasher, ParachainHostFunctions>(config))
}
BenchmarkCmd::Block(cmd) => runner.sync_run(|config| {
let partials = new_partial::<
pallets/foreign-assets/src/benchmarking.rsdiffbeforeafterboth--- 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::<MAX_COLLECTION_NAME_LENGTH>();
let token_prefix = create_data::<MAX_TOKEN_PREFIX_LENGTH>();
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,
runtime/common/config/governance/fellowship.rsdiffbeforeafterboth--- a/runtime/common/config/governance/fellowship.rs
+++ b/runtime/common/config/governance/fellowship.rs
@@ -73,6 +73,9 @@
type Polls = FellowshipReferenda;
type MinRankOfClass = ClassToRankMapper<Self, ()>;
type VoteWeight = pallet_ranked_collective::Geometric;
+
+ #[cfg(feature = "runtime-benchmarks")]
+ type BenchmarkSetup = ();
}
pub struct EnsureFellowshipProposition;
runtime/common/config/xcm.rsdiffbeforeafterboth--- 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<Location> = Some(Parent.into());
-}
-
impl pallet_xcm::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
@@ -223,10 +218,21 @@
type AdminOrigin = EnsureRoot<AccountId>;
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<Location> {
+ 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<XcmExecutorConfig<Self>>;
runtime/common/runtime_apis.rsdiffbeforeafterboth1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617#[macro_export]18macro_rules! dispatch_unique_runtime {19 ($collection:ident.$method:ident($($name:ident),*) $($rest:tt)*) => {{20 let collection = <Runtime as pallet_common::Config>::CollectionDispatch::dispatch($collection)?;21 let dispatch = collection.as_dyn();2223 Ok::<_, DispatchError>(dispatch.$method($($name),*) $($rest)*)24 }};25}2627#[macro_export]28macro_rules! impl_common_runtime_apis {29 (30 $(31 #![custom_apis]3233 $($custom_apis:tt)+34 )?35 ) => {36 use sp_std::prelude::*;37 use sp_api::impl_runtime_apis;38 use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H256, U256, H160};39 use sp_runtime::{40 Permill,41 traits::{Block as BlockT},42 transaction_validity::{TransactionSource, TransactionValidity},43 ApplyExtrinsicResult, DispatchError, ExtrinsicInclusionMode,44 };45 use frame_support::{46 pallet_prelude::Weight,47 traits::OnFinalize,48 };49 use fp_rpc::TransactionStatus;50 use pallet_transaction_payment::{51 FeeDetails, RuntimeDispatchInfo,52 };53 use pallet_evm::{54 Runner, account::CrossAccountId as _,55 Account as EVMAccount, FeeCalculator,56 };57 use runtime_common::{58 sponsoring::{SponsorshipPredict, UniqueSponsorshipPredict},59 dispatch::CollectionDispatch,60 config::ethereum::CrossAccountId,61 };62 use up_data_structs::*;6364 impl_runtime_apis! {65 $($($custom_apis)+)?6667 impl up_rpc::UniqueApi<Block, CrossAccountId, AccountId> for Runtime {68 fn account_tokens(collection: CollectionId, account: CrossAccountId) -> Result<Vec<TokenId>, DispatchError> {69 dispatch_unique_runtime!(collection.account_tokens(account))70 }71 fn collection_tokens(collection: CollectionId) -> Result<Vec<TokenId>, DispatchError> {72 dispatch_unique_runtime!(collection.collection_tokens())73 }74 fn token_exists(collection: CollectionId, token: TokenId) -> Result<bool, DispatchError> {75 dispatch_unique_runtime!(collection.token_exists(token))76 }7778 fn token_owner(collection: CollectionId, token: TokenId) -> Result<Option<CrossAccountId>, DispatchError> {79 dispatch_unique_runtime!(collection.token_owner(token).ok())80 }8182 fn token_owners(collection: CollectionId, token: TokenId) -> Result<Vec::<CrossAccountId>, DispatchError> {83 dispatch_unique_runtime!(collection.token_owners(token))84 }8586 fn topmost_token_owner(collection: CollectionId, token: TokenId) -> Result<Option<CrossAccountId>, DispatchError> {87 let budget = budget::Value::new(10);8889 <pallet_structure::Pallet<Runtime>>::find_topmost_owner(collection, token, &budget)90 }91 fn token_children(collection: CollectionId, token: TokenId) -> Result<Vec<TokenChild>, DispatchError> {92 Ok(<pallet_nonfungible::Pallet<Runtime>>::token_children_ids(collection, token))93 }94 fn collection_properties(95 collection: CollectionId,96 keys: Option<Vec<Vec<u8>>>97 ) -> Result<Vec<Property>, DispatchError> {98 let keys = keys.map(99 |keys| Common::bytes_keys_to_property_keys(keys)100 ).transpose()?;101102 Common::filter_collection_properties(collection, keys)103 }104105 fn token_properties(106 collection: CollectionId,107 token_id: TokenId,108 keys: Option<Vec<Vec<u8>>>109 ) -> Result<Vec<Property>, DispatchError> {110 let keys = keys.map(111 |keys| Common::bytes_keys_to_property_keys(keys)112 ).transpose()?;113114 dispatch_unique_runtime!(collection.token_properties(token_id, keys))115 }116117 fn property_permissions(118 collection: CollectionId,119 keys: Option<Vec<Vec<u8>>>120 ) -> Result<Vec<PropertyKeyPermission>, DispatchError> {121 let keys = keys.map(122 |keys| Common::bytes_keys_to_property_keys(keys)123 ).transpose()?;124125 Common::filter_property_permissions(collection, keys)126 }127128 fn token_data(129 collection: CollectionId,130 token_id: TokenId,131 keys: Option<Vec<Vec<u8>>>132 ) -> Result<TokenData<CrossAccountId>, DispatchError> {133 let token_data = TokenData {134 properties: Self::token_properties(collection, token_id, keys)?,135 owner: Self::token_owner(collection, token_id)?,136 pieces: Self::total_pieces(collection, token_id)?.unwrap_or(0),137 };138139 Ok(token_data)140 }141142 fn total_supply(collection: CollectionId) -> Result<u32, DispatchError> {143 dispatch_unique_runtime!(collection.total_supply())144 }145 fn account_balance(collection: CollectionId, account: CrossAccountId) -> Result<u32, DispatchError> {146 dispatch_unique_runtime!(collection.account_balance(account))147 }148 fn balance(collection: CollectionId, account: CrossAccountId, token: TokenId) -> Result<u128, DispatchError> {149 dispatch_unique_runtime!(collection.balance(account, token))150 }151 fn allowance(152 collection: CollectionId,153 sender: CrossAccountId,154 spender: CrossAccountId,155 token: TokenId,156 ) -> Result<u128, DispatchError> {157 dispatch_unique_runtime!(collection.allowance(sender, spender, token))158 }159160 fn adminlist(collection: CollectionId) -> Result<Vec<CrossAccountId>, DispatchError> {161 Ok(<pallet_common::Pallet<Runtime>>::adminlist(collection))162 }163 fn allowlist(collection: CollectionId) -> Result<Vec<CrossAccountId>, DispatchError> {164 Ok(<pallet_common::Pallet<Runtime>>::allowlist(collection))165 }166 fn allowed(collection: CollectionId, user: CrossAccountId) -> Result<bool, DispatchError> {167 Ok(<pallet_common::Pallet<Runtime>>::allowed(collection, user))168 }169 fn last_token_id(collection: CollectionId) -> Result<TokenId, DispatchError> {170 dispatch_unique_runtime!(collection.last_token_id())171 }172 fn collection_by_id(collection: CollectionId) -> Result<Option<RpcCollection<AccountId>>, DispatchError> {173 Ok(<pallet_common::Pallet<Runtime>>::rpc_collection(collection))174 }175 fn collection_stats() -> Result<CollectionStats, DispatchError> {176 Ok(<pallet_common::Pallet<Runtime>>::collection_stats())177 }178 fn next_sponsored(collection: CollectionId, account: CrossAccountId, token: TokenId) -> Result<Option<u64>, DispatchError> {179 Ok(<UniqueSponsorshipPredict<Runtime> as SponsorshipPredict<Runtime>>::predict(180 collection,181 account,182 token183 ))184 }185186 fn effective_collection_limits(collection: CollectionId) -> Result<Option<CollectionLimits>, DispatchError> {187 Ok(<pallet_common::Pallet<Runtime>>::effective_collection_limits(collection))188 }189190 fn total_pieces(collection: CollectionId, token_id: TokenId) -> Result<Option<u128>, DispatchError> {191 dispatch_unique_runtime!(collection.total_pieces(token_id))192 }193194 fn allowance_for_all(collection: CollectionId, owner: CrossAccountId, operator: CrossAccountId) -> Result<bool, DispatchError> {195 dispatch_unique_runtime!(collection.allowance_for_all(owner, operator))196 }197 }198199 impl app_promotion_rpc::AppPromotionApi<Block, BlockNumber, CrossAccountId, AccountId> for Runtime {200 #[allow(unused_variables)]201 fn total_staked(staker: Option<CrossAccountId>) -> Result<u128, DispatchError> {202 #[cfg(not(feature = "app-promotion"))]203 return unsupported!();204205 #[cfg(feature = "app-promotion")]206 return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_total_staked(staker).unwrap_or_default());207 }208209 #[allow(unused_variables)]210 fn total_staked_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>, DispatchError> {211 #[cfg(not(feature = "app-promotion"))]212 return unsupported!();213214 #[cfg(feature = "app-promotion")]215 return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_total_staked_per_block(staker));216 }217218 #[allow(unused_variables)]219 fn pending_unstake(staker: Option<CrossAccountId>) -> Result<u128, DispatchError> {220 #[cfg(not(feature = "app-promotion"))]221 return unsupported!();222223 #[cfg(feature = "app-promotion")]224 return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_pending_unstake(staker));225 }226227 #[allow(unused_variables)]228 fn pending_unstake_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>, DispatchError> {229 #[cfg(not(feature = "app-promotion"))]230 return unsupported!();231232 #[cfg(feature = "app-promotion")]233 return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_pending_unstake_per_block(staker))234 }235 }236237 impl sp_api::Core<Block> for Runtime {238 fn version() -> RuntimeVersion {239 VERSION240 }241242 fn execute_block(block: Block) {243 Executive::execute_block(block)244 }245246 fn initialize_block(header: &<Block as BlockT>::Header) -> ExtrinsicInclusionMode {247 Executive::initialize_block(header)248 }249 }250251 impl sp_api::Metadata<Block> for Runtime {252 fn metadata() -> OpaqueMetadata {253 OpaqueMetadata::new(Runtime::metadata().into())254 }255256 fn metadata_at_version(version: u32) -> Option<OpaqueMetadata> {257 Runtime::metadata_at_version(version)258 }259260 fn metadata_versions() -> sp_std::vec::Vec<u32> {261 Runtime::metadata_versions()262 }263 }264265 impl sp_block_builder::BlockBuilder<Block> for Runtime {266 fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {267 Executive::apply_extrinsic(extrinsic)268 }269270 fn finalize_block() -> <Block as BlockT>::Header {271 Executive::finalize_block()272 }273274 fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<<Block as BlockT>::Extrinsic> {275 data.create_extrinsics()276 }277278 fn check_inherents(279 block: Block,280 data: sp_inherents::InherentData,281 ) -> sp_inherents::CheckInherentsResult {282 data.check_extrinsics(&block)283 }284285 // fn random_seed() -> <Block as BlockT>::Hash {286 // RandomnessCollectiveFlip::random_seed().0287 // }288 }289290 impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {291 fn validate_transaction(292 source: TransactionSource,293 tx: <Block as BlockT>::Extrinsic,294 hash: <Block as BlockT>::Hash,295 ) -> TransactionValidity {296 Executive::validate_transaction(source, tx, hash)297 }298 }299300 impl sp_offchain::OffchainWorkerApi<Block> for Runtime {301 fn offchain_worker(header: &<Block as BlockT>::Header) {302 Executive::offchain_worker(header)303 }304 }305306 impl fp_rpc::EthereumRuntimeRPCApi<Block> for Runtime {307 fn chain_id() -> u64 {308 <Runtime as pallet_evm::Config>::ChainId::get()309 }310311 fn account_basic(address: H160) -> EVMAccount {312 let (account, _) = EVM::account_basic(&address);313 account314 }315316 fn gas_price() -> U256 {317 let (price, _) = <Runtime as pallet_evm::Config>::FeeCalculator::min_gas_price();318 price319 }320321 fn account_code_at(address: H160) -> Vec<u8> {322 use pallet_evm::OnMethodCall;323 <Runtime as pallet_evm::Config>::OnMethodCall::get_code(&address)324 .unwrap_or_else(|| pallet_evm::AccountCodes::<Runtime>::get(address))325 }326327 fn author() -> H160 {328 <pallet_evm::Pallet<Runtime>>::find_author()329 }330331 fn storage_at(address: H160, index: U256) -> H256 {332 let mut tmp = [0u8; 32];333 index.to_big_endian(&mut tmp);334 pallet_evm::AccountStorages::<Runtime>::get(address, H256::from_slice(&tmp[..]))335 }336337 #[allow(clippy::redundant_closure)]338 fn call(339 from: H160,340 to: H160,341 data: Vec<u8>,342 value: U256,343 gas_limit: U256,344 max_fee_per_gas: Option<U256>,345 max_priority_fee_per_gas: Option<U256>,346 nonce: Option<U256>,347 estimate: bool,348 access_list: Option<Vec<(H160, Vec<H256>)>>,349 ) -> Result<pallet_evm::CallInfo, sp_runtime::DispatchError> {350 let config = if estimate {351 let mut config = <Runtime as pallet_evm::Config>::config().clone();352 config.estimate = true;353 Some(config)354 } else {355 None356 };357358 let is_transactional = false;359 let validate = false;360 <Runtime as pallet_evm::Config>::Runner::call(361 CrossAccountId::from_eth(from),362 to,363 data,364 value,365 gas_limit.low_u64(),366 max_fee_per_gas,367 max_priority_fee_per_gas,368 nonce,369 access_list.unwrap_or_default(),370 is_transactional,371 validate,372 // TODO we probably want to support external cost recording in non-transactional calls373 None,374 None,375376 config.as_ref().unwrap_or_else(|| <Runtime as pallet_evm::Config>::config()),377 ).map_err(|err| err.error.into())378 }379380 #[allow(clippy::redundant_closure)]381 fn create(382 from: H160,383 data: Vec<u8>,384 value: U256,385 gas_limit: U256,386 max_fee_per_gas: Option<U256>,387 max_priority_fee_per_gas: Option<U256>,388 nonce: Option<U256>,389 estimate: bool,390 access_list: Option<Vec<(H160, Vec<H256>)>>,391 ) -> Result<pallet_evm::CreateInfo, sp_runtime::DispatchError> {392 let config = if estimate {393 let mut config = <Runtime as pallet_evm::Config>::config().clone();394 config.estimate = true;395 Some(config)396 } else {397 None398 };399400 let is_transactional = false;401 let validate = false;402 <Runtime as pallet_evm::Config>::Runner::create(403 CrossAccountId::from_eth(from),404 data,405 value,406 gas_limit.low_u64(),407 max_fee_per_gas,408 max_priority_fee_per_gas,409 nonce,410 access_list.unwrap_or_default(),411 is_transactional,412 validate,413 // TODO we probably want to support external cost recording in non-transactional calls414 None,415 None,416417 config.as_ref().unwrap_or_else(|| <Runtime as pallet_evm::Config>::config()),418 ).map_err(|err| err.error.into())419 }420421 fn current_transaction_statuses() -> Option<Vec<TransactionStatus>> {422 pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()423 }424425 fn current_block() -> Option<pallet_ethereum::Block> {426 pallet_ethereum::CurrentBlock::<Runtime>::get()427 }428429 fn current_receipts() -> Option<Vec<pallet_ethereum::Receipt>> {430 pallet_ethereum::CurrentReceipts::<Runtime>::get()431 }432433 fn current_all() -> (434 Option<pallet_ethereum::Block>,435 Option<Vec<pallet_ethereum::Receipt>>,436 Option<Vec<TransactionStatus>>437 ) {438 (439 pallet_ethereum::CurrentBlock::<Runtime>::get(),440 pallet_ethereum::CurrentReceipts::<Runtime>::get(),441 pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()442 )443 }444445 fn extrinsic_filter(xts: Vec<<Block as BlockT>::Extrinsic>) -> Vec<pallet_ethereum::Transaction> {446 xts.into_iter().filter_map(|xt| match xt.0.function {447 RuntimeCall::Ethereum(pallet_ethereum::Call::transact { transaction }) => Some(transaction),448 _ => None449 }).collect()450 }451452 fn elasticity() -> Option<Permill> {453 None454 }455456 fn gas_limit_multiplier_support() {}457458 fn pending_block(459 xts: Vec<<Block as BlockT>::Extrinsic>,460 ) -> (Option<pallet_ethereum::Block>, Option<Vec<TransactionStatus>>) {461 for ext in xts.into_iter() {462 let _ = Executive::apply_extrinsic(ext);463 }464465 Ethereum::on_finalize(System::block_number() + 1);466467 (468 pallet_ethereum::CurrentBlock::<Runtime>::get(),469 pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()470 )471 }472 }473474 impl sp_session::SessionKeys<Block> for Runtime {475 fn decode_session_keys(476 encoded: Vec<u8>,477 ) -> Option<Vec<(Vec<u8>, KeyTypeId)>> {478 SessionKeys::decode_into_raw_public_keys(&encoded)479 }480481 fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {482 SessionKeys::generate(seed)483 }484 }485486 impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {487 fn slot_duration() -> sp_consensus_aura::SlotDuration {488 #[cfg(not(feature = "lookahead"))]489 {490 sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration())491 }492 #[cfg(feature = "lookahead")]493 {494 sp_consensus_aura::SlotDuration::from_millis(up_common::constants::SLOT_DURATION)495 }496 }497498 fn authorities() -> Vec<AuraId> {499 Aura::authorities().to_vec()500 }501 }502503 impl cumulus_primitives_core::CollectCollationInfo<Block> for Runtime {504 fn collect_collation_info(header: &<Block as BlockT>::Header) -> cumulus_primitives_core::CollationInfo {505 ParachainSystem::collect_collation_info(header)506 }507 }508509 impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {510 fn account_nonce(account: AccountId) -> Nonce {511 System::account_nonce(account)512 }513 }514515 impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {516 fn query_info(uxt: <Block as BlockT>::Extrinsic, len: u32) -> RuntimeDispatchInfo<Balance> {517 TransactionPayment::query_info(uxt, len)518 }519 fn query_fee_details(uxt: <Block as BlockT>::Extrinsic, len: u32) -> FeeDetails<Balance> {520 TransactionPayment::query_fee_details(uxt, len)521 }522 fn query_weight_to_fee(weight: Weight) -> Balance {523 TransactionPayment::weight_to_fee(weight)524 }525 fn query_length_to_fee(length: u32) -> Balance {526 TransactionPayment::length_to_fee(length)527 }528 }529530 #[cfg(feature = "runtime-benchmarks")]531 impl frame_benchmarking::Benchmark<Block> for Runtime {532 fn benchmark_metadata(extra: bool) -> (533 Vec<frame_benchmarking::BenchmarkList>,534 Vec<frame_support::traits::StorageInfo>,535 ) {536 use frame_benchmarking::{list_benchmark, Benchmarking, BenchmarkList};537 use frame_support::traits::StorageInfoTrait;538539 let mut list = Vec::<BenchmarkList>::new();540 list_benchmark!(list, extra, pallet_xcm, PolkadotXcm);541542 list_benchmark!(list, extra, pallet_evm_migration, EvmMigration);543 list_benchmark!(list, extra, pallet_common, Common);544 list_benchmark!(list, extra, pallet_unique, Unique);545 list_benchmark!(list, extra, pallet_structure, Structure);546 list_benchmark!(list, extra, pallet_inflation, Inflation);547 list_benchmark!(list, extra, pallet_configuration, Configuration);548549 #[cfg(feature = "app-promotion")]550 list_benchmark!(list, extra, pallet_app_promotion, AppPromotion);551552 list_benchmark!(list, extra, pallet_fungible, Fungible);553 list_benchmark!(list, extra, pallet_nonfungible, Nonfungible);554555 #[cfg(feature = "refungible")]556 list_benchmark!(list, extra, pallet_refungible, Refungible);557558 #[cfg(feature = "collator-selection")]559 list_benchmark!(list, extra, pallet_collator_selection, CollatorSelection);560561 #[cfg(feature = "governance")]562 list_benchmark!(list, extra, pallet_identity, Identity);563564 #[cfg(feature = "foreign-assets")]565 list_benchmark!(list, extra, pallet_foreign_assets, ForeignAssets);566567 list_benchmark!(list, extra, pallet_maintenance, Maintenance);568569 // list_benchmark!(list, extra, pallet_evm_coder_substrate, EvmCoderSubstrate);570571 let storage_info = AllPalletsWithSystem::storage_info();572573 return (list, storage_info)574 }575576 fn dispatch_benchmark(577 config: frame_benchmarking::BenchmarkConfig578 ) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {579 use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark};580 use sp_storage::TrackedStorageKey;581582 let allowlist: Vec<TrackedStorageKey> = vec![583 // Total Issuance584 hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(),585586 // Block Number587 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(),588 // Execution Phase589 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(),590 // Event Count591 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(),592 // System Events593 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),594595 // Evm CurrentLogs596 hex_literal::hex!("1da53b775b270400e7e61ed5cbc5a146547f210cec367e9af919603343b9cb56").to_vec().into(),597598 // Transactional depth599 hex_literal::hex!("3a7472616e73616374696f6e5f6c6576656c3a").to_vec().into(),600 ];601602 let mut batches = Vec::<BenchmarkBatch>::new();603 let params = (&config, &allowlist);604 add_benchmark!(params, batches, pallet_xcm, PolkadotXcm);605606 add_benchmark!(params, batches, pallet_evm_migration, EvmMigration);607 add_benchmark!(params, batches, pallet_common, Common);608 add_benchmark!(params, batches, pallet_unique, Unique);609 add_benchmark!(params, batches, pallet_structure, Structure);610 add_benchmark!(params, batches, pallet_inflation, Inflation);611 add_benchmark!(params, batches, pallet_configuration, Configuration);612613 #[cfg(feature = "app-promotion")]614 add_benchmark!(params, batches, pallet_app_promotion, AppPromotion);615616 add_benchmark!(params, batches, pallet_fungible, Fungible);617 add_benchmark!(params, batches, pallet_nonfungible, Nonfungible);618619 #[cfg(feature = "refungible")]620 add_benchmark!(params, batches, pallet_refungible, Refungible);621622 #[cfg(feature = "collator-selection")]623 add_benchmark!(params, batches, pallet_collator_selection, CollatorSelection);624625 #[cfg(feature = "governance")]626 add_benchmark!(params, batches, pallet_identity, Identity);627628 #[cfg(feature = "foreign-assets")]629 add_benchmark!(params, batches, pallet_foreign_assets, ForeignAssets);630631 add_benchmark!(params, batches, pallet_maintenance, Maintenance);632633 // add_benchmark!(params, batches, pallet_evm_coder_substrate, EvmCoderSubstrate);634635 if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }636 Ok(batches)637 }638 }639640 impl up_pov_estimate_rpc::PovEstimateApi<Block> for Runtime {641 #[allow(unused_variables)]642 fn pov_estimate(uxt: Vec<u8>) -> ApplyExtrinsicResult {643 #[cfg(feature = "pov-estimate")]644 {645 use parity_scale_codec::Decode;646647 let uxt_decode = <<Block as BlockT>::Extrinsic as Decode>::decode(&mut &*uxt)648 .map_err(|_| DispatchError::Other("failed to decode the extrinsic"));649650 let uxt = match uxt_decode {651 Ok(uxt) => uxt,652 Err(err) => return Ok(err.into()),653 };654655 Executive::apply_extrinsic(uxt)656 }657658 #[cfg(not(feature = "pov-estimate"))]659 return Ok(unsupported!());660 }661 }662663 #[cfg(feature = "try-runtime")]664 impl frame_try_runtime::TryRuntime<Block> for Runtime {665 fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {666 log::info!("try-runtime::on_runtime_upgrade unique-chain.");667 let weight = Executive::try_runtime_upgrade(checks).unwrap();668 (weight, $crate::config::substrate::RuntimeBlockWeights::get().max_block)669 }670671 fn execute_block(672 block: Block,673 state_root_check: bool,674 signature_check: bool,675 select: frame_try_runtime::TryStateSelect676 ) -> Weight {677 log::info!(678 target: "node-runtime",679 "try-runtime: executing block {:?} / root checks: {:?} / try-state-select: {:?}",680 block.header.hash(),681 state_root_check,682 select,683 );684685 Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap()686 }687 }688689 #[cfg(feature = "lookahead")]690 impl cumulus_primitives_aura::AuraUnincludedSegmentApi<Block> for Runtime {691 fn can_build_upon(692 included_hash: <Block as BlockT>::Hash,693 slot: cumulus_primitives_aura::Slot,694 ) -> bool {695 $crate::config::parachain::ConsensusHook::can_build_upon(included_hash, slot)696 }697 }698699 /// Should never be used, yet still required because of https://github.com/paritytech/polkadot-sdk/issues/27700 /// Not allowed to panic, because rpc may be called using native runtime, thus causing thread panic.701 impl fp_rpc::ConvertTransactionRuntimeApi<Block> for Runtime {702 fn convert_transaction(703 transaction: pallet_ethereum::Transaction704 ) -> <Block as BlockT>::Extrinsic {705 UncheckedExtrinsic::new_unsigned(706 pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),707 )708 }709 }710 }711 }712}runtime/common/weights/xcm.rsdiffbeforeafterboth--- 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<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for SubstrateWeight<T> {
- /// 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))
+ }
}