diff --git a/Cargo.lock b/Cargo.lock index 0e7422972549..91ab0d92dc16 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9641,7 +9641,6 @@ dependencies = [ "alloy-primitives 0.8.14", "alloy-rpc-types-engine", "reth-chainspec", - "reth-payload-validator", "reth-primitives", "reth-rpc-types-compat", "reth-taiko-engine-types", diff --git a/crates/blockchain-tree/src/blockchain_tree.rs b/crates/blockchain-tree/src/blockchain_tree.rs index d5c45f3522e6..7702194bb9a9 100644 --- a/crates/blockchain-tree/src/blockchain_tree.rs +++ b/crates/blockchain-tree/src/blockchain_tree.rs @@ -192,7 +192,10 @@ where if self.externals.provider_factory.provider()?.block_number(block.hash)?.is_some() { return Ok(Some(BlockStatus::Valid(BlockAttachment::Canonical))); } - return Ok(None); + return Err(BlockchainTreeError::PendingBlockIsFinalized { + last_finalized: last_finalized_block, + } + .into()); } // is block inside chain diff --git a/crates/consensus/beacon/src/engine/mod.rs b/crates/consensus/beacon/src/engine/mod.rs index ed33b31c9cfe..51c406a9bb59 100644 --- a/crates/consensus/beacon/src/engine/mod.rs +++ b/crates/consensus/beacon/src/engine/mod.rs @@ -935,28 +935,6 @@ where Ok(()) } - /// Sets the head of the canon chain without any additional checks. - fn taiko_reorg(&self, max_block: BlockNumber) -> RethResult<()> { - let max_header = self.blockchain.sealed_header(max_block) - .inspect_err(|error| { - error!(target: "consensus::engine", %error, "Error getting canonical header for continuous sync"); - })? - .ok_or_else(|| ProviderError::HeaderNotFound(max_block.into()))?; - let max_hash = max_header.hash(); - self.update_canon_chain( - max_header, - &ForkchoiceState { - head_block_hash: max_hash, - finalized_block_hash: max_hash, - safe_block_hash: max_hash, - }, - )?; - self.blockchain.update_block_hashes_and_clear_buffered()?; - self.blockchain.connect_buffered_blocks_to_canonical_hashes()?; - // We are on an optimistic syncing process, better to wait for the next FCU to handle - Ok(()) - } - /// Updates the state of the canon chain tracker based on the given head. /// /// This expects the given head to be the new canonical head. @@ -1519,10 +1497,6 @@ where } }; - trace!(target: "consensus::engine", ?sync_target_state, "Check sync target state"); - // ignore the finalized block hash if we are in taiko mode - return self.taiko_reorg(ctrl.block_number().unwrap_or_default()); - if sync_target_state.finalized_block_hash.is_zero() { self.set_canonical_head(ctrl.block_number().unwrap_or_default())?; self.blockchain.update_block_hashes_and_clear_buffered()?; diff --git a/crates/taiko/payload/validator/Cargo.toml b/crates/taiko/payload/validator/Cargo.toml index 963ba28df598..8fe6143b0092 100644 --- a/crates/taiko/payload/validator/Cargo.toml +++ b/crates/taiko/payload/validator/Cargo.toml @@ -15,7 +15,6 @@ workspace = true # reth reth-chainspec.workspace = true reth-primitives = { workspace = true, features = ["taiko"] } -reth-payload-validator.workspace = true reth-rpc-types-compat.workspace = true # ethereum diff --git a/crates/taiko/payload/validator/src/lib.rs b/crates/taiko/payload/validator/src/lib.rs index cc008751827d..33537c524e74 100644 --- a/crates/taiko/payload/validator/src/lib.rs +++ b/crates/taiko/payload/validator/src/lib.rs @@ -13,7 +13,6 @@ use alloy_primitives::B256; use alloy_rpc_types_engine::{ExecutionPayloadSidecar, MaybeCancunPayloadFields, PayloadError}; use reth_chainspec::EthereumHardforks; -use reth_payload_validator::ExecutionPayloadValidator; use reth_primitives::{Block, BlockExt, Header, SealedBlock}; use reth_rpc_types_compat::engine::payload::try_into_block; use reth_taiko_engine_types::TaikoExecutionPayload;