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

AssetHubs - split weights for pallet_assets #2743

Merged
merged 25 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e276190
AssetHubs - split weights for pallet_assets
bkontur Jun 15, 2023
bc0a95f
Merge remote-tracking branch 'origin/master' into bko-fix-benchmarks
Jun 15, 2023
3b9259e
".git/.scripts/commands/bench/bench.sh" pallet asset-hub-kusama asset…
Jun 15, 2023
ee912a9
Merge branch 'master' of https://github.com/paritytech/cumulus into HEAD
Jun 16, 2023
b3440b0
".git/.scripts/commands/bench/bench.sh" pallet asset-hub-kusama asset…
Jun 16, 2023
796d5f9
".git/.scripts/commands/bench/bench.sh" pallet asset-hub-westend asse…
Jun 16, 2023
2202f8f
Merge branch 'master' of https://github.com/paritytech/cumulus into HEAD
Jun 16, 2023
45c3559
".git/.scripts/commands/bench/bench.sh" pallet asset-hub-polkadot ass…
Jun 16, 2023
bd41912
".git/.scripts/commands/bench/bench.sh" pallet asset-hub-westend asse…
Jun 16, 2023
7dd6b89
".git/.scripts/commands/bench/bench.sh" pallet asset-hub-polkadot ass…
Jun 16, 2023
1168381
Rename weight file for pallet_assets instances (polkadot)
bkontur Jun 19, 2023
fd50d42
Merge branch 'master' of https://github.com/paritytech/cumulus into HEAD
Jun 19, 2023
c234f9b
".git/.scripts/commands/bench/bench.sh" pallet asset-hub-polkadot ass…
Jun 19, 2023
b036dca
Rename weight file for pallet_assets instances (kusama/westend)
bkontur Jun 19, 2023
af07741
Merge remote-tracking branch 'origin/bko-fix-benchmarks' into bko-fix…
bkontur Jun 19, 2023
e4a1885
Merge remote-tracking branch 'origin/master' into bko-fix-benchmarks
bkontur Jun 19, 2023
6fd3c6f
".git/.scripts/commands/bench/bench.sh" pallet asset-hub-kusama asset…
Jun 19, 2023
f615c87
".git/.scripts/commands/bench/bench.sh" pallet asset-hub-westend asse…
Jun 19, 2023
b63a8da
Changed `pallet_assets_remote` -> `pallet_assets_foreign`
bkontur Jun 20, 2023
64d167e
fmt
bkontur Jun 20, 2023
c8fd4f0
".git/.scripts/commands/bench/bench.sh" pallet asset-hub-kusama asset…
Jun 20, 2023
ae2d651
Merge branch 'master' of https://github.com/paritytech/cumulus into HEAD
Jun 20, 2023
a1896f0
".git/.scripts/commands/bench/bench.sh" pallet asset-hub-westend asse…
Jun 20, 2023
ee317be
Merge branch 'master' of https://github.com/paritytech/cumulus into HEAD
Jun 20, 2023
004951f
".git/.scripts/commands/bench/bench.sh" pallet asset-hub-polkadot ass…
Jun 20, 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
18 changes: 14 additions & 4 deletions parachains/runtimes/assets/asset-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,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>;
Expand Down Expand Up @@ -311,7 +311,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_remote::WeightInfo<Runtime>;
type CallbackHandle = ();
type AssetAccountDeposit = ForeignAssetsAssetAccountDeposit;
type RemoveItemsLimit = frame_support::traits::ConstU32<1000>;
Expand Down Expand Up @@ -798,8 +798,8 @@ extern crate frame_benchmarking;
mod benches {
define_benchmarks!(
[frame_system, SystemBench::<Runtime>]
[pallet_assets, Assets]
[pallet_assets, ForeignAssets]
[pallet_assets, Local]
[pallet_assets, Remote]
[pallet_balances, Balances]
[pallet_multisig, Multisig]
[pallet_nfts, Nfts]
Expand Down Expand Up @@ -1032,6 +1032,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_remote.rs`.
type Local = pallet_assets::Pallet::<Runtime, TrustBackedAssetsInstance>;
type Remote = pallet_assets::Pallet::<Runtime, ForeignAssetsInstance>;

let mut list = Vec::<BenchmarkList>::new();
list_benchmarks!(list, extra);

Expand Down Expand Up @@ -1158,6 +1165,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 Remote = pallet_assets::Pallet::<Runtime, ForeignAssetsInstance>;

let whitelist: Vec<TrackedStorageKey> = vec![
// Block Number
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ pub mod block_weights;
pub mod cumulus_pallet_xcmp_queue;
pub mod extrinsic_weights;
pub mod frame_system;
pub mod pallet_assets;
pub mod pallet_assets_local;
pub mod pallet_assets_remote;
pub mod pallet_balances;
pub mod pallet_collator_selection;
pub mod pallet_multisig;
Expand Down
Loading