diff --git a/testing/simulator/src/cli.rs b/testing/simulator/src/cli.rs index a82c8b8577..db77712e51 100644 --- a/testing/simulator/src/cli.rs +++ b/testing/simulator/src/cli.rs @@ -77,7 +77,7 @@ pub fn cli_app() -> Command { ) .arg( Arg::new("vc-count") - .short('c') + .short('n') .long("vc-count") .action(ArgAction::Set) .default_value("3") diff --git a/validator_client/src/beacon_node_fallback.rs b/validator_client/src/beacon_node_fallback.rs index 76ecca6d4f..020fb9a33d 100644 --- a/validator_client/src/beacon_node_fallback.rs +++ b/validator_client/src/beacon_node_fallback.rs @@ -129,8 +129,9 @@ impl fmt::Display for Errors { } /// Reasons why a candidate might not be ready. -#[derive(Debug, Clone, Copy, Deserialize, Serialize)] +#[derive(Debug, Clone, Copy, PartialEq, Deserialize, Serialize)] pub enum CandidateError { + PreGenesis, Uninitialized, Offline, Incompatible, @@ -210,7 +211,12 @@ impl CandidateBeaconNode { if let Some(slot_clock) = slot_clock { match check_node_health(&self.beacon_node, log).await { Ok((head, is_optimistic, el_offline)) => { - let slot_clock_head = slot_clock.now().ok_or(CandidateError::Uninitialized)?; + let Some(slot_clock_head) = slot_clock.now() else { + match slot_clock.is_prior_to_genesis() { + Some(true) => return Err(CandidateError::PreGenesis), + _ => return Err(CandidateError::Uninitialized), + } + }; if head > slot_clock_head + FUTURE_SLOT_TOLERANCE { return Err(CandidateError::TimeDiscrepancy); @@ -457,12 +463,14 @@ impl BeaconNodeFallback { for (result, node) in results { if let Err(e) = result { - warn!( - self.log, - "A connected beacon node errored during routine health check."; - "error" => ?e, - "endpoint" => node, - ); + if *e != CandidateError::PreGenesis { + warn!( + self.log, + "A connected beacon node errored during routine health check."; + "error" => ?e, + "endpoint" => node, + ); + } } }