<p>Blocks with an unknown parent block are stored in the orphan block pool. They will stay there until the parent block is received and then linked to the existing chain. </p>

<p>As far as I know, there's no other condition for the block to be removed from the pool. If the particular parent is never received, they will remain there forever.</p>

<p>The current difficulty should be enough to prevent people from spamming this pool with orphans, because that would require a lot a processing power and a huge waste of money. A block has to be valid to be stored in this pool, block hash has to meet target and so on. If that is not the case, the block is discarded and will not spam the orphan pool.</p>

<p>See <a href="https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch10.asciidoc#assembling-and-selecting-chains-of-blocks" rel="nofollow noreferrer">Mastering Bitcoin, Chapter 10, Section Assembling and Selecting Chains of Blocks</a> for detailed explanation.</p>

CC BY-SA 4.0
2018-12-04T11:59:53.417Z
2018-12-04T11:59:53.417Z
Jack O'Neill
<p>I searched this question and couldn't find an answer to the following scenario.</p>

<p>Block 4440 gets mined at 10:00 AM
Block 4441 gets mined  at 10:01 AM</p>

<p>Lets assume I receive Block 4441 first and 4440 later. What happens? When I received 4441 I didnt know the block with the previous hash and I wasn't able to add 4441 to my chain. </p>

<p>Do I store these kinds of blocks with an unknown previous header in a pool and check periodically if I received the previous block?</p>

<p>Assuming we do this, do you ever remove old blocks from this pool?</p>

<p>If we save "invalid" blocks, how do we prevent people from submitting thousands of invalid blocks and filling up our pool? I assume we check if the difficulty was met but what happens if block 4440 lowered the required difficulty?</p>

CC BY-SA 4.0
2018-11-27T17:46:06.907Z
Hey Peter, check out the tag [tag:orphaned-block], particularly this answer by Pieter: https://bitcoin.stackexchange.com/a/5869/5406. ;)
Murch
<orphaned-blocks>
What happens if you receive a block with an unknown previous hash in the header
Peter111
# What happens if you receive a block with an unknown previous hash in the header

(Asked by: username_0 on 2018-11-27)

I searched this question and couldn't find an answer to the following scenario.

Block 4440 gets mined at 10:00 AM
Block 4441 gets mined at 10:01 AM

Lets assume I receive Block 4441 first and 4440 later. What happens? When I received 4441 I didnt know the block with the previous hash and I wasn't able to add 4441 to my chain.

Do I store these kinds of blocks with an unknown previous header in a pool and check periodically if I received the previous block?

Assuming we do this, do you ever remove old blocks from this pool?

If we save "invalid" blocks, how do we prevent people from submitting thousands of invalid blocks and filling up our pool? I assume we check if the difficulty was met but what happens if block 4440 lowered the required difficulty?

**Tags:** orphaned-blocks

> **Comments:**
> **username_1**: Hey Peter, check out the tag [tag:orphaned-block], particularly this answer by Pieter: https://bitcoin.stackexchange.com/a/5869/5406. ;)  

---

## 1 answers

### Answer by username_2 on 2018-12-04. Score: 3 | Accepted answer

Blocks with an unknown parent block are stored in the orphan block pool. They will stay there until the parent block is received and then linked to the existing chain.

As far as I know, there's no other condition for the block to be removed from the pool. If the particular parent is never received, they will remain there forever.

The current difficulty should be enough to prevent people from spamming this pool with orphans, because that would require a lot a processing power and a huge waste of money. A block has to be valid to be stored in this pool, block hash has to meet target and so on. If that is not the case, the block is discarded and will not spam the orphan pool.

See [Mastering Bitcoin, Chapter 10, Section Assembling and Selecting Chains of Blocks](https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch10.asciidoc#assembling-and-selecting-chains-of-blocks) for detailed explanation.


---

