-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Some proposers create blocks with duplicated transactions #2846
Comments
Does your app include some kind of replay protection (eg. an increment sequence number per account, like in Ethereum)? Technically this is supposed to be the app's responsibility, but the mempool includes an additional heuristic (ie. the cache) to prevent it. Might be helpful if you have some mempool logs around this time ? |
Yes. Just like Ethereum we are using nonce in transactions, so only one of these 3 transactions was applied to state. Other 2 marked as non-valid by our app.
Indeed, and there is 2 strange things in this situation:
Sure, I'll collect them. |
Are these failing CheckTx, or just deliver Tx. If it only fails deliver and not check, the following may be happening: Machine 1 hasn't seen tx What we can do to fix this is update the mempool cache for txs received in a block, which makes sense to me. I'll open a new issue to discuss that in particular. (No guarantees that is what the problem your facing is though) |
We should add txs that come in from mempool.Update to the mempool's cache, so that they never hit a potentially expensive check tx. Originally posted by @ValarDragon in #2846 #2846 (comment) Refs #2855
We should add txs that come in from mempool.Update to the mempool's cache, so that they never hit a potentially expensive check tx. Originally posted by @ValarDragon in #2846 #2846 (comment) Refs #2855
We should add txs that come in from mempool.Update to the mempool's cache, so that they never hit a potentially expensive check tx. Originally posted by @ValarDragon in #2846 #2846 (comment) Refs #2855
@danil-lashin did the issue go away after #2882? |
I have not tried it yet. AFAIU, this fix is not released? If not I will try to use develop branch if there were no breaking changes. |
There will be a non-breaking release later today. |
@melekes, seems like the latest version solved the issue, thanks! I also have another related problem. Just like Ethereum, we are using nonce in transactions. When a user tries to send more than one transaction in the block this situation appears: Consider 2 transactions with nonces And here is the worst scenario: Do you have an issue for that? Or I can open one? |
The application needs to maintain some CheckTx state for the mempool connection to be able to handle this. This is what we do in the SDK for instance, and just reset it with every Commit. Unless I'm missing something, my understanding of what you've described is an application-level concern. See eg. https://tendermint.com/docs/spec/abci/apps.html#mempool-connection
Great, thanks. I'll close this issue for now. If you still think there's another problem, please open a new issue :) |
Tendermint version (use
tendermint version
orgit rev-parse --verify HEAD
if installed from source): v0.26.0ABCI app (name for built-in, URL for self-written if it's publicly available): https://github.com/MinterTeam/minter-go-node
Environment:
What happened:
Some proposers create blocks with duplicated transactions. Here is example of a block with 3 exact same transactions: https://pastebin.com/HzzK6myi
What you expected to happen:
Proposers should not duplicate transactions in blocks.
Have you tried the latest version: yes
How to reproduce it (as minimally and precisely as possible): idk :)
Logs (paste a small part showing an error (< 10 lines) or link a pastebin, gist, etc. containing more of the log file): no related logs
Config (you can paste only the changes you've made):
Mempool.CacheSize = 100000
Mempool.Recheck = true
Mempool.Size = 10000
Anything else we need to know:
This issue often appears on slow machines.
The text was updated successfully, but these errors were encountered: