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

fix(xcm): use single encoding for XCM messages #2278

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

peterwht
Copy link
Contributor

@peterwht peterwht commented Aug 27, 2024

Summary

Closes #_

  • [y] y/n | Does it introduce breaking changes? -> kinda, see notes below.
  • [y] y/n | Is it dependant on the specific version of cargo-contract or pallet-contracts?

A later release of pallet-contracts changes the expected XCM message format for xcm_execute and xcm_send from requiring a double encoded message to a single encoded message.

Compatible with pallet-contracts on polkadot-v1.11.0 and greater.

Description

ink!'s XCM support was originally merged on polkadot-v1.10.0, where XCM used execute_blob and send_blob. These accepted an encoded XCM message, which required that ink! double encode XCM messages.

However, in this commit Revert execute_blob and send_blob (#4266) , execute_blob was replaced by execute which accepts a VersionedXcm<RuntimeCall> message. This requires that ink! single encodes the XCM message.
Screenshot 2024-08-27 at 3 59 26 PM

XCM support in ink! has not had an official release, and remained in the master branch only. Additionally, since the initial support, pallet-contracts has stabilized the XCM host fns.

Checklist before requesting a review

  • My code follows the style guidelines of this project
  • I have added an entry to CHANGELOG.md
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works ->
  • Any dependent changes have been merged and published in downstream modules

Copy link
Contributor

@pgherveou pgherveou left a comment

Choose a reason for hiding this comment

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

Make sense I think if the tests are passing with a runtime that has the changed mentioned here, then it should be good to merge

Copy link

@AlexD10S AlexD10S left a comment

Choose a reason for hiding this comment

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

The CI failing here https://github.com/use-ink/ink/actions/runs/10586570908/job/29335623282?pr=2278 I think is the same problem we have building the docker image in cargo-contract: https://github.com/use-ink/cargo-contract/actions/runs/10556354226/job/29241730113

The nightly Rust version nightly-2024-02-08 is currently hardcoded for linting in the rust-toolchain.toml file. Does it needs to be updated?

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

Successfully merging this pull request may close these issues.

3 participants