aligned_layer
aligned_layer copied to clipboard
fix(batcher) add timeout and retries logic to submit batch function
I added this timeout logic to the wait for tx receipt
match timeout(Duration::from_secs(60), pending_tx).await {
Ok(Ok(Some(receipt))) => Ok(receipt),
Ok(Ok(None)) => Err(anyhow::anyhow!("Transaction was mined but no receipt was returned")),
Ok(Err(e)) => Err(anyhow::anyhow!("Transaction failed: {:?}", e)),
Err(_) => Err(anyhow::anyhow!("Transaction was not mined within 60 seconds")),
}
I think Err(_) case should return Ok(None) instead of Err(...) because this case does not mean that the tx failed, but the receipt was not received @MauroToscano @entropidelic
To test the normal behavior, run anvil and the aggregator and send proofs