mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 12:11:59 +00:00
Do not penalize peers on execution layer offline errors (#3258)
## Issue Addressed Partly resolves https://github.com/sigp/lighthouse/issues/3032 ## Proposed Changes Extracts some of the functionality of #3094 into a separate PR as the original PR requires a bit more work. Do not unnecessarily penalize peers when we fail to validate received execution payloads because our execution layer is offline.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
//! If a batch fails, the backfill sync cannot progress. In this scenario, we mark the backfill
|
||||
//! sync as failed, log an error and attempt to retry once a new peer joins the node.
|
||||
|
||||
use crate::beacon_processor::{ChainSegmentProcessId, WorkEvent as BeaconWorkEvent};
|
||||
use crate::beacon_processor::{ChainSegmentProcessId, FailureMode, WorkEvent as BeaconWorkEvent};
|
||||
use crate::sync::manager::{BatchProcessResult, Id};
|
||||
use crate::sync::network_context::SyncNetworkContext;
|
||||
use crate::sync::range_sync::{BatchConfig, BatchId, BatchInfo, BatchProcessingResult, BatchState};
|
||||
@@ -554,6 +554,7 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
||||
imported_blocks: false,
|
||||
// The beacon processor queue is full, no need to penalize the peer.
|
||||
peer_action: None,
|
||||
mode: FailureMode::ConsensusLayer,
|
||||
},
|
||||
)
|
||||
} else {
|
||||
@@ -638,6 +639,7 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
||||
BatchProcessResult::Failed {
|
||||
imported_blocks,
|
||||
peer_action,
|
||||
mode: _,
|
||||
} => {
|
||||
let batch = match self.batches.get_mut(&batch_id) {
|
||||
Some(v) => v,
|
||||
|
||||
Reference in New Issue
Block a user