Open bkontur opened 6 months ago
@acatangiu @franciscoaguirre guys, I need your eyes and fresh minds :), maybe I am missing something, I don't understand why we need to do those .saturating_add(w)
I thought either one weight or the other is used, not adding both (doubling)..
Either way, the second commit in this PR https://github.com/paritytech/polkadot-sdk/pull/3695 should also indirectly fix this, yes?
I thought either one weight or the other is used, not adding both (doubling)..
Either way, the second commit in this PR paritytech/polkadot-sdk#3695 should also indirectly fix this, yes?
wow, I think this commit exactly fixes this, I would even backport that commit to 1.7 / (1.8?) / 1.9 :)
I was confused by this at first, but then I saw it gives you credit to execute the message, which is this part.
I think the idea came from that, you have to pay for the extrinsic but you also pay for the execution so you don't need to do BuyExecution
in the message itself.
But I guess that only makes sense if prepare_and_execute
is somehow mocked during the extrinsic benchmarks. If it's being accounted for then you're accounting for it twice indeed 😅
Just being able to use WeightInfo
like in that commit would be great. It probably is what we should do
Just being able to use
WeightInfo
like in that commit would be great. It probably is what we should do
yes, exactly, also I just talked to the Adrian and we will patch his commit to the 1.7.0
@acatangiu that double-weights fix was patched to the 1.7.0 and now it is coming to the master here: https://github.com/paritytech/polkadot-sdk/pull/3927 so 1.10.0 release will be ok, but what about 1.8.0 / 1.9.0? Do we want/need to backport it?
I'm not sure if/how that PR fixes double weight or how they happened in the first place, for example benchmarking asset-hub-westend
in said PR didn't result in relevant changes to pallet_xcm::weights
.
I'm not sure if/how that PR fixes double weight or how they happened in the first place, for example benchmarking
asset-hub-westend
in said PR didn't result in relevant changes topallet_xcm::weights
.
this double-weights problem, you won't see it in the weights, but you would see it on the extrinsic fees: https://github.com/paritytech/polkadot-sdk/pull/3927/files#diff-742026ed87c0710683d2ef4263b463a3e6f0acfae3c8fad80f2f3d291088997fL991
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-L1003teleport_assets
- https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/pallet-xcm/src/lib.rs#L940-L945transfer_assets
- https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/pallet-xcm/src/lib.rs#L1299-L1308Is this adding ok? And does not double the actual weights?
For example for AssetHubRococo for
pallet_xcm::reserve_transfer_assets
, it adds:benchamark for
transfer_reserve_asset
which 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-L97benchmark 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-L117Why we adds "reserve+delivery-to-parent" + "reserve+delivery-to-sibling"?
I think we should remove maybe those:
.saturating_add(w)
TODO