@@ -22,7 +22,7 @@ use reth_db_common::init;
2222use reth_exex:: { ExExContext , ExExEvent , ExExHead , ExExNotificationsStream } ;
2323use reth_node_api:: { FullNodeComponents , FullNodeTypes , NodeTypes } ;
2424use signet_blobber:: BlobFetcher ;
25- use signet_block_processor:: SignetBlockProcessorV1 ;
25+ use signet_block_processor:: { AliasOracleFactory , SignetBlockProcessorV1 } ;
2626use signet_db:: { DbProviderExt , RuChain , RuWriter } ;
2727use signet_node_config:: SignetNodeConfig ;
2828use signet_node_types:: { NodeStatus , NodeTypesDbTrait , SignetNodeTypes } ;
@@ -42,7 +42,7 @@ type ExExNotification<Host> = reth_exex::ExExNotification<PrimitivesOf<Host>>;
4242type Chain < Host > = reth:: providers:: Chain < PrimitivesOf < Host > > ;
4343
4444/// Signet context and configuration.
45- pub struct SignetNode < Host , Db >
45+ pub struct SignetNode < Host , Db , AliasOracle = Box < dyn StateProviderFactory > >
4646where
4747 Host : FullNodeComponents ,
4848 Host :: Types : NodeTypes < Primitives = EthPrimitives > ,
@@ -72,13 +72,13 @@ where
7272 pub ( crate ) status : watch:: Sender < NodeStatus > ,
7373
7474 /// The block processor
75- pub ( crate ) processor : SignetBlockProcessorV1 < Db > ,
75+ pub ( crate ) processor : SignetBlockProcessorV1 < Db , AliasOracle > ,
7676
7777 /// A reqwest client, used by the blob fetch and the tx cache forwarder.
7878 pub ( crate ) client : reqwest:: Client ,
7979}
8080
81- impl < Host , Db > fmt:: Debug for SignetNode < Host , Db >
81+ impl < Host , Db , AliasOracle > fmt:: Debug for SignetNode < Host , Db , AliasOracle >
8282where
8383 Host : FullNodeComponents ,
8484 Host :: Types : NodeTypes < Primitives = EthPrimitives > ,
8989 }
9090}
9191
92- impl < Host , Db > NodePrimitivesProvider for SignetNode < Host , Db >
92+ impl < Host , Db , AliasOracle > NodePrimitivesProvider for SignetNode < Host , Db , AliasOracle >
9393where
9494 Host : FullNodeComponents ,
9595 Host :: Types : NodeTypes < Primitives = EthPrimitives > ,
@@ -98,22 +98,24 @@ where
9898 type Primitives = EthPrimitives ;
9999}
100100
101- impl < Host , Db > CanonStateSubscriptions for SignetNode < Host , Db >
101+ impl < Host , Db , AliasOracle > CanonStateSubscriptions for SignetNode < Host , Db , AliasOracle >
102102where
103103 Host : FullNodeComponents ,
104104 Host :: Types : NodeTypes < Primitives = EthPrimitives > ,
105105 Db : NodeTypesDbTrait ,
106+ AliasOracle : AliasOracleFactory ,
106107{
107108 fn subscribe_to_canonical_state ( & self ) -> CanonStateNotifications < Self :: Primitives > {
108109 self . bp . subscribe_to_canonical_state ( )
109110 }
110111}
111112
112- impl < Host , Db > SignetNode < Host , Db >
113+ impl < Host , Db , AliasOracle > SignetNode < Host , Db , AliasOracle >
113114where
114115 Host : FullNodeComponents ,
115116 Host :: Types : NodeTypes < Primitives = EthPrimitives > ,
116117 Db : NodeTypesDbTrait ,
118+ AliasOracle : AliasOracleFactory ,
117119{
118120 /// Create a new Signet instance.
119121 ///
@@ -124,6 +126,7 @@ where
124126 ctx : ExExContext < Host > ,
125127 config : SignetNodeConfig ,
126128 factory : ProviderFactory < SignetNodeTypes < Db > > ,
129+ alias_oracle : AliasOracle ,
127130 client : reqwest:: Client ,
128131 ) -> eyre:: Result < ( Self , tokio:: sync:: watch:: Receiver < NodeStatus > ) > {
129132 let constants =
@@ -174,13 +177,11 @@ where
174177 . wrap_err ( "failed to create blob cacher" ) ?
175178 . spawn ( ) ;
176179
177- let bdsp: Box < dyn StateProviderFactory > = Box :: new ( ctx. provider ( ) . clone ( ) ) ;
178-
179180 let processor = SignetBlockProcessorV1 :: new (
180181 constants. clone ( ) ,
181182 config. chain_spec ( ) . clone ( ) ,
182183 factory. clone ( ) ,
183- bdsp ,
184+ alias_oracle ,
184185 config. slot_calculator ( ) ,
185186 blob_cacher,
186187 ) ;
0 commit comments