Author

Topic: Double Spend VS Transaction Accelerators. (Read 281 times)

legendary
Activity: 2268
Merit: 18711
March 07, 2021, 12:46:30 PM
#20
Sounds like you've got it now.

Ok, the transaction should have the replacement by fee activated to make it easy.
Or indeed, to make it possible at all. If you don't mark your first transaction as opted in to RBF at the time you make it, then there is no way to replace it using an RBF transaction at a later time.

And if the transaction isn't flagged it's more complex, but still possible.
Correct. It becomes easier in certain circumstances, for example if the transaction you are trying to replace has been unconfirmed for so long that most nodes have dropped it from their mempools.

Thanks a lot o_e_l_e_o for your words and your time.
No problem. Always happy to help!
legendary
Activity: 3346
Merit: 3125
It sounds like you are still a bit confused about what RBF and double spending are.

Double spending a transaction which is flagged as RBF is a perfectly good (and relatively common) method to bump the fee of your transaction and get a faster confirmation.
Ok, the transaction should have the replacement by fee activated to make it easy.
Double spending a transaction which is not flagged as RBF is much more difficult to do and is unlikely to be successful for the average user.
And if the transaction isn't flagged it's more complex, but still possible.
There is absolutely no reason to have a service which will perform an RBF transaction for you, since they are trivial to perform yourself and using such a service would involve handing over your private key(s) and risking all your coins.
I agree with this point, a service like this would be a totally risk because they need your private key and that isn't a smart move at all.

Thanks a lot o_e_l_e_o for your words and your time. We need more users like you in the community! Now the topic it's clear for me.
legendary
Activity: 2268
Merit: 18711
Now we know it's not a good option to make a doublespend to try to get a faster confirmation. But the idea was good.

Maybe we will have some RBF services in the future, but is a crazy concept to make it a business.
It sounds like you are still a bit confused about what RBF and double spending are.

Double spending a transaction which is flagged as RBF is a perfectly good (and relatively common) method to bump the fee of your transaction and get a faster confirmation.
Double spending a transaction which is not flagged as RBF is much more difficult to do and is unlikely to be successful for the average user.
There is absolutely no reason to have a service which will perform an RBF transaction for you, since they are trivial to perform yourself and using such a service would involve handing over your private key(s) and risking all your coins.
legendary
Activity: 3346
Merit: 3125
Thanks for the experimentation and for making the topic clear for all. Now we know it's not a good option to make a doublespend to try to get a faster confirmation. But the idea was good.

Maybe we will have some RBF services in the future, but is a crazy concept to make it a business.
legendary
Activity: 2268
Merit: 18711
In blockchair, the transaction reappeared. But blockchain is still showing the message saying it's invalid.

I checked the first transaction in some other explorers as well.
I am getting the same results for your first transaction. On Blockchair it looks fine, on Blockchain it finds it but says it is invalid, and I can't find it on any other explorers.

Combine that with ranochigo's tests, and it seems the default behavior is indeed to purge an unconfirmed RBF enabled transaction as soon as a replacement is received. Some nodes, however, seems to hold on to them, perhaps for the very reason that these nodes are being used to run block explorers and the the block explorer in question wants to keep a more complete record of transactions. It seems pretty unlikely, though, that your first transaction would be mined (even if the fee were high enough at the moment), without being rebroadcast.

Great work on the experimentation!
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
-snip-
I tried replicating the scenario that you described. This isn't anything scientific but should provide a clue into the behavior of reference client. Miners should have a different behavior given that they are probably not running the reference implementation.

Here's my first transaction:

Output A to Address B.

91ed8bad00c62dfdde7068da6c3216fa2af51e0d3c994ac683cf03069ceea1b6

Code:
{
  "fees": {
    "base": 0.00000550,
    "modified": 0.00000550,
    "ancestor": 0.00000550,
    "descendant": 0.00000550
  },
  "vsize": 110,
  "weight": 437,
  "fee": 0.00000550,
  "modifiedfee": 0.00000550,
  "time": 1615027325,
  "height": 673402,
  "descendantcount": 1,
  "descendantsize": 110,
  "descendantfees": 550,
  "ancestorcount": 1,
  "ancestorsize": 110,
  "ancestorfees": 550,
  "wtxid": "5ea4da4c370d67bfcaf0d7a3591b56cb7b4240a4cbfd72a404c5078d606d443e",
  "depends": [
  ],
  "spentby": [
  ],
  "bip125-replaceable": true,
  "unbroadcast": false
}

My node sees it in the mempool.

After which, I replaced it with another transaction.

Output A + Output C to Address B.

The first transaction is purged from my node's mempool. The second transaction is now available.
Code:
{ "fees": {
    "base": 0.00001246,
    "modified": 0.00001246,
    "ancestor": 0.00001246,
    "descendant": 0.00001246
  },
  "vsize": 177,
  "weight": 708,
  "fee": 0.00001246,
  "modifiedfee": 0.00001246,
  "time": 1615028442,
  "height": 673405,
  "descendantcount": 1,
  "descendantsize": 177,
  "descendantfees": 1246,
  "ancestorcount": 1,
  "ancestorsize": 177,
  "ancestorfees": 1246,
  "wtxid": "cd4f4135cd73e4ac9a8059feef951dd8948544c826f933ee5423b1453c5559c4",
  "depends": [
  ],
  "spentby": [
  ],
  "bip125-replaceable": true,
  "unbroadcast": false
}

Afterwhich, I broadcasted the third transaction. With output C only to Address B.

8724f830d928064a095107c99dc84f57ec5df22477d075d4d1539f7e028212ad
Code:

{
  "fees": {
    "base": 0.00001430,
    "modified": 0.00001430,
    "ancestor": 0.00001430,
    "descendant": 0.00001430
  },
  "vsize": 110,
  "weight": 437,
  "fee": 0.00001430,
  "modifiedfee": 0.00001430,
  "time": 1615028761,
  "height": 673405,
  "descendantcount": 1,
  "descendantsize": 110,
  "descendantfees": 1430,
  "ancestorcount": 1,
  "ancestorsize": 110,
  "ancestorfees": 1430,
  "wtxid": "22ba16de06447cc25b8211a99c39c1b247cb17410378c3814578f300beada316",
  "depends": [
  ],
  "spentby": [
  ],
  "bip125-replaceable": true,
  "unbroadcast": false
}

The previous two transactions were both evicted from the mempool. Results appears to be consistent across both of my nodes.


Transactions that are evicted from the mempool but are still otherwise valid appears to be excluded from a reference node's mempool after it gets replaced.
legendary
Activity: 2380
Merit: 5213
---------
Your post made me think more about this. I wasn't sure how it works. So, I tested it.

First, I made the transaction below. ( I had made this transaction before. The last time I rebroadcast it was 2 days ago)




Below is the second transaction I made.




After that, I searched the first transaction in blockchair and blockchain explorers.
Blockchair said that the transaction doesn't exist and blockchain displayed the following message.




In the next step, I made the following transaction. I spent the UTXO that had been spent in the second transaction.



This transaction is now confirmed.

I checked the first transaction in both blockchair and blockchain explorers again.

In blockchair, the transaction reappeared. But blockchain is still showing the message saying it's invalid.

I checked the first transaction in some other explorers as well.

blockstream says "no result found".
btc.com says "Your search did not match any records"
blockcypher says "No transaction found"

Blockchair is the only explorer showing my first transaction.



PS.
Due to privacy reasons, I didn't share transaction IDs here. I just sent them to o_e_l_e_o.
If anyone is interested to investigate more on this, I can send the transaction IDs via PM.
legendary
Activity: 2268
Merit: 18711
If a transaction has been flagged as RBF, nodes will remove it from their mempool if they see another transaction with at least one same input and higher fee.
Do they remove the original transaction completely when the replacement transaction is received? Or do they only remove the original transaction when the replacement transaction confirms?

Let's say, for example, I make the following transaction:

Output A  ->  Address B (low fee, RBF enabled)

I later decide to bump the fee by making the following transaction:

Output A  ->  Address B (average fee, RBF enabled)
Output C

I then make yet another transaction as follows:

Output C  ->  Address D (high fee)

My third transaction confirms first. By spending output C, I have invalidated my second transaction, but I have not invalidated my first transaction. Is my first transaction still in the mempool at this point, or do I need to rebroadcast it?
legendary
Activity: 1512
Merit: 4795
Leading Crypto Sports Betting & Casino Platform
What do you mean about RBF? as we can see in the transaction is says 'No' RBF enabled as we can see in the image:
From the thread, you are commenting about full RBF which some users can make use of, but according to hosseinimr93 which I believe have more experience about full RBF, not that it might not work, but the chances it will work is slim. Even if that aside, two known wallets are best for this, I do not know if other wallet support full RBF, but the wallets that support it are full clients that require user to have the full blockchain downloaded, Bitcoin core and Armony. In this case, making use of full RBF is not viable as it is not supported by SPV wallets like electrum which can be easily downloaded by bitcoin users and available to many.

In this case, it will be better for people to make use of wallets that support opt-In RBF, I think the latest version of Bitcoin core supports it, Armony supports it, electrum which can be easily downloaded for use also supports it. If a transaction in this case support RBF, that means the transaction can be pumped with higher fee in which the miners will be able to confirm the high fee ones as the former low fee transaction leaves the mempool for the high fee one.

With what I have checked about the transaction above, it will be good for the user to just make sure his wallet is not online but fully offline and be tracking the transaction on blockchain explorer, with this, the transaction will not be able to be rebrocasted automatically from the wallet, in this process, most mempool will drop the transaction, and the bitcoin will appear back in his wallet which he will be able to spend again, but high fee will be needed for fast confirmation. In the process, very possible the transaction can be confirmed during weekend, especially Sunday. He will only just be using blockchain explorer to track it, if not confirmed, the transaction will be dropped from most mempool as I commented earlier by leaving his wallet totally offline.
legendary
Activity: 2380
Merit: 5213
If it isn't enabled, the user should be able to make a double-spend to give high priority to the transaction.
If you double-spend input(s) of a non-RBF transaction with a higher fee, it's possible that a miner includes the second transaction into a block. But that's very very unlikely.

Nodes usually reject transactions spending an input of a non-RBF transaction they have in their mempool even if it pays a higher fee. In the case RBF is disabled, the valid transaction is the one seen first not the one paying higher fee.

If a transaction has been flagged as RBF, nodes will remove it from their mempool if they see another transaction with at least one same input and higher fee.

legendary
Activity: 3346
Merit: 3125
7943344c764ee175f290274761e52954614287ea17284bce0c1601a1923fa874
NO RBF
------
If you create the transaction with the same inputs from the old one and this time you add more fees then it should confirm in the next blocks.
It won't work.
The transaction in question hasn't been flagged as RBF.
As mentioned in my first reply, if you make a new transaction even with a much higher fee, nodes will likely reject it.

What do you mean about RBF? as we can see in the transaction is says 'No' RBF enabled as we can see in the image:


If it isn't enabled, the user should be able to make a double-spend to give high priority to the transaction.

I still think a double-spend could be a viable solution, please prove I'm wrong
legendary
Activity: 2380
Merit: 5213
7943344c764ee175f290274761e52954614287ea17284bce0c1601a1923fa874
NO RBF
------
If you create the transaction with the same inputs from the old one and this time you add more fees then it should confirm in the next blocks.
It won't work.
The transaction in question hasn't been flagged as RBF.
As mentioned in my first reply, if you make a new transaction even with a much higher fee, nodes will likely reject it.
newbie
Activity: 10
Merit: 0
There may be some YouTube guide you can give me a link to that I do not understand like that
legendary
Activity: 3346
Merit: 3125
7943344c764ee175f290274761e52954614287ea17284bce0c1601a1923fa874
NO RBF

That transaction was sent on 2021-02-11 02:48... that's some days ago, if you want to double spend it with higher fees you need to:

1.- Get the bitcoin core (If you download the bootstrap with torrent would be faster.)
2.-Import the privatekey from 15BqWP4j6UQcWiLaqmpP51myhZusmKMv8L to the wallet.
3.- Use the commands:

createrawtransaction
signrawtransactionwithwallet
sendrawtransaction


If you create the transaction with the same inputs from the old one and this time you add more fees then it should confirm in the next blocks.
legendary
Activity: 2380
Merit: 5213
I didn't know the RBF exists... Replace by fee is an elegant way to talk about the double-spend, now the question is, is there some service that you can give your private keys and they make the replace by fees for you? This practice is totally out of recommendation, is like giving your bank card and nip to a 'Professional'. But it would be interesting to know if someone already offers this service.
There is no need to give your private key to third parties.
Some wallets like electrum support RBF. You can make a RBF-enabled transaction and increase the fee whenever you want.
When you increase the fee, you actually replace the first transaction with a new one spending same inputs and paying a higher fee.
newbie
Activity: 10
Merit: 0
7943344c764ee175f290274761e52954614287ea17284bce0c1601a1923fa874
NO RBF
legendary
Activity: 3346
Merit: 3125
...
It's true only if the first transaction has been flagged as RBF.
In the case RBF hasn't been enabled, nodes usually reject the second transaction even if it pays a much higher fee.

I didn't know the RBF exists... Replace by fee is an elegant way to talk about the double-spend, now the question is, is there some service that you can give your private keys and they make the replace by fees for you? This practice is totally out of recommendation, is like giving your bank card and nip to a 'Professional'. But it would be interesting to know if someone already offers this service.
newbie
Activity: 10
Merit: 0
Can anyone give me an accurate explanation or guide on how I do double spending?
legendary
Activity: 2380
Merit: 5213
If you made a transaction with low fees and it gets stuck, a double-spend could be the solution, but for this, you need to build a transaction with the unconfirmed inputs from your last transaction. The transaction with bigger fees will get a higher priority and a faster confirmation.
It's true only if the first transaction has been flagged as RBF.
In the case RBF hasn't been enabled, nodes usually reject the second transaction even if it pays a much higher fee.
legendary
Activity: 3346
Merit: 3125
Think about all the people who use Bitcoin, less than 0.001% know how to do a double spend and less than 0.00001% has done one. It doesn't require only skills, we need the knowledge to build a transaction with the right inputs, outputs, and fees, a bitcoin node, and the privilege to sign the transaction.

If you made a transaction with low fees and it gets stuck, a double-spend could be the solution, but for this, you need to build a transaction with the unconfirmed inputs from your last transaction. The transaction with bigger fees will get a higher priority and a faster confirmation.

I will not enter into the technical discussion about how the double-spend works, I would like to read some points of view about the topic, do you think double-spending is a viable solution to give a higher priority for a transaction?
Jump to: