diff --git a/beacon_node/beacon_chain/src/light_client_finality_update_verification.rs b/beacon_node/beacon_chain/src/light_client_finality_update_verification.rs index 0d5a5425d5..fe62b8ef90 100644 --- a/beacon_node/beacon_chain/src/light_client_finality_update_verification.rs +++ b/beacon_node/beacon_chain/src/light_client_finality_update_verification.rs @@ -116,7 +116,13 @@ impl VerifiedLightClientFinalityUpdate { // Verify that the gossiped finality update is the same as the locally constructed one. if latest_finality_update != rcv_finality_update { let signature_slot = latest_finality_update.signature_slot(); + if signature_slot != rcv_finality_update.signature_slot() { + // The locally constructed finality update is not up to date, probably + // because the node has fallen behind and needs to sync. + if rcv_finality_update.signature_slot() > signature_slot { + return Err(Error::Ignore); + } return Err(Error::MismatchedSignatureSlot { local: signature_slot, observed: rcv_finality_update.signature_slot(), diff --git a/beacon_node/beacon_chain/src/light_client_optimistic_update_verification.rs b/beacon_node/beacon_chain/src/light_client_optimistic_update_verification.rs index 4da6913443..b59390ea0c 100644 --- a/beacon_node/beacon_chain/src/light_client_optimistic_update_verification.rs +++ b/beacon_node/beacon_chain/src/light_client_optimistic_update_verification.rs @@ -118,6 +118,11 @@ impl VerifiedLightClientOptimisticUpdate { if latest_optimistic_update != rcv_optimistic_update { let signature_slot = latest_optimistic_update.signature_slot(); if signature_slot != rcv_optimistic_update.signature_slot() { + // The locally constructed optimistic update is not up to date, probably + // because the node has fallen behind and needs to sync. + if rcv_optimistic_update.signature_slot() > signature_slot { + return Err(Error::Ignore); + } return Err(Error::MismatchedSignatureSlot { local: signature_slot, observed: rcv_optimistic_update.signature_slot(),