solana

Solana deploy "account data too small for instruction"


When i try to deploy a program with anchor (devnet or mainnet, same error), i get the following error : Deploying program failed: Error processing Instruction 0: account data too small for instruction.

I have no clue where this comes from.

The so file is around 331Ko, and apparently, the error shows up when i try to use "mpl-token-metadata" to get metadata of NFT

Any one has an idea how to correct that ?


Solution

  • When you deploy a program on Solana, the amount of space allocated for that program is 2x the original program size.

    This is to ensure there is a good amount of space if you upgrade the program, up to 2x the original program size.

    The program that you are deploying is exceeding this limit. You will have to get a new programId and deploy again.