-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix XCM Barrier Rejection Handling to Return Incomplete with Weight #7843
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
Changes from all commits
822b950
5f78736
bb52a41
9f35778
a53a1d6
a988682
9db3337
807177b
b571112
7dd1c09
55e481b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -272,7 +272,11 @@ impl<Config: config::Config> ExecuteXcm<Config::RuntimeCall> for XcmExecutor<Con | |
| error = ?e, | ||
| "Barrier blocked execution", | ||
| ); | ||
| return Outcome::Error { error: XcmError::Barrier } | ||
|
|
||
| return Outcome::Incomplete { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice, I think this change make sense according to the: because Barrier check fails in the I am just wondering where else we are using
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Created the follow-up issue #7965 |
||
| used: xcm_weight, // Weight consumed before the error | ||
| error: XcmError::Barrier, // The error that occurred | ||
| }; | ||
| } | ||
|
|
||
| *id = properties.message_id.unwrap_or(*id); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| title: Fix XCM Barrier Rejection Handling to Return Incomplete with Weight | ||
| doc: | ||
| - audience: Runtime Dev | ||
| description: "This PR addresses an issue with the handling of message execution\ | ||
| \ when blocked by the barrier. Instead of returning an `Outcome::Error`, we modify\ | ||
| \ the behaviour to return `Outcome::Incomplete`, which includes the weight consumed\ | ||
| \ up to the point of rejection and the error that caused the blockage.\n\nThis\ | ||
| \ change ensures more accurate weight tracking during message execution, even\ | ||
| \ when interrupted. It improves resource management and aligns the XCM executor\u2019\ | ||
| s behaviour with better error handling practices." | ||
| crates: | ||
| - name: staging-xcm-executor | ||
| bump: patch | ||
| - name: staging-xcm-builder | ||
| bump: patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do these values come from? some benchmarking or something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original is from
let weight = BaseXcmWeight::get() * 3;.