solana icon indicating copy to clipboard operation
solana copied to clipboard

Updated fee transaction priority proposal

Open apfitzge opened this issue 1 year ago • 4 comments

Problem

Out of date and fee priority scheduler proposal

Summary of Changes

Updated the fee priority proposal for current idea of how we should schedule transacitons

Fixes #

apfitzge avatar Jul 01 '22 16:07 apfitzge

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Jul 10 '22 14:07 stale[bot]

The first paragraph needs to be updated, mainly to replace term additional fee with compute-unit price (aka prioritization fee), as it has been changed since the original proposal. Perhaps something like this:

[Prioritization Fee](https://github.com/solana-labs/solana/blob/master/docs/src/terminology.md#prioritization-fee)  were introduced to transactions as a method to allow users to bid for priority for
their transactions in the leader's queue.
The fee priority of a transaction `T` can then be defined as `F(T)`, where `F(T)` is the "compute-unit price", can be set by `ComputeBudgetInstruction.set_compute_unit_price()`. 

tao-stones avatar Jul 13 '22 20:07 tao-stones

  1. If T1 cannot be processed before T2 because there's already a transaction currently being processed that contends on an account A, then T2 should not be scheduled if it would grab any account locks needed by T1. This prevents lower fee transactions like T2 from starving higher paying transactions like T1.

As briefly discussed early, another reason for T1 cannot be processed could be it hit block/account compute-unit limit. In that case, T2 still should not be scheduled before T1

tao-stones avatar Jul 13 '22 20:07 tao-stones

This was an initial idea for: #27027

apfitzge avatar Aug 09 '22 14:08 apfitzge