1

I follow the following instructions to deploy the program: https://docs.solana.com/getstarted/rust

Here are my steps:

solana-keygen new

solana config set --url https://api.testnet.solana.com (or https://api.devnet.solana.com)

cargo init hello_world --lib

cd hello_world

cargo add solana-program

...

cargo-build-sbf

solana program deploy ./target/deploy/hello_world.so

And I got an error:

Blockhash expired. 4 retries remaining
Blockhash expired. 3 retries remaining
Blockhash expired. 2 retries remaining
Blockhash expired. 1 retries remaining
Blockhash expired. 0 retries remaining
===============================================================================
Recover the intermediate account's ephemeral keypair file with
`solana-keygen recover` and the following 12-word seed phrase:
===============================================================================
kite frost impulse submit brass stomach gas guilt basic correct acquire unusual
===============================================================================
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: Data writes to account failed: Custom error: Max retries exceeded

I have been blocked for 2 days because of this error, can anyone help me!

2 Answers 2

1

Try using a different RPC. My recommendation is to find a 3rd party service and register for a free tier account. This worked for me just now, while deploy via https://api.devnet.solana.com failed.

You can also run solana gossip in the cli and try the servers from the RPC Address column as RPC nodes, but expect some of these not to work at all.

What you might also want to check is that the cluster's Solana version is close to your local version (solana cluster-version).

2
  • I have run solana-test-validator to deploy to local but it keeps initializing, is there any way to fix it: "logrotate is not supported on this platform Ledger location: test-ledger Log: test-ledger\validator.log ⠒ Initializing..."
    – Vuong Tran
    Aug 20, 2023 at 3:17
  • I installed WSL and set it all up from scratch, then I generated RPC from quicknode.com and it worked fine
    – Vuong Tran
    Sep 17, 2023 at 7:46
-1

I was also getting the same error I just upgrade my solana cli tool to lastest then it is working for me

solana-install update

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.