From 5d7a7c06fda3ed82e19195552dc7986e122e0460 Mon Sep 17 00:00:00 2001
From: "paritytech-cmd-bot-polkadot-sdk[bot]"
 <179002856+paritytech-cmd-bot-polkadot-sdk[bot]@users.noreply.github.com>
Date: Mon, 13 Jan 2025 08:45:18 +0100
Subject: [PATCH] [stable2409] Backport #7050 (#7059)

Backport #7050 into `stable2409` from skunert.

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: Sebastian Kunert <skunert49@gmail.com>
---
 .../consensus/aura/src/equivocation_import_queue.rs   |  1 +
 prdoc/pr_7050.prdoc                                   | 11 +++++++++++
 2 files changed, 12 insertions(+)
 create mode 100644 prdoc/pr_7050.prdoc

diff --git a/cumulus/client/consensus/aura/src/equivocation_import_queue.rs b/cumulus/client/consensus/aura/src/equivocation_import_queue.rs
index 68f2d37c874..dbd9d5ba6a6 100644
--- a/cumulus/client/consensus/aura/src/equivocation_import_queue.rs
+++ b/cumulus/client/consensus/aura/src/equivocation_import_queue.rs
@@ -97,6 +97,7 @@ where
 		// This is done for example when gap syncing and it is expected that the block after the gap
 		// was checked/chosen properly, e.g. by warp syncing to this block using a finality proof.
 		if block_params.state_action.skip_execution_checks() || block_params.with_state() {
+			block_params.fork_choice = Some(ForkChoiceStrategy::Custom(block_params.with_state()));
 			return Ok(block_params)
 		}
 
diff --git a/prdoc/pr_7050.prdoc b/prdoc/pr_7050.prdoc
new file mode 100644
index 00000000000..da9dd808033
--- /dev/null
+++ b/prdoc/pr_7050.prdoc
@@ -0,0 +1,11 @@
+title: Avoid incomplete block import pipeline with full verifying import queue
+doc:
+- audience: Node Dev
+  description: |-
+    When warp syncing a node using the equivocation checking verifier, we now properly set the fork_choice rule.
+    Affected are mostly nodes that are derived from the parachain template. Omni-node is not affected.
+
+    The prevents the error `ClientImport("Incomplete block import pipeline.")` after state sync.
+crates:
+- name: cumulus-client-consensus-aura
+  bump: patch
-- 
GitLab