Toolbox

Priority Fees and Compute Management

Last updated September 21, 2026

Umi V1 transactions store compute limits and the total priority fee in the transaction message, while V0 transactions use Compute Budget program instructions.

Summary

Use setTransactionConfig() to configure compute units and priority fees on V1 transactions.

  • V1 uses computeUnitLimit and a total priorityFee.
  • V1 rejects Compute Budget program instructions.
  • V0 uses setComputeUnitLimit and setComputeUnitPrice.
  • Priority fee estimates expressed in micro-lamports per compute unit must be converted to total lamports for V1.

Configure V1 Compute Units and Priority Fees

V1 transactions configure their compute unit limit and total priority fee with setTransactionConfig().

V1 compute configuration
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.

V0 compute configuration
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