anza-xyz / agave

Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.
https://www.anza.xyz/
Apache License 2.0
213 stars 82 forks source link

Deploying always reach 100% but error: "X write transactions failed" instead of 1/1 confirming deploy #1082

Open layer1tales opened 2 months ago

layer1tales commented 2 months ago

Problem

I am trying to deploy a program needing 1100 transactions and I am never able to deploy it. Here is my command:

./solana program deploy --url https://xxx-mainnet.quiknode.pro/ --keypair /keypairs/update-authority.json --program-id /keypairs/program-id.json --with-compute-unit-price 501000 /home/quantmaven/rewards-center-main/target/deploy/cardinal_rewards_center.so --max-sign-attempts 500

I will always get from 0% to 100%, which is great, BUT:

99.9% | Resending 2/2 transactions [block height 242467171; re-sign in 256 blocks]

Instead of going to 1/1 confirming final transaction of the deploy, I get this error:

Error: X write transactions failed after 99.9%

It seems like the higher -with-compute-unit-price, the higher the number of write transactions failed.

I have attempted deploying at least 20 times. I always get to 100%, but that 100% has failed transactions. How is that possible? Isn't the code supposed to resend transactions that failed?

Proposed Solution

I feel some timeout is needed somewhere to give time for transactions to fail, before continuing the logic of the code, or else this is what happens. This never happened with core CLI 1.14 when it was only 5 tries, with a small pause of maybe 15-30sec between each attempt. Can someone have any idea where it should be placed? I heard something like this, but not sure where:

let timeout = tokio::time::timeout(Duration::from_secs(60), joinall(futures)); let = timeout.await;

   Or maybe if you have a better understanding please let me know because I am losing my sanity over this. Thanks!
ad7090 commented 2 months ago

Same issue 35534