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

XCM Account Derivation #3505

Closed
wants to merge 2 commits into from
Closed

XCM Account Derivation #3505

wants to merge 2 commits into from

Conversation

apopiak
Copy link
Contributor

@apopiak apopiak commented Jul 20, 2021

This PR adds a struct to derive a local account id from a parachain + account combination and adds it to Kusama, Rococo and Westend.

@apopiak
Copy link
Contributor Author

apopiak commented Jul 20, 2021

related to #3500

@apopiak apopiak added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. labels Jul 20, 2021
X2(Parachain(para_id), AccountId32 { id, network })
if network == NetworkId::Any || &network == &Network::get() =>
{
(para_id, id).using_encoded(blake2_256)
Copy link
Member

@gavofyork gavofyork Jul 20, 2021

Choose a reason for hiding this comment

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

Should have a disambiguating prefix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Like generate a 28byte array and prepend a u32 with the para id?

@apopiak apopiak closed this Jul 20, 2021
@apopiak
Copy link
Contributor Author

apopiak commented Jul 20, 2021

Will not likely be actually used in practice. Might revisit if parachains want to enable this kind of pattern.

@louismerlin louismerlin removed the D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. label Oct 13, 2022
@acatangiu acatangiu deleted the apopiak/account-derivation branch December 12, 2022 10:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants