-
Notifications
You must be signed in to change notification settings - Fork 86
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
refactor: Drop tranche multiLocation #1340
Conversation
We make it just `None` since having a MultiLocation for Tranche tokens implies they are XCM-transferrable when in fact we have specific Xcm configs in place to forbid tranche tokens transfers. Tranche tokens are only transferrable through Centrifuge Connectors, which guarantee the permissioned-nature of tranche tokens are respected.
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.
I would really like us to stick with the naming for upgrades, so use UpgradeAltair1028
instead of just the plain migration. Makes it so much easier in the future to remove what needs to be removed.
Otherwise, looks good!
For approval:
Need clarification whether the following will never fail:
let location: MultiLocation = old_location.clone().try_into().map_err(|()| Error::<T>::BadVersion)?;
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! Left some comments about crates we can likely remove from the pool-system
deps.
@mustermeiszer what's the context for this code snippet? 🤔 |
Just the only error that could happen behind the expect call in the upgrade logic. Not really a blocker though. . Was just curious or wanted to be sure they expect never gets triggered |
Yeah, that's a valid concern. Maybe we can just |
@wischli @mustermeiszer I believe I have addressed everything, thanks for the feedback and I look forward for the next round :) |
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.
LGTM!
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.
LGTM! I left two nitpicks which definitely don't need to be addressed.
UPDATE: Seeing the conflicts, I would recommend to move your runtime migration code into its own module inside runtime/$runtime/migrations.rs
. In #1342, I ensured all imports tied to a specific migration where part of the module's scope such that deprecated migrations can be removed seamlessly without breaking clippy.
ad08698
to
f3e103d
Compare
@wischli @mustermeiszer could you approve this again? :) |
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.
Re-approving based on previous approvals 😃
Closes #1336
We make
AssetMetadata.location
of aTranche
simplyNone
since having aMultiLocation
for Tranche tokens implies they are XCM-transferrable when in fact we have specific Xcm configs in place to forbid tranche tokens transfers. Tranche tokens are only transferrable through Centrifuge Connectors, which guarantees that the permissioned-nature of tranche tokens are respected.Changes
AssetMetadata.location
of aTranche
token toNone
To Do
CurrencyId::Tranche
in entry in theAssetRegistry
, updates that asset by settinglocation
toNone
.Discussion
Can we dry the migration so that we define it once for all all runtimes? We need to reference directly on the (external dependency)
orml_asset_registry
which I don't think we can abstract over the runtime it's in 🤔