-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XCM message weight computation must give the same result at both sides of the bridge #1417
Comments
This issue shall be handled very carefully, since there are many caveats. There's buy execution command, which takes and withdraws assets at the target chain. Does xcm weigher return weight of this dispatch? If so, then it'll be paid twice - once at the source chain and once at the target (during XCM execution). UPD: an alternate (and probably better) solution would be to add something like |
Thoughts in-progress:
So I suggest a following solution:
This should work for all possible use cases - for XCM, for encoded calls, enums, ... |
* [ci] Send bench results to S3 * move publish stage
That's the actual bug found in #1412. In RialtoParachain configuration the weight of single XCM instruction was set to the
1_000_000
, while at the Millau it was set to the1_000_000_000
.Messages relay is currently using source client (RialtoParachain in our case) to get message dispatch weight. So for simplest message it has been returning
1_000_000
for the message. During dispatch, messages pallet has been using at-Millau XCM weigher, which has been returning1_000_000_000
instead (seeFromBridgedChainMessageDispatch::dispatch_weight
). So delivery transaction was failing without even delivering single message, effectively blocking lane.This is definitely a misconfiguration, but it has raised some questions. E.g. - can we assume that XCM weighers will always be in-sync on both chains? I don't think so, given possible runtime upgrades. So imo to avoid blocking lanes, we need to transfer pre-computed dispatch weight over the wire (as it was with encoded calls).
The text was updated successfully, but these errors were encountered: