diff --git a/apps/fortuna/Cargo.lock b/apps/fortuna/Cargo.lock index 390ae620be..adae9dd7cf 100644 --- a/apps/fortuna/Cargo.lock +++ b/apps/fortuna/Cargo.lock @@ -1554,7 +1554,7 @@ dependencies = [ [[package]] name = "fortuna" -version = "7.4.8" +version = "7.4.9" dependencies = [ "anyhow", "axum", diff --git a/apps/fortuna/Cargo.toml b/apps/fortuna/Cargo.toml index 5beca37f55..8d5a4bf763 100644 --- a/apps/fortuna/Cargo.toml +++ b/apps/fortuna/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fortuna" -version = "7.4.8" +version = "7.4.9" edition = "2021" [lib] diff --git a/apps/fortuna/src/eth_utils/utils.rs b/apps/fortuna/src/eth_utils/utils.rs index 3aa2f8a12c..7627cf701e 100644 --- a/apps/fortuna/src/eth_utils/utils.rs +++ b/apps/fortuna/src/eth_utils/utils.rs @@ -1,3 +1,4 @@ +use ethabi::ethereum_types::U64; use { crate::eth_utils::nonce_manager::NonceManaged, anyhow::{anyhow, Result}, @@ -315,5 +316,12 @@ pub async fn submit_tx( )) })?; + if receipt.status == Some(U64::from(0)) { + return Err(backoff::Error::transient(anyhow!( + "Reveal transaction reverted on-chain. Tx:{:?}", + transaction + ))); + } + Ok(receipt) } diff --git a/apps/fortuna/src/keeper/process_event.rs b/apps/fortuna/src/keeper/process_event.rs index d29851c227..a4a6e51137 100644 --- a/apps/fortuna/src/keeper/process_event.rs +++ b/apps/fortuna/src/keeper/process_event.rs @@ -63,7 +63,12 @@ pub async fn process_event_with_backoff( match success { Ok(result) => { - tracing::info!("Processed event successfully in {:?}", result.duration); + tracing::info!( + "Processed event successfully in {:?} after {} retries. Receipt: {:?}", + result.duration, + result.num_retries, + result.receipt + ); metrics .requests_processed_success