mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 06:27:58 +00:00
e6f3106d89
This PR introduces changes enabling the transfer of coretime regions via XCM. TL;DR: There are two primary issues that are resolved in this PR: 1. The `mint` and `burn` functions were not implemented for coretime regions. These operations are essential for moving assets to and from the XCM holding register. 2. The transfer of non-fungible assets through XCM was previously disallowed. This was due to incorrectly benchmarking non-fungible asset transfers via XCM, which led to assigning it a weight of `Weight::Max`, effectively preventing its execution. ### `mint_into` and `burn` implementation This PR addresses the issue with cross-chain transferring regions back to the Coretime chain. Remote reserve transfers are performed by withdrawing and depositing the asset to and from the holding registry. This requires the asset to support burning and minting functionality. This PR adds burning and minting; however, they work a bit differently than usual so that the associated region record is not lost when burning. Instead of removing all the data, burning will set the owner of the region to `None`, and when minting it back, it will set it to an actual value. So, when cross-chain transferring, withdrawing into the registry will remove the region from its original owner, and when depositing it from the registry, it will set its owner to another account This was originally implemented in this PR: #3455, however we decided to move all of it to this single PR (https://github.com/paritytech/polkadot-sdk/pull/3455#discussion_r1547324892) ### Fixes made in this PR - Update the `XcmReserveTransferFilter` on coretime chain since it is meant as a reserve chain for coretime regions. - Update the XCM benchmark to use `AssetTransactor` instead of assuming `pallet-balances` for fungible transfers. - Update the XCM benchmark to properly measure weight consumption for nonfungible reserve asset transfers. ATM reserve transfers via the extrinsic do not work since the weight for it is set to `Weight::max()`. Closes: https://github.com/paritytech/polkadot-sdk/issues/865 --------- Co-authored-by: Branislav Kontur <bkontur@gmail.com> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com> Co-authored-by: Dónal Murray <donalm@seadanda.dev>
29 lines
1.1 KiB
Plaintext
29 lines
1.1 KiB
Plaintext
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
|
|
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json
|
|
|
|
title: Region reserve transfers fix
|
|
|
|
doc:
|
|
- audience: Runtime User
|
|
description: |
|
|
This PR introduces changes enabling the transfer of coretime regions via XCM.
|
|
There are two primary issues that are resolved in this PR:
|
|
1. The mint and burn functions were not implemented for coretime regions. These operations
|
|
are essential for moving assets to and from the XCM holding register.
|
|
2. The transfer of non-fungible assets through XCM was previously disallowed. This was due
|
|
to incorrectly benchmarking non-fungible asset transfers via XCM, which led to assigning
|
|
it a weight of Weight::Max, effectively preventing its execution.
|
|
|
|
migrations:
|
|
db: []
|
|
runtime:
|
|
- reference: pallet-broker
|
|
description: |
|
|
The region owner is optional.
|
|
|
|
crates:
|
|
- name: pallet-broker
|
|
- name: pallet-xcm
|
|
- name: coretime-rococo-runtime
|
|
- name: coretime-westend-runtime
|