@@ -21,10 +21,10 @@ use reth_optimism_consensus::isthmus;
2121use  reth_optimism_forks:: { OpHardfork ,  OpHardforks } ; 
2222use  reth_optimism_payload_builder:: { OpExecutionPayloadValidator ,  OpPayloadTypes } ; 
2323use  reth_optimism_primitives:: { OpBlock ,  ADDRESS_L2_TO_L1_MESSAGE_PASSER } ; 
24- use  reth_primitives_traits:: { RecoveredBlock ,  SealedBlock } ; 
24+ use  reth_primitives_traits:: { RecoveredBlock ,  SealedBlock ,   SignedTransaction } ; 
2525use  reth_provider:: StateProviderFactory ; 
2626use  reth_trie_common:: { HashedPostState ,  KeyHasher } ; 
27- use  std:: sync:: Arc ; 
27+ use  std:: { marker :: PhantomData ,   sync:: Arc } ; 
2828
2929/// The types used in the optimism beacon consensus engine. 
3030#[ derive( Debug ,  Default ,  Clone ,  serde:: Deserialize ,  serde:: Serialize ) ]  
@@ -71,20 +71,22 @@ where
7171
7272/// Validator for Optimism engine API. 
7373#[ derive( Debug ,  Clone ) ]  
74- pub  struct  OpEngineValidator < P >  { 
74+ pub  struct  OpEngineValidator < P ,   Tx >  { 
7575    inner :  OpExecutionPayloadValidator < OpChainSpec > , 
7676    provider :  P , 
7777    hashed_addr_l2tol1_msg_passer :  B256 , 
78+     phantom :  PhantomData < Tx > , 
7879} 
7980
80- impl < P >  OpEngineValidator < P >  { 
81+ impl < P ,   Tx >  OpEngineValidator < P ,   Tx >  { 
8182    /// Instantiates a new validator. 
8283pub  fn  new < KH :  KeyHasher > ( chain_spec :  Arc < OpChainSpec > ,  provider :  P )  -> Self  { 
8384        let  hashed_addr_l2tol1_msg_passer = KH :: hash_key ( ADDRESS_L2_TO_L1_MESSAGE_PASSER ) ; 
8485        Self  { 
8586            inner :  OpExecutionPayloadValidator :: new ( chain_spec) , 
8687            provider, 
8788            hashed_addr_l2tol1_msg_passer, 
89+             phantom :  PhantomData , 
8890        } 
8991    } 
9092
@@ -95,11 +97,12 @@ impl<P> OpEngineValidator<P> {
9597    } 
9698} 
9799
98- impl < P >  PayloadValidator  for  OpEngineValidator < P > 
100+ impl < P ,   Tx >  PayloadValidator  for  OpEngineValidator < P ,   Tx > 
99101where 
100102    P :  StateProviderFactory  + Unpin  + ' static , 
103+     Tx :  SignedTransaction  + Unpin  + ' static , 
101104{ 
102-     type  Block  = OpBlock ; 
105+     type  Block  = alloy_consensus :: Block < Tx > ; 
103106    type  ExecutionData  = OpExecutionData ; 
104107
105108    fn  ensure_well_formed_payload ( 
@@ -142,13 +145,15 @@ where
142145    } 
143146} 
144147
145- impl < Types ,  P >  EngineValidator < Types >  for  OpEngineValidator < P > 
148+ impl < Types ,  P ,   Tx >  EngineValidator < Types >  for  OpEngineValidator < P ,   Tx > 
146149where 
147150    Types :  PayloadTypes < 
148151        PayloadAttributes  = OpPayloadAttributes , 
149152        ExecutionData  = <Self  as  PayloadValidator >:: ExecutionData , 
153+         BuiltPayload :  BuiltPayload < Primitives :  NodePrimitives < SignedTx  = Tx > > , 
150154    > , 
151155    P :  StateProviderFactory  + Unpin  + ' static , 
156+     Tx :  SignedTransaction  + Unpin  + ' static  + Send  + Sync , 
152157{ 
153158    fn  validate_version_specific_fields ( 
154159        & self , 
@@ -311,7 +316,7 @@ mod test {
311316            OpEngineValidator :: new :: < KeccakKeyHasher > ( get_chainspec ( ) ,  NoopProvider :: default ( ) ) ; 
312317        let  attributes = get_attributes ( None ,  1732633199 ) ; 
313318
314-         let  result = <engine:: OpEngineValidator < _ >  as  EngineValidator < 
319+         let  result = <engine:: OpEngineValidator < _ ,   _ >  as  EngineValidator < 
315320            OpEngineTypes , 
316321        > >:: ensure_well_formed_attributes ( 
317322            & validator,  EngineApiMessageVersion :: V3 ,  & attributes
@@ -325,7 +330,7 @@ mod test {
325330            OpEngineValidator :: new :: < KeccakKeyHasher > ( get_chainspec ( ) ,  NoopProvider :: default ( ) ) ; 
326331        let  attributes = get_attributes ( None ,  1732633200 ) ; 
327332
328-         let  result = <engine:: OpEngineValidator < _ >  as  EngineValidator < 
333+         let  result = <engine:: OpEngineValidator < _ ,   _ >  as  EngineValidator < 
329334            OpEngineTypes , 
330335        > >:: ensure_well_formed_attributes ( 
331336            & validator,  EngineApiMessageVersion :: V3 ,  & attributes
@@ -339,7 +344,7 @@ mod test {
339344            OpEngineValidator :: new :: < KeccakKeyHasher > ( get_chainspec ( ) ,  NoopProvider :: default ( ) ) ; 
340345        let  attributes = get_attributes ( Some ( b64 ! ( "0000000000000008" ) ) ,  1732633200 ) ; 
341346
342-         let  result = <engine:: OpEngineValidator < _ >  as  EngineValidator < 
347+         let  result = <engine:: OpEngineValidator < _ ,   _ >  as  EngineValidator < 
343348            OpEngineTypes , 
344349        > >:: ensure_well_formed_attributes ( 
345350            & validator,  EngineApiMessageVersion :: V3 ,  & attributes
@@ -353,7 +358,7 @@ mod test {
353358            OpEngineValidator :: new :: < KeccakKeyHasher > ( get_chainspec ( ) ,  NoopProvider :: default ( ) ) ; 
354359        let  attributes = get_attributes ( Some ( b64 ! ( "0000000800000008" ) ) ,  1732633200 ) ; 
355360
356-         let  result = <engine:: OpEngineValidator < _ >  as  EngineValidator < 
361+         let  result = <engine:: OpEngineValidator < _ ,   _ >  as  EngineValidator < 
357362            OpEngineTypes , 
358363        > >:: ensure_well_formed_attributes ( 
359364            & validator,  EngineApiMessageVersion :: V3 ,  & attributes
@@ -367,7 +372,7 @@ mod test {
367372            OpEngineValidator :: new :: < KeccakKeyHasher > ( get_chainspec ( ) ,  NoopProvider :: default ( ) ) ; 
368373        let  attributes = get_attributes ( Some ( b64 ! ( "0000000000000000" ) ) ,  1732633200 ) ; 
369374
370-         let  result = <engine:: OpEngineValidator < _ >  as  EngineValidator < 
375+         let  result = <engine:: OpEngineValidator < _ ,   _ >  as  EngineValidator < 
371376            OpEngineTypes , 
372377        > >:: ensure_well_formed_attributes ( 
373378            & validator,  EngineApiMessageVersion :: V3 ,  & attributes
0 commit comments