solana icon indicating copy to clipboard operation
solana copied to clipboard

Remove leader QoS adjustment logic

Open tao-stones opened this issue 1 year ago • 1 comments

Problem

The QoS adjustment logic still alive in leader code.

  1. It should have been removed after cost model replaced "estimated cost" with "requested cu".
  2. It needs to be removed if leader is bankless.

But It cannot be removed yet, because the benefit of adjusting with actual consumed CUs prevents transactions with unnecessary high compute-unit-limits to degrade cluster.

This is because:

  1. transaction base fee is signature based, transaction can request max 1.4 Mil CUs without paying additional base fee. Without the Adjustment in question, few such transactions can take up entire block space.

  2. prioritization fee is = compute-unit-limit * compute-unit-price, but compute-unit-print is "micro-lamport", so 1Mil CU transaction only pays 1 lamport more than 1CU transaction. Without the Adjustment in question, transactions with high compute-unit-limit can prioritize out normal transactions, and degrade cluster performance.

Proposed Solution

  1. adjust compute-unit-price rate #31378
  2. implement base fee based on compute-units (https://github.com/solana-foundation/solana-improvement-documents/pull/19, and https://github.com/solana-foundation/solana-improvement-documents/pull/4.)
  3. remove Qos Adjustment logic.
  4. Still be able to revert qos-selected transaction if they are/would fail to be executed (due to accountInUse, Invalid Payer account, etc)

tao-stones avatar Apr 27 '23 21:04 tao-stones