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:
an empty list of messages heading to the relay chain
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.
The InspectMessageQueue trait implementation for tuples doesn't discard empty lists, which is the cause of the first issue.
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.
When dry-running the
polkadotXcm.transferAssets
extrinsic using the newdryRunApi
, AssetHub reports excessive items in theforwardedXcms
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:
ReserveAssetDeposited
message heading to the destination chain repeated several timesYou can see this by dry-running the following using any account with at least 1 USDT as the Origin.
The cause
InspectMessageQueue
trait implementation for tuples doesn't discard empty lists, which is the cause of the first issue.InspectMessageQueue
trait implementation forSovereignPaidRemoteExporter
reuses theRouter
passed as the generic parameter. AssetHub's XCM config contains bridge routers that useSovereignPaidRemoteExporter
and pass theXcmpQueue
to the generic parameter. Thus,XcmpQueue
's messages got into the final list several times.