@@ -5,7 +5,7 @@ use crate::{
55 config:: { BuilderConfig , HostProvider , RuProvider } ,
66 tasks:: env:: SimEnv ,
77} ;
8- use alloy:: { consensus:: Header , eips:: BlockId , network:: Ethereum } ;
8+ use alloy:: { consensus:: Header , eips:: BlockId , network:: Ethereum , providers :: Provider } ;
99use init4_bin_base:: {
1010 deps:: metrics:: { counter, histogram} ,
1111 utils:: calc:: SlotCalculator ,
@@ -183,6 +183,9 @@ impl Simulator {
183183 // Host DB and Env
184184 let host_db = self . create_host_db ( ) . await ;
185185
186+ let height = sim_env. host_block_number ( ) ;
187+ debug ! ( %height, "creating host env at block number" ) ;
188+
186189 let host_env = HostEnv :: < HostAlloyDatabaseProvider , NoOpInspector > :: new (
187190 host_db,
188191 constants. clone ( ) ,
@@ -303,8 +306,11 @@ impl Simulator {
303306 deadline. max ( Instant :: now ( ) )
304307 }
305308
306- /// Creates an `AlloyDB` instnace from the host provider.
309+ /// Creates an `AlloyDB` instance from the host provider.
307310 async fn create_host_db ( & self ) -> HostAlloyDatabaseProvider {
311+ let block_height = self . host_provider . get_block_number ( ) . await . unwrap ( ) ;
312+ debug ! ( %block_height, "creating alloyDB at block height" ) ;
313+
308314 let alloy_db = AlloyDB :: new ( self . host_provider . clone ( ) , BlockId :: latest ( ) ) ;
309315
310316 // Wrap the AlloyDB instance in a WrapDatabaseAsync and return it.
@@ -316,6 +322,8 @@ impl Simulator {
316322
317323 /// Creates an `AlloyDB` instance from the rollup provider.
318324 fn create_rollup_db ( & self , latest_block_number : u64 ) -> RollupAlloyDatabaseProvider {
325+ debug ! ( %latest_block_number, "creating rollup alloyDB at block height" ) ;
326+
319327 // Make an AlloyDB instance from the rollup provider with that latest block number
320328 let alloy_db: AlloyDB < Ethereum , RuProvider > =
321329 AlloyDB :: new ( self . ru_provider . clone ( ) , BlockId :: from ( latest_block_number) ) ;
0 commit comments