3

With the recent network issues I'm having trouble landing some transactions. I haven't been relying on MaxRetries yet but would like to implement it in addition to my existing logic. What I can't figure out is what the default behaviour is if you don't include MaxRetries.

Does the node only attempt to send the transaction once if MaxRetries is not included, or is there a default number of attempts that if I set MaxRetries lower than I'll actually get worse results?

What is the max value of MaxRetries?

1 Answer 1

1

maxRetries: usize (optional) - Maximum number of times for the RPC node to retry sending the transaction to the leader. If this parameter not provided, the RPC node will retry the transaction until it is finalized or until the blockhash expires.

2
  • Hi, I’ve read this blurb from the Solana website but it doesn’t clarify much for me. Why do many recommendations say to send a tx multiple times with ‘maxRetries’ set to 0 as a method for retrying, if sending it without the parameter included means the node will keep trying? Commented Apr 9 at 20:08
  • I believe this is because each time you are trying to send tx with maxretires set to 0 you are getting different txn’s with different signatures and increasing the chance of tx to land successfully. Maybe I’m wrong, but this is what I think
    – Dzhisl
    Commented Apr 12 at 11:50

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.