File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ pub struct BatcherConfigFromYaml {
1212 pub batch_size_interval : usize ,
1313 pub max_proof_size : usize ,
1414 pub max_batch_size : usize ,
15+ pub eth_ws_reconnects : usize ,
1516}
1617
1718#[ derive( Debug , Deserialize ) ]
Original file line number Diff line number Diff line change @@ -49,10 +49,11 @@ impl Batcher {
4949 let deployment_output =
5050 ContractDeploymentOutput :: new ( config. aligned_layer_deployment_config_file_path ) ;
5151
52- let eth_ws_provider = Provider :: connect ( & config. eth_ws_url )
52+ let eth_ws_provider = Provider :: connect_with_reconnects (
53+ & config. eth_ws_url , config. batcher . eth_ws_reconnects )
5354 . await
5455 . expect ( "Failed to get ethereum websocket provider" ) ;
55-
56+
5657 let eth_rpc_provider =
5758 eth:: get_provider ( config. eth_rpc_url . clone ( ) ) . expect ( "Failed to get provider" ) ;
5859
@@ -105,6 +106,7 @@ impl Batcher {
105106 tx : Arc < Sender < Message > > ,
106107 ) -> Result < ( ) , anyhow:: Error > {
107108 let mut stream = self . eth_ws_provider . subscribe_blocks ( ) . await ?;
109+
108110 while let Some ( block) = stream. next ( ) . await {
109111 let batcher = self . clone ( ) ;
110112 let tx = tx. clone ( ) ;
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ batcher:
2323 batch_size_interval : 999999999
2424 max_proof_size : 67108864 # 64 MiB
2525 max_batch_size : 268435456 # 256 MiB
26+ eth_ws_reconnects : 99999999999999
2627
2728# # Aggregator Configurations
2829aggregator :
You can’t perform that action at this time.
0 commit comments