-
Notifications
You must be signed in to change notification settings - Fork 503
Prep for Shiden AssetHub migration #1533
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
Conversation
ashutoshvarma
left a comment
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.
Did we test it with chopsticks?
Dinonard
left a comment
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.
Not sure I understand about the pallet calls that will be disabled though.
Checking the docs provided by Parity, it relates to reserve transfer which is only used for transferring tokens for which Astar/Shiden are reserve.
Also, about the solution/approach - perhaps a more sound one would be to disable relay chain as valid reserve via a dedicated call, i.e. by changing some value? My only concern is the requirement for timing the runtime upgrade.
Yes the docs are not clear enough agree. But this message is more detailed. The issue is DOT/KSM transfers between 2 Paras. Also check this test
For Also during migration it will still be possible to use XCM using |
|
@ashutoshvarma I haven't specifically tested with chopsticks. However I've tested it with e2e-tests |
I see, but it's for the We should only need to block
I see, and your idea is fine. |
Dinonard
left a comment
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.
Looking at the docs for migration, I think I can phrase my concern now properly. :)
Do we really need to apply these changes to the runtime?
Asking this since I thought the flow would be something like:
- apply runtime-1700
- AH migration happens
- disable relay chain as reserve (in some future runtime upgrade)
The rest should be handled offchain, by the UI & apps.
I might be missing something, but don't see the need to handle this via 2 separate runtime upgrades.
I haven't considered it might be unsuported. This simplify a lot of things. I'll revert the But it remains for Xtokens though. I also planned to have the flow as you described. It's because of the bug/issue that we need to have this intermediary runtime upgrade. |
I understand your point, but still, even if this happens, it's because someone executed this call. Instead, can we adjust your solution so that the With that approach, both Shiden and Astar runtime code updates can be handled immediately. EDIT: This can also be tested using the integration testing. |
Dinonard
left a comment
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.
Can you test this using integration test?
Also, since this new read has been introduced, we should account for the weight somewhere. Of course, it's not the end of the world if we ignore it since it's just one read and we'll remove it later, but in that case please add a comment somewhere that it's ignored on purpose.
primitives/src/xcm/mod.rs
Outdated
| pub struct ReserveAssetFilter<T>(PhantomData<T>); | ||
| impl<T> ContainsPair<Asset, Location> for ReserveAssetFilter<T> | ||
| where | ||
| T: pallet_xc_asset_config::Config, |
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 understand this is temporary, but we should avoid making the entire pallet a dependency here. Instead, it could be handled by a simpler trait, like Get<MigrationStep> which the pallet can then implement.
primitives/src/xcm/mod.rs
Outdated
| && !matches!(reserve_location.first_interior(), Some(Parachain(_))); | ||
|
|
||
| // KSM/DOT token is not allowed to be transferred to sibling parachain as it will use relay as reserve during migration | ||
| if is_relay_token && asset_hub_migration_step == MigrationStep::Ongoing { |
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.
Just a suggestion, but you'd probably get better readability if you handle migration steps using match.
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.
The approach of deactivating Xtokens calls using KSM reserves LGTM. Thank you for the testing effort!
2b3a8f5
|
/bench astar pallet_xc_asset_config |
|
Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/17494132837. |
|
Benchmarks have been finished. |
| // Estimated: `0` | ||
| // Minimum execution time: 13_646_000 picoseconds. | ||
| Weight::from_parts(13_783_000, 0) | ||
| .saturating_add(Weight::from_parts(0, 0)) |
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.
The proof size is 0 now with frame-omni-bencher v1, I am not sure if this is ok. I think it's because in the --json-input they are empty.
|
The benchmark issue has now been fixed in the latest master, rerunning them should give proper PoV results. |
…en-ah-migration-prep
|
/bench astar pallet_xc_asset_config |
|
Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/17947016025. |
|
Benchmarks have been finished. |
Minimum allowed line rate is |
|
Hi, |
Pull Request Summary
Ship 2, 3 and 4 described in this issue: #1532 :
EDIT: Not doing (3) this as transfer_assets is a blacklisted call:
3. Deactivate calls that can use Kusama as reserve: Throw error on transfer_assets and (limited)reserve_transfer_assets by using latest version on pallet_xcm (updated to latest commit of
stable2412)_Note:
Because of this issue in yamux, I am using a patched version
EDIT: Aslo updated e2e-tests PR