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

Improve debuggability  #7079

Closed
Closed
@xlc

Description

I had a hard time to debug the XCM weight issue caused by #6785. All the error message I got is XcmError::Barrier.

I understand why propagate error is hard but we need an alternative.

One way is to add enough logs to indicate why an error is occurred. I think we already drop logging in production build so it shouldn't have any overhead. And then in releases, it will be great to also make a production build with logging and we can use wasm override to use those runtime to debug errors.

For example, we could refactor this code to log weight limit and max weight and say it failed due to under weighted

BuyExecution { weight_limit: Limited(ref mut weight), .. }
if weight.all_gte(max_weight) =>
{
*weight = max_weight;
Ok(())
},
BuyExecution { ref mut weight_limit, .. } if weight_limit == &Unlimited => {
*weight_limit = Limited(max_weight);
Ok(())
},
_ => Err(()),

Metadata

Assignees

No one assigned

    Labels

    J0-enhancementAn additional feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions