Skip to content

Commit 2279155

Browse files
paritytech-release-backport-bot[bot]sistemdgithub-actions[bot]bkchr
authored
[stable2506] Backport #9581 (#9634)
Backport #9581 into `stable2506` from sistemd. 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: sistemd <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Bastian Köcher <[email protected]>
1 parent 03d0b02 commit 2279155

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

cumulus/client/service/src/lib.rs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ where
302302
.spawn("cumulus-pov-recovery", None, pov_recovery.run());
303303

304304
let parachain_informant = parachain_informant::<Block, _>(
305+
para_id,
305306
relay_chain_interface.clone(),
306307
client.clone(),
307308
prometheus_registry.map(ParachainInformantMetrics::new).transpose()?,
@@ -609,6 +610,7 @@ where
609610

610611
/// Task for logging candidate events and some related metrics.
611612
async fn parachain_informant<Block: BlockT, Client>(
613+
para_id: ParaId,
612614
relay_chain_interface: impl RelayChainInterface + Clone,
613615
client: Arc<Client>,
614616
metrics: Option<ParachainInformantMetrics>,
@@ -636,7 +638,10 @@ async fn parachain_informant<Block: BlockT, Client>(
636638
let mut timed_out_candidates = Vec::new();
637639
for event in candidate_events {
638640
match event {
639-
CandidateEvent::CandidateBacked(_, head, _, _) => {
641+
CandidateEvent::CandidateBacked(receipt, head, _, _) => {
642+
if receipt.descriptor.para_id() != para_id {
643+
continue;
644+
}
640645
let backed_block = match Block::Header::decode(&mut &head.0[..]) {
641646
Ok(header) => header,
642647
Err(e) => {
@@ -656,7 +661,10 @@ async fn parachain_informant<Block: BlockT, Client>(
656661
last_backed_block_time = Some(backed_block_time);
657662
backed_candidates.push(backed_block);
658663
},
659-
CandidateEvent::CandidateIncluded(_, head, _, _) => {
664+
CandidateEvent::CandidateIncluded(receipt, head, _, _) => {
665+
if receipt.descriptor.para_id() != para_id {
666+
continue;
667+
}
660668
let included_block = match Block::Header::decode(&mut &head.0[..]) {
661669
Ok(header) => header,
662670
Err(e) => {
@@ -674,7 +682,10 @@ async fn parachain_informant<Block: BlockT, Client>(
674682
}
675683
included_candidates.push(included_block);
676684
},
677-
CandidateEvent::CandidateTimedOut(_, head, _) => {
685+
CandidateEvent::CandidateTimedOut(receipt, head, _) => {
686+
if receipt.descriptor.para_id() != para_id {
687+
continue;
688+
}
678689
let timed_out_block = match Block::Header::decode(&mut &head.0[..]) {
679690
Ok(header) => header,
680691
Err(e) => {

prdoc/pr_9581.prdoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
title: 'fix: parachain informant'
2+
doc:
3+
- audience: Node Operator
4+
description: |-
5+
The parachain informant was logging information for all parachains, not just ours. This PR fixes that by filtering the events by parachain ID.
6+
crates:
7+
- name: cumulus-client-service
8+
bump: patch

0 commit comments

Comments
 (0)