Introduce Tinkernet multisig XCM configs to Kusama/Rococo through xcm-builder #7165
Conversation
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: |
@KiChjang Could you add review requests to other maintainers in this PR? |
@@ -345,6 +346,54 @@ impl<Network: Get<Option<NetworkId>>, AccountId: From<[u8; 20]> + Into<[u8; 20]> | |||
} | |||
} | |||
|
|||
/// Tinkernet ParaId used when matching Multisig MultiLocations. | |||
pub const TINKERNET_PARA_ID: u32 = 2125; |
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.
This test is assuming your kusama para-id, right? it should be in the kusama runtime file, not in XCM-builder.
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.
Renamed the constants to include the KUSAMA_ prefix.
@@ -241,6 +245,37 @@ where | |||
} | |||
} | |||
|
|||
/// Convert a Tinkernet Multisig `MultiLocation` value into a `Signed` origin. | |||
pub struct TinkernetMultisigAsNative<RuntimeOrigin>(PhantomData<RuntimeOrigin>); |
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.
Similarly, I think from an organization perspective, it is more correct for this configuration to be placed in the kusama runtime, as it is the only user of it. But I see that it is more "convenient" to do it like this.
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.
Kusama is not the only user of these converters, parachains will also import these into their xcm configurations from xcm-builder. I believe this also responds the previous 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.
About the previous comment: the TINKERNET_PARA_ID
is only valid on Kusama, right? So could be named KUSAMA_ TINKERNET_PARA_ID
.
bot rebase |
Rebased |
bot merge |
Waiting for commit status. |
52595c8
into
paritytech:master
🎉 |
Items specific to Kusama which go into common crates like a) be placed in a Kusama-specific path or have "Kusama" clearly placed in its name; and This code makes little sense outside of the very specific context it is designed for. In particular, matching code like Once the runtimes are moved out into the Fellowship repo, this code should be, too. For now it can reasonably live next to the runtime, but I think it's just too inherently opinionated to be placed in |
@gavofyork From what I understand, to do this I need to send a |
This PR introduces the XCM configs required for Saturn multisigs from Tinkernet to transact on Kusama/Rococo, this is done simply by providing implementations to convert the MultiLocation to both an AccountId and a Signed RuntimeOrigin.
For more information regarding why this approach of using a very specific derivation function and defining this function in the receiver chain's runtime is necessary for Saturn, and also general information about Saturn, you can check the discussion that was opened in the forum prior: https://forum.polkadot.network/t/saturn-xcm-multisig-integration-on-kusama-a-technical-discussion/2694
For a more high level overview of Saturn, check this article: https://invarch.medium.com/saturn-the-future-of-multi-party-ownership-ac7190f86a7b
Please ask any questions left unanswered by the forum post and I'll make sure to clarify them!
Obs: My editor applied auto-format to some sections of the files edited, if those are unwanted for any reason, let me know and I'll revert them.Those were actually the incorrect formatting standard required by CI, so I fixed them.