From 69288f6164154c870bfeff69ff27dfc6f9fbadb3 Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Mon, 24 Jan 2022 22:33:04 +0000 Subject: [PATCH] VC: don't warn if BN config doesn't match exactly (#2952) ## Proposed Changes Remove the check for exact equality on the beacon node spec when polling `/config/spec` from the VC. This check was always overzealous, and mostly served to check that the BN was configured for upcoming forks. I've replaced it by explicit checks of the `altair_fork_epoch` and `bellatrix_fork_epoch` instead. ## Additional Info We should come back to this and clean it up so that we can retain compatibility while removing the field `default`s we installed. --- Cargo.lock | 4 ++-- validator_client/src/beacon_node_fallback.rs | 19 ++++++++----------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bbf8de27e0..e16f4996ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5994,9 +5994,9 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" dependencies = [ "once_cell", ] diff --git a/validator_client/src/beacon_node_fallback.rs b/validator_client/src/beacon_node_fallback.rs index 487b5744d0..18780c3092 100644 --- a/validator_client/src/beacon_node_fallback.rs +++ b/validator_client/src/beacon_node_fallback.rs @@ -253,22 +253,19 @@ impl CandidateBeaconNode { "our_genesis_fork" => ?spec.genesis_fork_version, ); return Err(CandidateError::Incompatible); - } else if *spec != beacon_node_spec { + } else if beacon_node_spec.altair_fork_epoch != spec.altair_fork_epoch { warn!( log, - "Beacon node config does not match exactly"; + "Beacon node has mismatched Altair fork epoch"; "endpoint" => %self.beacon_node, - "advice" => "check that the BN is updated and configured for any upcoming forks", + "endpoint_altair_fork_epoch" => ?beacon_node_spec.altair_fork_epoch, ); - debug!( + } else if beacon_node_spec.bellatrix_fork_epoch != spec.bellatrix_fork_epoch { + warn!( log, - "Beacon node config"; - "config" => ?beacon_node_spec, - ); - debug!( - log, - "Our config"; - "config" => ?spec, + "Beacon node has mismatched Bellatrix fork epoch"; + "endpoint" => %self.beacon_node, + "endpoint_bellatrix_fork_epoch" => ?beacon_node_spec.bellatrix_fork_epoch, ); }