-
Notifications
You must be signed in to change notification settings - Fork 741
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
pallet-xcm: Deprecate execute
and send
in favor of execute_blob
and send_blob
#3749
Conversation
@pgherveou Could you take a look at |
this should work, I am not too sure where your new MaxXcmEncodedSize is defined though. If that helps we can also not add the legacy function to the traits since at that point the contract implementation is still unstable and ok to change. |
I'll put only the new function in the traits then and ping you later to check everything would be fine with contracts. |
Co-authored-by: PG Herveou <pgherveou@gmail.com>
New PJS utility to allow same UX for these new extrinsics is already available, thanks to @serban300 👍 |
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.
looks good! waiting for TODOs to be finished before approving.
Can you tell a bit more about the motivations
The new interface is a bit awkward, the caller needs to create an XCM, then encode it, so that it's later decoded again and processed inside the pallet. Couldn't we just get away with an extra encoded_size() check on the passed message to see if it fits the constraint? |
You only encode and then decode because you're writing the code in rust, but normal users would already have to encode their XCM. |
bot help |
@pgherveou @bkontur this is ready, waiting for final review |
… and `send_blob` (paritytech#3749) `execute` and `send` try to decode the xcm in the parameters before reaching the filter line. The new extrinsics decode only after the filter line. These should be used instead of the old ones. ## TODO - [x] Tests - [x] Generate weights - [x] Deprecation issue -> paritytech#3771 - [x] PRDoc - [x] Handle error in pallet-contracts This would make writing XCMs in PJS Apps more difficult, but here's the fix for that: polkadot-js/apps#10350. Already deployed! https://polkadot.js.org/apps/#/utilities/xcm Supersedes paritytech#1798 --------- Co-authored-by: PG Herveou <pgherveou@gmail.com> Co-authored-by: command-bot <> Co-authored-by: Adrian Catangiu <adrian@parity.io>
execute
andsend
try to decode the xcm in the parameters before reaching the filter line.The new extrinsics decode only after the filter line.
These should be used instead of the old ones.
TODO
execute
andsend
#3771This would make writing XCMs in PJS Apps more difficult, but here's the fix for that: polkadot-js/apps#10350.
Already deployed! https://polkadot.js.org/apps/#/utilities/xcm
Supersedes #1798