0

How to deal with same transaction hash issue on solana, if i want to send multiple transaction with same instructions with data and sign them all with same blockhash. they will end up getting same transaction hash?.

Are there any workaround adding dummy unique instruction which does nothing rather than for generating unique hash for each transaction.

Any ideas or resources will be highly appreciated.

2 Answers 2

1

You could e.g., add the ComputeBudget instruction with some slightly different tip (like add 1 micro lamport) to the same transaction you want to "double send" (https://solana-labs.github.io/solana-web3.js/classes/ComputeBudgetInstruction.html).

1

I'll typically tack on a self transfer for different lamport amounts if I want to spam transactions. You can also poll for new blockhashes every ~400ms as they're produced by the cluster. Note that this might not always work due to forking / skipped slots.

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.