solana-with-rpc-optimizations/cost-model
steviez 9076348ef4
Make CostTracker aware of inflight transactions (#437)
When a leader is packing a Bank, transactions costs are added to the
CostTracker and then later updated or removed, depending on if the
tx is committed. However, it is possible for a Bank to be frozen while
there are several tx's in flight.

CostUpdateService submits a metric with cost information almost
immediately after a Bank has been frozen. The result is that we have
observed cost details being submitted before some cost removals take
place, which causes a massive over-reporting of the block cost
compared to actual.

This PR adds a field to track the number of transactions that are
inflight, and adds a simple mechanism to try to allow that value to
settle to zero before submitting the datapoint. The number of inflight
tx's is submitted with the datapoint, so even if the value does not
settle to zero, we can still detect this case and know the metric is
tainted.

Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
2024-03-29 07:34:12 -05:00
..
src Make CostTracker aware of inflight transactions (#437) 2024-03-29 07:34:12 -05:00
Cargo.toml sdk: Upgrade to borsh 1.2.1 (#34355) 2023-12-08 13:18:10 +01:00
build.rs Crates have identical build.rs to frozen-abi can just be symlink (#33787) 2023-10-21 13:33:10 -05:00