Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: BusyAssistant on January 05, 2019, 08:58:01 PM



Title: Are all RPC methods available in pruned mode?
Post by: BusyAssistant on January 05, 2019, 08:58:01 PM
Like the title, can I use all RPC methods on the entire blockchain in pruning mode? Or would I only be able to receive all data on recent blocks? I have not configured my node to be pruned yet, but am considering it for disk space.


Title: Re: Are all RPC methods available in pruned mode?
Post by: achow101 on January 05, 2019, 09:10:31 PM
You will be able to use all RPCs. However, those that require pulling information from stored block data will not be able to give you data from blocks that have been pruned. For example, getblock will read a block off disk and give it to you decoded. If you use getblock on a block that has been pruned, it will give you an error. For blocks that were not pruned, it will work as expected.

Although pruning deletes old blocks from disk, there is still data kept about them in the chainstate database. This includes the block header so getblockheader will still work.


Title: Re: Are all RPC methods available in pruned mode?
Post by: BusyAssistant on January 06, 2019, 02:44:44 AM
Thanks for your reply. I just realized that txindex is unavailable in prune mode, and my current usage relies on txindex being set to True. I guess I've got to keep the full bc.