0

The following is my merkle tree config for cnft using metaplex bubblegum (solana devnet)

{
  treeConfig: {
    publicKey: 'Hu4Rqtx2sf5gGKEYkY6TXPxMjUqGQUnASKZ2gCvxXtcZ',
    header: {
      executable: false,
      owner: 'BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY',
      lamports: [Object],
      rentEpoch: 18446744073709551616n,
      exists: true
    },
    discriminator: [
      122, 245, 175, 248,
      171,  34,   0, 207
    ],
    treeCreator: 'EVDVp1miKUdGR3Y9PcckUAxmXNaZNS85AHchJaaKFkh9',
    treeDelegate: 'EVDVp1miKUdGR3Y9PcckUAxmXNaZNS85AHchJaaKFkh9',
    totalMintCapacity: 8n,
    numMinted: 3n,
    isPublic: true,
    isDecompressible: 1
  }
}

And when I try to redeem the voucher with


    const assetWithProof = await getAssetWithProof(umi, assetId)

    await redeem(umi, {
        ...assetWithProof,
        leafOwner: keypairSigner,
    }).sendAndConfirm(umi)

I get the error that 'Program log: AnchorError occurred. Error Code: DecompressionDisabled. Error Number: 6033. Error Message: Decompression is disabled for this tree..',

I cannot understand why this is happening since in the treeConfig it is clearly visible that decompression is set to be true?

1 Answer 1

1

From the listing you provided here, I assume that says the compression is disabled.

See the code that throws the error here:

https://github.com/metaplex-foundation/mpl-bubblegum/blob/main/programs/bubblegum/program/src/processor/redeem.rs#L60

The TreeConfig account defines the Disabled state to be coded as value 1

See: https://github.com/metaplex-foundation/mpl-bubblegum/blob/main/programs/bubblegum/program/src/state/mod.rs#L86

6
  • Okayy, that was little odd using 1 as false value. Thank you for addressing! Can you please suggest how to enable the decompression? Commented Jun 5 at 3:10
  • I assume with the instruction SetDecompressibleState github.com/metaplex-foundation/mpl-bubblegum/blob/main/programs/…
    – chalda
    Commented Jun 5 at 5:58
  • I am using their instructions mentioned in official docs for creating the tree: const builder = await createTree(umi, { merkleTree, maxDepth: 3, maxBufferSize: 8, public: true, SetDecompressibleState: 0 // treeCreator: keypairSigner }) It does not recognise SetDecompressibleState variable. Do you have any further idea? Commented Jun 5 at 20:03
  • The state is configured at the creation for Disabled as you can check in the code: github.com/metaplex-foundation/mpl-bubblegum/blob/main/programs/… I think the SetDecompressibleState: 0 does nothing in your code as there is no such variable expected. More on that you use upper case S while the other items work with lower case. More of that it signals that usage of the SetDecompressibleState: 0 in the call is artificial.
    – chalda
    Commented Jun 6 at 10:32
  • Yes, I realize that. I only put it there for the reference. I have tried with multiple possible values for decompression that could be possible inspiring from the link you mentioned, it expects none of those values. Is it possible that they have bug on their side or I am missing out on something? Commented Jun 6 at 11:20

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.