solana-py icon indicating copy to clipboard operation
solana-py copied to clipboard

Missing Transactions

Open spkompella opened this issue 3 years ago • 4 comments

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?

spkompella avatar Jan 20 '22 23:01 spkompella

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

MarioProjects avatar Mar 01 '22 14:03 MarioProjects

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!

aleixisp avatar Mar 09 '22 10:03 aleixisp

@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.

spkompella avatar Mar 28 '22 17:03 spkompella