0

Because I need bitcoin core client only for JSON-RPC requests. Will I need pruned initialization or normal initialization of bitcoin core client for successfully running such requests? (I guess client software does full verification in both modes, just avoids storing of blocks in former mode.) From what I understand if I prune the block data, It will only store around 2GB of data on my local system. However, I am not sure if I need nth block data using JSON-RPC call, which can be any block from beginning itself, will my pruned client get it from the main chain with the help of its peers? I just wanna save my bandwidth and also wanna use JSON-RPC feature. I am really confused. Any help will be appreciated.

1

I just wanna save my bandwidth

Running a node in pruned mode will not save you bandwidth during the initial block download (sync), you still need to download all blocks and validate them, even if you don't store them longer term (pruning lowers disk space requirements). You can fine-tune your data upload limits in the bitcoin.conf file though.

Most RPC calls will work with a pruned node, some will not though. From a quick search for some examples, see:

https://github.com/bitcoin/bitcoin/blob/v0.11.0/doc/release-notes.md#block-file-pruning

https://github.com/bitcoin/bitcoin/blob/v0.12.0/doc/release-notes.md#wallet-pruning

| improve this answer | |
  • Links suggests getblock and getrawtransaction won't work in pruned mode. Why would it be like that? Why doesn't it ask its connected peers to share the required block data? It should download the block at the time of getblock command time. – wowfactory Feb 27 at 4:16
  • 1
    Getblock could work by asking other peers, but simply isn't implemented in Bitcoin Core. Getrawtransaction cannot work, as the P2P protocol has no mechanism for querying a single transaction - it'd need to download all blocks over again just to find the transaction you want. – Pieter Wuille Feb 29 at 7:05

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.