Skip to content

Commit c4b92f4

Browse files
authored
Backport #5369 to v1.14: Always include UnpaidExecution, not just when revenue is nonzero (#5370)
Full details in #5369
1 parent bc3919b commit c4b92f4

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

polkadot/runtime/parachains/src/coretime/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,10 @@ fn mk_coretime_call<T: Config>(call: crate::coretime::CoretimeCalls) -> Instruct
358358

359359
fn do_notify_revenue<T: Config>(when: BlockNumber, raw_revenue: Balance) -> Result<(), XcmError> {
360360
let dest = Junction::Parachain(T::BrokerId::get()).into_location();
361-
let mut message = Vec::new();
361+
let mut message = vec![Instruction::UnpaidExecution {
362+
weight_limit: WeightLimit::Unlimited,
363+
check_origin: None,
364+
}];
362365
let asset = Asset { id: AssetId(Location::here()), fun: Fungible(raw_revenue) };
363366
let dummy_xcm_context = XcmContext { origin: None, message_id: [0; 32], topic: None };
364367

@@ -383,10 +386,6 @@ fn do_notify_revenue<T: Config>(when: BlockNumber, raw_revenue: Balance) -> Resu
383386

384387
message.extend(
385388
[
386-
Instruction::UnpaidExecution {
387-
weight_limit: WeightLimit::Unlimited,
388-
check_origin: None,
389-
},
390389
ReceiveTeleportedAsset(assets_reanchored),
391390
DepositAsset {
392391
assets: Wild(AllCounted(1)),

prdoc/pr_5370.prdoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
2+
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json
3+
4+
title: Fix failing XCM from relay to Coretime Chain when revenue is zero
5+
6+
doc:
7+
- audience: Runtime Dev
8+
description: |
9+
The coretime assigner now always includes UnpaidExecution when calling `notify_revenue` via a
10+
`Transact`, not just when revenue is nonzero. This fixes an issue where the XCM would fail to
11+
process on the receiving side.
12+
13+
crates:
14+
- name: polkadot-runtime-parachains
15+
bump: patch

0 commit comments

Comments
 (0)