From e5fc9f26bcccde9c48396eb4ea7d10fcd9fed13e Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Mon, 15 Aug 2022 01:31:02 +0000 Subject: [PATCH] Log if no execution endpoint is configured (#3467) ## Issue Addressed Fixes an issue whereby syncing a post-merge network without an execution endpoint would silently stall. Sync swallows the errors from block verification so previously there was no indication in the logs for why the node couldn't sync. ## Proposed Changes Add an error log to the merge-readiness notifier for the case where the merge has already completed but no execution endpoint is configured. --- beacon_node/client/src/notifier.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/beacon_node/client/src/notifier.rs b/beacon_node/client/src/notifier.rs index ae8f024b71..11f0f6e2a2 100644 --- a/beacon_node/client/src/notifier.rs +++ b/beacon_node/client/src/notifier.rs @@ -339,7 +339,21 @@ async fn merge_readiness_logging( payload.parent_hash() != ExecutionBlockHash::zero() }); - if merge_completed || !beacon_chain.is_time_to_prepare_for_bellatrix(current_slot) { + let has_execution_layer = beacon_chain.execution_layer.is_some(); + + if merge_completed && has_execution_layer + || !beacon_chain.is_time_to_prepare_for_bellatrix(current_slot) + { + return; + } + + if merge_completed && !has_execution_layer { + error!( + log, + "Execution endpoint required"; + "info" => "you need an execution engine to validate blocks, see: \ + https://lighthouse-book.sigmaprime.io/merge-migration.html" + ); return; }