-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Withdraw Unknown Assets Exhausts Block Weight #7182
Comments
CC @KiChjang |
We need to know how much weight the destination chain will use to execute the XCM, in order to provide a proper amount to Moreover, the API of the |
Thanks for the reply @KiChjang - But can you just provide the weight in the If you use
So this actually breaks the |
Wait sorry, the entire flow is actually weighed twice for 2 different purposes -- once for Let me check this first and I'll get back to you to see whether this is indeed the case. |
Okay, so I've figured out now that we indeed are overpaying for the weight. The |
Amazing! Thanks @KiChjang and @franciscoaguirre for the quick turnaround |
Currently, in Westmint based relay chains, if you include a
WithdrawAsset
instruction you getInvalid Transaction: Transaction would exhaust the block limits
. This is because the Weigher forcefully assigns the MAX if the asset is unknown:polkadot/runtime/westend/src/weights/xcm/mod.rs
Lines 64 to 65 in dbae30e
This completely blocks the possibility of controlling remote origins from the relay chain as you can't send XCM messages that withdraw other chains assets from remote origin accounts. One solution is to use
SUDO
andutility.withOrigin
but that limits the applicability as you can only do it in setups where SUDO is available and known.Why is the XCM message being weighted by
xcm.Send
? Is that really necessary as the XCM is not being locally executed? Another option would be to provide a field forrefTime
andproofSize
so it can be manually set and is not forced to be MAXThe text was updated successfully, but these errors were encountered: