diff --git a/beacon_node/beacon_chain/src/beacon_chain.rs b/beacon_node/beacon_chain/src/beacon_chain.rs index 7655faa0f40..d6ec5926f65 100644 --- a/beacon_node/beacon_chain/src/beacon_chain.rs +++ b/beacon_node/beacon_chain/src/beacon_chain.rs @@ -3653,7 +3653,9 @@ impl BeaconChain { } // If this is a post-merge block, update the execution layer. - if let Some(new_head_execution_block_hash) = new_head_execution_block_hash_opt { + if let Some(new_head_execution_block_hash) = + new_head_execution_block_hash_opt.filter(|h| *h != ExecutionBlockHash::zero()) + { if is_merge_transition_complete { let finalized_execution_block_hash = finalized_block .execution_status @@ -3704,6 +3706,15 @@ impl BeaconChain { head_block_root: Hash256, head_execution_block_hash: ExecutionBlockHash, ) -> Result<(), Error> { + if head_execution_block_hash == ExecutionBlockHash::zero() { + debug!( + self.log, + "Not sending forkchoice updated"; + "msg" => "head block hash is zero" + ); + return Ok(()); + } + let forkchoice_updated_response = self .execution_layer .as_ref() diff --git a/beacon_node/client/src/builder.rs b/beacon_node/client/src/builder.rs index f8c21b86230..73a4232ec91 100644 --- a/beacon_node/client/src/builder.rs +++ b/beacon_node/client/src/builder.rs @@ -668,7 +668,10 @@ where // Issue the head to the execution engine on startup. This ensures it can start // syncing. - if let Some(block_hash) = head.execution_payload_block_hash { + if let Some(block_hash) = head + .execution_payload_block_hash + .filter(|h| *h != ExecutionBlockHash::zero()) + { let finalized_root = head.finalized_checkpoint.root; let finalized_block = beacon_chain .store diff --git a/beacon_node/execution_layer/src/engines.rs b/beacon_node/execution_layer/src/engines.rs index 2773ac79f8c..4927cad0093 100644 --- a/beacon_node/execution_layer/src/engines.rs +++ b/beacon_node/execution_layer/src/engines.rs @@ -150,6 +150,16 @@ impl Engines { let latest_forkchoice_state = self.get_latest_forkchoice_state().await; if let Some(forkchoice_state) = latest_forkchoice_state { + if forkchoice_state.head_block_hash == ExecutionBlockHash::zero() { + debug!( + self.log, + "No need to call forkchoiceUpdated"; + "msg" => "head does not have execution enabled", + "id" => &engine.id, + ); + return; + } + info!( self.log, "Issuing forkchoiceUpdated";