2

For several days I couldn't deploy program because of the same reason everyone fails. In 5 retries you can't deploy it. I changed Solana Cli source code in order to increase max retries number (you can find instructions on how to do this here) ). It worked. After all it writes checking transaction status and never be successful. It gives this error Error: 122 write transactions failed

After that stage does it spend Sol? Could it be I have insufficient funds? Is this common error? Have you ever got the same error? I couldn't find any mentions of this error on the internet. I began to suspect that modifying the source code might be the cause.

Edit: I think writing to buffer account is completed. I get error at the end of the second step writes here:

Once all transactions have been sent, the CLI polls the RPC API with batches of transaction signatures to ensure that every write was successful and confirmed.

1 Answer 1

2

The deployment will spend a bit of SOL to create a buffer account, and after which this is reclaimed once the deploy succeeds or solana program close --buffers is ran. If the deploy fails like in your case, you can rerun solana program deploy ./target/deploy/<program-name>.so with the --buffer flag and the buffer address to retry your previous deploy. To find open buffers you can run solana program show --buffers

Additionally, you can partially mitigate some of the issues with mainnet deployments failing by using flags like --with-compute-unit-price <micro-lamports>, --use-rpc (solana config set -u <url>), and --use-quic

Using these flags combined with retrying via the previous buffer should help get your program deployed even after failing.

3
  • Thanks for explanations. I run command as your write in order to use same buffer account again. But it gives error at the same step with different number of transactions that were failed. I think it completely write to buffer account. Since I changed max retries, I can successfully reach %100. After that it writes checking transaction status After that it says number of transactions failed. I think, it is one step before creating program account. I searched on internet I couldn't find anything about it. So, I became suspicious that if I did something wrong.
    – kadir
    Commented Jun 5 at 16:40
  • @kadir it eventually finishes and then hangs? It should show a progress like "150/200 transactions", where the total will incrementally decrease each time you retry. If it continues to fail, you can keep retrying until it eventually completes. Does it complete all of the transactions and then do nothing?
    – Joey Meere
    Commented Jun 5 at 19:11
  • According to text it writes to console, it completes writing to buffer account. I checked it on explorer, I think it might finished it. Checking statues of transaction says, there is a problem with some of these transactions. I tried Solpg, using rpc etc. Nothing works. Solana Cli doesn't support this flag: --with-compute-unit-price. But in Solpg I increased it. It was worser than Solana Cli. Solpg waits for hours without doing a successful transaction. I think there is nothing left I can do. I can deploy a small hello word program, but can't deploy my 6 times bigger program.
    – kadir
    Commented Jun 6 at 20:30

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.