block-prioritization-fee metrics update#6967
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6967 +/- ##
=========================================
- Coverage 83.2% 83.2% -0.1%
=========================================
Files 853 853
Lines 375634 375678 +44
=========================================
+ Hits 312647 312679 +32
- Misses 62987 62999 +12 🚀 New features to boost your workflow:
|
| .prioritization_fee, | ||
| solana_fee::FeeFeatures::from(bank.feature_set.as_ref()), | ||
| ) | ||
| }); |
There was a problem hiding this comment.
Making additional fee calculation in hot path might be an issue, reporting its us, testing in testnet
There was a problem hiding this comment.
metrics reported from devbox indicates near 0 us
There was a problem hiding this comment.
Yeah I don't like the additional work here.
It's also worth noting that I've had a WIP PR to make PrioritizationFeeCache rpc-only - we don't need to do any of this on a block-producing node; but then we'd lose the metrics.
See my other comment on reporting all fees.
There was a problem hiding this comment.
I felt the same. Was focusing on Trent's particular use case, when one is curious about how cu-price is bidding up, it helps to put total fee collected as ref point. But yea, I don't love to have to calculate fee again here just for reporting.
One benefit of reporting here vs from cost-tracking is, here only report when block is opportunistically confirmed. Wondering if adding fee to transaction meta is a good idea - I chatted about it before, don't remember why we didn't do it.
There was a problem hiding this comment.
but we won't report this on building nodes if we make prio-fee-cache optional (we should).
There was a problem hiding this comment.
it's not separate infra, but the cost tracking is currently where we report other objective block facts around the cost. I feel it makes sense to just lop it near there for now so we have semething without reinventing a metric system.
There was a problem hiding this comment.
i mostly want the separate infra 'cause 5000 identical datapoints is kinda useless load on the metrics db
There was a problem hiding this comment.
agreed, but i feel we should have this metric asap even if repeated. then can figure out how we want to report going forward separately, but don't lose data time
There was a problem hiding this comment.
Agree. Do we have objection of reporting total_priority_fee at cost of one multiplying (eg FeeBudgetLimits::from(compute_budget_limits))?
Can add total transaction fee reporting at Cost Tracker separately.
| // Total prioritization fees included in this slot. | ||
| total_prioritization_fee: Saturating<u64>, | ||
| // Total transaction fees of non-vote transactions included in this slot. | ||
| total_non_vote_transaction_fee: Saturating<u64>, |
There was a problem hiding this comment.
vote transactions are filtered out early, so only non-vote-transaction-fees are accumulated for confirmed blocks, which probably is the right thing to look at when analyzing prioritization fee behaviors
There was a problem hiding this comment.
I'd actually be in favor of removing this field of the metric entirely.
We should not re-calculate the costs just to get a metric.
Each bank has the fee-details on it. We should report those somewhere, though it doesn't necessarily have to be in this datapoint.
There was a problem hiding this comment.
A good place might be in the same loop as cost-reporting. and we report with a tag is_leader in a similar way.
wdyt?
f0e4505 to
3b2c3a7
Compare
| // The minimum prioritization fee of prioritized transactions in this slot. | ||
| min_prioritization_fee: Option<u64>, | ||
| // The minimum compute unit price of prioritized transactions in this slot. | ||
| min_compute_unit_price: Option<u64>, |
There was a problem hiding this comment.
the min|max_compute_unit_prices are reported as sanitized raw value, in micro-lamports; vs above total_non_vote_transaction_fee is reported in lamports
|
note: |
|
assuming 992b0f8 is purely cosmetic? |
Yes, only renaming "_prioritization_fee" to "_compute_unit_price" |
3b2c3a7 to
b7c6fa7
Compare
* clean up naming * accumulates and reports included transaction fees * only collect total prioritization fee


Problem
block-prioritization-feemetrics reports data incorrectly:min_prioritization_feeis actually min ofcompute_unit_price, denominated inmicro-lamportsmax_prioritization_feeis actually max ofcompute_unit_price, denominated inmicro-lamportstotal_prioritization_feeis the sum of all non-vote transaction'scompute_unit_price, which is misleading.Summary of Changes
[min|max]-prioritization-feewith[min|max]-compute-unit-priceto truly reflect the data points are raw cu price user set inmicro-lamports;total-prioritization-feeis updated to report the sum of all landed transactions' prioritization fee (egcompute_unit_price * compute_unit_limit).block_prioritization_fee_counters.total_calculate_priotitization_fee_elapsed_usto monitor time spent on calculate prioritization fees.Fixes #6948