Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Bibite on May 08, 2019, 12:09:43 PM



Title: Question about cancelling a transaction
Post by: Bibite on May 08, 2019, 12:09:43 PM
I have a question about how to cancel a transaction using the double spend with a higher fee (Yes I know about RBF too)

Quote
Most miners and wallets have safeguards against double spending, though, so there’s still a large chance that this method may not work.

I just want to know if it's still relevant or it works.

Thanks


Title: Re: Question about cancelling a transaction
Post by: mocacinno on May 08, 2019, 12:17:42 PM
Theoretically, it should still work... In reality, the odds have always been very small.


Title: Re: Question about cancelling a transaction
Post by: Bibite on May 08, 2019, 12:27:26 PM
Thanks
I'm going to make a transaction and wait until tomorrow or Friday to try this. What do you call minimal odds, less than 50% chance?


Title: Re: Question about cancelling a transaction
Post by: mocacinno on May 08, 2019, 12:55:44 PM
Thanks
I'm going to make a transaction and wait until tomorrow or Friday to try this. What do you call minimal odds, less than 50% chance?


More like a 1% chance... Just my gut feeling tough, it's not like i actually setup a trial to see how much of those double spends would actually end up in a block.
My gut feeling tells me most of those double spending transactions will be rejected right away, so they'll never end up in the mempool of a mining node.


Title: Re: Question about cancelling a transaction
Post by: posi on May 08, 2019, 04:52:27 PM
[snip]
It's different story if you broadcast 2 conflicting transaction at same time since the one who propagated to most nodes first would win.
But AFAIK even a second difference is enough to make 2nd/double-spend transaction rejected.
If get you right the fees paid to rebroadcast a transaction doesn't matter and what matter is the transaction that early generate into the most nodes first would win? Because I actually did one acouple of weeks back though it free and my transaction get confirm acouple of minute after.


Title: Re: Question about cancelling a transaction
Post by: HeRetiK on May 08, 2019, 08:16:54 PM
I'm not sure if that's still the case (and the posts above make me doubt it) but it used to work a couple of years back, provided the original transaction had too low a fee.

Keep us posted, I'm actually quite curious about the results.


Title: Re: Question about cancelling a transaction
Post by: pooya87 on May 09, 2019, 03:46:23 AM
[snip]
It's different story if you broadcast 2 conflicting transaction at same time since the one who propagated to most nodes first would win.
But AFAIK even a second difference is enough to make 2nd/double-spend transaction rejected.
If get you right the fees paid to rebroadcast a transaction doesn't matter and what matter is the transaction that early generate into the most nodes first would win? Because I actually did one acouple of weeks back though it free and my transaction get confirm acouple of minute after.

it works based on the assumption that majority of nodes have implemented a rule to reject any double spend transactions. and since majority of the network is running bitcoin-core that implements this by default you can say that it is impossible to do that as long as the nodes have the previous transaction. so in your case that might have been because they didn't have your previous tx with no fee (?).


Title: Re: Question about cancelling a transaction
Post by: nc50lc on May 09, 2019, 04:03:29 AM
Looks like posi's tx was lucky to get mined despite the fact that nodes will still prioritize the "first" tx and may drop the "second" without broadcasting it to other nodes :-\

Moving on... How about transactions marked with RBF?
I've been thinking that it may be a workaround for the default node behavior to accept the "second tx" because the first one was marked with replace-by-fee.
Will it work even if the outputs were changed?

Any thoughts or personal experience?


Title: Re: Question about cancelling a transaction
Post by: Bibite on May 09, 2019, 06:06:58 PM
mocacinno and ETFbitcoin, Thank you, I just wanted to test but look like I will waste my time. I have been confused because the quote in my first post is old from 2017. So I was puzzled, especially since it was about solutions to cancel a transaction and I read the same in another place.

Last questions

- HeRetiK says it worked before, I'm not old in BTC enough but when it stopped to work, approximatively of course.
- while reading the forum, I found this topic https://bitcointalk.org/index.php?topic=2269914.0


Title: Re: Question about cancelling a transaction
Post by: HCP on May 09, 2019, 09:11:18 PM
Last questions

- HeRetiK says it worked before, I'm not old in BTC enough but when it stopped to work, approximatively of course.
- while reading the forum, I found this topic https://bitcointalk.org/index.php?topic=2269914.0
It never "stopped working"... it is just incredibly difficult to do (and always was).

Most nodes are configured to reject double spend transactions with the "txn-mempool-conflict" error. Some nodes (like the ones that the service in your link have setup) will happily accept double spend transactions and attempt to relay them. This doesn't mean other nodes will accept those transactions, or that they will get confirmed.

The issue is whether or not your transaction will make it into the mempool of a miner... unless a miner is willing to accept your double spend transaction then the chances of it being included in a block a practically zero.


Title: Re: Question about cancelling a transaction
Post by: bob123 on May 10, 2019, 08:06:44 AM
Moving on... How about transactions marked with RBF?

Should work flawlessly.

The RBF tag basically says "this transaction is replacable".

If you create a new transaction using the same inputs to different outputs (sending to a different address) using a higher fee, it should get accepted by most nodes.
This is probably the easiest way to double spend an unconfirmed transaction.


Title: Re: Question about cancelling a transaction
Post by: nc50lc on May 10, 2019, 09:00:56 AM
mocacinno and ETFbitcoin, Thank you, I just wanted to test but look like I will waste my time.
-snip-
You might wanna try it.
If the reply above (by bob123) is true, it's possible using any wallet implemented with BIP125 (https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki). (Example: Electrum/BitcoinCore).
As long as you enabled "use replace-by-fee" or something similar to the setting, every transaction you will create will be marked as "RBF" and it should work.


Title: Re: Question about cancelling a transaction
Post by: Bibite on May 13, 2019, 11:37:58 AM
Hello nc50lc. I know RBF but I am not interested in, I thought OP was clear


Title: Re: Question about cancelling a transaction
Post by: bob123 on May 13, 2019, 11:43:39 AM
Hello nc50lc. I know RBF but I am not interested in, I thought OP was clear

Did you read my post ?

I clearly stated that you should be able to create a double-spending transaction (which won't be dropped by all nodes) if the RBF-tag is set.

nc50lc just mentioned that this should work if the RBF-tag is set in your original transaction and if you are using a compatible wallet to do so.
So, actually.. you should be indeed interested in RBF.


If you however want to double spend a transaction which does not have the RBF flag set, your OP wasn't clear at all..


Title: Re: Question about cancelling a transaction
Post by: Bibite on May 13, 2019, 11:49:15 AM
Sorry, I read too fast and missed