Skip to content

Commit a38e8d5

Browse files
authored
[Backport] Always include UnpaidExecution, not just when revenue is nonzero (#5510)
Backport #5369 to stable2407, which was already backported to v1.14 in #5370
1 parent c9e5cf1 commit a38e8d5

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
@@ -359,7 +359,10 @@ fn mk_coretime_call<T: Config>(call: crate::coretime::CoretimeCalls) -> Instruct
359359

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

@@ -384,10 +387,6 @@ fn do_notify_revenue<T: Config>(when: BlockNumber, raw_revenue: Balance) -> Resu
384387

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

prdoc/pr_5510.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)