-
Notifications
You must be signed in to change notification settings - Fork 776
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
Added fallback_max_weight to Transact for sending messages to V4 chai… #6778
Added fallback_max_weight to Transact for sending messages to V4 chai… #6778
Conversation
…ns (#6643) Closes: #6585 Removing the `require_weight_at_most` parameter in V5 Transact had only one problem. Converting a message from V5 to V4 to send to chains that didn't upgrade yet. The conversion would not know what weight to give to the Transact, since V4 and below require it. To fix this, I added back the weight in the form of an `Option<Weight>` called `fallback_max_weight`. This can be set to `None` if you don't intend to deal with a chain that hasn't upgraded yet. If you set it to `Some(_)`, the behaviour is the same. The plan is to totally remove this in V6 since there will be a good conversion path from V6 to V5. --------- Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Adrian Catangiu <adrian@parity.io>
This pull request is amending an existing release. Please proceed with extreme caution,
Emergency Bypass
If you really need to bypass this check: add |
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
To fix this, XCM v5 Transact now also takes a `fallback_max_weight: Option<Weight>` parameter. | ||
This can be set to `None` if the instruction is not meant to be sent to chains running XCM versions lower than V5. | ||
If set to `Some(weight)`, a subsequent conversion to V4 will result in `Transact { require_weight_at_most: weight, .. }`. | ||
The plan is to remove this workaround in V6 since there will be a good conversion path from V6 to V5. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have already have a list of things we want to have in v6? It'd be good to add this one straight away so that we don't forget about it.
Backport of #6643 to stable2412.
We need it before the release so we have a good story with chains that haven't upgraded yet.