-
Notifications
You must be signed in to change notification settings - Fork 141
[AHM] Sovereign Account Translation #594
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
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c4d582a
[AHM] Sovereign account translation
ggwpez c694b70
fix
ggwpez 414e327
fix
ggwpez c17033e
Add docs
ggwpez 9d70251
docs
ggwpez 345ebfe
example
ggwpez c4b7497
fmt
ggwpez 0d4c211
link source
ggwpez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Account Migration | ||
|
|
||
| Accounts are migrated with all their balance, locks and reserves at the beginning of the Asset Hub | ||
| migration. | ||
|
|
||
| ## User Impact | ||
|
|
||
| Users need to be aware that all of their funds will be moved from the Relay chain to the Asset Hub. | ||
| The Account ID will stay the same. This ensures that normal user accounts will be to control their | ||
| funds on Asset Hub. | ||
|
|
||
| ## Sovereign Account Translation | ||
|
|
||
| For parachain sovereign accounts, it is not possible to just use the same account ID. The sovereign | ||
| account address of a parachain is calculated differently, depending on whether it is the account on | ||
| the Relay or a parachain (like Asset Hub). | ||
|
|
||
| There are different kinds of sovereign accounts. In this context, we only focus on these parachain | ||
| sovereign accounts: | ||
| - On the Relay: derived from `"para" ++ para_id ++ 00..` | ||
| - On the Asset Hub and all other sibling parachains: derived from `"sibl" ++ para_id ++ 00..` | ||
|
|
||
| Our translation logic inverts the derivation and changes the prefix from `"para"` to `"sibl"` for | ||
| all accounts that match the pattern `"para" ++ para_id ++ 00..`. The full list of translated | ||
| accounts is in [this CSV file](./sovereign_account_translation.csv). | ||
|
|
||
| It is advised that parachains check that they can control their account on Asset Hub. They can also | ||
| forego this check if they do not need control thereof - for example when they are not holding any | ||
| funds on their relay sovereign account. However, please note that someone could still send funds to | ||
| that address before or after the migration. | ||
|
|
||
| Example for Bifrost: this is the [relay sovereign account](https://polkadot.subscan.io/account/13YMK2eeopZtUNpeHnJ1Ws2HqMQG6Ts9PGCZYGyFbSYoZfcm) and it gets translated to this [sibling sovereign account](https://assethub-polkadot.subscan.io/account/13cKp89TtYknbyYnqnF6dWN75q5ZosvFSuqzoEVkUAaNR47A). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.