<p>It's not done every 14 days - it's done every 2016 blocks, which will happen in 14 days if hashpower stays the same. If hashpower goes up, then the retarget happens sooner.</p>

CC BY-SA 3.0
2017-10-02T01:20:20.383Z
Also supercomputers wouldn't make a dent compared to today's hashrate. Likely, even the top 1000 most powerful general purpose computers together wouldn't even.
Pieter Wuille
CC BY-SA 3.0
2017-10-02T01:38:02.227Z
well, then a supercomputer can take advantage once in while. it can make 2015 blocks and then wait for the hashrate to stabilize.
Nulik
CC BY-SA 3.0
2017-10-02T04:35:53.600Z
@Nulik It would take 8 weeks for the hashrate to stabilize from that. That raises the question: why not turn on the supercomputer and mine continuously? Hardware isn't free.
Nick ODell
CC BY-SA 3.0
2017-10-02T04:52:17.807Z
@NickODell , I am exploring the possibility for the governments to attack bitcoin. They can use supercomputers to drive the difficulty so high, that the currency will be unusable, nobody would be able to withdraw or deposit because there will be no new block. Creating new block would take months, which means, bitcoin has failed its purpose.
Nulik
CC BY-SA 3.0
2017-10-02T04:52:49.393Z
so, mining is not the goal
Nulik
CC BY-SA 3.0
2017-10-02T08:35:58.283Z
@Nulik The difficulty algorithm would be adjusted. There are enough people who want bitcoin to keep working that, while it would be a bit inconvenient, they would be able to work out a change in the rules to keep things going.
David Schwartz
CC BY-SA 3.0
2017-10-02T16:21:57.500Z
You also need a LOT of power to do that. If that happens you can rather destroy bitcoin by reverting transactions. See, in order to "stop transactions for hours" you need to run like 20 or 50 times the current hashpower - otherwise you are just "inconveniently" slowing down the network, not disrupting it. That is a surreal amount of specialized hardware. You really need something that can hammer down like 2015 blocks in - half a day or so ;)
TomTom
CC BY-SA 3.0
2017-10-02T16:25:32.847Z
@TomTom: I did some reasoning on this. To break bitcoin permanently start from some weeks-old block and find the next block in the chain with the all-zeros hash if you can. All of the nodes will think your block is the next block and roll back a few weeks worth of transactions. It's not that they can't clean this up it's that they will be very worried about somebody doing that a second time with the intent to double-spend.
Joshua
CC BY-SA 3.0
2017-10-02T16:43:44.023Z
@Joshua That wouldn't work. Your chain (the one with the block you just found) is way shorter than the chain they were on previously (because it has a few weeks of additional blocks in it). The *longest* valid chain wins and your chain would be way shorter. (It's slightly more complicated than that, but that's the basic idea.)
David Schwartz
CC BY-SA 3.0
2017-10-02T17:45:22.910Z
@DavidSchwartz: It's total difficulty, and the difficulty of the all-zeros hash will be rated very high.
Joshua
CC BY-SA 3.0
2017-10-02T17:49:38.403Z
@Joshua No, it would not. You absolutely do *NOT* compute difficulty that way. It's only the difficulty *required* that you count.
David Schwartz
CC BY-SA 3.0
2017-10-02T19:45:44.560Z
The system is designed so that attempting attacks in simplistic ways like re mining an old block from a few weeks ago would not work.  If this was possible bitcoin would be effectively useless as a reliable store of value, and this form of attack would most likely have occurred by now.
DanielSon
CC BY-SA 3.0
2017-10-02T23:49:57.440Z
@Nulik - if a government wanted to destroy bitcoin - or any cryptocurrency - all they need to do is pass a law, then enforce it.  It wouldn't be hard.  And IMO, it's going to be inevitable, because neither governments nor banks will want to deal with the loss of power.
davidbak
CC BY-SA 3.0
2017-10-03T00:11:43.937Z
@davidbak No single government can destroy bitcoin for the same reason they can't destroy the Internet. They could disconnect their own country from the system, to the extent their enforcement actually worked.
David Schwartz
CC BY-SA 3.0
2017-10-03T03:36:03.637Z
@DavidSchwartz. Why it wouldn't work? 2015 blocks are created every 2 weeks. Let's suppose I have super-puper computer at home, thousands of times faster that current bitcoin network of all the nodes within it. With my super-puper computer I could create 2015 blocks of last 2 weeks in a few minutes. Then I will create another 2015 blocks , my chain of blocks will be larger and it will accepted. And probably only after that my super-puper computer will have difficulties to calculate new blocks due to the difficulty. Why do you say it is not possible? Theoretically it is.
Nulik
CC BY-SA 3.0
2017-10-03T03:38:03.693Z
@DavidSchwartz and you would erase 2 weeks of transactions this way. What a horrible technology is this blockchain algorithm if you can lose transactions you made in the past
Nulik
CC BY-SA 3.0
2017-10-03T04:16:36.980Z
@Nulik There are a number of reasons that won't actually work. Ask your own question and I'll explain it.
David Schwartz
CC BY-SA 3.0
2017-10-03T05:01:52.137Z
@DavidSchwartz, okay, here it is: https://bitcoin.stackexchange.com/questions/60234/rewriting-past-transactions-in-bitcoin
Nulik
CC BY-SA 3.0
2017-10-02T01:12:22.227Z
2017-10-02T01:12:22.227Z
Nick ODell
<p>It would take the power out put of a 30GW power plant for 3months and 49 qibits running of GPU to start from the gen block Jan 3rd 2009 up to date giving 2 months of mining the chain into oblivion. Thus collapsing the bitcoin. </p>

<p>"IBM has come up with a way to simulate quantum computers that have 56 quantum bits, or qubits, on a non-quantum supercomputer – a task previously thought to be impossible."</p>

<p>Set back and watch for a time and price a GOV backed attack takes place and evaporates the bitcoin barter business. In return causing a market dump of all blockchain and etherum platted trade.  </p>

CC BY-SA 3.0
2017-11-05T00:49:24.563Z
2017-11-05T00:49:24.563Z
user63631
<p>"<strong>TL;DR:</strong> Bitcoin mining is virtually immune to someone attacking it with a supercomputer, because the mining market is already flooded with supercomputers custom tailored to the job at the hardware level."<br>
<sub>(via Cort Ammon in comments)</sub></p>

<hr>

<p>First of all, the difficulty reset happens after 2016 blocks. That's only after about 14 days if the hashrate is stable. When there is a steep increase in mining power the difficulty will therefore adjust much more quickly. The difficulty change is limited to a factor of four, so e.g. if the hashrate increased by a factor ten (at the start of a difficulty period), the difficulty would increase by a factor four after 1.4 days, and then again by a factor of 2.5 after 5.6 days, so that it would have adjusted a factor of 10 after only one week. Since the adjustment is an exponential function, the network can similarly adjust to even bigger jumps. You are correct however, that if the hashpower left at that point, the network could get stuck. </p>

<p>Luckily, supercomputers are not effective at producing Bitcoin blocks. For Bitcoin blocks, the only operation that needs to be churned endlessly is a double SHA-256 hash. And that's exactly what Bitcoin ASIC miner hardware does, their chips have the necessary algorithm implemented in hardware and are therefore exclusively designed to calculate Bitcoin blocks. This is what makes even a single contemporary ASIC faster than thousands of computers.</p>

<p>The window for supercomputers to take over Bitcoin mining closed some time in 2012 or 2013. Today, the Bitcoin network produces about 10 exahashes/s. To my knowledge, the most cost effective miners come at about $100 per TH/s which translates to a magnitude of one billion USD invested in Bitcoin mining hardware alone.</p>

CC BY-SA 3.0
2017-10-02T04:55:57.203Z
there are GPU supercomputers. or, you could also make your own ASICs to attack bitcoin, how much would you need? around 100k USD, that is not much, considering that all discovered blocks would pay for the ASICs during the period you would be attacking it.
Nulik
CC BY-SA 3.0
2017-10-02T05:06:01.287Z
You severely underestimate the mining power of the Bitcoin network. ;) I've amended my answer to address your comment.
Murch
CC BY-SA 3.0
2017-10-02T07:22:50.343Z
Does that cost factor in the amount of power consumed by those miners?
Shadur-don't-feed-the-AI
CC BY-SA 3.0
2017-10-02T07:26:59.550Z
No just a guesstimate for the hardware acquisition cost. Although, miners producing for themselves probably would have lower costs.
Murch
CC BY-SA 3.0
2017-10-02T16:19:21.700Z
Wrong answer - it does not address the main poiint (getting all Bitcoin before the 14 day pass) which is false to start with.
TomTom
CC BY-SA 3.0
2017-10-02T17:16:51.010Z
@TomTom: Thanks, I've added a paragraph to address that part of the question.
Murch
CC BY-SA 3.0
2017-10-02T17:37:46.297Z
Tl/Dr: Bitcoin mining is virtually immune to someone attacking it with a supercomputer, because the mining market is already flooded with supercomputers custom tailored to the job at the hardware level.  (similar argument: what prevents someone with a gun from going onto an airforce base and taking a modern F-22 fight?  Answer: the Airforce base has more guns than he does)
Cort Ammon
CC BY-SA 3.0
2017-10-02T18:14:08.993Z
@CortAmmon: Thanks, I've added your summary to my answer.
Murch
CC BY-SA 3.0
2017-10-09T02:19:15.073Z
@Shadur Power is indeed a significant issue. That is why Iceland is a particularly good location for Bitcoin mining. It has cheap power, and plenty of cold air. See [We got a look inside a vast Icelandic bitcoin mine](http://www.businessinsider.com/photos-iceland-bitcoin-ethereum-mine-genesis-mining-cloud-2016-6?r=UK&IR=T/#these-photos-are-from-genesis-mining-a-cloud-mining-company-it-lets-customers-mine-using-its-cloud-without-having-to-buy-specialised-hardware-1).
Patricia Shanahan
CC BY-SA 3.0
2017-10-02T04:36:13.040Z
2017-10-03T04:05:50.623Z
2017-10-03T04:05:50.623Z
Murch
<p>The difficulty in Bitcoin is recalculated every 14 days. What if immediately after this difficulty adjustment someone targets Bitcoin nodes with a supercomputer and start creating new blocks?</p>

<p>Such attack can create some many bitcoin to complete the series to the 21 million bitcoins before the 14 days pass by. Then the difficulty will be recalculated and it is going to result sky high, because of so many blocks were generated in the previous cycle.</p>

<p>But after that the super computer is disconnected, and the Bitcoin network (all nodes that were mining prior the attack) will have no power to create another block. The network will stall. The interest in mining Bitcoin will disappear and nobody would be able to withdraw anything, since you would need a supercomputer to create the next block, or wait for hundreds of years for the next block to come.</p>

<p>Is there any error in my reasoning? Is this scenario possible?</p>

CC BY-SA 3.0
2017-10-02T17:11:01.517Z
Related: [Why can't they use super computers to mine all the bitcoins?](https://bitcoin.stackexchange.com/q/28228/5406)
Murch
<bitcoin-core><bitcoind><attack>
Attacking Bitcoin with a supercomputer
Nulik
# Attacking Bitcoin with a supercomputer

(Asked by: username_0 on 2017-10-02)

The difficulty in Bitcoin is recalculated every 14 days. What if immediately after this difficulty adjustment someone targets Bitcoin nodes with a supercomputer and start creating new blocks?

Such attack can create some many bitcoin to complete the series to the 21 million bitcoins before the 14 days pass by. Then the difficulty will be recalculated and it is going to result sky high, because of so many blocks were generated in the previous cycle.

But after that the super computer is disconnected, and the Bitcoin network (all nodes that were mining prior the attack) will have no power to create another block. The network will stall. The interest in mining Bitcoin will disappear and nobody would be able to withdraw anything, since you would need a supercomputer to create the next block, or wait for hundreds of years for the next block to come.

Is there any error in my reasoning? Is this scenario possible?

**Tags:** bitcoin-core, bitcoind, attack

> **Comments:**
> **username_1**: Related: [Why can't they use super computers to mine all the bitcoins?](https://bitcoin.stackexchange.com/q/28228/5406)  

---

## 3 answers

### Answer by username_1 on 2017-10-02. Score: 24 | Accepted answer

"**TL;DR:** Bitcoin mining is virtually immune to someone attacking it with a supercomputer, because the mining market is already flooded with supercomputers custom tailored to the job at the hardware level."  
(via username_11 in comments)

---

First of all, the difficulty reset happens after 2016 blocks. That's only after about 14 days if the hashrate is stable. When there is a steep increase in mining power the difficulty will therefore adjust much more quickly. The difficulty change is limited to a factor of four, so e.g. if the hashrate increased by a factor ten (at the start of a difficulty period), the difficulty would increase by a factor four after 1.4 days, and then again by a factor of 2.5 after 5.6 days, so that it would have adjusted a factor of 10 after only one week. Since the adjustment is an exponential function, the network can similarly adjust to even bigger jumps. You are correct however, that if the hashpower left at that point, the network could get stuck.

Luckily, supercomputers are not effective at producing Bitcoin blocks. For Bitcoin blocks, the only operation that needs to be churned endlessly is a double SHA-256 hash. And that's exactly what Bitcoin ASIC miner hardware does, their chips have the necessary algorithm implemented in hardware and are therefore exclusively designed to calculate Bitcoin blocks. This is what makes even a single contemporary ASIC faster than thousands of computers.

The window for supercomputers to take over Bitcoin mining closed some time in 2012 or 2013. Today, the Bitcoin network produces about 10 exahashes/s. To my knowledge, the most cost effective miners come at about $100 per TH/s which translates to a magnitude of one billion USD invested in Bitcoin mining hardware alone.

> **Comments:**
> **username_0**: there are GPU supercomputers. or, you could also make your own ASICs to attack bitcoin, how much would you need? around 100k USD, that is not much, considering that all discovered blocks would pay for the ASICs during the period you would be attacking it.  
> **username_1**: You severely underestimate the mining power of the Bitcoin network. ;) I've amended my answer to address your comment.  
> **username_10**: Does that cost factor in the amount of power consumed by those miners?  
> **username_1**: No just a guesstimate for the hardware acquisition cost. Although, miners producing for themselves probably would have lower costs.  
> **username_5**: Wrong answer - it does not address the main poiint (getting all Bitcoin before the 14 day pass) which is false to start with.  
> **username_1**: @username_5: Thanks, I've added a paragraph to address that part of the question.  
> **username_11**: Tl/Dr: Bitcoin mining is virtually immune to someone attacking it with a supercomputer, because the mining market is already flooded with supercomputers custom tailored to the job at the hardware level.  (similar argument: what prevents someone with a gun from going onto an airforce base and taking a modern F-22 fight?  Answer: the Airforce base has more guns than he does)  
> **username_1**: @username_11: Thanks, I've added your summary to my answer.  
> **username_12**: @Shadur Power is indeed a significant issue. That is why Iceland is a particularly good location for Bitcoin mining. It has cheap power, and plenty of cold air. See [We got a look inside a vast Icelandic bitcoin mine](http://www.businessinsider.com/photos-iceland-bitcoin-ethereum-mine-genesis-mining-cloud-2016-6?r=UK&IR=T/#these-photos-are-from-genesis-mining-a-cloud-mining-company-it-lets-customers-mine-using-its-cloud-without-having-to-buy-specialised-hardware-1).  

---

### Answer by username_2 on 2017-10-02. Score: 8

It's not done every 14 days - it's done every 2016 blocks, which will happen in 14 days if hashpower stays the same. If hashpower goes up, then the retarget happens sooner.

> **Comments:**
> **username_3**: Also supercomputers wouldn't make a dent compared to today's hashrate. Likely, even the top 1000 most powerful general purpose computers together wouldn't even.  
> **username_0**: well, then a supercomputer can take advantage once in while. it can make 2015 blocks and then wait for the hashrate to stabilize.  
> **username_2**: @username_0 It would take 8 weeks for the hashrate to stabilize from that. That raises the question: why not turn on the supercomputer and mine continuously? Hardware isn't free.  
> **username_0**: @username_2 , I am exploring the possibility for the governments to attack bitcoin. They can use supercomputers to drive the difficulty so high, that the currency will be unusable, nobody would be able to withdraw or deposit because there will be no new block. Creating new block would take months, which means, bitcoin has failed its purpose.  
> **username_0**: so, mining is not the goal  
> **username_4**: @username_0 The difficulty algorithm would be adjusted. There are enough people who want bitcoin to keep working that, while it would be a bit inconvenient, they would be able to work out a change in the rules to keep things going.  
> **username_5**: You also need a LOT of power to do that. If that happens you can rather destroy bitcoin by reverting transactions. See, in order to "stop transactions for hours" you need to run like 20 or 50 times the current hashpower - otherwise you are just "inconveniently" slowing down the network, not disrupting it. That is a surreal amount of specialized hardware. You really need something that can hammer down like 2015 blocks in - half a day or so ;)  
> **username_6**: @username_5: I did some reasoning on this. To break bitcoin permanently start from some weeks-old block and find the next block in the chain with the all-zeros hash if you can. All of the nodes will think your block is the next block and roll back a few weeks worth of transactions. It's not that they can't clean this up it's that they will be very worried about somebody doing that a second time with the intent to double-spend.  
> **username_4**: @username_6 That wouldn't work. Your chain (the one with the block you just found) is way shorter than the chain they were on previously (because it has a few weeks of additional blocks in it). The *longest* valid chain wins and your chain would be way shorter. (It's slightly more complicated than that, but that's the basic idea.)  
> **username_6**: @username_4: It's total difficulty, and the difficulty of the all-zeros hash will be rated very high.  
> **username_4**: @username_6 No, it would not. You absolutely do *NOT* compute difficulty that way. It's only the difficulty *required* that you count.  
> **username_7**: The system is designed so that attempting attacks in simplistic ways like re mining an old block from a few weeks ago would not work.  If this was possible bitcoin would be effectively useless as a reliable store of value, and this form of attack would most likely have occurred by now.  
> **username_8**: @username_0 - if a government wanted to destroy bitcoin - or any cryptocurrency - all they need to do is pass a law, then enforce it.  It wouldn't be hard.  And IMO, it's going to be inevitable, because neither governments nor banks will want to deal with the loss of power.  
> **username_4**: @username_8 No single government can destroy bitcoin for the same reason they can't destroy the Internet. They could disconnect their own country from the system, to the extent their enforcement actually worked.  
> **username_0**: @username_4. Why it wouldn't work? 2015 blocks are created every 2 weeks. Let's suppose I have super-puper computer at home, thousands of times faster that current bitcoin network of all the nodes within it. With my super-puper computer I could create 2015 blocks of last 2 weeks in a few minutes. Then I will create another 2015 blocks , my chain of blocks will be larger and it will accepted. And probably only after that my super-puper computer will have difficulties to calculate new blocks due to the difficulty. Why do you say it is not possible? Theoretically it is.  
> **username_0**: @username_4 and you would erase 2 weeks of transactions this way. What a horrible technology is this blockchain algorithm if you can lose transactions you made in the past  
> **username_4**: @username_0 There are a number of reasons that won't actually work. Ask your own question and I'll explain it.  
> **username_0**: @username_4, okay, here it is: https://bitcoin.stackexchange.com/questions/60234/rewriting-past-transactions-in-bitcoin  

---

### Answer by username_9 on 2017-11-05. Score: 0

It would take the power out put of a 30GW power plant for 3months and 49 qibits running of GPU to start from the gen block Jan 3rd 2009 up to date giving 2 months of mining the chain into oblivion. Thus collapsing the bitcoin.

"IBM has come up with a way to simulate quantum computers that have 56 quantum bits, or qubits, on a non-quantum supercomputer – a task previously thought to be impossible."

Set back and watch for a time and price a GOV backed attack takes place and evaporates the bitcoin barter business. In return causing a market dump of all blockchain and etherum platted trade.


---

