Skip to content
English
A priority fee is an optional fee paid to increase the chance that the current leader processes your transaction. To add a priority fee to a transaction, invoke instructions from the Compute Budget Program.
The v1 transaction format handles this differently: ComputeBudget instructions are ignored (they execute as no-ops), and the priority fee is set directly in the message config as a total in lamports rather than a price in micro-lamports per compute unit. Because those are different quantities, @solana/kit gives them separate setters and enforces the split in the type system: setTransactionMessagePriorityFeeLamports accepts only v1 messages, and setTransactionMessageComputeUnitPrice accepts only legacy and 0. The other resource limits are version-agnostic — setTransactionMessageComputeUnitLimit, setTransactionMessageLoadedAccountsDataSizeLimit, and setTransactionMessageHeapSize take a message of any version.
Kit
Output from a local Surfpool network
Output