I would like to download (and access) as much blocks as possible - including stale (extinct) blocks, orphans blocks and invalid blocks.
I have 0.11 official client.
My node is already synchronized but I can re-sync for that.
As I understand thanks to header-first IBD method (and maybe some other improvement) introduced in 0.10.0:
- I have as few as possible stale blocks (only those downloaded after IBD)
- I don't have invalid blocks
- I don't have orphans as they were not materialized because they would be waiting for missing parents(?)
How can I download as much of them as possible?
Besides of downloading blocks what rpc calls should I use to query those blocks from local blockchain?
getbestblockwill let me iterate using
getblockfrom the most recent block all the way down to genesis
- I can also
getblockto iterate starting from genesis block
None of above gives access to stale or invalid. Orphaned were not materialized, correct?, so I'm not interested to access blocks which are still in-memory.