-
Notifications
You must be signed in to change notification settings - Fork 301
increase prioritization fee #50
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
Closed
tao-stones
wants to merge
15
commits into
solana-foundation:main
from
tao-stones:increase_prioritization_fee
Closed
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
12b86d0
increase prioritization fee
tao-stones c83f78b
fmt
tao-stones 2cd2219
changed to 1_000 micrlamports as new unit
tao-stones 03367f2
fmt
tao-stones 6b5b325
updated motivation and alternative
tao-stones b4f88e5
lint
tao-stones c481978
lint
tao-stones 5817d27
Update proposals/0050-increase-prioritization-fee.md
tao-stones b8185d9
Update proposals/0050-increase-prioritization-fee.md
tao-stones d194a66
Update proposals/0050-increase-prioritization-fee.md
tao-stones 0058e95
Update proposals/0050-increase-prioritization-fee.md
tao-stones 4c48656
Update proposals/0050-increase-prioritization-fee.md
tao-stones f34ee60
Update proposals/0050-increase-prioritization-fee.md
tao-stones 6a0d454
Update proposals/0050-increase-prioritization-fee.md
tao-stones 069f866
fix
tao-stones File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| --- | ||
| simd: '0050' | ||
| title: Increase Prioritization Fee | ||
| authors: | ||
| - Tao Zhu | ||
| category: Standard | ||
| type: Core | ||
| status: Draft | ||
| created: 2023-05-22 | ||
| feature: #31453 | ||
| --- | ||
|
|
||
| ## Summary | ||
|
|
||
| Cost of prioritizing should be a meaningful portion of transaction base fee. | ||
|
|
||
| ## Motivation | ||
|
|
||
| Prioritization fee is intended to be used sensitively during congestion, | ||
| provides advanced users a tool to access particular resources when contented | ||
| with a meaningful fee, while other users may opt to delay access to avoid | ||
| paying extra fee. When local fee market functions as designed, it provides | ||
| economic incentives to reduce congestion. | ||
|
|
||
| `Prioritization_fee = compute_unit_limit * compute_unit_price`, | ||
| where compute_unit_price has unit of microlamport. | ||
|
|
||
| The small unit of compute_unit_price manifests into: | ||
|
|
||
| 1. Prioritization_fee is proportionally insignificant to base fee; | ||
| 2. Therefore, some payers set priority even if there is no contention, | ||
| potentially distorting local fee market, and leaving other users at a | ||
| disadvantage; | ||
| 3. Little consideration was given to compute_unit_limit when setting priority; | ||
| These are being documented in https://github.com/solana-labs/solana/issues/31755. | ||
|
|
||
| To encourage prioritization fee to be used as intended as congestion control | ||
| tool, it propose to regulate `compute_unit_price` by rounding down to its | ||
| nearest 1_000 microlamports. The effect is user should set `compute_unit_price` | ||
| in increments of 1_000 microlamports. Transaction with less than 1_000 | ||
| `compute_unit_price` will have no priority nor be charged a priority fee. | ||
|
|
||
| ## Alternatives Considered | ||
|
|
||
| 1. to change `compute_unit_price` unit from microlamports to milli-lamport. | ||
| This approach will require a new version of compute_budget instruction that | ||
| uses `milli-lamport` as unit, to coexist with existing instruction, | ||
| later to be deprecated when users migrate to new instruction. It requires | ||
| significantly more work on rolling out the change. | ||
|
|
||
| Current approach avoid changing API, nor introducing an additional terminology. | ||
|
|
||
| ## New Terminology | ||
|
|
||
| None | ||
|
|
||
| ## Detailed Design | ||
|
|
||
| - No change to compute_budget instruction APIs; | ||
| - No change to how prioritization fee is calculated; | ||
| - No change to how banking_stage prioritization works; | ||
| - Add feature gated function to round user specified `compute_unit_price` down | ||
| to its nearest 1_000 microlamports. | ||
| - The rounded `compute_unit_price` will be used by leader in prioritizing, and | ||
| used by bank to calculate prioritization fee. | ||
|
|
||
| ### Implementation | ||
|
|
||
| PoC https://github.com/solana-labs/solana/pull/31469 | ||
|
|
||
| ## Impact | ||
|
|
||
| - To vote transactions, no impact; | ||
| - To transactions don't set `compute_unit_price` (which is ~32% of non-vote | ||
| transactions) , no impact; | ||
| - To transactions set `compute_unit_price`, user needs to reevaluate strategy | ||
| of when to use priority, and how much. Specifically: | ||
| - user might want to set `compute_unit_price` only when block or account | ||
| contention increase; | ||
|
|
||
| Users can do that by either checking the RPC endpoint `getRecentPrioritizationFees` | ||
| for the minimum fee to land in a block, or specific write locked accounts when | ||
| constructing the transaction; | ||
|
|
||
| User can also continuously poll RPC endpoint to built up prioritization | ||
| fee historical stats locally, then generate adequate prioritization fee | ||
| algorithmically when constructing transactions. | ||
| - when setting `compute_unit_price`, it is advised to set in increment of | ||
| 1_000 microlamports (eg 0.001 lamport); | ||
| - When setting `compute_unit_price`, it is important to also evaluate | ||
| value for `compute_unit_limit` to avoid paying too high prioritization fee; | ||
| especially for ~50% non-vote transactions currently not setting | ||
| `compute_unit_limit` at all. | ||
|
|
||
| ### Examples | ||
|
|
||
| - 31.27% non-vote transactions in mainnet-beta set `compute_unit_price` when | ||
| both block and account CUs are below 75% of limit (eg., not congested). | ||
| They are currently paying an insignificant prioritization fee; With this | ||
| proposal, the payers of these transactions would have to consider only | ||
| paying prioritization fee when truly needed. | ||
|
|
||
| - about 6% of non-vote transactions in mainnet-beta that set `compute_unit_price` | ||
| are either not setting `compute_unit_limit` or setting it _above_ Max 1.4M. | ||
| With this proposal, payers of these transactions would have to consider | ||
| setting an accurate/reasonable `compute_unit_limit`. | ||
|
|
||
| ## Security Considerations | ||
|
|
||
| None | ||
|
|
||
| ## Backwards Compatibility | ||
|
|
||
| No breaking changes. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.