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

XCM: Location Conversion for AccountKey20#2576

Merged
shawntabrizi merged 1 commit intoparitytech:masterfrom
4meta5:ethereum-account-conversion
Mar 7, 2021
Merged

XCM: Location Conversion for AccountKey20#2576
shawntabrizi merged 1 commit intoparitytech:masterfrom
4meta5:ethereum-account-conversion

Conversation

@4meta5
Copy link
Contributor

@4meta5 4meta5 commented Mar 6, 2021

Most substrate chains use Junction::AccountId32 when referring to their native account id type as a MultiLocation so AccountId32Aliases and SignedAccount32AsNative are the relevant types to construct the LocationConverter (object that implements trait LocationConversion<AccountId>).

Moonbeam (and any other chains that set system::AccountId: H160) use Junction::AccountKey20 when referring to their native account id type as a MultiLocation. This requires a different implementation for AccountIdAliases and SignedAccountAsNative, but the only difference is that the AccountId trait bounds use [u8; 20] instead of [u8; 32].

Let me know if there are any other types that Moonbeam must add to ensure messages sent to the chain form the local account id as [u8; 20]. These types are already included in this PR with Moonbeam's XCMP pallets.

@bkchr bkchr requested a review from shawntabrizi March 6, 2021 22:09
@shawntabrizi shawntabrizi added 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. labels Mar 7, 2021
@shawntabrizi shawntabrizi changed the title location conversion types for chains with Junction::AccountKey20 as native account id type XCM: Location Conversion for AccountKey20 Mar 7, 2021
@shawntabrizi shawntabrizi merged commit 6aa73f2 into paritytech:master Mar 7, 2021
@4meta5 4meta5 deleted the ethereum-account-conversion branch March 8, 2021 00:15
ordian added a commit that referenced this pull request Mar 9, 2021
* master:
  Make Substrate deps uniform (#2589)
  Mostly, let guide reflect #2579 (#2583)
  add accountkey20 conversion impls (#2576)
  Substrate companion #8275 (#2575)
  Make warning nicer (#2569)
  Print an error if a collator connects to a node without real-overseer (#2563)
  add log message when real-overseer is enabled (#2565)
  Jaeger spans for availability distribution (#2559)
  Fix links in docs. (#2556)
  bump spec versions in kusama, polkadot and westend again (#2557)
  Guide update for availability distribution. (#2554)
  Whole subsystem test for new availability-distribution (#2552)
  Companion for `ExecuteBlock` changes in Substrate (#2548)
  Initialize telemetry earlier (#2549)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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.

2 participants