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
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/fortuna/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fortuna"
version = "8.2.0"
version = "8.2.1"
edition = "2021"

[lib]
Expand Down
13 changes: 12 additions & 1 deletion apps/fortuna/src/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,18 @@ impl History {
}
};
if let Err(e) = result {
tracing::error!("Failed to update request status: {}", e);
match e.as_database_error() {
Some(db_error) if db_error.is_unique_violation() => {
tracing::info!(
"Failed to insert request, request already exists: Chain ID: {}, Sequence: {}",
network_id,
sequence
);
}
_ => {
tracing::error!("Failed to update request status: {}", e);
}
}
}
}

Expand Down
10 changes: 9 additions & 1 deletion apps/fortuna/src/keeper/fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ async fn calculate_fair_fee_withdrawal_amount<M: Middleware + 'static>(
.await
.map_err(|e| anyhow!("Error while getting current keeper balance. error: {:?}", e))?;

tracing::info!(
"Contract has available fees: {:?}, current keeper ({:?}) has balance: {:?}",
available_fees,
keeper_address,
current_balance
);

// Calculate total funds across all keepers + available fees
let mut total_funds = current_balance + available_fees;

Expand All @@ -55,6 +62,7 @@ async fn calculate_fair_fee_withdrawal_amount<M: Middleware + 'static>(
e
)
})?;
tracing::info!("Keeper address {:?} has balance: {:?}", address, balance);
total_funds += balance;
}

Expand Down Expand Up @@ -174,7 +182,7 @@ pub async fn withdraw_fees_if_necessary(
if withdrawal_amount < min_withdrawal_amount {
// We don't have enough to meaningfully top up the balance.
// NOTE: This log message triggers a grafana alert. If you want to change the text, please change the alert also.
tracing::warn!("Keeper balance {:?} is too low (< {:?}) but provider fees are not sufficient to top-up.", keeper_balance, min_balance);
tracing::warn!("Keeper balance {:?} is too low (< {:?}) but provider fees are not sufficient to top-up. (withdrawal_amount={:?} < min_withdrawal_amount={:?})", keeper_balance, min_balance, withdrawal_amount, min_withdrawal_amount);
return Ok(());
}

Expand Down