Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.16: reduce WARN logging to only necessary scenario (backport of #33408) #33445

Merged
merged 1 commit into from
Sep 28, 2023
Merged
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
7 changes: 5 additions & 2 deletions runtime/src/prioritization_fee_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,17 @@ impl PrioritizationFeeCache {
// block minimum fee.
let (result, slot_finalize_time) = measure!(
{
// Only retain priority fee reported from optimistically confirmed bank
let pre_purge_bank_count = slot_prioritization_fee.len() as u64;
slot_prioritization_fee.retain(|id, _| id == bank_id);
let post_purge_bank_count = slot_prioritization_fee.len() as u64;
metrics.accumulate_total_purged_duplicated_bank_count(
pre_purge_bank_count.saturating_sub(post_purge_bank_count),
);
if post_purge_bank_count == 0 {
warn!("Prioritization fee cache unexpected finalized on non-existing bank. slot {slot} bank id {bank_id}");
// It should be rare that optimistically confirmed bank had no prioritized
// transactions, but duplicated and unconfirmed bank had.
if pre_purge_bank_count > 0 && post_purge_bank_count == 0 {
warn!("Finalized bank has empty prioritization fee cache. slot {slot} bank id {bank_id}");
}

let mut block_prioritization_fee = slot_prioritization_fee
Expand Down