Priority fees and compute
Priority fees and compute in the Carbium Library: 7 working Solana examples, among them Program compute usage profile and Compute budget instruction order.
- Program compute usage profile HS0152
Profile a program's compute units per call by summing its log lines across recent transactions read with getTransaction on Carbium RPC.
- Compute budget instruction order HS0149
Read where a transaction's ComputeBudget instructions sit and whether it sets the unit price twice, using getTransaction on Carbium RPC.
- Block fee reward breakdown HS0059
Recompute a block's Fee reward from its transactions: half the base fees plus all priority fees, then print the difference to the reported lamports.
- Compute budget audit HS0058
Audit recent transactions for the compute limit they requested, whether it came from the default or an instruction, and how many units they used.
- Compute unit limit from simulation HS0031
Read the compute units a transaction used, add a margin and set the compute-unit limit, from the numbers a simulation or a landed run returns.
- Transaction fee breakdown HS0030
Read one transaction and split its fee into the signature base fee and the priority fee, then check the split against the compute budget instructions.
- Priority fee per compute unit HS0015
Sample recent prioritization fees for your writable accounts and turn percentiles into a micro-lamports per compute unit price and a lamport fee.