-
Notifications
You must be signed in to change notification settings - Fork 14
Patched version of Cumulus needed for reserve-based transfer examples #53
Comments
I can confirm that the slide demo for reserve-based transfer works with cumulus tag |
This doesn't seem to be working for me. The last reserve-transfer demo (i.e. transferring xUSD from Bob's account on Trappist to Bob's account on Parachain 3000, involving a transfer between the 2 parachain's sovereign accounts on Statemine) does not execute successfully: the reserve-transfer fails with a |
indeed, the only reserve transfer I confirmed was Statemine>Trappist. @stiiifff which runtime did you use for Parachain 3000? |
Aah, the reserve-based transfer from Trappist to Parachain 3000 is the highlight of the show 😁️ |
I seem to have this working at https://github.com/paritytech/trappist/blob/frank/add-asset-teleport-test/integration-tests/reserve-transfer-asset/1_reserve_transfer_two_hops.yml (wip), but it required a hack in order to work around the below error that I was getting when the xcm message arrived on the reserve parachain for processing (sent from Trappist).
I tracked this down to https://github.com/paritytech/cumulus/blob/24ba075e7df5967dc610f82fc6aad6276854fa56/pallets/xcmp-queue/src/lib.rs#L847, whereby the resulting available block space for a xcm message seems be calculated as follows:
Based on Statemine config:
The calculated weight of the message ( The hack was to reduce the
My question is now why the xcm message is considered overweight by Statemine and how it should be implemented correctly to avoid the hack? |
@evilrobot-01 Good catch ! I ran into the same issue but did not have time to investigate further. Let's understand what is the purpose of the |
Confirmed that snippet of code in the Trappist runtime is indeed still enabling the reserve-transfer, as is the case in the updated
We are using the Cumulus I believe the only outstanding action is to understand what is going on with |
@evilrobot-01 what's missing to close this one ? |
It was just to figure out why the error was happening. I actually noticed the below when copying the zombienet config last night to another POC and wondered whether the max_message_size might be the root cause:
Suggested steps to close this:
I will set aside a day next week to get this resolved. |
I did some XCM work using Moonbase over the holidays and encountered the same issue at one point, but it seemed to be related to asset and weight configuration. I have implemented #102 as a step to better understanding and debugging things, where I did receive the same error depending on config used. I will re-visit the integration tests with updated config and see if finally resolved. |
Just received the weight limit reached error again on another project when simply setting a large value of
So it seems that it simply uses that value in checking the weight limit and any sufficiently large number provided will trigger the error. This implies the issue was originally caused by too large a weight being provided as a limit. I haven't confirmed this to be the case, but I feel this can probably be closed now based on all the above gathered insight. |
So, I re-tested the whole flow, and it seems that the "two-hop asset reserve-based transfer" (from Trappist -> Statemine -> Stout) is being considered as overweight on Statemine because of the As explained by @evilrobot-01, the calculated weight of the XCM message is therefore bigger than the maximum allowed:
By forcing the The value of 1 is mentioned in the rust documentation of the /// A reasonable parameter may be `1`, which makes half of the `max_weight` available for the first page,
/// then a quarter plus the remainder for the second &c. though empirical and or practical factors may
/// give rise to adjusting it further.
Based on this learning, and the assumption that complex XCM messages like the one referred to above are not that common (and thus, that the limit described here is not hit very often), we can close this issue. And if one wants to demo the two-hop reserve-based transfer, the workaround of adjusting the |
Amazing, thanks for finally joining all the 'dots' and making sense of it all! A great learning indeed!! 🙌 |
The reserve-based transfers that I demoed in the XCM presentation needed a patched version of Cumulus with these two PRs:
I was using this patched fork of Cumulus, but it would be nice if we could just use the Cumulus's main repo (master branch ideally, or a specific branch / tag).
Confirm if we still need the Cumulus fork or not anymore.
The text was updated successfully, but these errors were encountered: