<p>During the initial block download, a node will only receive blocks that are part of the best chain from other peers. Stale blocks are not be advertised to peers and since they would serve as a fingerprint to identify nodes there are also no methods of asking for them explicitly.</p>
<p>Later when synchronized, a node that receives competing blocks at the chaintip will store them both in its <code>blk….dat</code> files. A node would not specifically remove the stale blocks from their blockchain data, but they would get pruned just like other block data if the node is running in pruning mode.</p>

CC BY-SA 4.0
2022-09-30T15:05:32.773Z
2022-09-30T15:05:32.773Z
Murch
<p>Is there orphaned blocks in blockchain?</p>

<p>I mean a database of full node. Is it true that orphaned blocks (that outside the mainchain) already are in <code>blk00*.dat</code> files?</p>

<bitcoin-core><stale-block>
Orphaned blocks
Denis Leonov
# Orphaned blocks

(Asked by: username_0 on 2017-04-12)

Is there orphaned blocks in blockchain?

I mean a database of full node. Is it true that orphaned blocks (that outside the mainchain) already are in `blk00*.dat` files?

**Tags:** bitcoin-core, stale-block


---

## 1 answers

### Answer by username_1 on 2022-09-30. Score: 1

During the initial block download, a node will only receive blocks that are part of the best chain from other peers. Stale blocks are not be advertised to peers and since they would serve as a fingerprint to identify nodes there are also no methods of asking for them explicitly.

Later when synchronized, a node that receives competing blocks at the chaintip will store them both in its `blk….dat` files. A node would not specifically remove the stale blocks from their blockchain data, but they would get pruned just like other block data if the node is running in pruning mode.


---

