Bitcoin Forum
May 26, 2024, 12:34:20 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Are all RPC methods available in pruned mode?  (Read 196 times)
BusyAssistant (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 4


View Profile
January 05, 2019, 08:58:01 PM
Merited by Foxpup (1), HeRetiK (1), ABCbits (1), mikeywith (1)
 #1

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.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3402
Merit: 6657


Just writing some code


View Profile WWW
January 05, 2019, 09:10:31 PM
Merited by Foxpup (3), bones261 (2), HeRetiK (1), ABCbits (1)
 #2

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.

BusyAssistant (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 4


View Profile
January 06, 2019, 02:44:44 AM
 #3

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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!