AssetHubs - split weights for pallet_assets (#2743)

* AssetHubs - split weights for pallet_assets

* ".git/.scripts/commands/bench/bench.sh" pallet asset-hub-kusama assets pallet_assets

* ".git/.scripts/commands/bench/bench.sh" pallet asset-hub-kusama assets pallet_assets

* ".git/.scripts/commands/bench/bench.sh" pallet asset-hub-westend assets pallet_assets

* ".git/.scripts/commands/bench/bench.sh" pallet asset-hub-polkadot assets pallet_assets

* ".git/.scripts/commands/bench/bench.sh" pallet asset-hub-westend assets pallet_assets

* ".git/.scripts/commands/bench/bench.sh" pallet asset-hub-polkadot assets pallet_assets

* Rename weight file for pallet_assets instances (polkadot)

* ".git/.scripts/commands/bench/bench.sh" pallet asset-hub-polkadot assets pallet_assets

* Rename weight file for pallet_assets instances (kusama/westend)

* ".git/.scripts/commands/bench/bench.sh" pallet asset-hub-kusama assets pallet_assets

* ".git/.scripts/commands/bench/bench.sh" pallet asset-hub-westend assets pallet_assets

* Changed `pallet_assets_remote` -> `pallet_assets_foreign`

* fmt

* ".git/.scripts/commands/bench/bench.sh" pallet asset-hub-kusama assets pallet_assets

* ".git/.scripts/commands/bench/bench.sh" pallet asset-hub-westend assets pallet_assets

* ".git/.scripts/commands/bench/bench.sh" pallet asset-hub-polkadot assets pallet_assets

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
Branislav Kontur
2023-06-20 17:48:25 +02:00
committed by GitHub
parent ad2189ae4e
commit 43c9a94969
12 changed files with 2088 additions and 421 deletions
@@ -248,7 +248,7 @@ impl pallet_assets::Config<TrustBackedAssetsInstance> for Runtime {
type StringLimit = AssetsStringLimit;
type Freezer = ();
type Extra = ();
type WeightInfo = weights::pallet_assets::WeightInfo<Runtime>;
type WeightInfo = weights::pallet_assets_local::WeightInfo<Runtime>;
type CallbackHandle = ();
type AssetAccountDeposit = AssetAccountDeposit;
type RemoveItemsLimit = frame_support::traits::ConstU32<1000>;
@@ -290,7 +290,7 @@ impl pallet_assets::Config<ForeignAssetsInstance> for Runtime {
type StringLimit = ForeignAssetsAssetsStringLimit;
type Freezer = ();
type Extra = ();
type WeightInfo = weights::pallet_assets::WeightInfo<Runtime>;
type WeightInfo = weights::pallet_assets_foreign::WeightInfo<Runtime>;
type CallbackHandle = ();
type AssetAccountDeposit = ForeignAssetsAssetAccountDeposit;
type RemoveItemsLimit = frame_support::traits::ConstU32<1000>;
@@ -793,8 +793,8 @@ extern crate frame_benchmarking;
mod benches {
define_benchmarks!(
[frame_system, SystemBench::<Runtime>]
[pallet_assets, Assets]
[pallet_assets, ForeignAssets]
[pallet_assets, Local]
[pallet_assets, Foreign]
[pallet_balances, Balances]
[pallet_multisig, Multisig]
[pallet_nft_fractionalization, NftFractionalization]
@@ -1072,6 +1072,13 @@ impl_runtime_apis! {
type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::<Runtime>;
type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::<Runtime>;
// Benchmark files generated for `Assets/ForeignAssets` instances are by default
// `pallet_assets_assets.rs / pallet_assets_foreign_assets`, which is not really nice,
// so with this redefinition we can change names to nicer:
// `pallet_assets_local.rs / pallet_assets_foreign.rs`.
type Local = pallet_assets::Pallet::<Runtime, TrustBackedAssetsInstance>;
type Foreign = pallet_assets::Pallet::<Runtime, ForeignAssetsInstance>;
let mut list = Vec::<BenchmarkList>::new();
list_benchmarks!(list, extra);
@@ -1197,6 +1204,9 @@ impl_runtime_apis! {
type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::<Runtime>;
type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::<Runtime>;
type Local = pallet_assets::Pallet::<Runtime, TrustBackedAssetsInstance>;
type Foreign = pallet_assets::Pallet::<Runtime, ForeignAssetsInstance>;
let whitelist: Vec<TrackedStorageKey> = vec![
// Block Number
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(),