From time to time, I will be making some 5 ~ 10 tx/s on Ethereum via RPC interface.

I have to handle the nonce manually because it cannot update fast enough. But I am facing issue below:

  1. From time to time to RPC will fail, and I will have to reset the nonce.

  2. Some times the RPC will fail and timeout, but the tx was processed successfully eventually. I can't reset the nonce in this case. Because if I reset, it will not be accurate anymore

In short, I don't know what shall I do when there is an error with the RPC. I don't know what to do with the nonce and don't know how to send the next transaction.

  • Save last nonce somewhere? – Зелёный Dec 25 '18 at 5:08
  • Not possible, since I do not know if the previous transaction was failed / successful – s k Dec 25 '18 at 6:36
  • If transaction is confirmed, it is successful, nothing impossible here. – Зелёный Dec 25 '18 at 6:47
  • I do not know if it is committed or not, because the RPC was timeout, and I am not able to get back the Transaction receipt. I have no idea whether it is succeed or failed. – s k Dec 25 '18 at 8:08
  • RPC has a feature, every request goes with unique id, every response returns that id, save that id and check whenever response good or not, nothing hard, it is simple programming task. – Зелёный Dec 25 '18 at 9:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.