3

Trying to upgrade a program I constantly bump into the following error:

$ solana program deploy ./target/deploy/c003_low_level.so 
=============================================================================
Recover the intermediate account's ephemeral keypair file with
`solana-keygen recover` and the following 12-word seed phrase:
=============================================================================

=============================================================================
To resume a deploy, pass the recovered keypair as the
[BUFFER_SIGNER] to `solana program deploy` or `solana program write-buffer'.
Or to recover the account's lamports, pass it as the
[BUFFER_ACCOUNT_ADDRESS] argument to `solana program close`.
=============================================================================
Error: Deploying program failed: Error processing Instruction 0: account data too small for instruction

I have tried to pass the printed-out seed phrase as --program-id ASK

But it just generate a brand new seed phrase:

$ solana program deploy ./target/deploy/c003_low_level.so  --program-id ASK
[program_id] seed phrase: 
[program_id] If this seed phrase has an associated passphrase, enter it now. Otherwise, press ENTER to continue: 
==========================================================================
Recover the intermediate account's ephemeral keypair file with
`solana-keygen recover` and the following 12-word seed phrase:
==========================================================================

==========================================================================
To resume a deploy, pass the recovered keypair as the
[BUFFER_SIGNER] to `solana program deploy` or `solana program write-buffer'.
Or to recover the account's lamports, pass it as the
[BUFFER_ACCOUNT_ADDRESS] argument to `solana program close`.
==========================================================================
Error: Deploying program failed: Error processing Instruction 0: custom program error: 0x0

I tried to use solana program write-buffer it returns an address, but I'm puzzled how to use it.

1
  • write-buffer returns the buffer address that you can use to deploy solana program deploy --program-id <PROGRAM_ADDRESS> --buffer <BUFFER_ADDRESS> Commented Jan 18 at 16:11

1 Answer 1

3

The error Error processing Instruction 0: custom program error: 0x0 usually means that you don't have a big enough account to hold your programs.

When programs are deployed today, space is only allocated to be double the first program's size you deploy. If you go past that during an upgrade, you'll run into this issue.

2
  • Then how to resize the allocated program's size?
    – unegare
    Commented Aug 17, 2022 at 17:58
  • 1
    You cannot resize today. That's an upcoming feature though
    – Jacob Creech
    Commented Aug 17, 2022 at 18:00

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.