<p>I would like to download (and access) as much blocks as possible - including stale (extinct) blocks, orphans blocks and invalid blocks.<br>
I have 0.11 official client.<br>
My node is already synchronized but I can re-sync for that.<br>
As I understand thanks to <em>header-first</em> IBD method (and maybe some other improvement) introduced in 0.10.0:</p>

<ul>
<li>I have as few as possible stale blocks (only those downloaded after IBD)</li>
<li>I don't have invalid blocks</li>
<li>I don't have orphans as they were not materialized because they would be waiting for missing parents(?)</li>
</ul>

<p>How can I download as much of them as possible?</p>

<p>Besides of downloading blocks what rpc calls should I use to query those blocks from local blockchain?  </p>

<ul>
<li><code>getbestblock</code> will let me iterate using <code>getblock</code> from the most recent block all the way down to genesis</li>
<li>I can also <code>getblock</code> to iterate starting from genesis block</li>
</ul>

<p>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.</p>

CC BY-SA 3.0
2015-09-01T13:07:21.437Z
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
CC BY-SA 3.0
2015-09-01T13:24:19.127Z
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.
Claris
CC BY-SA 3.0
2015-09-01T19:39:51.493Z
@StephenM347 good point, from tips I can go similarly as from the `getbestblock`. Is there a way to download historical stale blocks then?
jangorecki
CC BY-SA 3.0
2015-09-01T20:05:41.197Z
@jangorecki, only way I know of is to read the `getchaintips` from a node that has been live for a very long time!
morsecoder
CC BY-SA 3.0
2015-09-02T03:57:18.253Z
@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
CC BY-SA 3.0
2015-09-02T10:30:06.953Z
@NickODell I'm not so much interested in invalid block now as in the stale blocks. And it looks like there is no way to get them without have own node running for a long time(?).
jangorecki
<json-rpc><synchronization><blockchain-fork><orphaned-blocks><stale-block>
Get as many blocks as possible (stale, invalid, orphans)
jangorecki
# Get as many blocks as possible (stale, invalid, orphans)

(Asked by: username_0 on 2015-09-01)

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.

**Tags:** json-rpc, synchronization, blockchain-fork, orphaned-blocks, stale-block

> **Comments:**
> **username_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.  
> **username_2**: 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.  
> **username_0**: @StephenM347 good point, from tips I can go similarly as from the `getbestblock`. Is there a way to download historical stale blocks then?  
> **username_1**: @username_0, only way I know of is to read the `getchaintips` from a node that has been live for a very long time!  
> **username_3**: @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.  
> **username_0**: @username_3 I'm not so much interested in invalid block now as in the stale blocks. And it looks like there is no way to get them without have own node running for a long time(?).  

---

## 0 answers

