Author

Topic: Can't send because of "txn-mempool-conflict" (Read 328 times)

legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
October 12, 2020, 10:54:46 PM
#17
He must have deleted the "mempool.dat" while bitcoin core is running in the background.
Problem is, core will dump its mempool to a new mempool.dat after it's shutdown, so it didn't worked when he first tried.

The latter worked probably because -zapwallettxes when used will temporarily set -persistmempool to false.
Ref: https://github.com/bitcoin/bitcoin/pull/10330
That'll start core with a clear mempool. Then he started Armory.

CMIIW
legendary
Activity: 3640
Merit: 1345
Armory Developer
Why would a transaction from Armory, sent to the node through RPC for relay to the network and of no relationship to the node's wallet, be stored in the node's wallet.dat and require zapwallettxes to remove it? Huh

Since the tx went through the RPC, Core can correctly assume this tx is yours. I don't know why it would keep track of it, and somehow I doubt zapwallettxes has an actual effect in this case. I'm going to guess Achow only suggested to use this CLI arg as part of a the standard procedure to clean up stuck transactions in Core's Wallet. Armory isn't related to Core's wallet, it only makes use of the networking and consensus parts.
HCP
legendary
Activity: 2086
Merit: 4314
Armory uses core to broadcast transactions.
When there is no internet connection, armory still tries to broadcast it using core. Core just isn't able to forward it into the network.

So it kinda has to be somewhere "stored" by core, i'd say.
Yes, and that place would be in "mempool.dat" along with all the other unconfirmed transactions received from other nodes etc... what I'm saying is that zapwallettxes is meant for clearing unconfirmed transactions from your wallet.dat file...

Why would a transaction from Armory, sent to the node through RPC for relay to the network and of no relationship to the node's wallet, be stored in the node's wallet.dat and require zapwallettxes to remove it? Huh

legendary
Activity: 1624
Merit: 2481
Interesting that -zapwallettxes was required... I would not have thought that the transaction from Armory would be "stored" by Bitcoin Core like that. Huh

Armory uses core to broadcast transactions.
When there is no internet connection, armory still tries to broadcast it using core. Core just isn't able to forward it into the network.

So it kinda has to be somewhere "stored" by core, i'd say.
HCP
legendary
Activity: 2086
Merit: 4314
-zapwallettxes fixed it

p.s. just to clarify that deleting mempool.dat was the first thing I tried but it didn't help
Interesting that -zapwallettxes was required... I would not have thought that the transaction from Armory would be "stored" by Bitcoin Core like that. Huh

In any case, glad that you managed to get it resolved.
legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
-zapwallettxes fixed it

just to clarify that deleting mempool.dat was the first thing I tried but it didn't help
Probably worked together with 'deleting the mempool.dat file' since it also contains that transaction.


I know this is late but if it's just an issue with a single unconfirmed transaction,
a simpler solution is to create a signed transaction that can be broadcast outside of Armory.

After using "Clear Unconfirmed", create the same txn using the cold-storage method but instead of using Armory to broadcast, just copy the the "RAW TX (HEX)"
and broadcast it using an online service like: https://live.blockcypher.com/btc/pushtx/ or https://blockstream.info/tx/push

If you don't know how to get the Signed Raw Tx, follow this:
  • Click "Send", fill up the transaction info: fee, recipient, amount, etc.
  • On the same window, check "Create Unsigned", then click "Continue"
  • On the next window, click "Copy to Clipboard", then "Continue"
  • Next, paste the copied text, click "Sign", "Continue" then type your password
  • Click "Copy Raw Tx (Hex)".
  • Lastly, go to an online push service, paste and send that signed RAW tx.

After getting one confirmation, the conflicting transaction in your Bitcoin core's mempool or wallet.dat will be dropped.
jr. member
Activity: 73
Merit: 1
-zapwallettxes fixed it

thank you all!


p.s.
just to clarify that deleting mempool.dat was the first thing I tried but it didn't help
HCP
legendary
Activity: 2086
Merit: 4314
Deleted mempool.dat
zapwallettxes should only remove transactions in the Bitcoin Core "wallet.dat" itself... this "offline" transaction was sent from Armory via RPC. So it wouldn't be recorded in the Bitcoin Core wallet.dat, so there would be nothing to "zap". Theoretically, deleting mempool.dat should have removed this transaction from Bitcoin Core.

It's possible there is something screwy with the Armory databases that the "rebuild and rescan" did not fix. While drastic, and requiring a bit of time to rebuild, you might want to try the "Factory Reset" option in Armory and select the "also delete the databases and rebuild" option:


Then shut down Armory and restart it. That should hopefully purge everything and let you broadcast your transaction.

NOTE: Make sure you have a wallet backup before you start!
legendary
Activity: 3640
Merit: 1345
Armory Developer
You can simply delete mempool.dat in the bitcoin datadir.
legendary
Activity: 3206
Merit: 2904
Block halving is coming.

but i deleted bitcoin core mempool.dat?

what does zapwallettxes do?

It seems that it needs to put -zapwallettxes under the bitcoin-qt shortcut to make it work and it's a solution for stuck transaction.
I don't know if it will work but worth trying.

I found something on google there are two options on achow's blog that you can follow including this -zapwallettxes and abandontransaction
You can read it from here https://achow101.com/2016/07/Bitcoin-Core-Troubleshooting
legendary
Activity: 2380
Merit: 5213
what does zapwallettxes do?
It asks your wallet (your local node) to forget your unconfirmed transactions.
If your local node forgets the unconfirmed transaction, your wallet will likely allow you to spend the fund.
jr. member
Activity: 73
Merit: 1
The problem seems to be that the UTXO simply isn't available anymore in core, because the transaction is already sitting in your own mempool.
Due to the missing internet connection, however, it didn't get broadcasted and therefore no other node is aware of this transaction.

You can either publish the raw transaction by yourself, as mentioned by BitMaxz or you can start core with the argument -zapwallettxes.

but i deleted bitcoin core mempool.dat?

what does zapwallettxes do?
legendary
Activity: 1624
Merit: 2481
The problem seems to be that the UTXO simply isn't available anymore in core, because the transaction is already sitting in your own mempool.
Due to the missing internet connection, however, it didn't get broadcasted and therefore no other node is aware of this transaction.

You can either publish the raw transaction by yourself, as mentioned by BitMaxz or you can start core with the argument -zapwallettxes.
legendary
Activity: 3206
Merit: 2904
Block halving is coming.
The transaction doesn't exist on any of those blockexplorers.
During broadcasting it I didn't have internet access, so I doubt it's on any other node.

In that situation what else I can do to fix that?

The bolded part might your issue as I think that the armory doesn't work without the internet it needs to be sync and bitcoin core must be fully synced to make the armory work.

But you can still get the raw transaction and broadcast/push them manually to any of these below.

- https://coinb.in/#broadcast
- https://blockchain.com/btc/pushtx
- https://blockchair.com/broadcast
jr. member
Activity: 73
Merit: 1
The transaction doesn't exist on any of those blockexplorers.
During broadcasting it I didn't have internet access, so I doubt it's on any other node.

In that situation what else I can do to fix that?
HCP
legendary
Activity: 2086
Merit: 4314
The error would indicate that the node you're attempting to broadcast your transaction through, still thinks that the UTXO is already being spent in an unconfirmed transaction.

It's possible that it's either on your local node, or a node that your Bitcoin Core is attached to... Note that it may not necessarily show up on any given block explorer, so I'd recommend checking a number of different block explorers to see if that original transaction is still floating around:

https://www.blockchain.com/explorer
https://btc.com/
https://blockchair.com/bitcoin/
https://live.blockcypher.com/btc/
https://blockstream.info/
jr. member
Activity: 73
Merit: 1
That's the error I get when I try to send.
Deleted mempool.dat
restarted everything (armory, bitcoind, OS ubuntu 18.10)
rebuild and rescan db

and still get that error


it appeared after I sent transaction while having network problems, it stayed at 0 confirmations in armory for a while, when checked block explorer, it didn't exist, so I did "clear unconfirmed" that worked and cleared it but since then when i try to send that particular UTXO I get the error above.
Jump to: