Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions batcher/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pub struct BatcherConfigFromYaml {
pub batch_size_interval: usize,
pub max_proof_size: usize,
pub max_batch_size: usize,
pub eth_ws_reconnects: usize,
}

#[derive(Debug, Deserialize)]
Expand Down
6 changes: 4 additions & 2 deletions batcher/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ impl Batcher {
let deployment_output =
ContractDeploymentOutput::new(config.aligned_layer_deployment_config_file_path);

let eth_ws_provider = Provider::connect(&config.eth_ws_url)
let eth_ws_provider = Provider::connect_with_reconnects(
&config.eth_ws_url, config.batcher.eth_ws_reconnects)
.await
.expect("Failed to get ethereum websocket provider");

let eth_rpc_provider =
eth::get_provider(config.eth_rpc_url.clone()).expect("Failed to get provider");

Expand Down Expand Up @@ -105,6 +106,7 @@ impl Batcher {
tx: Arc<Sender<Message>>,
) -> Result<(), anyhow::Error> {
let mut stream = self.eth_ws_provider.subscribe_blocks().await?;

while let Some(block) = stream.next().await {
let batcher = self.clone();
let tx = tx.clone();
Expand Down
1 change: 1 addition & 0 deletions config-files/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ batcher:
batch_size_interval: 999999999
max_proof_size: 67108864 # 64 MiB
max_batch_size: 268435456 # 256 MiB
eth_ws_reconnects: 99999999999999

## Aggregator Configurations
aggregator:
Expand Down