-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Tendermint version (use tendermint version or git rev-parse --verify HEAD if installed from source):
latest(2975732)
ABCI app (name for built-in, URL for self-written if it's publicly available):
persistent_kvstore
Environment:
MacOS
What happened:
Duplicate transactions can be stacked in mempool when more transactions than mempool cache size are crowded at once or when mempool cache size is zero.
There is a problem that this can lead to duplicate execution of transactions.
There's another bug, and there's a bigger problem that such duplicate transaction won't be remove and remain in the mempool by following code after being executed:
tendermint/mempool/clist_mempool.go
Line 610 in 2975732
| if e, ok := mem.txsMap.Load(TxKey(tx)); ok { |
What you expected to happen:
duplicate tx should be on error
Have you tried the latest version: yes/no
yes
How to reproduce it (as minimally and precisely as possible):
- set cache_size to 0
- execute tendermint with persistent_kvstore
- execute following command twice quickly: curl http://localhost:26657/broadcast_tx_sync?tx=\"apple=100\"
Logs (paste a small part showing an error (< 10 lines) or link a pastebin, gist, etc. containing more of the log file):
Config (you can paste only the changes you've made):
node command runtime flags:
Please provide the output from the http://<ip>:<port>/dump_consensus_state RPC endpoint for consensus bugs
Anything else we need to know: