@@ -71,60 +71,3 @@ async fn test_handle_build() {
71
71
assert ! ( got. is_ok( ) ) ;
72
72
assert ! ( got. unwrap( ) . tx_count( ) == 2 ) ;
73
73
}
74
-
75
- /// Tests the full block builder loop, including transaction ingestion and block simulation.
76
- ///
77
- /// This test sets up a simulated environment using Anvil, creates a block builder,
78
- /// and verifies that the builder can process incoming transactions and produce a block
79
- /// within a specified timeout.
80
- #[ ignore = "integration test" ]
81
- #[ tokio:: test( flavor = "multi_thread" , worker_threads = 2 ) ]
82
- async fn test_spawn ( ) {
83
- setup_logging ( ) ;
84
-
85
- // Make a test config
86
- let config = setup_test_config ( ) . unwrap ( ) ;
87
- let constants = SignetSystemConstants :: pecorino ( ) ;
88
-
89
- // Create an anvil instance for testing
90
- let anvil_instance = Anvil :: new ( ) . chain_id ( signet_constants:: pecorino:: RU_CHAIN_ID ) . spawn ( ) ;
91
-
92
- // Create a wallet
93
- let keys = anvil_instance. keys ( ) ;
94
- let test_key_0 = PrivateKeySigner :: from_signing_key ( keys[ 0 ] . clone ( ) . into ( ) ) ;
95
- let test_key_1 = PrivateKeySigner :: from_signing_key ( keys[ 1 ] . clone ( ) . into ( ) ) ;
96
-
97
- // Plumb inputs for the test setup
98
- let ( tx_sender, tx_receiver) = unbounded_channel ( ) ;
99
- let ( _, bundle_receiver) = unbounded_channel ( ) ;
100
- let ( block_sender, mut block_receiver) = unbounded_channel ( ) ;
101
-
102
- let env_task = config. env_task ( ) ;
103
- let ( block_env, _env_jh) = env_task. spawn ( ) ;
104
-
105
- let cache_task = CacheTask :: new ( block_env. clone ( ) , bundle_receiver, tx_receiver) ;
106
- let ( sim_cache, _cache_jh) = cache_task. spawn ( ) ;
107
-
108
- // Create a rollup provider
109
- let ru_provider = RootProvider :: < Ethereum > :: new_http ( anvil_instance. endpoint_url ( ) ) ;
110
-
111
- let sim = Simulator :: new ( & config, ru_provider. clone ( ) , block_env) ;
112
-
113
- // Finally, Kick off the block builder task.
114
- sim. spawn_simulator_task ( constants, sim_cache. clone ( ) , block_sender) ;
115
-
116
- // Feed in transactions to the tx_sender and wait for the block to be simulated
117
- let tx_1 = new_signed_tx ( & test_key_0, 0 , U256 :: from ( 1_f64 ) , 11_000 ) . unwrap ( ) ;
118
- let tx_2 = new_signed_tx ( & test_key_1, 0 , U256 :: from ( 2_f64 ) , 10_000 ) . unwrap ( ) ;
119
- tx_sender. send ( tx_1) . unwrap ( ) ;
120
- tx_sender. send ( tx_2) . unwrap ( ) ;
121
-
122
- // Wait for a block with timeout
123
- let result = timeout ( Duration :: from_secs ( 5 ) , block_receiver. recv ( ) ) . await ;
124
- assert ! ( result. is_ok( ) , "Did not receive block within 5 seconds" ) ;
125
-
126
- // Assert on the block
127
- let block = result. unwrap ( ) ;
128
- assert ! ( block. is_some( ) , "Block channel closed without receiving a block" ) ;
129
- assert ! ( block. unwrap( ) . block. tx_count( ) == 2 ) ; // TODO: Why is this failing? I'm seeing EVM errors but haven't tracked them down yet.
130
- }
0 commit comments