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

Make xcm config index friendly #3113

Merged

Conversation

yrong
Copy link
Contributor

@yrong yrong commented Dec 19, 2024

⚠️ Breaking Changes ⚠️

XCMv2 will no longer be supported.

What does it do?

Always use TrailingSetTopicAsId and WithUniqueTopic to be consistent with system Parachains.

What value does it bring to the blockchain users?

Make indexing the Xcm across multiple chains a bit easier. e.g: a transfer from Moonbeam to Ethereum:

@RomarQ RomarQ requested a review from Agusrodri December 19, 2024 15:15
Copy link
Contributor

@RomarQ RomarQ left a comment

Choose a reason for hiding this comment

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

LGTM

RomarQ
RomarQ previously approved these changes Dec 19, 2024
Agusrodri
Agusrodri previously approved these changes Dec 19, 2024
@RomarQ RomarQ added B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D3-trivial PR contains trivial changes in a runtime directory that do not require an audit not-breaking Does not need to be mentioned in breaking changes labels Dec 19, 2024
@yrong yrong dismissed stale reviews from Agusrodri and RomarQ via f5b7996 December 20, 2024 04:40
@yrong yrong changed the title Barrier with TrailingSetTopic Make xcm config index friendly Dec 20, 2024
@yrong
Copy link
Contributor Author

yrong commented Dec 20, 2024

@RomarQ @Agusrodri
Thanks for the review! I add another change to use WithUniqueTopic sending outbound Xcm. Please take another look to see if that makes sense.

Copy link
Contributor

@alistair-singh alistair-singh left a comment

Choose a reason for hiding this comment

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

+1

@RomarQ RomarQ added breaking Needs to be mentioned in breaking changes and removed not-breaking Does not need to be mentioned in breaking changes labels Dec 20, 2024
@RomarQ
Copy link
Contributor

RomarQ commented Dec 20, 2024

@RomarQ @Agusrodri Thanks for the review! I add another change to use WithUniqueTopic sending outbound Xcm. Please take another look to see if that makes sense.

We may need to wait for safeXcmVersion to be set to v3, since SetTopic does not exist in XCMv2. Currently in progress, but will take some time since it needs to go through governance.

Context: SetTopic does not exist on v2

@Agusrodri @albertov19 do you guys agree?

@Agusrodri
Copy link
Contributor

@RomarQ @Agusrodri Thanks for the review! I add another change to use WithUniqueTopic sending outbound Xcm. Please take another look to see if that makes sense.

We may need to wait for safeXcmVersion to be set to v3, since SetTopic does not exist in XCMv2. Currently in progress, but will take some time since it needs to go through governance.

Context: SetTopic does not exist on v2

@Agusrodri @albertov19 do you guys agree?

I think that issue won't happen, as both Polkadot and Kusama already recognizes V4 as the XCM version for Moonbeam and Moonriver respectively.

The issue mentioned there, is due to the fact that the relay chain thinks that the parachain is configured in a lower version than the one it is being used to send the message.

You can check this by querying the xcmPallet.supportedVersion storage on each relay. You will notice that all parachains in both Kusama and Polkadot are configured to V4.

See this moonbeam forum post for more context.

@albertov19
Copy link
Contributor

@RomarQ @Agusrodri Thanks for the review! I add another change to use WithUniqueTopic sending outbound Xcm. Please take another look to see if that makes sense.

We may need to wait for safeXcmVersion to be set to v3, since SetTopic does not exist in XCMv2. Currently in progress, but will take some time since it needs to go through governance.

Context: SetTopic does not exist on v2

@Agusrodri @albertov19 do you guys agree?

Agree with @Agusrodri - Either way it would be good practice to bump safe xcm version. The issue is that this is a root track proposal and it requires a hefty decision deposit. I'm coordinating but this can take 1 month to enact at least.

Copy link
Contributor

@RomarQ RomarQ left a comment

Choose a reason for hiding this comment

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

@yrong please merge the latest changes from master and fix the tests.

@Agusrodri
Copy link
Contributor

Agusrodri commented Dec 20, 2024

I took a deeper look and indeed it fails when converting to V2 (our safeXcmVersion). It performs the conversion inside wrap_version function from polkadot xcm pallet:

This means we actually need to wait for the proposal that bumps the safeXcmVersion to 3 for this new router to work.

@yrong yrong requested a review from RomarQ December 28, 2024 15:12
Copy link
Contributor

@RomarQ RomarQ left a comment

Choose a reason for hiding this comment

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

Both moonriver and moonbeam are in the process to update safeXcmVerstion to 3. The changes look good to me 👍

Copy link
Contributor

@pLabarta pLabarta left a comment

Choose a reason for hiding this comment

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

👍

@RomarQ RomarQ merged commit aa523e4 into moonbeam-foundation:master Jan 6, 2025
39 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes breaking Needs to be mentioned in breaking changes D3-trivial PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants