chore: relax EngineNodeLauncher bounds (#13540)

This commit is contained in:
Arsenii Kulikov
2024-12-24 17:04:05 +04:00
committed by GitHub
parent f67625fd67
commit 9773b85568
5 changed files with 12 additions and 14 deletions

View File

@ -59,6 +59,7 @@ reth-tracing.workspace = true
reth-transaction-pool.workspace = true
## ethereum
alloy-consensus.workspace = true
alloy-primitives.workspace = true
alloy-rpc-types = { workspace = true, features = ["engine"] }
alloy-eips = { workspace = true, features = ["kzg"] }

View File

@ -25,10 +25,7 @@ use reth_evm::noop::NoopBlockExecutorProvider;
use reth_fs_util as fs;
use reth_invalid_block_hooks::InvalidBlockWitnessHook;
use reth_network_p2p::headers::client::HeadersClient;
use reth_node_api::{
FullNodePrimitives, FullNodeTypes, NodePrimitives, NodeTypes, NodeTypesWithDB,
NodeTypesWithDBAdapter,
};
use reth_node_api::{FullNodeTypes, NodeTypes, NodeTypesWithDB, NodeTypesWithDBAdapter};
use reth_node_core::{
args::InvalidBlockHookType,
dirs::{ChainPath, DataDirPath},
@ -46,7 +43,7 @@ use reth_node_metrics::{
server::{MetricServer, MetricServerConfig},
version::VersionInfo,
};
use reth_primitives::{Head, TransactionSigned};
use reth_primitives::Head;
use reth_provider::{
providers::{NodeTypesForProvider, ProviderNodeTypes, StaticFileProvider},
BlockHashReader, BlockNumReader, ChainSpecProvider, ProviderError, ProviderFactory,
@ -388,7 +385,6 @@ where
pub async fn create_provider_factory<N>(&self) -> eyre::Result<ProviderFactory<N>>
where
N: ProviderNodeTypes<DB = DB, ChainSpec = ChainSpec>,
N::Primitives: FullNodePrimitives<BlockHeader = reth_primitives::Header>,
{
let factory = ProviderFactory::new(
self.right().clone(),
@ -455,7 +451,6 @@ where
) -> eyre::Result<LaunchContextWith<Attached<WithConfigs<ChainSpec>, ProviderFactory<N>>>>
where
N: ProviderNodeTypes<DB = DB, ChainSpec = ChainSpec>,
N::Primitives: FullNodePrimitives<BlockHeader = reth_primitives::Header>,
{
let factory = self.create_provider_factory().await?;
let ctx = LaunchContextWith {
@ -879,7 +874,7 @@ impl<T, CB>
where
T: FullNodeTypes<
Provider: StateProviderFactory + ChainSpecProvider,
Types: NodeTypesForProvider<Primitives: NodePrimitives<SignedTx = TransactionSigned>>,
Types: NodeTypesForProvider,
>,
CB: NodeComponentsBuilder<T>,
{

View File

@ -1,5 +1,6 @@
//! Engine node related functionality.
use alloy_consensus::BlockHeader;
use futures::{future::Either, stream, stream_select, StreamExt};
use reth_beacon_consensus::{
hooks::{EngineHooks, StaticFileHook},
@ -385,12 +386,12 @@ where
ChainEvent::Handler(ev) => {
if let Some(head) = ev.canonical_header() {
let head_block = Head {
number: head.number,
number: head.number(),
hash: head.hash(),
difficulty: head.difficulty,
timestamp: head.timestamp,
difficulty: head.difficulty(),
timestamp: head.timestamp(),
total_difficulty: chainspec
.final_paris_total_difficulty(head.number)
.final_paris_total_difficulty(head.number())
.unwrap_or_default(),
};
network_handle.update_status(head_block);