diff --git a/Cargo.lock b/Cargo.lock index 299f84e8784f..35f1a2ed0853 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8686,6 +8686,7 @@ dependencies = [ "reth-payload-builder-primitives", "reth-payload-primitives", "reth-primitives", + "reth-primitives-traits", "revm", "tokio", "tokio-stream", diff --git a/crates/payload/basic/src/lib.rs b/crates/payload/basic/src/lib.rs index 43292385661c..1b8bc6ba7c0b 100644 --- a/crates/payload/basic/src/lib.rs +++ b/crates/payload/basic/src/lib.rs @@ -19,7 +19,7 @@ use reth_evm::state_change::post_block_withdrawals_balance_increments; use reth_payload_builder::{KeepPayloadJobAlive, PayloadId, PayloadJob, PayloadJobGenerator}; use reth_payload_builder_primitives::PayloadBuilderError; use reth_payload_primitives::{BuiltPayload, PayloadBuilderAttributes, PayloadKind}; -use reth_primitives::{proofs, SealedHeader}; +use reth_primitives::{proofs, NodePrimitives, SealedHeader}; use reth_provider::{BlockReaderIdExt, CanonStateNotification, StateProviderFactory}; use reth_revm::cached::CachedReads; use reth_tasks::TaskSpawner; @@ -191,7 +191,7 @@ where Ok(job) } - fn on_new_state(&mut self, new_state: CanonStateNotification) { + fn on_new_state(&mut self, new_state: CanonStateNotification) { let mut cached = CachedReads::default(); // extract the state from the notification and put it into the cache diff --git a/crates/payload/builder/Cargo.toml b/crates/payload/builder/Cargo.toml index 78814da50664..d709c1208e2b 100644 --- a/crates/payload/builder/Cargo.toml +++ b/crates/payload/builder/Cargo.toml @@ -14,6 +14,7 @@ workspace = true [dependencies] # reth reth-primitives = { workspace = true, optional = true } +reth-primitives-traits.workspace = true reth-chain-state.workspace = true reth-payload-builder-primitives.workspace = true reth-payload-primitives.workspace = true @@ -44,8 +45,9 @@ alloy-consensus.workspace = true [features] test-utils = [ - "alloy-primitives", - "reth-chain-state/test-utils", - "reth-primitives/test-utils", - "revm/test-utils", + "alloy-primitives", + "reth-chain-state/test-utils", + "reth-primitives/test-utils", + "revm/test-utils", + "reth-primitives-traits/test-utils" ] diff --git a/crates/payload/builder/src/service.rs b/crates/payload/builder/src/service.rs index af11ba75ce6a..aaff23dda82d 100644 --- a/crates/payload/builder/src/service.rs +++ b/crates/payload/builder/src/service.rs @@ -14,6 +14,7 @@ use reth_payload_builder_primitives::{ Events, PayloadBuilder, PayloadBuilderError, PayloadEvents, PayloadStoreExt, }; use reth_payload_primitives::{BuiltPayload, PayloadBuilderAttributes, PayloadKind, PayloadTypes}; +use reth_primitives_traits::NodePrimitives; use std::{ fmt, future::Future, @@ -352,12 +353,13 @@ where } } -impl Future for PayloadBuilderService +impl Future for PayloadBuilderService where T: PayloadTypes, + N: NodePrimitives, Gen: PayloadJobGenerator + Unpin + 'static, ::Job: Unpin + 'static, - St: Stream + Send + Unpin + 'static, + St: Stream> + Send + Unpin + 'static, Gen::Job: PayloadJob, ::BuiltPayload: Into, { diff --git a/crates/payload/builder/src/traits.rs b/crates/payload/builder/src/traits.rs index d9d54ccd0e45..34a756e6059b 100644 --- a/crates/payload/builder/src/traits.rs +++ b/crates/payload/builder/src/traits.rs @@ -3,6 +3,7 @@ use reth_chain_state::CanonStateNotification; use reth_payload_builder_primitives::PayloadBuilderError; use reth_payload_primitives::{BuiltPayload, PayloadBuilderAttributes, PayloadKind}; +use reth_primitives_traits::NodePrimitives; use std::future::Future; /// A type that can build a payload. @@ -105,7 +106,7 @@ pub trait PayloadJobGenerator: Send + Sync { /// /// This is intended for any logic that needs to be run when the chain state changes or used to /// use the in memory state for the head block. - fn on_new_state(&mut self, new_state: CanonStateNotification) { + fn on_new_state(&mut self, new_state: CanonStateNotification) { let _ = new_state; } }