From 9be3d4ecac89d3700ebdd7c873e6c4ce6016176a Mon Sep 17 00:00:00 2001 From: eklm Date: Fri, 17 Dec 2021 07:59:46 +0000 Subject: [PATCH] Downgrade AttestationStateIsFinalized error to debug (#2866) ## Issue Addressed #2834 ## Proposed Changes Change log message severity from error to debug in attestation verification when attestation state is finalized. --- .../network/src/beacon_processor/worker/gossip_methods.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/beacon_node/network/src/beacon_processor/worker/gossip_methods.rs b/beacon_node/network/src/beacon_processor/worker/gossip_methods.rs index 365d53f49b..d18c96c0a7 100644 --- a/beacon_node/network/src/beacon_processor/worker/gossip_methods.rs +++ b/beacon_node/network/src/beacon_processor/worker/gossip_methods.rs @@ -1,5 +1,6 @@ use crate::{metrics, service::NetworkMessage, sync::SyncMessage}; +use beacon_chain::store::Error; use beacon_chain::{ attestation_verification::{Error as AttnError, VerifiedAttestation}, observed_operations::ObservationOutcome, @@ -13,6 +14,7 @@ use slog::{crit, debug, error, info, trace, warn}; use slot_clock::SlotClock; use ssz::Encode; use std::time::{Duration, SystemTime, UNIX_EPOCH}; +use store::hot_cold_store::HotColdDBError; use tokio::sync::mpsc; use types::{ Attestation, AttesterSlashing, EthSpec, Hash256, IndexedAttestation, ProposerSlashing, @@ -1579,6 +1581,12 @@ impl Worker { self.propagate_validation_result(message_id, peer_id, MessageAcceptance::Reject); self.gossip_penalize_peer(peer_id, PeerAction::MidToleranceError); } + AttnError::BeaconChainError(BeaconChainError::DBError(Error::HotColdDBError( + HotColdDBError::AttestationStateIsFinalized { .. }, + ))) => { + debug!(self.log, "Attestation for finalized state"; "peer_id" => % peer_id); + self.propagate_validation_result(message_id, peer_id, MessageAcceptance::Ignore); + } AttnError::BeaconChainError(e) => { /* * Lighthouse hit an unexpected error whilst processing the attestation. It