Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[xcm] Assets: sort after prepend_with #4235

Merged
merged 2 commits into from
Apr 22, 2024
Merged

[xcm] Assets: sort after prepend_with #4235

merged 2 commits into from
Apr 22, 2024

Conversation

bkontur
Copy link
Contributor

@bkontur bkontur commented Apr 22, 2024

Adds sorting to the XCM Assets' prepend_with, which could modify the order of AssetId locations.

Relates to: #4186 (the same fix for reanchored)
Part of: #2129

@bkontur bkontur added R0-silent Changes should not be mentioned in any release notes T6-XCM This PR/Issue is related to XCM. labels Apr 22, 2024
@bkontur bkontur requested a review from a team as a code owner April 22, 2024 08:53
@bkontur bkontur self-assigned this Apr 22, 2024
@bkontur bkontur enabled auto-merge April 22, 2024 10:51
@bkontur bkontur added this pull request to the merge queue Apr 22, 2024
Merged via the queue into master with commit e0202ec Apr 22, 2024
139 of 141 checks passed
@bkontur bkontur deleted the bko-xcm-prepend-sort branch April 22, 2024 11:48
github-merge-queue bot pushed a commit that referenced this pull request Apr 23, 2024
…Xcm` router (for testing purposes) (#4186)

This PR:
- adds `EnsureDecodableXcm` (testing) router that attempts to *encode*
and *decode* passed XCM `message` to ensure that the receiving side will
be able to decode, at least with the same XCM version.
- fixes `pallet_xcm` / `pallet_xcm_benchmarks` assets data generation

Relates to investigation of
https://substrate.stackexchange.com/questions/11288 and missing fix
#2129 which did not get
into the fellows 1.1.X release.

## Questions/TODOs

- [x] fix XCM benchmarks, which produces undecodable data - new router
catched at least two cases
  - `BoundedVec exceeds its limit`
  - `Fungible asset of zero amount is not allowed`  
- [x] do we need to add `sort` to the `prepend_with` as we did for
reanchor [here](#2129)?
@serban300 (**created separate/follow-up PR**:
#4235)
- [x] We added decoding check to `XcmpQueue` -> `validate_xcm_nesting`,
why not to added to the `ParentAsUmp` or `ChildParachainRouter`?
@franciscoaguirre (**created separate/follow-up PR**:
#4236)
- [ ] `SendController::send_blob` replace `VersionedXcm::<()>::decode(`
with `VersionedXcm::<()>::decode_with_depth_limit(MAX_XCM_DECODE_DEPTH,
data)` ?

---------

Co-authored-by: Adrian Catangiu <adrian@parity.io>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
R0-silent Changes should not be mentioned in any release notes T6-XCM This PR/Issue is related to XCM.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants