From 43c4c1f4acc199ae055630aa56ea9e3ca7d7c610 Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Tue, 4 Jun 2024 11:44:45 +1000 Subject: [PATCH] Investigate UnknownTargetRoot slasher errors (#5006) Squashed commit of the following: commit 7adfecc53cef21058a498be7b7fc8c908bcf7363 Author: armaganyildirak Date: Wed Dec 13 15:22:02 2023 -0500 Fix the UnknownTargetRoot --- beacon_node/beacon_chain/src/attestation_verification.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/beacon_node/beacon_chain/src/attestation_verification.rs b/beacon_node/beacon_chain/src/attestation_verification.rs index 471c43d94f8..b7019d79b43 100644 --- a/beacon_node/beacon_chain/src/attestation_verification.rs +++ b/beacon_node/beacon_chain/src/attestation_verification.rs @@ -381,6 +381,11 @@ fn process_slash_info( if let Some(slasher) = chain.slasher.as_ref() { let (indexed_attestation, check_signature, err) = match slash_info { SignatureNotChecked(attestation, err) => { + if let Error::UnknownHeadBlock { .. } = err { + if attestation.data.beacon_block_root == attestation.data.target.root { + return err; + } + } match obtain_indexed_attestation_and_committees_per_slot(chain, attestation) { Ok((indexed, _)) => (indexed, true, err), Err(e) => {