2

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?

  • getbestblock will let me iterate using getblock from the most recent block all the way down to genesis
  • I can also getblock to 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.

  • 1
    You might want to look at the RPC call getchaintips. It tells you the tips of all the chains you know about, many of which will be stale blocks. – morsecoder Sep 1 '15 at 13:07
  • 4
    Bitcoin Core has never stored invalid blocks, they are rejected and the peer that sent them is banned. You will not likely find any because they are impossible to broadcast around the network. – Anonymous Sep 1 '15 at 13:24
  • @StephenM347 good point, from tips I can go similarly as from the getbestblock. Is there a way to download historical stale blocks then? – jangorecki Sep 1 '15 at 19:39
  • @jangorecki, only way I know of is to read the getchaintips from a node that has been live for a very long time! – morsecoder Sep 1 '15 at 20:05
  • @Bitcoin There are a couple of invalid blocks that are nonetheless well-known, like the ones in the 0.9.4/0.10.0 fork. – Nick ODell Sep 2 '15 at 3:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.