0

I am trying to determine if I want to prune but I'm trying to figure out if it would interfere with anything.

Would it interfere with rpc calls to show info on a transaction/block? A full explorer?

Does it interfere with showing transaction histories?

I finally have the full blockchain downloaded and it takes a long time so i want to be sure. I don't need the extra space.

5

Pruning Blockchain, what does it remove?

What

Raw block data for blocks older than a given height.

If we look at https://bitcoincore.org/en/releases/0.11.0/, it says

This release supports running a fully validating node without maintaining a copy of the raw block and undo data on disk. To recap, there are four types of data related to the blockchain in the bitcoin system: the raw blocks as received over the network (blk???.dat), the undo data (rev???.dat), the block index and the UTXO set (both LevelDB databases). The databases are built from the raw data.

Block pruning allows Bitcoin Core to delete the raw block and undo data once it’s been validated and used to build the databases. At that point, the raw data is used only to relay blocks to other nodes, to handle reorganizations, to look up old transactions (if -txindex is enabled or via the RPC/REST interfaces), or for rescanning the wallet. The block index continues to hold the metadata about all blocks in the blockchain.

So if raw block data and undo data are deleted that presumably leaves the block index and the UTXO set as the two of the "four types of data" that are unaffected by pruning.

...
Modified RPC calls:

getblockchaininfo now includes whether we are in pruned mode or not.
getblock will check if the block’s data has been pruned and if so, return an error.
getrawtransaction will no longer be able to locate a transaction that has a UTXO but where its block file has been pruned.

So some RPC calls return an error for pruned data.

When

However the most recent 288 blocks are kept (approx 2 days worth) regardless of whether all their transaction outputs have been spent.

There are some additional details about the timing of deletion of files that contain multiple blocks that are individually marked for deletion. I don't think this substantially affects this answer but it may be something that you should study - depending on what you are trying to achieve.


Would it interfere with rpc calls to show info on a transaction/block?

Obviously, if the block has been pruned it would hamper the ability of the node to report on it. As mentioned above, some RPC calls will return an error if a block has been pruned.

a full explorer?

Ditto.


Does it interfere with showing transaction histories?

It may interfere with showing the history of arbitrary transactions but you should still be able to view all transactions that were created by this wallet/node.

I think you wouldn't always be able to immediately retrieve full details of the sources of transaction inputs back through prior transactions all the way back to the "coinbase" transaction that created the money currently being controlled by the pruning node.

So it may depend what you mean by history?

  • transactions previously created by this node
  • historical transactions referred to by own "live" transactions directly or indirectly.

I think the intent of a pruning node is that it should be fully functional as a personal wallet but require much less disk storage space.

If you are using it as something other than a personal wallet you may find that there are significant disadvantages you have to explicitly work around. I guess it depends on the precise details of the intended usage.


See

10
  • thanks for the clarification. if i want to copy my completed blockchain from windows to linux i just copy the blocks and chainstate folders? nothing else?
    – Derek Hill
    Jan 3 at 11:52
  • 1
    @Derek. That's a different question. Comments are mainly for suggesting improvements to questions or answers, not for asking new questions. See bitcoin.stackexchange.com/a/60807/13866. The search facility here is quite good. I recommend you try it out. Jan 3 at 11:56
  • "Does it interfere with showing transaction histories?" No, I think he's referring to one's own transactions.
    – MCCCS
    Jan 3 at 11:58
  • 1
    I don't think this is correct. Since all consensus data is moved to chainstate (utxo set) you don't really need any blocks after they've been processed once. Prune mode only keeps a minimum of 288 blocks on disk to serve to peers. All older blocks are marked for deletion and when a .blk file contains only marked blocks the file can be deleted.
    – pinhead
    Jan 3 at 12:29
  • 1
    The wallet in Bitcoin Core has its own transaction list. Pruning does not interfere with having that list in the wallet; it does however interfere with the ability to rescan the chain for old transactions affecting the wallet. Jan 3 at 19:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.