I am trying to send a compressed NFT with a canopy depth of 0, meaning i have to submit a proofpath with a 24 key length. This always gives me a transaction too large error. Is there a way to optimize this?

This is the code I am using:

const assetWithProof = await getAssetWithProof(umi, publicKey(assetId));

  console.log("Asset with proof:", assetWithProof);

  const transferIxs: TransactionInstruction[] = transfer(umi, {
    leafOwner: publicKey(asset.ownership.owner),
    newLeafOwner: publicKey(toPubkey),

1 Answer 1


The way to optimize this and make your tree more composable also with other programs is using a higher canopy depth.

Having a proof path of 24 will take 24x32 bytes which is 768 bytes. The max size of a transaction is 1232 bytes and with your other accounts and the signature you hit that limit.

If you want also other programs and users use your NFTs you should increase canopy depth of your tree.

You can read more about the topic here: https://www.soldev.app/course/compressed-nfts https://solana.com/de/docs/advanced/state-compression and calculate your depth here: https://compressed.app/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.