Bitcoin Forum

Bitcoin => Armory => Topic started by: hashtag on October 07, 2020, 08:15:10 PM



Title: Can't send because of "txn-mempool-conflict"
Post by: hashtag on October 07, 2020, 08:15:10 PM
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.


Title: Re: Can't send because of "txn-mempool-conflict"
Post by: HCP on October 07, 2020, 10:45:39 PM
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/


Title: Re: Can't send because of "txn-mempool-conflict"
Post by: hashtag on October 08, 2020, 04:31:38 AM
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?


Title: Re: Can't send because of "txn-mempool-conflict"
Post by: BitMaxz on October 08, 2020, 02:05:27 PM
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


Title: Re: Can't send because of "txn-mempool-conflict"
Post by: bob123 on October 08, 2020, 02:56:59 PM
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.


Title: Re: Can't send because of "txn-mempool-conflict"
Post by: hashtag on October 08, 2020, 04:02:31 PM
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?


Title: Re: Can't send because of "txn-mempool-conflict"
Post by: hosseinimr93 on October 08, 2020, 07:33:13 PM
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.


Title: Re: Can't send because of "txn-mempool-conflict"
Post by: BitMaxz on October 08, 2020, 07:44:42 PM

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


Title: Re: Can't send because of "txn-mempool-conflict"
Post by: goatpig on October 08, 2020, 09:46:17 PM
You can simply delete mempool.dat in the bitcoin datadir.


Title: Re: Can't send because of "txn-mempool-conflict"
Post by: HCP on October 08, 2020, 09:50:49 PM
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:
https://talkimg.com/images/2023/11/15/zYvJC.png

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!


Title: Re: Can't send because of "txn-mempool-conflict"
Post by: hashtag on October 09, 2020, 03:54:05 AM
-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


Title: Re: Can't send because of "txn-mempool-conflict"
Post by: nc50lc on October 09, 2020, 11:37:47 AM
-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/ (https://live.blockcypher.com/btc/pushtx/) or https://blockstream.info/tx/push (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.


Title: Re: Can't send because of "txn-mempool-conflict"
Post by: HCP on October 09, 2020, 10:19:34 PM
-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. ???

In any case, glad that you managed to get it resolved.


Title: Re: Can't send because of "txn-mempool-conflict"
Post by: bob123 on October 11, 2020, 11:55:01 AM
Interesting that -zapwallettxes was required... I would not have thought that the transaction from Armory would be "stored" by Bitcoin Core like that. ???

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.


Title: Re: Can't send because of "txn-mempool-conflict"
Post by: HCP on October 12, 2020, 01:23:39 AM
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? ???



Title: Re: Can't send because of "txn-mempool-conflict"
Post by: goatpig on October 12, 2020, 05:06:44 PM
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? ???

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.


Title: Re: Can't send because of "txn-mempool-conflict"
Post by: nc50lc on October 13, 2020, 02:54:46 AM
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 (https://github.com/bitcoin/bitcoin/pull/10330)
That'll start core with a clear mempool. Then he started Armory.

CMIIW