michaelhly / solana-py

Solana Python SDK
https://michaelhly.github.io/solana-py
MIT License
1.05k stars 271 forks source link

Missing Transactions #178

Open spkompella opened 2 years ago

spkompella commented 2 years ago

I have a script automating the transfer of SPL tokens using solana-py. When i use the spl-token library to send transactions, I am getting sucessful JSON RPC responses with transaction hashes in the result. However, when I check solana explorer or solscan, I am only seeing a fraction of those transfers appear as valid transactions. If I search using the transaction id from the JSON response, I am not seeing the transaction on the chain. My wallet is saying only the valid transfers went through. So what is happening to the transactions being generated by the JSON response but not showing up on explorer or my wallet? Is there a way to wait for the transaction to complete and verify before moving on?

MarioProjects commented 2 years ago

Hey @spkompella I am facing the same problem. Do you have any new way to solve it?

aleixisp commented 2 years ago

you can set up in send_transaction method the skip_confirmation=False. Also there you can specify which signature status you want to trigger (Processed, Confirmed, Finalized).

Hope it helps!

spkompella commented 2 years ago

@MarioProjects I had to use the skip_confirmation and commitment options to wait for Finalized transactions. Sometimes the RPC request times out when waiting for confirmation so I have code to catch that error and retrieve the transaction hash. I store that hash and check it again later to make sure the transaction went through.

aweee-goxawee commented 4 months ago

still happens to me. not a single transaction i do goes through, all of them have errors like this.