-
Notifications
You must be signed in to change notification settings - Fork 131
Description
Relates to the: https://github.com/polkadot-fellows/runtimes/issues/231#issue-2178704646
reserve_transfer_assets - https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/pallet-xcm/src/lib.rs#L997-L1003
teleport_assets - https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/pallet-xcm/src/lib.rs#L940-L945
transfer_assets - https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/pallet-xcm/src/lib.rs#L1299-L1308
Is this adding ok? And does not double the actual weights?
T::WeightInfo::reserve_transfer_assets().saturating_add(w)
T::WeightInfo::teleport_assets().saturating_add(w)
T::WeightInfo::transfer_assets().saturating_add(w)
For example for AssetHubRococo for pallet_xcm::reserve_transfer_assets, it adds:
-
benchamark for
transfer_reserve_assetwhich is configured to transfer to Parent, which covers reserve, send+delivery
https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs#L73-L97 -
benchmark for
pallet_xcm::reserve_transfer_assets, which is configured for delvering to sibling parachain, which also covers reserve+fee handling, send+delivery
https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/pallet_xcm.rs#L99-L117
Why we adds "reserve+delivery-to-parent" + "reserve+delivery-to-sibling"?
I think we should remove maybe those: .saturating_add(w)
TODO
- backport for 1.7 pallet-xcm: remove extrinsics guessed weight and rely on runtime benchmarks instead polkadot-sdk#3730
- backport for 1.8 - TODO:PR?
- backport for 1.9 - TODO:PR?
- make sure it lends to the master before 1.10 (03.04.2024) (as a part of pallet-xcm: add new extrinsic for asset transfers using explicit XCM transfer types polkadot-sdk#3695 or cherry-picked) merged here: pallet-xcm: fix weights for all XTs and deprecate unlimited weight ones polkadot-sdk#3927