#6722 introduces the possibility of removing transactions generated by the local wallet from its mempool, but fails to update CMerkleTx::GetDepthInMainChain which assumes a transaction neither in the blockchain nor the mempool must be conflicted. Since the wallet transaction is now assumed to be conflicted, the wallet will happily produce a double-spend using the same inputs again.
Mempool trimming regression: removes local wallet transactions #6959
issue luke-jr opened this issue on November 6, 2015-
luke-jr commented at 9:37 AM on November 6, 2015: member
-
jonasschnelli commented at 9:45 AM on November 6, 2015: contributor
During another case i was also stumbling over a
GetDepthInMainChain()inconsistency. IMO the wallet should keep it's own height cache or even it's own headers-only-chain (anyways required in case of process separation).But anyways; the bitcoin-core local wallet (and other wallets) need to find a way to handle removed transactions from the mempool without marking them as conflicted.
But you are saying using inputs from a conflicted transaction results in a double-spend? The transaction was removed from the mempool and is not in the chain,... that means it's available again for coin selection, isn't it?
-
luke-jr commented at 9:50 AM on November 6, 2015: member
In most cases, it means the wallet wishes to keep it in the mempool and rebroadcast until it is mined.
-
jonasschnelli commented at 10:09 AM on November 6, 2015: contributor
Yes. Such use cases, together with the FSS-RBF (or CPFP) need to be handled by the wallet.
- laanwj added the label Wallet on Nov 6, 2015
-
jgarzik commented at 12:43 PM on November 6, 2015: contributor
Yes - this problem was the same one that merge-blocked mempool janitor... Need to solve for local wallet
- laanwj added the label Mempool on Nov 6, 2015
- sturles referenced this in commit b79c9f2be6 on Nov 12, 2015
-
MarcoFalke commented at 12:04 AM on April 27, 2020: member
Is this still an issue with a recent version of Bitcoin Core? If yes, what are the steps to reproduce?
- MarcoFalke closed this on Apr 27, 2020
- DrahtBot locked this on Feb 15, 2022