Remove merge transition code (#8761)

Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
This commit is contained in:
Lion - dapplion
2026-02-24 20:20:28 -07:00
committed by GitHub
parent e59f1f03ef
commit d6bf53834f
39 changed files with 581 additions and 2433 deletions

View File

@@ -9,7 +9,6 @@ use crate::beacon_proposer_cache::{
};
use crate::blob_verification::{GossipBlobError, GossipVerifiedBlob};
use crate::block_times_cache::BlockTimesCache;
use crate::block_verification::POS_PANDA_BANNER;
use crate::block_verification::{
BlockError, ExecutionPendingBlock, GossipVerifiedBlock, IntoExecutionPendingBlock,
check_block_is_finalized_checkpoint_or_descendant, check_block_relevancy,
@@ -3513,28 +3512,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
.map_err(BeaconChainError::TokioJoin)?
.ok_or(BeaconChainError::RuntimeShutdown)??;
// Log the PoS pandas if a merge transition just occurred.
if payload_verification_outcome.is_valid_merge_transition_block {
info!("{}", POS_PANDA_BANNER);
info!(slot = %block.slot(), "Proof of Stake Activated");
info!(
terminal_pow_block_hash = ?block
.message()
.execution_payload()?
.parent_hash()
.into_root(),
);
info!(
merge_transition_block_root = ?block.message().tree_hash_root(),
);
info!(
merge_transition_execution_hash = ?block
.message()
.execution_payload()?
.block_hash()
.into_root(),
);
}
Ok(ExecutedBlock::new(
block,
import_data,
@@ -6078,21 +6055,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
input_params: ForkchoiceUpdateParameters,
override_forkchoice_update: OverrideForkchoiceUpdate,
) -> Result<(), Error> {
let next_slot = current_slot + 1;
// There is no need to issue a `forkchoiceUpdated` (fcU) message unless the Bellatrix fork
// has:
//
// 1. Already happened.
// 2. Will happen in the next slot.
//
// The reason for a fcU message in the slot prior to the Bellatrix fork is in case the
// terminal difficulty has already been reached and a payload preparation message needs to
// be issued.
if self.slot_is_prior_to_bellatrix(next_slot) {
return Ok(());
}
let execution_layer = self
.execution_layer
.as_ref()
@@ -6140,50 +6102,8 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
.unwrap_or_else(ExecutionBlockHash::zero),
)
} else {
// The head block does not have an execution block hash. We must check to see if we
// happen to be the proposer of the transition block, in which case we still need to
// send forkchoice_updated.
if self
.spec
.fork_name_at_slot::<T::EthSpec>(next_slot)
.bellatrix_enabled()
{
// We are post-bellatrix
if let Some(payload_attributes) = execution_layer
.payload_attributes(next_slot, params.head_root)
.await
{
// We are a proposer, check for terminal_pow_block_hash
if let Some(terminal_pow_block_hash) = execution_layer
.get_terminal_pow_block_hash(&self.spec, payload_attributes.timestamp())
.await
.map_err(Error::ForkchoiceUpdate)?
{
info!(
slot = %next_slot,
"Prepared POS transition block proposer"
);
(
params.head_root,
terminal_pow_block_hash,
params
.justified_hash
.unwrap_or_else(ExecutionBlockHash::zero),
params
.finalized_hash
.unwrap_or_else(ExecutionBlockHash::zero),
)
} else {
// TTD hasn't been reached yet, no need to update the EL.
return Ok(());
}
} else {
// We are not a proposer, no need to update the EL.
return Ok(());
}
} else {
return Ok(());
}
// Proposing the block for the merge is no longer supported.
return Ok(());
};
let forkchoice_updated_response = execution_layer