From ad64175f7cbf8148cd05788ceb1b032aabca46c2 Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Sat, 30 Nov 2024 16:47:38 +0700 Subject: [PATCH] feat: use generic receipt in InvalidBlockWitnessHook impl --- Cargo.lock | 1 + crates/engine/invalid-block-hooks/Cargo.toml | 1 + crates/engine/invalid-block-hooks/src/witness.rs | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e7859a6cc30a..82212f1a41e9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7709,6 +7709,7 @@ dependencies = [ "reth-chainspec", "reth-engine-primitives", "reth-evm", + "reth-node-types", "reth-primitives", "reth-primitives-traits", "reth-provider", diff --git a/crates/engine/invalid-block-hooks/Cargo.toml b/crates/engine/invalid-block-hooks/Cargo.toml index a7b0153d0d4b..e09c9d5fe06a 100644 --- a/crates/engine/invalid-block-hooks/Cargo.toml +++ b/crates/engine/invalid-block-hooks/Cargo.toml @@ -22,6 +22,7 @@ reth-revm = { workspace = true, features = ["serde"] } reth-rpc-api = { workspace = true, features = ["client"] } reth-tracing.workspace = true reth-trie.workspace = true +reth-node-types.workspace = true # alloy alloy-primitives.workspace = true diff --git a/crates/engine/invalid-block-hooks/src/witness.rs b/crates/engine/invalid-block-hooks/src/witness.rs index 98ee8dd2d137..b30451b3d581 100644 --- a/crates/engine/invalid-block-hooks/src/witness.rs +++ b/crates/engine/invalid-block-hooks/src/witness.rs @@ -8,8 +8,9 @@ use reth_engine_primitives::InvalidBlockHook; use reth_evm::{ state_change::post_block_balance_increments, system_calls::SystemCaller, ConfigureEvm, }; +use reth_node_types::NodeTypes; use reth_primitives::{Receipt, SealedBlockWithSenders, SealedHeader}; -use reth_primitives_traits::SignedTransaction; +use reth_primitives_traits::{ReceiptTy, SignedTransaction}; use reth_provider::{BlockExecutionOutput, ChainSpecProvider, StateProviderFactory}; use reth_revm::{ database::StateProviderDatabase, db::states::bundle_state::BundleRetention, @@ -52,6 +53,7 @@ where P: StateProviderFactory + ChainSpecProvider + Send + + NodeTypes + Sync + 'static, EvmConfig: ConfigureEvm
, @@ -60,7 +62,7 @@ where &self, parent_header: &SealedHeader, block: &SealedBlockWithSenders, - output: &BlockExecutionOutput, + output: &BlockExecutionOutput>, trie_updates: Option<(&TrieUpdates, B256)>, ) -> eyre::Result<()> { // TODO(alexey): unify with `DebugApi::debug_execution_witness`