solana program deploy command to devnet fails constantly with:

Blockhash expired. x retries remaining

My Setup:

  1. working against devnet.
  2. command includes all workarounds documented:
solana program deploy --skip-fee-check --buffer <BUFFER-KEYPAIR> <PROGRAM_PATH>
  1. I'm using latest solana tools version (1.10.32).
  2. It seems the program deploy buffer account was properly created.
  3. I'm using macbook pro A1 with fast network connection.
  4. My program binary is 330 KB.
  5. Been using both default devnet endpoint and a paid-rpc (quiknode).


the same program has been deployed successfully and seamlessly on mainnet. see https://explorer.solana.com/address/3b1JpnaCqMbWq14rxz5VCcuaMEBkFcyicvi9aMjMohkr

  • Is this devnet, testnet or mainnet? Testnet had some issues two weeks back. From the solana explorer status page, it still has occasional issues.
    – itsfarseen
    Commented Aug 23, 2022 at 6:38
  • 1
    working against devnet
    – Tom Peres
    Commented Aug 23, 2022 at 6:40
  • Hy getting the same error : When i try to deploy program in devnet, it shows sending transaction and progress remains zero. It retries for 5 times and displays: "error: data writes to account failed: custom error: max retries exceeded while deploying program solana" My binary file .so is 709 kbs ?? Commented Nov 5, 2022 at 14:27

1 Answer 1


Are you logging the blockhash you're using and can you check it on Explorer to see how old it is? Block hashes are good for 2 minutes or so.

Double check that you're getting the recent blockhash correctly and all from the right network. Don't query it until right before you run the main deployment transaction

  • >Are you logging the blockhash you're using I didn't log the blockhash, but rather cloned the entire solana src and built it with some logs and config tweaks. the tx are sent properly, but the tx status is never settled. what should I look for in the blockhash (via explorer)? I used verbose to make sure im on the right network.
    – Tom Peres
    Commented Aug 23, 2022 at 19:55
  • It's the hash of a prior block, I thought one could type it into the explorer search to see the block but it appears not so that's not very useful. You copy pasted the code you're using? Does it call getRecentBlockhash or getLatestBlockhash? this should happen immediately before submitting the transaction for signing. Commented Aug 24, 2022 at 8:20
  • that's the code you're referring to I assume - github.com/solana-labs/solana/blob/… ; notice that it's branch v1.1o (corresponds to the cli version I use)
    – Tom Peres
    Commented Aug 28, 2022 at 6:43
  • also, here's the mainnet deployment of the same program - explorer.solana.com/address/… (which was deployed seamlessly)
    – Tom Peres
    Commented Aug 28, 2022 at 6:47

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.