Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: theartlav on May 12, 2017, 08:01:51 PM



Title: Rebroadcast with higher fee? Nope, 258: txn-mempool-conflict.
Post by: theartlav on May 12, 2017, 08:01:51 PM
Greetings.

Lately i've been playing with Bitcoin at protocol level, trying to implement all the basics from scratch as a learning exercise.

Yesterday i made and signed a transaction to move some satoshis from one address completely to another, on mainnet.
At 44.643 sat/B fee it predictably didn't go anywhere, and after a day of poking ViaBTC's "accelerator" and getting "Submissions are beyond limit" i decided to try to send it again with a proper fee.
I read many times that an identical transaction with higher fee should supersede an existing one with a lower fee.

However, when i send it to the network it won't propagate.
After exhausting all possible bugs on my end i tried submitting it via https://coinb.in/#broadcast, and got a "258: txn-mempool-conflict" error.
Apparently it is being considered a double spend or some other sort of a collision.

So, the question is - is it possible to re-send a transaction with a higher fee, and if yes how to do it?

Here is the old transaction:
Code:
txid: 10c4272ff25ccbc4e98fe6576ce8c13bfda5d99857407c5d596eb3e21bc07f8b
raw: 01000000019dcb891734e73cf8ffa054a0dd0f01807444c1b142ef8c938fc346bb09e29bdb000000008b483045022100dfd8837b299eb521d1669fc33876bb0f984b94cd20905bc1683cd055f7fc9cd702202110c54022b9eb7c7441841b8bac51c0bb971f929bc56ac98f4b2599f0cedd8a014104d1c6161c384ebbf6267a1597b5a19ef7e401f6e795de70a6db5f4c9ab5c0d5d9c4dba46c4a1a962d3ea53509700a6ed02f6b21a83b0f937cd3f593663a2d2617ffffffff0119dd0000000000001976a91450594e8b1197f00aa58ce3efa57ed756647959f588ac00000000

And the new one:
Code:
txid: da8e467ed90efb2168c6cf6ec3e436465eff3faf25a2162ce34e279adee20d89
raw: 01000000019dcb891734e73cf8ffa054a0dd0f01807444c1b142ef8c938fc346bb09e29bdb000000008b483045022100c0744cd8c917c1c8fd283f28ae2b6b45f544ea02c45a375f750c5db4ba8f676a0220d4ce2924b48ccb11632481abbb10bef2a30355d07cfadd68cc8c2380cb8737d6014104d1c6161c384ebbf6267a1597b5a19ef7e401f6e795de70a6db5f4c9ab5c0d5d9c4dba46c4a1a962d3ea53509700a6ed02f6b21a83b0f937cd3f593663a2d2617ffffffff01597f0000000000001976a91450594e8b1197f00aa58ce3efa57ed756647959f588ac00000000


Title: Re: Rebroadcast with higher fee? Nope, 258: txn-mempool-conflict.
Post by: DannyHamilton on May 12, 2017, 09:28:42 PM
- snip -
I read many times that an identical transaction with higher fee should supersede an existing one with a lower fee.
- snip -

Then you've been reading some misleading sources.

- snip -
However, when i send it to the network it won't propagate.
- snip -

Correct.  Most nodes that have heard about your first transaction will refuse to accept or relay the new one so long as the original transaction is still in their mempool.  You have no control over when other nodes choose to remove a transaction from their mempool.

- snip -
So, the question is - is it possible to re-send a transaction with a higher fee, and if yes how to do it?
- snip -

If the first transaction was sent with RBF enabled, then you can replace it with a higher fee transaction.  If it was not, then you'll need to wait for a few days for most nodes to forget your original transaction, then (as long as neither you nor anyone else has re-broadcast your original transaction) you'll be able to broadcast the new transaction.


Title: Re: Rebroadcast with higher fee? Nope, 258: txn-mempool-conflict.
Post by: theartlav on May 12, 2017, 09:49:39 PM
If the first transaction was sent with RBF enabled, then you can replace it with a higher fee transaction.
So, what should i change/set in a tx for it to be marked as RBF enabled?
There is surprisingly little i can google about this.


Title: Re: Rebroadcast with higher fee? Nope, 258: txn-mempool-conflict.
Post by: achow101 on May 12, 2017, 09:51:57 PM
If the first transaction was sent with RBF enabled, then you can replace it with a higher fee transaction.
So, what should i change/set in a tx for it to be marked as RBF enabled?
There is surprisingly little i can google about this.
You cannot change it after the fact. Since the transaction has already been broadcast, you cannot change it to be RBF enabled. That can only be done when creating the transaction, before it is signed and broadcast. Your transaction is not RBF enabled.


Title: Re: Rebroadcast with higher fee? Nope, 258: txn-mempool-conflict.
Post by: DannyHamilton on May 12, 2017, 09:52:26 PM
- snip -
So, what should i change/set in a tx for it to be marked as RBF enabled?
- snip -

https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki


Title: Re: Rebroadcast with higher fee? Nope, 258: txn-mempool-conflict.
Post by: theartlav on May 12, 2017, 09:55:41 PM
You cannot change it after the fact.
I understood that. The question is what should i have set differently in a transaction for it to have been marked as RBF?


Title: Re: Rebroadcast with higher fee? Nope, 258: txn-mempool-conflict.
Post by: DannyHamilton on May 12, 2017, 10:07:14 PM
- snip -
The question is what should i have set differently in a transaction for it to have been marked as RBF?

https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki