<p>The transaction would have no effect. A transaction that wasn't accepted by the network has no effect on the ability to spend coins. The person whose coins were affected could simply delete that transaction from his own database. There's no need to undo the transaction since it was never committed to the block chain anyway.</p>

CC BY-SA 3.0
2011-09-05T04:52:00.637Z
But ... the transaction appears in the network immediately. If I transfer from A to B, B sees the TX immediately with 0 confirmations. So how can A delete it?
ripper234
CC BY-SA 3.0
2011-09-05T05:29:53.320Z
You're assuming a broken network configuration where transactions are accepted for relaying even though no miners are willing to commit them. There are many ways you can break the network with inconsistent configurations, that's just one of them. Everyone who participates in the Bitcoin system wants a useful system and the network would not be permitted to go into a useless state. (What if all miners refused to include any transactions at all?)
David Schwartz
CC BY-SA 3.0
2011-09-05T07:48:35.027Z
What? I'm assuming someone using an unofficial or old bitcoin client, that doesn't include any TX fees. In this case, his transaction will be seen immediately, but it might take years for his TX to be confirmed, if at all.
ripper234
CC BY-SA 3.0
2011-09-05T16:37:11.230Z
Right, I understand that. If the network permitted a transaction to remain pending indefinitely without some way to override it with another transaction, the network as a whole would be broken. A broken client can't cause lost coins, you can just use a different client.
David Schwartz
CC BY-SA 3.0
2011-09-04T23:47:16.430Z
2011-09-04T23:47:16.430Z
David Schwartz
<p>Generally it is assumed that any client at that time will require a fee. As most clients require a fee now unless you start them with the no fee flag. </p>

<p>I suppose anyone could write their own client or use a client that has it re-enabled, but that is really on their own head and their best bet then would be to mine until they get a block and add their transaction to the block. That might take a couple years, but hey, they wanted a free transaction.</p>

CC BY-SA 3.0
2011-09-05T07:49:56.883Z
So if someone is using such a client, the TX would essentially be lost (except for the "mine your own block" solution)? There is no way to undo it or add fees retroactively, right? Hmm, someone could create a mining pool that includes specific transactions for an increased fee.
ripper234
CC BY-SA 3.0
2011-09-05T10:09:45.987Z
More likely a  bank or such would create their own pool to handle their own transactions.. for no fee.
Evil Spork
CC BY-SA 3.0
2011-09-04T23:32:15.783Z
2011-09-04T23:32:15.783Z
Evil Spork
<p>I have successfully used the methodology described <a href="https://bitcointalk.org/index.php?topic=19207.0">here</a> to delete a transaction which didn't go anywhere because of a too low fee. In short, the process is as follows:</p>

<ul>
<li>Configure Linux machine with db4.8-util and <a href="https://github.com/gavinandresen/bitcointools">bitcointools</a>. Ubuntu works fine.</li>
<li><p>Run following command on your data folder:</p>

<pre><code>./dbdump.py --datadir ~/.bitcoin --wallet-tx &gt; tx.txt
</code></pre></li>
<li><p>Open tx.txt using text editor. Find transaction in question. Should look like:</p>

<pre><code>==WalletTransaction== 12a75d48a002ab920 ...
block: 00000000000000000000000000000000 ...
2 tx in, 1 out
TxIn: value: 0.007640 prev(c09e92cb94ff1fb6d4 ...
TxIn: value: 0.000050 prev(7dcda75e6ad8b5adc7 ...
TxOut: value: 0.007690 pubkey:  Script: DUP HA...
</code></pre></li>
<li><p>Reverse the <code>12a75d48a002ab920...</code> value, get something like <code>92ab02a0485da712</code>. Don't need to reverse the whole line, just a few hex values from beginning. You will need to search for this in the database dump.</p></li>
<li><p>Dump the database using following command:</p>

<pre><code>db4.8_dump ~/.bitcoin/wallet.dat &gt; dumpfile
</code></pre></li>
<li><p>Using text editor open the dumpfile and search for that <code>92ab02a0485da712</code> line you found earlier. There will be two lines - key and value, you need to delete both. Save the file.</p></li>
<li><p>Re-import the database using the following command:</p>

<pre><code>db4.8_load ~/.bitcoin/wallet2.dat &lt; dumpfile
</code></pre></li>
</ul>

<p>If all went fine, the wallet2.dat will have a database without transaction in question.</p>

<p>All of this, of course, only works if transaction was never accepted by the network, which is likely the case if you already waited a day, and nothing happens. There is no way to undo transaction which was already accepted by the network. I tried this technology twice and both times worked fine.</p>

CC BY-SA 3.0
2012-01-04T04:38:48.297Z
2012-01-04T04:38:48.297Z
galets
<p>Suppose we reach a state where only transactions that pay a fee are accepted by miners. Further supposed that someone created a transaction using an old/odd client that allowed them <strong>not</strong> to send any fees.</p>

<p>In this case, what would happen to the transaction? Could it be undone? Would the coins be lost forever?</p>

<transactions>
Is there a way to undo transactions with a "too low" fee?
ripper234
# Is there a way to undo transactions with a "too low" fee?

(Asked by: username_0 on 2011-09-04)

Suppose we reach a state where only transactions that pay a fee are accepted by miners. Further supposed that someone created a transaction using an old/odd client that allowed them **not** to send any fees.

In this case, what would happen to the transaction? Could it be undone? Would the coins be lost forever?

**Tags:** transactions


---

## 3 answers

### Answer by username_3 on 2012-01-04. Score: 5 | Accepted answer

I have successfully used the methodology described [here](https://bitcointalk.org/index.php?topic=19207.0) to delete a transaction which didn't go anywhere because of a too low fee. In short, the process is as follows:

* Configure Linux machine with db4.8-util and [bitcointools](https://github.com/gavinandresen/bitcointools). Ubuntu works fine.
* Run following command on your data folder:

  ```
  ./dbdump.py --datadir ~/.bitcoin --wallet-tx > tx.txt

  ```
* Open tx.txt using text editor. Find transaction in question. Should look like:

  ```
  ==WalletTransaction== 12a75d48a002ab920 ...
  block: 00000000000000000000000000000000 ...
  2 tx in, 1 out
  TxIn: value: 0.007640 prev(c09e92cb94ff1fb6d4 ...
  TxIn: value: 0.000050 prev(7dcda75e6ad8b5adc7 ...
  TxOut: value: 0.007690 pubkey:  Script: DUP HA...

  ```
* Reverse the `12a75d48a002ab920...` value, get something like `92ab02a0485da712`. Don't need to reverse the whole line, just a few hex values from beginning. You will need to search for this in the database dump.
* Dump the database using following command:

  ```
  db4.8_dump ~/.bitcoin/wallet.dat > dumpfile

  ```
* Using text editor open the dumpfile and search for that `92ab02a0485da712` line you found earlier. There will be two lines - key and value, you need to delete both. Save the file.
* Re-import the database using the following command:

  ```
  db4.8_load ~/.bitcoin/wallet2.dat < dumpfile

  ```

If all went fine, the wallet2.dat will have a database without transaction in question.

All of this, of course, only works if transaction was never accepted by the network, which is likely the case if you already waited a day, and nothing happens. There is no way to undo transaction which was already accepted by the network. I tried this technology twice and both times worked fine.


---

### Answer by username_1 on 2011-09-04. Score: 9

The transaction would have no effect. A transaction that wasn't accepted by the network has no effect on the ability to spend coins. The person whose coins were affected could simply delete that transaction from his own database. There's no need to undo the transaction since it was never committed to the block chain anyway.

> **Comments:**
> **username_0**: But ... the transaction appears in the network immediately. If I transfer from A to B, B sees the TX immediately with 0 confirmations. So how can A delete it?  
> **username_1**: You're assuming a broken network configuration where transactions are accepted for relaying even though no miners are willing to commit them. There are many ways you can break the network with inconsistent configurations, that's just one of them. Everyone who participates in the Bitcoin system wants a useful system and the network would not be permitted to go into a useless state. (What if all miners refused to include any transactions at all?)  
> **username_0**: What? I'm assuming someone using an unofficial or old bitcoin client, that doesn't include any TX fees. In this case, his transaction will be seen immediately, but it might take years for his TX to be confirmed, if at all.  
> **username_1**: Right, I understand that. If the network permitted a transaction to remain pending indefinitely without some way to override it with another transaction, the network as a whole would be broken. A broken client can't cause lost coins, you can just use a different client.  

---

### Answer by username_2 on 2011-09-04. Score: 1

Generally it is assumed that any client at that time will require a fee. As most clients require a fee now unless you start them with the no fee flag.

I suppose anyone could write their own client or use a client that has it re-enabled, but that is really on their own head and their best bet then would be to mine until they get a block and add their transaction to the block. That might take a couple years, but hey, they wanted a free transaction.

> **Comments:**
> **username_0**: So if someone is using such a client, the TX would essentially be lost (except for the "mine your own block" solution)? There is no way to undo it or add fees retroactively, right? Hmm, someone could create a mining pool that includes specific transactions for an increased fee.  
> **username_2**: More likely a  bank or such would create their own pool to handle their own transactions.. for no fee.  

---

