<p>Bitcoin Core does headers first sync so it downloads the headers first and partially validates them before downloading the blocks. So if a malicious node sends headers with invalid PoW's, the syncing node will disconnect from it and sync headers off of another node. If the it receives multiple headers for the same block height, that node will be considered to be misbehaving and stop syncing headers from it.</p>

CC BY-SA 3.0
2017-09-15T17:15:20.107Z
2017-09-15T17:15:20.107Z
Ava Chow
<p>A simple DOS attack while IBD could be as follows:</p>

<ol>
<li>The fresh client is currently downloading block 100. </li>
<li>Then it is offered 10 blocks at height 101, each claiming they are the heaviest chain</li>
<li>9 out of 10 alternatives are
    with fake PoW but still the client will waste time in getting the
    entire block and validating their PoW.</li>
</ol>

<p>How does the current implementation of P2P protocol in bitcoin-core handle this sort of DoS attack?</p>

<bitcoin-core><client><synchronization><attack>
How does intial block download work at P2P layer?
sanket1729
# How does intial block download work at P2P layer?

(Asked by: username_0 on 2017-09-15)

A simple DOS attack while IBD could be as follows:

1. The fresh client is currently downloading block 100.
2. Then it is offered 10 blocks at height 101, each claiming they are the heaviest chain
3. 9 out of 10 alternatives are
   with fake PoW but still the client will waste time in getting the
   entire block and validating their PoW.

How does the current implementation of P2P protocol in bitcoin-core handle this sort of DoS attack?

**Tags:** bitcoin-core, client, synchronization, attack


---

## 1 answers

### Answer by username_1 on 2017-09-15. Score: 2 | Accepted answer

Bitcoin Core does headers first sync so it downloads the headers first and partially validates them before downloading the blocks. So if a malicious node sends headers with invalid PoW's, the syncing node will disconnect from it and sync headers off of another node. If the it receives multiple headers for the same block height, that node will be considered to be misbehaving and stop syncing headers from it.


---

