Author

Topic: Are all RPC methods available in pruned mode? (Read 213 times)

legendary
Activity: 1878
Merit: 1038
Telegram: https://t.me/eckmar
January 08, 2019, 12:16:15 PM
#4
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.

If you don't want to download whole blockchain, maybe Regtest is for you. Can't say I'm 100% sure txindex is there, but it should be. With Regtest you can manually add blocks, conifrm tx, add satoshis etc, its your private blockchain and I use it while developing even before testnet.

You can see here how to set it up and read more: https://bitcoin.org/en/developer-examples#regtest-mode
newbie
Activity: 9
Merit: 4
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.
staff
Activity: 3458
Merit: 6793
Just writing some code
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.
newbie
Activity: 9
Merit: 4
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.
Jump to: