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.
👉 To be merged into the AHM dev branch.
quote from the
proxy.md
doc:Pallet Proxy
The proxy pallet consists of two storage variables.
Storage: Proxies
The Proxies storage map maps a delegator to its delegates. It can be translated one-to-one by mapping the
ProxyType
andDelay
fields.Proxy Type Translation
The different kinds that are possible for a proxy are a runtime injected type. Since these are different for each runtime, we need a converter that maps the Relay to AH
ProxyType
as close as possible to keep the original intention. The Relay kind is defined here and the AH version here. This is done by injecting aRcToProxyType
converter into the Asset Hub migration pallet. This is not bullet proof since it relies on some copy&paste code instead of pulling in the Polkadot runtime into the AH runtime but it is the simplest solution.Mapping from Relay to AH looks as follows:
All variants that serve no purpose anymore on the Relay Chain are deleted from there. For example
Staking
. The ones that are still usable on the relay likeNonTransfer
are also deleted since there is no storage deposit taken anymore. (TODO think about what is best here)Translation of the Delay
The delay of a ProxyDefinition is measured in blocks. These are currently 6 seconds Relay blocks. To translate them to 12s AH blocks, we can divide the number by two.
Storage: Announcements
The Announcements storage maps proxy account IDs to Accouncement. Since an announcement contains a call hash, we cannot translate them for the same reason as with the Multisigs; the preimage of the hash would be either undecodable, decode to something else (security issue) or accidentally decode to the same thing.
We therefore do not migrate the announcements.
User Impact
Announcements need to be re-created
Proxies of type
Auction
are not migrated and need to be re-created on the RelayDoes not require a CHANGELOG entry