Skip to content
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

XCM extensions #17

Closed
xlc opened this issue Mar 7, 2021 · 2 comments
Closed

XCM extensions #17

xlc opened this issue Mar 7, 2021 · 2 comments

Comments

@xlc
Copy link
Contributor

xlc commented Mar 7, 2021

We should have optional XCM extensions for features that useful for some chain but not every chain will implement it

Required for #11, #12, #14

Also may need feature discovery to detect available features on destination chain. But it could just be a registry somewhere offchain.

@xlc
Copy link
Contributor Author

xlc commented Mar 7, 2021

What should be the strategy of including new XCM extensions?

I see few options:


Add new message type for each XCM extension

pub enum Xcm {
	// existing types
	Staking(StakingMessage),
	Governance(GovernanceMessage),
	Storage(StorageMessage),
}

Add just one message type for all extensions

pub enum Xcm {
	// existing types
	Extension(XcmExtensionMessage),
}

enum XcmExtensionMessage {
	Staking(StakingMessage),
	Governance(GovernanceMessage),
	Storage(StorageMessage),
}

Or something very generic

pub enum Xcm {
	// existing types
	Extension { extension_id: Vec<u8>, extension_payload: Vec<u8> },
}

@xlc
Copy link
Contributor Author

xlc commented Mar 8, 2021

Had a chat with Gav, will just use the first approach.

@xlc xlc closed this as completed Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant