Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Deny using relay chain for reserve transfers #1169

Merged
merged 16 commits into from
Apr 20, 2022
Merged

Deny using relay chain for reserve transfers #1169

merged 16 commits into from
Apr 20, 2022

Conversation

gilescope
Copy link
Contributor

@gilescope gilescope commented Apr 12, 2022

Fixes #5233

I will move DenyThenTry to polkadot xcm and then reference it from there in a later release, but we'd like to ship this for v900.

@nuke-web3
Copy link
Contributor

DumbQ: Any action needed for the template in this PR?

@NachoPal
Copy link
Contributor

DumbQ: Any action needed for the template in this PR?

Considering that the template will be used mostly by future Parachains, I would say yes, it is a good idea to reject by default DepositReserveAsset and TransferReserveAsset if the destination is the MultiLocation { parents: 1, interior: Here }

The proper way to reserve transfer funds back to the reserve is by making use of InitiateReserveWithdraw

Unless somebody disagrees, can you @gilescope add also the change to the parachain-template runtime?

@NachoPal
Copy link
Contributor

Has it been tested?

@gilescope
Copy link
Contributor Author

RE testing: I've tested that attempting to do a limited reserve asset transfer on statemine/statemint leads to a failure of Barrier. I've not run up a local westmint which does not filter Execute and tried executing individual instructions but that is something we could do.

@hbulgarini hbulgarini added B7-runtimenoteworthy T6-XCM This PR/Issue is related to XCM. labels Apr 19, 2022
@gilescope
Copy link
Contributor Author

So just to confirm, I've checked that we can still do teleports back and forth between the relay and statemine, and that we can do a reserve asset transfer on statemine to the community parachain wtihout it getting blocked by the barrier.

Copy link
Contributor

@hbulgarini hbulgarini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@gilescope gilescope merged commit 563ce7c into master Apr 20, 2022
@gilescope gilescope deleted the giles-barrier branch April 20, 2022 09:14
}
}

// See issue #5233
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, meant to make a follow up PR to docs in parachain-template. Will fix this too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T6-XCM This PR/Issue is related to XCM. T7-system_parachains This PR/Issue is related to System Parachains.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not possible to reserve_transfer_assets back from Statemine to Kusama
8 participants