Fix XCM Barrier Rejection Handling to Return Incomplete with Weight#7843
Fix XCM Barrier Rejection Handling to Return Incomplete with Weight#7843raymondkfcheung merged 11 commits intomasterfrom
Conversation
|
/cmd prdoc --audience runtime_dev --bump patch |
…time_dev --bump patch'
| assert_eq!( | ||
| outcome, | ||
| Outcome::Incomplete { | ||
| used: Weight::from_parts(3000000000, 3072), |
There was a problem hiding this comment.
Where do these values come from? some benchmarking or something else?
There was a problem hiding this comment.
The original is from let weight = BaseXcmWeight::get() * 3;.
polkadot/xcm/xcm-executor/src/lib.rs
Outdated
| ); | ||
| return Outcome::Error { error: XcmError::Barrier } | ||
|
|
||
| // Return Outcome::Incomplete instead of Outcome::Error |
There was a problem hiding this comment.
This comment doesn't seem very helpful. We can either have a comment about why we return Outcome::Incomplete or no comment at all.
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
| ); | ||
| return Outcome::Error { error: XcmError::Barrier } | ||
|
|
||
| return Outcome::Incomplete { |
There was a problem hiding this comment.
nice, I think this change make sense according to the:
/// Execution started, but did not complete successfully due to the given error; given weight
/// was used.
Incomplete { used: Weight, error: Error },
/// Execution did not start due to the given error.
Error { error: Error },
because Barrier check fails in the Self::execute(origin, pre, id, weight_credit) - so it started.
I am just wondering where else we are using Outcome::Error instead of Incomplete { used: Weight, error: Error }
impl From<Error> for Outcome {
fn from(error: Error) -> Self {
Self::Error { error }
}
}
|
Successfully created backport PR for |
Backport #7843 into `stable2503` from raymondkfcheung. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> --------- Co-authored-by: Raymond Cheung <[email protected]>
Backport #7843 into `stable2407` from raymondkfcheung. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> --------- Co-authored-by: Raymond Cheung <[email protected]>
Backport #7843 into `stable2409` from raymondkfcheung. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> --------- Co-authored-by: Raymond Cheung <[email protected]>
Backport #7843 into `stable2412` from raymondkfcheung. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> --------- Co-authored-by: Raymond Cheung <[email protected]>
|
`` |
|
__ |
* master: (26 commits) Snowbridge V2 (#7402) [AHM] Revert multi-block election, slashing and staking client pallets (#7939) docs: update local ci execution instruction (#8003) Upgrade deps to eliminate ancient dependencies (#7999) Removed `pallet:getter` from XCM pallets (#7916) Add digest processor xcm emulator (#7915) Fix: [Referenda Tracks] Resolve representation issues that are breaking PJS apps (#7671) Improve XCMP weight metering (#7963) bump version of zombienet-sdk (#7964) rpc-v2/archive: Rename archive call method result to value (#7885) Bump parachains runtime api to 13 (#7981) `bp-runtime`: make macro expansion not rely on `sp-std` in scope. (#7978) [CI/CD] Refactor backports flow so that it can determine automatically where to do a backport based on labels (#7976) Treasury: update expire date on payout (#7958) (#7959) `fatxpool`: report_invalid: do not ban Future/Stale txs from re-entering the view (#7777) Fix XCM Barrier Rejection Handling to Return Incomplete with Weight (#7843) Bump openssl from 0.10.64 to 0.10.70 (#7442) runtime-api: remove redundant version checks (#7610) Upgrade link-checker cache to v4 (#7874) Updating readmes (#7950) ...
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 returnOutcome::Incomplete, which includes the weight consumed up to the point of rejection and the error that caused the blockage.This change ensures more accurate weight tracking during message execution, even when interrupted. It improves resource management and aligns the XCM executor’s behaviour with better error handling practices.