<p>The DoS the block size limitation is trying to prevent is a miner creating a huge block of garbage data that now every single Bitcoin miner must download, validate, and store the entirety of. Imagine if some miner decided to create block after block of 1GB of garbage, and now every single Bitcoin node in the world must store and validate all of this garbage. If it were possible, this would be in the best interests of larger miners to do: smaller miners, who don't have the ability to download and validate these giant blocks of garbage as efficiently, will not be able to keep up with mining.</p>
<p>Also, people do attempt to submit spam to the blockchain. Trying to do so to the point of blocking out legitimate transactions will be quite expensive, considering you would have to pay transaction fees for every &quot;spam&quot; transaction you want to send.</p>

CC BY-SA 4.0
2021-01-24T06:04:24.213Z
@ ieatpizza thanks for your reply. If you could clarify **1)** If the block turns out to be "garbage" (by that you mean it would contain invalid transactions or just missing/fake hash?) the miner won't get reward so wouldn't that reduce his incentive to do so? **2)** what stops a miner from repeatedly producing  garbage blocks of 1 MB? True, it is easier/faster to download/process but  what stops a miner from producing thousands of illegitimate blocks? **3)** What is the main bottleneck here - bandwidth, processing (CPU) or storage (hard drive)?
S.O.S
CC BY-SA 4.0
2021-01-24T06:18:53.273Z
@S.O.S 1) By garbage data in blocks I mean some miner mining a valid block but including spam transactions (such as transactions that include a large amount of junk data). They still get the block reward since it is still a valid block, they are just missing out on transaction fees from legitimate transactions. 2) Because the profit margins are already so low, and by doing so they lose out on the fees that make up a large portion of their profit. If they won't take that profit, another miner will. 3) All 3, although I expect bandwidth and storage are the most expensive.
ieatpizza
CC BY-SA 4.0
2021-01-24T06:28:44.853Z
thanks for the clarification. From a purely tech perspective, wouldn't it be possible to detect when a miner includes "spam" data (or "junk data" as you call it) and have the nodes reject these kind of blocks (in order to disincentives miners from doing this)?
S.O.S
CC BY-SA 4.0
2021-01-24T06:43:30.570Z
@S.O.S No. We could block people from including certain types of unspendable outputs (like the people who are including arbitrary data using `OP_RETURN` outputs), but a miner could also just include transactions that send Bitcoins to themselves to fill the block in that case. It looks like an ordinary transaction on a technical level, but hopefully you can agree that this is spam.
ieatpizza
CC BY-SA 4.0
2021-01-24T06:45:51.173Z
The nice thing about a market that competes for blockspace is that nobody needs to make a determination about what is spam and what isn't (which is highly undesirable... how do you prevent such a system from being abused for targetted censorship?).
Pieter Wuille
CC BY-SA 4.0
2021-01-24T07:05:03.837Z
@ieatpizza If we enforce a minimum fee and burn the transaction fee wouldn't that preempt miners from including transactions that send Bitcoins to themselves? Are there other ways a miner might choose to overwhelm the network with spam/junk data?
David Lynch
CC BY-SA 4.0
2021-01-24T07:17:03.487Z
@DavidLynch That would come with its own set of problems (how do you motivate miners to keep mining once the block reward is no longer sufficient to cover costs? how will the bitcoin that is now being burned every time be replenished, eventually we will run out if we keep removing them from circulation? etc.) It is not a sustainable option.
ieatpizza
CC BY-SA 4.0
2021-01-24T16:34:28.710Z
@ieatpizza the obvious solution to both of the stated problems is to cont giving miners block rewards. Think about this: Right now the avg miner gets approx. 4% of their total reward from transaction fees - it is an utterly insignificant portion of the reward. When reward falls to zero it means that 96% of the network would need to stop mining so the 4% could break even. So 96% less secure when that happens. The alternative is to increase the transaction fee by 2,500% when it's already considered very high for most small to medium transactions. Imagine paying $125 to send BTC instead of $5..
David Lynch
CC BY-SA 4.0
2021-01-24T16:55:37.263Z
@DavidLynch Your proposed solution is to take away one of the main selling points of BTC. The way it's set up right now is meant to limit BTC inflation, and it's not likely the majority of BTC users, many of whom see BTC as an asset to protect against arbitrary inflation, are going to agree with a fork that would allow such extreme inflation. It would ruin the value of all existing coins. As for future, more sustainable alternatives to proof-of-work mining, I prefer moving to a proof-of-stake algorithm eventually, but it's debatable. But, this is probably a topic for another question. :)
ieatpizza
CC BY-SA 4.0
2021-01-24T18:12:42.090Z
@ieatpizza It seems that the notion of using Bitcoin as a form of payment is in direct conflict with the notion of using Bitcoin as a store of value. We need to decide which use case is more important. If Bitcoin is used mainly as form of payment (instead of long term store of value) inflation shouldn't be much of an issue.. Also it would be possible to set the miner fee to the average transaction burn rate over the last two weeks (just as we dynamically re-adjust the hash complexity based on total network hashing power) but perhaps this should be the subject of a new question?
David Lynch
CC BY-SA 4.0
2021-01-24T18:19:43.233Z
But why? There is no need for all of these transactions to take place on-chain. Lightning Network exists and will continue to get better. The problems you're describing already have solutions.
ieatpizza
CC BY-SA 4.0
2021-01-24T05:40:42.130Z
2021-01-24T05:40:42.130Z
ieatpizza
<p><a href="https://en.wikipedia.org/wiki/Bitcoin_Unlimited" rel="nofollow noreferrer">Wikipedia</a> explains the rationale behind the 1 MB block size limit as follows:</p>
<blockquote>
<p>The one megabyte block size limit was added in 2010 by Satoshi
Nakamoto as a temporary anti-DoS measure</p>
</blockquote>
<p>A <a href="https://bitcoin.stackexchange.com/questions/57120/why-does-a-larger-block-size-infer-a-bigger-attack-vector/78978#78978">SE post</a> expounds on this:</p>
<blockquote>
<p>Usually Denial Of Service(DoS) attack may take place on larger sized
blocks. So to avoid this condition initially block size Bitcoin was
chosen to be 1Mb. Because attacker sends a lot of data in the network
to make it busy so that the actual transactions are not able to take
place</p>
</blockquote>
<p>What I don't understand is:</p>
<p><strong>1)</strong> What stops an attacker from sending illegitimate transactions to quickly filling up the 1 Mb block size in order to perform a DoS attack? What is it about bigger block size that makes this attack more likely?</p>
<p><strong>2)</strong> Is there a way to empirically demonstrate that a block size of 1 Mb is less likely to suffer a DoS attack compared to a block size of say 1 GB?</p>
<p>Considering the block size is one of the biggest bottle necks to BTC scalability it seems like a no-brainer that something like has to be proven. A block size of 1 GB would be able to process 1,000 x more transactions per sec compared to a block size of 1 mb.</p>
<p>Thanks</p>

CC BY-SA 4.0
2021-01-24T05:31:04.590Z
You're misunderstanding: this is about DoS concerns on validating nodes, who need to process all transactions in all blocks, keep up with the network, and the ability for nodes to validate history. It isn't about the ability for transactions creators to get their transactions accepted; that's just a free market where everyone can bid for the available space - there are no illegitimate transactions from that perspective.
Pieter Wuille
CC BY-SA 4.0
2021-01-24T11:40:14.600Z
The question links to the BU Wikipedia page. This has nothing to do with Bitcoin. Any amateur or scammer can take the Bitcoin source and proclaim their own coin, including revisionist history.
Jannes
<bitcoin-core><blockchain><security><block><bitcoin-core-development>
1 MB Block Size as a Anti-DoS Attack Measure
S.O.S
# 1 MB Block Size as a Anti-DoS Attack Measure

(Asked by: username_0 on 2021-01-24)

[Wikipedia](https://en.wikipedia.org/wiki/Bitcoin_Unlimited) explains the rationale behind the 1 MB block size limit as follows:

> The one megabyte block size limit was added in 2010 by Satoshi
> Nakamoto as a temporary anti-DoS measure

A [SE post](https://bitcoin.stackexchange.com/questions/57120/why-does-a-larger-block-size-infer-a-bigger-attack-vector/78978#78978) expounds on this:

> Usually Denial Of Service(DoS) attack may take place on larger sized
> blocks. So to avoid this condition initially block size Bitcoin was
> chosen to be 1Mb. Because attacker sends a lot of data in the network
> to make it busy so that the actual transactions are not able to take
> place

What I don't understand is:

**1)** What stops an attacker from sending illegitimate transactions to quickly filling up the 1 Mb block size in order to perform a DoS attack? What is it about bigger block size that makes this attack more likely?

**2)** Is there a way to empirically demonstrate that a block size of 1 Mb is less likely to suffer a DoS attack compared to a block size of say 1 GB?

Considering the block size is one of the biggest bottle necks to BTC scalability it seems like a no-brainer that something like has to be proven. A block size of 1 GB would be able to process 1,000 x more transactions per sec compared to a block size of 1 mb.

Thanks

**Tags:** bitcoin-core, blockchain, security, block, bitcoin-core-development

> **Comments:**
> **username_1**: You're misunderstanding: this is about DoS concerns on validating nodes, who need to process all transactions in all blocks, keep up with the network, and the ability for nodes to validate history. It isn't about the ability for transactions creators to get their transactions accepted; that's just a free market where everyone can bid for the available space - there are no illegitimate transactions from that perspective.  
> **username_2**: The question links to the BU Wikipedia page. This has nothing to do with Bitcoin. Any amateur or scammer can take the Bitcoin source and proclaim their own coin, including revisionist history.  

---

## 1 answers

### Answer by username_3 on 2021-01-24. Score: 5

The DoS the block size limitation is trying to prevent is a miner creating a huge block of garbage data that now every single Bitcoin miner must download, validate, and store the entirety of. Imagine if some miner decided to create block after block of 1GB of garbage, and now every single Bitcoin node in the world must store and validate all of this garbage. If it were possible, this would be in the best interests of larger miners to do: smaller miners, who don't have the ability to download and validate these giant blocks of garbage as efficiently, will not be able to keep up with mining.

Also, people do attempt to submit spam to the blockchain. Trying to do so to the point of blocking out legitimate transactions will be quite expensive, considering you would have to pay transaction fees for every "spam" transaction you want to send.

> **Comments:**
> **username_0**: @ username_3 thanks for your reply. If you could clarify **1)** If the block turns out to be "garbage" (by that you mean it would contain invalid transactions or just missing/fake hash?) the miner won't get reward so wouldn't that reduce his incentive to do so? **2)** what stops a miner from repeatedly producing  garbage blocks of 1 MB? True, it is easier/faster to download/process but  what stops a miner from producing thousands of illegitimate blocks? **3)** What is the main bottleneck here - bandwidth, processing (CPU) or storage (hard drive)?  
> **username_3**: @username_0 1) By garbage data in blocks I mean some miner mining a valid block but including spam transactions (such as transactions that include a large amount of junk data). They still get the block reward since it is still a valid block, they are just missing out on transaction fees from legitimate transactions. 2) Because the profit margins are already so low, and by doing so they lose out on the fees that make up a large portion of their profit. If they won't take that profit, another miner will. 3) All 3, although I expect bandwidth and storage are the most expensive.  
> **username_0**: thanks for the clarification. From a purely tech perspective, wouldn't it be possible to detect when a miner includes "spam" data (or "junk data" as you call it) and have the nodes reject these kind of blocks (in order to disincentives miners from doing this)?  
> **username_3**: @username_0 No. We could block people from including certain types of unspendable outputs (like the people who are including arbitrary data using `OP_RETURN` outputs), but a miner could also just include transactions that send Bitcoins to themselves to fill the block in that case. It looks like an ordinary transaction on a technical level, but hopefully you can agree that this is spam.  
> **username_1**: The nice thing about a market that competes for blockspace is that nobody needs to make a determination about what is spam and what isn't (which is highly undesirable... how do you prevent such a system from being abused for targetted censorship?).  
> **username_4**: @username_3 If we enforce a minimum fee and burn the transaction fee wouldn't that preempt miners from including transactions that send Bitcoins to themselves? Are there other ways a miner might choose to overwhelm the network with spam/junk data?  
> **username_3**: @username_4 That would come with its own set of problems (how do you motivate miners to keep mining once the block reward is no longer sufficient to cover costs? how will the bitcoin that is now being burned every time be replenished, eventually we will run out if we keep removing them from circulation? etc.) It is not a sustainable option.  
> **username_4**: @username_3 the obvious solution to both of the stated problems is to cont giving miners block rewards. Think about this: Right now the avg miner gets approx. 4% of their total reward from transaction fees - it is an utterly insignificant portion of the reward. When reward falls to zero it means that 96% of the network would need to stop mining so the 4% could break even. So 96% less secure when that happens. The alternative is to increase the transaction fee by 2,500% when it's already considered very high for most small to medium transactions. Imagine paying $125 to send BTC instead of $5..  
> **username_3**: @username_4 Your proposed solution is to take away one of the main selling points of BTC. The way it's set up right now is meant to limit BTC inflation, and it's not likely the majority of BTC users, many of whom see BTC as an asset to protect against arbitrary inflation, are going to agree with a fork that would allow such extreme inflation. It would ruin the value of all existing coins. As for future, more sustainable alternatives to proof-of-work mining, I prefer moving to a proof-of-stake algorithm eventually, but it's debatable. But, this is probably a topic for another question. :)  
> **username_4**: @username_3 It seems that the notion of using Bitcoin as a form of payment is in direct conflict with the notion of using Bitcoin as a store of value. We need to decide which use case is more important. If Bitcoin is used mainly as form of payment (instead of long term store of value) inflation shouldn't be much of an issue.. Also it would be possible to set the miner fee to the average transaction burn rate over the last two weeks (just as we dynamically re-adjust the hash complexity based on total network hashing power) but perhaps this should be the subject of a new question?  
> **username_3**: But why? There is no need for all of these transactions to take place on-chain. Lightning Network exists and will continue to get better. The problems you're describing already have solutions.  

---

