Toolbox
Priority Fees and Compute Management
Last updated September 21, 2026
Summary
Use setTransactionConfig() to configure compute units and priority fees on V1 transactions.
- V1 uses
computeUnitLimitand a totalpriorityFee. - Umi V1 transaction builders reject Compute Budget program instructions.
- V0 uses
setComputeUnitLimitandsetComputeUnitPrice. - Priority fee estimates expressed in micro-lamports per compute unit must be converted to total lamports for V1.
Umi V1 transactions store compute limits and the total priority fee in the transaction message, while V0 transactions use Compute Budget program instructions.
Configure V1 Compute Units and Priority Fees
V1 transactions configure their compute unit limit and total priority fee with setTransactionConfig().
import { lamports, transactionBuilder } from '@metaplex-foundation/umi'
await transactionBuilder()
.add(myInstruction)
.useV1()
.setTransactionConfig({
computeUnitLimit: 600_000,
priorityFee: lamports(600),
})
.sendAndConfirm(umi)
The priorityFee is the total fee, not the price per compute unit. For a price of 1,000 micro-lamports and a limit of 600,000 units, the total is 600,000 × 1,000 ÷ 1,000,000 = 600 lamports.
Do not add setComputeUnitLimit or setComputeUnitPrice instructions to a V1 transaction builder. Umi rejects Compute Budget instructions in V1 transactions.
Configure V0 Compute Units and Priority Fees
V0 transactions continue to use Compute Budget program instructions from @metaplex-foundation/mpl-toolbox.
import { transactionBuilder } from '@metaplex-foundation/umi'
import {
setComputeUnitLimit,
setComputeUnitPrice,
} from '@metaplex-foundation/mpl-toolbox'
await transactionBuilder()
.add(setComputeUnitLimit(umi, { units: 600_000 }))
.add(setComputeUnitPrice(umi, { microLamports: 1_000 }))
.add(myInstruction)
.useV0()
.sendAndConfirm(umi)
Use V0 when the transaction requires an Address Lookup Table or the connected wallet does not support V1 transactions.
Notes
- Umi 1.6.0 or later is required for
useV1()andsetTransactionConfig(). - The V1 compute unit limit cannot exceed 1,400,000.
- See Optimal Transaction Landing to estimate compute units and fees.
- See Migrating from V0 to V1 Transactions for all compatibility requirements.
