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

dryRunApi.dryRunCall: redundant items in forwardedXcms #5878

Open
mrshiposha opened this issue Sep 30, 2024 · 2 comments
Open

dryRunApi.dryRunCall: redundant items in forwardedXcms #5878

mrshiposha opened this issue Sep 30, 2024 · 2 comments
Assignees
Labels
T4-runtime_API This PR/Issue is related to runtime APIs. T6-XCM This PR/Issue is related to XCM.

Comments

@mrshiposha
Copy link
Contributor

When dry-running the polkadotXcm.transferAssets extrinsic using the new dryRunApi, AssetHub reports excessive items in the forwardedXcms field.

For instance, if one constructs an extrinsic to transfer USDT to a different chain and dry-runs it to obtain the forwarded messages, they will get the following:

  1. an empty list of messages heading to the relay chain
  2. the ReserveAssetDeposited message heading to the destination chain repeated several times

You can see this by dry-running the following using any account with at least 1 USDT as the Origin.

0x1f0b04010100411f0400010100bee592c66e1f3bd7f438a0800cbd2f2519ccc0ce763325091f778f1809cdbd4704040002043205011f0002093d000000000000

The cause

  1. The InspectMessageQueue trait implementation for tuples doesn't discard empty lists, which is the cause of the first issue.
  2. The InspectMessageQueue trait implementation for SovereignPaidRemoteExporter reuses the Router passed as the generic parameter. AssetHub's XCM config contains bridge routers that use SovereignPaidRemoteExporter and pass the XcmpQueue to the generic parameter. Thus, XcmpQueue's messages got into the final list several times.
@bkchr
Copy link
Member

bkchr commented Oct 1, 2024

CC @franciscoaguirre

@franciscoaguirre
Copy link
Contributor

Nice catch! I'm working on fixing this alongside #5708

@franciscoaguirre franciscoaguirre self-assigned this Oct 1, 2024
@franciscoaguirre franciscoaguirre added T4-runtime_API This PR/Issue is related to runtime APIs. T6-XCM This PR/Issue is related to XCM. labels Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T4-runtime_API This PR/Issue is related to runtime APIs. T6-XCM This PR/Issue is related to XCM.
Projects
None yet
Development

No branches or pull requests

3 participants