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.
This commit is contained in:
Michael Sproul 2022-08-15 01:31:02 +00:00
parent 25e3dc9300
commit e5fc9f26bc

View File

@ -339,7 +339,21 @@ async fn merge_readiness_logging<T: BeaconChainTypes>(
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;
}