Bitcoin Forum
May 05, 2024, 01:47:59 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.
You get merit points when someone likes your post enough to give you some. And for every 2 merit points you receive, you can send 1 merit point to someone else!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714916879
Hero Member
*
Offline Offline

Posts: 1714916879

View Profile Personal Message (Offline)

Ignore
1714916879
Reply with quote  #2

1714916879
Report to moderator
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6581


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!