<h2>TxIndex</h2>
<p>Most use cases do not require a tx-index. The wallet keeps track of the relevant transactions (if you run a wallet). A complete tx-index may be useful for block-explorer-like interfaces or for research, etc.
It requires some disk space.</p>
<p><strong>Pruning &amp; TxIndex</strong>: You can't use a txindex with a pruned blockchain. Pruning will throw away scanned blocks. Having an index that points to a tx in a block that is no longer on your disk seems a waste.</p>
<hr />
<h2>Pruning</h2>
<p>Autopprune (-prune=550) allows you to reduce your historical blockchain data to a given target (in MB, example uses 550 which is the minimum). You can't throw away all blocks because you may need to &quot;roll back a couple of block&quot; if there is a chain reorganisation.</p>
<p>If you set <code>prune=1</code> (== manual mode), you can then manually prune your blockchain (use RPC call <code>pruneblockchain &lt;height&gt;</code>) [since 0.14]</p>
<p>The only reason to keep old blocks (say deeper then 144 blocks) is to allow other peers to bootstrap the blockchain and to serve (filtered) blocks to SPV client.
There are little &quot;end-user&quot; use case (expect the txindex) to keep old block.</p>
<h3>UTXO set</h3>
<p>Important to know is, that your full node will keep track of all unspent transaction (only those are relevant for validating blocks/the chain).
This database is (at the moment) roughly 2GB large and will (and must) also be present in pruning-mode. This database is essential for a full node.</p>
<hr />
<h2>Default mode</h2>
<p>Keep all blocks (take up ~80GB of disk-space). This will allow other peers to verify the blockchain and it allows SPV peers to ask for relevant transactions in all possible blocks.
If no one will run in this mode, the blockchain history may be lost (exaggerated).</p>

CC BY-SA 4.0
2018-09-30T14:59:31.480Z
FYI today the blockchain takes up closer to ~250 GB of disc space. It's getting difficult to run a full node... 

    `λ MEC-MBP scripts → λ git master* → du -sh ~/Library/Application\ Support/Bitcoin/{blocks,chainstate}
    228G    /Users/mec/Library/Application Support/Bitcoin/blocks
    2.7G    /Users/mec/Library/Application Support/Bitcoin/chainstate`
mecampbellsoup
CC BY-SA 3.0
2017-04-21T15:06:51.517Z
2017-04-21T15:06:51.517Z
2020-06-16T11:10:03.350Z
Jonas Schnelli
<p>You can run bitcoin in:</p>

<ul>
<li><p>txindex mode: Which allows you to query any transaction on the
blockchain with getrawtransactions (any other benefits?). This takes
up the most space</p></li>
<li><p>default mode: this allows you to only getrawtransactions for your own
transaction</p></li>
<li><p>Pruned mode: Like default mode but you only keep a few GB of the
latest transactions.You download the blocks verify then throw them
away.</p></li>
</ul>

<p>But I would like to know in more depth the differences between the modes.</p>

<p>What part of the Bitcoin blockchain does each mode store on the local machine? What does it download and verify? What does it discard? What abilities do you lose with the different modes?</p>

CC BY-SA 3.0
2017-04-21T15:08:38.843Z
Short comment: getrawtransaction only works for unconfirmed transactions (or all, if you have txindex). To query for your own transactions you have to use `gettransaction` (which always works, and gives way more information).
Pieter Wuille
<bitcoind><bitcoin-core>
Bitcoin Core txindex vs default mode vs pruned mode in depth
Cyrus
# Bitcoin Core txindex vs default mode vs pruned mode in depth

(Asked by: username_0 on 2017-04-21)

You can run bitcoin in:

* txindex mode: Which allows you to query any transaction on the
  blockchain with getrawtransactions (any other benefits?). This takes
  up the most space
* default mode: this allows you to only getrawtransactions for your own
  transaction
* Pruned mode: Like default mode but you only keep a few GB of the
  latest transactions.You download the blocks verify then throw them
  away.

But I would like to know in more depth the differences between the modes.

What part of the Bitcoin blockchain does each mode store on the local machine? What does it download and verify? What does it discard? What abilities do you lose with the different modes?

**Tags:** bitcoind, bitcoin-core

> **Comments:**
> **username_1**: Short comment: getrawtransaction only works for unconfirmed transactions (or all, if you have txindex). To query for your own transactions you have to use `gettransaction` (which always works, and gives way more information).  

---

## 1 answers

### Answer by username_2 on 2017-04-21. Score: 6 | Accepted answer

## TxIndex

Most use cases do not require a tx-index. The wallet keeps track of the relevant transactions (if you run a wallet). A complete tx-index may be useful for block-explorer-like interfaces or for research, etc.
It requires some disk space.

**Pruning & TxIndex**: You can't use a txindex with a pruned blockchain. Pruning will throw away scanned blocks. Having an index that points to a tx in a block that is no longer on your disk seems a waste.

---

## Pruning

Autopprune (-prune=550) allows you to reduce your historical blockchain data to a given target (in MB, example uses 550 which is the minimum). You can't throw away all blocks because you may need to "roll back a couple of block" if there is a chain reorganisation.

If you set `prune=1` (== manual mode), you can then manually prune your blockchain (use RPC call `pruneblockchain <height>`) [since 0.14]

The only reason to keep old blocks (say deeper then 144 blocks) is to allow other peers to bootstrap the blockchain and to serve (filtered) blocks to SPV client.
There are little "end-user" use case (expect the txindex) to keep old block.

### UTXO set

Important to know is, that your full node will keep track of all unspent transaction (only those are relevant for validating blocks/the chain).
This database is (at the moment) roughly 2GB large and will (and must) also be present in pruning-mode. This database is essential for a full node.

---

## Default mode

Keep all blocks (take up ~80GB of disk-space). This will allow other peers to verify the blockchain and it allows SPV peers to ask for relevant transactions in all possible blocks.
If no one will run in this mode, the blockchain history may be lost (exaggerated).

> **Comments:**
> **username_3**: FYI today the blockchain takes up closer to ~250 GB of disc space. It's getting difficult to run a full node...       `λ MEC-MBP scripts → λ git master* → du -sh ~/Library/Application\ Support/Bitcoin/{blocks,chainstate}     228G    /Users/mec/Library/Application Support/Bitcoin/blocks     2.7G    /Users/mec/Library/Application Support/Bitcoin/chainstate`  

---

