Transact without specifying weight#6228
Conversation
| use sp_version::NativeVersion; | ||
| use sp_version::RuntimeVersion; | ||
| use xcm::v4::{Assets, InteriorLocation, Location, SendError, SendResult, SendXcm, XcmHash}; | ||
| use xcm::v5::{Assets, InteriorLocation, Location, SendError, SendResult, SendXcm, XcmHash}; |
There was a problem hiding this comment.
@franciscoaguirre yes, yes, my favorite, I think we should use xcm::latest here :D
@seadanda I also think we should refactor polkadot/runtime/parachains/src/coretime/mod.rs to use xcm::latest instead of the specific xcmV4 version. If I understand correctly, this pallet only sends some XCM at some point and does not store XCM data/structs, so it should be fine and preferable to use xcm::latest.
Keeping this pallet on xcmV4 while migrating the rest to xcmV5 could lead to potential issues, as we would need to manage multiple imports in the fellows' runtimes, e.g., xcm::v4::SendXcm and xcm::v5::SendXcm.
For now, it’s fine on the master since xcmV4 is the latest version. However, I recommend refactoring the coretime pallet directly on the master branch before merging xcmV5.
| "Max weight bigger than require at most", | ||
| ); | ||
|
|
||
| return Err(XcmError::MaxWeightInvalid) |
There was a problem hiding this comment.
haha, now we could remove MaxWeightInvalid from the xcm spec - related to the #6199
(no need to do anything here, just a comment :))
0fc5cc8 to
a044c7c
Compare
|
bot fmt |
|
@franciscoaguirre https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7657414 was started for your command Comment |
|
@franciscoaguirre Command |
|
@bkontur Updated with feedback |
# Context This PR aims to introduce XCMv5, for now it's in progress and will be updated over time. This branch will serve as a milestone branch for merging in all features we want to add to XCM, roughly outlined [here](polkadot-fellows/xcm-format#60). More features could be added. ## TODO - [x] Migrate foreign assets from v3 to v4 - [x] Setup v5 skeleton - [x] Remove XCMv2 - [x] #5390 - [x] #5585 - [x] #5420 - [x] #5876 - [x] #5971 - [x] #6148 - [x] #6228 Fixes #3434 Fixes #4190 Fixes #5209 Fixes #5241 Fixes #4284 --------- Signed-off-by: Adrian Catangiu <[email protected]> Co-authored-by: Adrian Catangiu <[email protected]> Co-authored-by: Andrii <[email protected]> Co-authored-by: Branislav Kontur <[email protected]> Co-authored-by: Joseph Zhao <[email protected]> Co-authored-by: Nazar Mokrynskyi <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Shawn Tabrizi <[email protected]> Co-authored-by: command-bot <> Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Serban Iorga <[email protected]>
Addresses #4284
For V5, removed
required_weight_at_mostfromTransact.The weigher now has to decode the call inside of a transaction in order to know it's dispatch weight.
It's harder to make mistakes now, since the user no longer specifies a weight value which might be wrong.