<p>If you mean a miner as in a computer that only does mining, it should be generally as resistant to DOS attacks as any casual computer on the network - it doesn't open its ports.</p>

<p>If you are worried about a standard client being flooded with many blocks and having to store it - the developers did think of that and they put in the checkpoint system. Basically, making a lot of forks of the new blocks would require a lot of computational power and so forth, so it is highly unlikely. However, changing some of the earliest blocks in existence would be dirt cheap nowadays. However, the standard client will not accept any block chain forks that branch out from blocks older than the most recent checkpoint.</p>

CC BY-SA 3.0
2012-09-22T18:34:22.793Z
Ahh, so checkpoints is the technique to prevent DoS attacks.  I'll have to learn more about this.
makerofthings7
CC BY-SA 3.0
2012-09-23T04:37:42.713Z
@makerofthings7 Not all of them, just the DoS attacks that deal with blocks. The other countermeasures are the minimal transaction fees per transaction that scale based on the amount of transactions in the block, and dropping connection to peers that are spammy.
ThePiachu
CC BY-SA 3.0
2012-09-21T19:53:49.720Z
2012-09-21T19:53:49.720Z
ThePiachu
<p>A valid block that is orphaned is just as expensive to create as a block on top of the longest chain.  </p>

<p>It makes no economic sense to create a block that has almost no chance of becoming the longest chain.  Today, that costs maybe $500 per block for electricity and amortized capital to solve a block.  And to DDoS you would need many many blocks, so you'ld likely be expending millions of dollars before any developers would even need to start worrying about mitigation, if there were truly a problem.</p>

<p>[Edit: Also see ThePiachu's comment about the checkpoint protecting against new forks emerging for blocks back when there was a low difficulty.]</p>

CC BY-SA 3.0
2012-09-22T18:33:12.797Z
I'm thinking in terms of Netsplits, where the miners have completely different views of what transactions are happening.  During a netsplit (or while I run a wallet/miner on several cruise ships)  I'd think that the "real" longest chain may not manifest itself until the network is converged.  Alternatively, I think that a DoS against miners/clients that accept inbound connection plus a netsplit will produce interesting blockchains.
makerofthings7
CC BY-SA 3.0
2012-09-24T04:22:43.783Z
Except the difficulty doesn't change just because you are not connected to the rest of the network.  (Well, it does, but we'll be taking cruise shuttles to mars before your isolated network confirms enough blocks to get difficulty lowered.)
Stephen Gornick
CC BY-SA 3.0
2012-10-02T20:39:42.947Z
There was the concern that clients other than the Bitcoin.org client might be vulnerable to this as they don't use checkpoints.  But they also don't serve blocks so unless that changes even alternative clients are not exposed to this: http://bitcointalk.org/index.php?topic=114918.msg1239719#msg1239719
Stephen Gornick
CC BY-SA 3.0
2012-09-21T19:27:13.110Z
2012-09-22T08:11:53.477Z
2012-09-22T08:11:53.477Z
Stephen Gornick
<p>Suppose it was possible to influence a miner to create many forks.  My understanding is that a miner <a href="https://bitcoin.stackexchange.com/a/3132/1878">won't retransmit the fork, but will track it internally</a>.</p>

<ul>
<li><p>Where is this information saved in a miner (disk, RAM, etc)?</p></li>
<li><p>What protections exist to protect a miner from a resource depletion attack due to forking?</p></li>
</ul>

CC BY-SA 3.0
2012-09-21T19:57:11.167Z
I think you are misusing some terms in your questions - a miner is not the same as a pool, a wallet is not a client, etc. etc. If you'd like me to explain the difference between those things, I can try writing something up.
ThePiachu
CC BY-SA 3.0
2012-09-22T18:24:49.550Z
@ThePiachu I think I understand how a miner is different than a pool (which contacts Bitcoin-QT in -server mode?), but I thought "client" always referred to Bitcoin-QT.
makerofthings7
CC BY-SA 3.0
2012-09-23T04:39:25.130Z
Yes, but a miner is usually not a client, but a simple program to crunch numbers supplied by a pool.
ThePiachu
<protocol><blockchain-fork><mining-software><getwork>
Could many large forks cause a DoS attack on the miner?
makerofthings7
# Could many large forks cause a DoS attack on the miner?

(Asked by: username_0 on 2012-09-21)

Suppose it was possible to influence a miner to create many forks. My understanding is that a miner [won't retransmit the fork, but will track it internally](https://bitcoin.stackexchange.com/a/3132/1878).

* Where is this information saved in a miner (disk, RAM, etc)?
* What protections exist to protect a miner from a resource depletion attack due to forking?

**Tags:** protocol, blockchain-fork, mining-software, getwork

> **Comments:**
> **username_1**: I think you are misusing some terms in your questions - a miner is not the same as a pool, a wallet is not a client, etc. etc. If you'd like me to explain the difference between those things, I can try writing something up.  
> **username_0**: @username_1 I think I understand how a miner is different than a pool (which contacts Bitcoin-QT in -server mode?), but I thought "client" always referred to Bitcoin-QT.  
> **username_1**: Yes, but a miner is usually not a client, but a simple program to crunch numbers supplied by a pool.  

---

## 2 answers

### Answer by username_1 on 2012-09-21. Score: 3 | Accepted answer

If you mean a miner as in a computer that only does mining, it should be generally as resistant to DOS attacks as any casual computer on the network - it doesn't open its ports.

If you are worried about a standard client being flooded with many blocks and having to store it - the developers did think of that and they put in the checkpoint system. Basically, making a lot of forks of the new blocks would require a lot of computational power and so forth, so it is highly unlikely. However, changing some of the earliest blocks in existence would be dirt cheap nowadays. However, the standard client will not accept any block chain forks that branch out from blocks older than the most recent checkpoint.

> **Comments:**
> **username_0**: Ahh, so checkpoints is the technique to prevent DoS attacks.  I'll have to learn more about this.  
> **username_1**: @username_0 Not all of them, just the DoS attacks that deal with blocks. The other countermeasures are the minimal transaction fees per transaction that scale based on the amount of transactions in the block, and dropping connection to peers that are spammy.  

---

### Answer by username_2 on 2012-09-21. Score: 1

A valid block that is orphaned is just as expensive to create as a block on top of the longest chain.

It makes no economic sense to create a block that has almost no chance of becoming the longest chain. Today, that costs maybe $500 per block for electricity and amortized capital to solve a block. And to DDoS you would need many many blocks, so you'ld likely be expending millions of dollars before any developers would even need to start worrying about mitigation, if there were truly a problem.

[Edit: Also see username_1's comment about the checkpoint protecting against new forks emerging for blocks back when there was a low difficulty.]

> **Comments:**
> **username_0**: I'm thinking in terms of Netsplits, where the miners have completely different views of what transactions are happening.  During a netsplit (or while I run a wallet/miner on several cruise ships)  I'd think that the "real" longest chain may not manifest itself until the network is converged.  Alternatively, I think that a DoS against miners/clients that accept inbound connection plus a netsplit will produce interesting blockchains.  
> **username_2**: Except the difficulty doesn't change just because you are not connected to the rest of the network.  (Well, it does, but we'll be taking cruise shuttles to mars before your isolated network confirms enough blocks to get difficulty lowered.)  
> **username_2**: There was the concern that clients other than the Bitcoin.org client might be vulnerable to this as they don't use checkpoints.  But they also don't serve blocks so unless that changes even alternative clients are not exposed to this: http://bitcointalk.org/index.php?topic=114918.msg1239719#msg1239719  

---

