Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-32000, future transaction tries to replace pending #26890

Closed
xihucuyu888 opened this issue Mar 15, 2023 · 7 comments · Fixed by #26930
Closed

-32000, future transaction tries to replace pending #26890

xihucuyu888 opened this issue Mar 15, 2023 · 7 comments · Fixed by #26930
Labels

Comments

@xihucuyu888
Copy link

node error: {-32000, future transaction tries to replace pending}
I send 2 txs with nonce 0 and 1 to the geth simultaneously and the node return this error, why?

@starwill
Copy link

I have the same error,when send transaction with nonce- n success,send nonce- n+1 will return this error after geth client upgrade

@xihucuyu888
Copy link
Author

This issue is not always reproducible, it occurs intermittently.

@MariusVanDerWijden
Copy link
Member

This is the new rule added in 1.11.4, A future transaction can not be added to the tx pool if it would replace pending transactions. This is a safety mechanism. Is this happening with transactions that you send via eth_sendRawTransaction?

@MariusVanDerWijden
Copy link
Member

Okay I looked through the code, seems we check this for local transactions as well. I think we can skip this check for local transactions

@karalabe
Copy link
Member

There is a slight race if you submit multiple transactions currently. Transaction N enters the pool but will be marked as executable a bit later (hundreds of millisecs I think), in which time N+1 might be rejected. The quick and dirty solution currently it to wait a bit before subsequent nonce submissions. We'll make the above mentioned protection a bit smarter not to have this bug in the next release.

@swoonai
Copy link

swoonai commented Mar 24, 2023

This is happening widespread.

@MariusVanDerWijden
Copy link
Member

@swoonai Please update to the newest release v.1.11.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants