Conversation
pallets/withdraw-teleport/src/lib.rs
Outdated
| WithdrawAsset(assets.clone()), | ||
| BurnAsset(assets), | ||
| ]); | ||
| T::Weigher::weight(&mut message).map_or(Weight::MAX, |w| <T as pallet::Config>::WeightInfo::withdraw_and_teleport().saturating_add(w)) |
There was a problem hiding this comment.
I'm not 100% sure about this but here is my concern:
You are computing the weight for the XCM messages and once you have the result you sum that weight to the benchmarking for the extrinsic weight. Aren't these XCM messages charged already on the XCM Executor when the messages are processed? In other terms , are you not charging twice the XCM messages?
There was a problem hiding this comment.
I stuck to the pattern used on pallet-xcm and traced relevant PR even though I agree it's not fully clear to me either. Already discussed this with xcm team and agreed on keeping it until they address it further just to be sure on not being undercharging.
There was a problem hiding this comment.
What I do also realize is that if I want to fully stick to the pattern I should also add pallet-xcm send weight as it is also called inside the extrinsic, this is opaque on the case of teleport and reserve as it is done inside the instructions.
| // Measured: `177` | ||
| // Estimated: `3642` | ||
| // Minimum execution time: 87_000_000 picoseconds. | ||
| Weight::from_parts(88_000_000, 3642) |
There was a problem hiding this comment.
for some reason the ref_time is different from the benchmark result:
Even if this will not be final results, because they have to be properly benchmarked with the bot i'm curious about this.
There was a problem hiding this comment.
No description provided.