Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 5 additions & 2 deletions apps/fortuna/src/keeper/commitment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ pub async fn update_commitments_if_necessary(
}
let threshold =
((provider_info.max_num_hashes as f64) * UPDATE_COMMITMENTS_THRESHOLD_FACTOR) as u64;
if provider_info.sequence_number - provider_info.current_commitment_sequence_number > threshold
{
let outstanding_requests =
provider_info.sequence_number - provider_info.current_commitment_sequence_number;
if outstanding_requests > threshold {
// NOTE: This log message triggers a a grafana alert. If you want to change the text, please change the alert also.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a a grafana alert -> a grafana alert

tracing::warn!("Update commitments threshold reached -- possible outage or DDOS attack. Number of outstanding requests: {:?} Threshold: {:?}", outstanding_requests, threshold);
let seq_number = provider_info.sequence_number - 1;
let provider_revelation = chain_state
.state
Expand Down
1 change: 1 addition & 0 deletions apps/fortuna/src/keeper/fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ pub async fn withdraw_fees_if_necessary(
let contract_call = contract.withdraw_as_fee_manager(provider_address, fees);
send_and_confirm(contract_call).await?;
} else if keeper_balance < min_balance {
// NOTE: This log message triggers a a grafana alert. If you want to change the text, please change the alert also.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a a grafana alert -> a grafana alert

tracing::warn!("Keeper balance {:?} is too low (< {:?}) but provider fees are not sufficient to top-up.", keeper_balance, min_balance)
}

Expand Down
Loading