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

XCM v2/3 is not XCMP-full compatible #6543

Closed
xlc opened this issue Jan 12, 2023 · 2 comments
Closed

XCM v2/3 is not XCMP-full compatible #6543

xlc opened this issue Jan 12, 2023 · 2 comments

Comments

@xlc
Copy link
Contributor

xlc commented Jan 12, 2023

Right now we have XCMP lite that parachain send XCM to another parachain via relaychain route.
In future, we will have XCMP full that parachain send XCM to another parachain directly without any intermediary.

Currently, for many operations such as reserved transfer, the XCM is sent to relaychain, relaychain execute it, and dispatch a modified XCM to dest chain for execution. This is not XCMP compatible as there will be no intermediary chain to execute the XCM before delivering it to dest chain.

Relaychain should really only do the message delivery and no execution for HRMP. Otherwise XCMP-lite won't be XCMP-full compatible, which is the goal of XCMP-lite.

@xlc
Copy link
Contributor Author

xlc commented Jan 12, 2023

For example, HydraDX send DAI to Acala, this is the outgoing message from HydraDX that got executed by Polkadot

{
  "v2": [
    {
      "withdrawAsset": [
        {
          "id": {
            "concrete": {
              "parents": 0,
              "interior": {
                "x1": {
                  "generalKey": "0x0254a37a01cd75b616d63e0ab665bffdb0143c52ae"
                }
              }
            }
          },
          "fun": {
            "fungible": "0x0000000000000001158e460913d00000"
          }
        }
      ]
    },
    {
      "clearOrigin": null
    },
    {
      "buyExecution": {
        "fees": {
          "id": {
            "concrete": {
              "parents": 0,
              "interior": {
                "x1": {
                  "generalKey": "0x0254a37a01cd75b616d63e0ab665bffdb0143c52ae"
                }
              }
            }
          },
          "fun": {
            "fungible": "0x00000000000000008ac7230489e80000"
          }
        },
        "weightLimit": {
          "limited": 5000000000
        }
      }
    },
    {
      "depositReserveAsset": {
        "assets": {
          "wild": {
            "all": null
          }
        },
        "maxAssets": 1,
        "dest": {
          "parents": 0,
          "interior": {
            "x1": {
              "parachain": 2000
            }
          }
        },
        "xcm": [
          {
            "buyExecution": {
              "fees": {
                "id": {
                  "concrete": {
                    "parents": 2,
                    "interior": {
                      "x2": [
                        {
                          "parachain": 2000
                        },
                        {
                          "generalKey": "0x0254a37a01cd75b616d63e0ab665bffdb0143c52ae"
                        }
                      ]
                    }
                  }
                },
                "fun": {
                  "fungible": "0x00000000000000008ac7230489e80000"
                }
              },
              "weightLimit": {
                "limited": 5000000000
              }
            }
          },
          {
            "depositAsset": {
              "assets": {
                "wild": {
                  "all": null
                }
              },
              "maxAssets": 1,
              "beneficiary": {
                "parents": 0,
                "interior": {
                  "x1": {
                    "accountId32": {
                      "network": {
                        "any": null
                      },
                      "id": "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"
                    }
                  }
                }
              }
            }
          }
        ]
      }
    }
  ]
}

this is the hrmp message received by Acala

{
  "v2": [
    {
      "withdrawAsset": [
        {
          "id": {
            "concrete": {
              "parents": 0,
              "interior": {
                "x1": {
                  "generalKey": "0x0254a37a01cd75b616d63e0ab665bffdb0143c52ae"
                }
              }
            }
          },
          "fun": {
            "fungible": "0x00000000000000000de0b6b3a7640000"
          }
        }
      ]
    },
    {
      "clearOrigin": null
    },
    {
      "buyExecution": {
        "fees": {
          "id": {
            "concrete": {
              "parents": 0,
              "interior": {
                "x1": {
                  "generalKey": "0x0254a37a01cd75b616d63e0ab665bffdb0143c52ae"
                }
              }
            }
          },
          "fun": {
            "fungible": "0x00000000000000000de0b6b3a7640000"
          }
        },
        "weightLimit": {
          "limited": 5000000000
        }
      }
    },
    {
      "depositAsset": {
        "assets": {
          "wild": {
            "all": null
          }
        },
        "maxAssets": 1,
        "beneficiary": {
          "parents": 0,
          "interior": {
            "x1": {
              "accountId32": {
                "network": {
                  "any": null
                },
                "id": "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"
              }
            }
          }
        }
      }
    }
  ]
}

@xlc
Copy link
Contributor Author

xlc commented Jan 12, 2023

I might have misunderstood something & have some bugs in Chopsticks handling HRMP. Closing for now.

@xlc xlc closed this as completed Jan 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant