Difference between revisions of "User:5tu"

From Bitcoin Wiki
Jump to: navigation, search
(How to unblock published transactions)
 
Line 33: Line 33:
 
| [http://https://breadwallet.com/ BreadWallet (iOS)] || <span style="color:red">No</span> || <span style="color:red">No</span>  || <span style="color:orange">Unknown</span> || ?
 
| [http://https://breadwallet.com/ BreadWallet (iOS)] || <span style="color:red">No</span> || <span style="color:red">No</span>  || <span style="color:orange">Unknown</span> || ?
 
|-
 
|-
| Electrum || <span style="color:red">No</span> || <span style="color:red">No</span>  || <span style="color:orange">Unknown</span> || ?
+
| Electrum || <span style="color:red">No</span> || <span style="color:green">Yes</span>  || <span style="color:orange">Unknown</span> || ?
 
|-
 
|-
| Bitcoind || <span style="color:red">No</span> || <span style="color:red">No</span>  || <span style="color:orange">Unknown</span> || ?
+
| Bitcoind GUI || <span style="color:red">No</span> || <span style="color:yellow">Coming Soon</span>  || <span style="color:orange">Unknown</span> || ?
 
|-
 
|-
 
| Jaxx (iOS) || <span style="color:red">No</span> || <span style="color:red">No</span>  || <span style="color:orange">Unknown</span> || ?
 
| Jaxx (iOS) || <span style="color:red">No</span> || <span style="color:red">No</span>  || <span style="color:orange">Unknown</span> || ?
Line 42: Line 42:
 
|-
 
|-
 
| MyCelium || <span style="color:red">No</span> || <span style="color:red">No</span>  || <span style="color:orange">Unknown</span> || ?
 
| MyCelium || <span style="color:red">No</span> || <span style="color:red">No</span>  || <span style="color:orange">Unknown</span> || ?
 +
|-
 +
| GreenAddress || <span style="color:red">No</span> || <span style="color:red">No</span>  || <span style="color:orange">Unknown</span> || ?
 +
|-
 +
| Armoury || <span style="color:red">No</span> || <span style="color:green">Yes</span>  || <span style="color:orange">Unknown</span> || ?
 
|}
 
|}
  
  
 
=== Walkthrough manually unsticking a transaction ===
 
=== Walkthrough manually unsticking a transaction ===
Using coinb.in we can manually construct and publish a CPFP transaction
+
(TODO)
 +
If you know the private keys of the original transaction you can manually construct a transaction using coinb.in or on the bitcoin-cli commandline.
 +
 
 
[https://coinb.in/#newTransaction Publish New Transaction Manually]
 
[https://coinb.in/#newTransaction Publish New Transaction Manually]
(TODO)
+
 
 +
==== Bitcoin-cli ====
 +
You can use "createrawtransaction" to manually add inputs and mark the "nsequence" field to a value less than 0xffffffff. If you would like to replace the first transaction created this way. You will have to dump the transaction to free the UTXOs for use again using the "abandontransaction" command.
 +
 
 +
Once you've dumped the first transaction. You should be able to repeat the process above then increment the "nsequence" field. This new transaction when broadcasted should then be accepted by any node that supports full RBF.

Revision as of 17:51, 31 October 2016

Purpose

When submitting a transaction from your wallet to the bitcoin network you broadcast a transaction to one of the thousands of bitcoin nodes making up the network.

If the transaction is considered valid by this node, the transaction is next put in the nodes waiting area (mempool) and is shared to this node's neighbours where they now check if they believe it is valid and forward it on to their neighbours and so on to propagating your transaction around the bitcoin network until everyone has seen it.

Eventually when a miner finds a solution to the next block they would have included your transaction in that block so becomes part of the blockchain. Once this happens the transaction is eventually removed from the mempool waiting area. The other nodes will now see this new valid block and remove the transaction from their mempool.

A common problem that happens in a transaction is the fee paid is too low based on the network demand. This can lead to transactions being stuck for hours or even days. Keep in mind that if you have a source transaction of say 0.5btc and sent only 0.1btc somewhere, the 0.4btc change (less fee) is also being sent in the transaction so your full 0.5btc is tied up until the transaction is confirmed or discarded.

Transactions are typically only discarded from mempool when the machine is restarted or times out. Also when a machine is restarted it syncs with it's neighbours again meaning even a restart may not clear it. The timeout is very subjective and is typically days with many wallets not handling this very elegantly.


Unsticking a transaction

To cancel the transaction there are a few approaches

  • Child pays for parent (CPFP). - This approach is to construct another follow on transaction that pays a larger fee which covers the required fee for both the current and previous transaction. This is typically the best approach if possible since it doesn't invalidate your original transaction.
  • Double spend (RBF) - This approach is to simply spend the same money again but this time apply a larger fee. Most nodes will ignore double spend requests unless the RBF (Replace By Fee) option was originally set in the transaction. To know if this is possible you need to know if your wallet constructs transactions with this RBF flag. (Most don't as of writing this)

https://github.com/petertodd/replace-by-fee-tools

  • Time out - This approach is to simply wait it out until the transaction is eventually removed from mempools of the network.


Wallet support

TODO

Wallet CPFP RBF Export Private Key Dynamic Fees
BreadWallet (iOS) No No Unknown  ?
Electrum No Yes Unknown  ?
Bitcoind GUI No Coming Soon Unknown  ?
Jaxx (iOS) No No Unknown  ?
CoPay (iOS) No No Unknown  ?
MyCelium No No Unknown  ?
GreenAddress No No Unknown  ?
Armoury No Yes Unknown  ?


Walkthrough manually unsticking a transaction

(TODO) If you know the private keys of the original transaction you can manually construct a transaction using coinb.in or on the bitcoin-cli commandline.

Publish New Transaction Manually

Bitcoin-cli

You can use "createrawtransaction" to manually add inputs and mark the "nsequence" field to a value less than 0xffffffff. If you would like to replace the first transaction created this way. You will have to dump the transaction to free the UTXOs for use again using the "abandontransaction" command.

Once you've dumped the first transaction. You should be able to repeat the process above then increment the "nsequence" field. This new transaction when broadcasted should then be accepted by any node that supports full RBF.