user92394: I was shocked to see binance CZ comment to literally "roll back" the bitcoin chain by just "calling" in some favors from "friendly" Asian miners . 
This ONE person could effectively do it???  I mean are we all in a bubble, in some kind of utopia then, to think that the chain's decentralization makes it "bulletproof" and resistant to collusion by miners?
(1) This is fundamental question:  How are our highly regarded and brilliant Devs of bitcoin explaining such situation where only a handful of persons´ interests could essentially be enough to do a majority 51% attack?
(2) And secondly, are there active debates about how to mitigate such situation in the future, what technical aspects implemented in the btc chain (or to be implemented) could be helpful?
This huge mining farms are essentially very disturbing. it is like  in proof of stake , where the "richest" has most power. And in the PoW mining case , its similiar just that the "biggest hardware" has most power.
we have to try somehow to eliminate such easily corruptible scenarios, right? 
in todays digital world, there are plenty of collusion examples of even more than 1000 different persons involved. 
Handful of colluding majority miners would be a piece of cake, right?
Thank you for explaining to me this issue . I hope sincerely that this is taken up by our awesome dev community, or maybe I am just misunderstanding everything. 

user341: There a are a few things to take into account when we consider the probabilities of a rollback attack (a posteriori reorg destroying net value) to be successful:

If the reorg is shallower than 100 blocks (COINBASE_MATURITY), the attacker can minimize the amount of direct victims. But if we are talking about a deeper one, not only the payments he wants to revert may have been spent, mixed with additional inputs and all those coins owned by other innocent people, this would also apply to coinbases earned by honest miners. The longer it takes to perform the reorg, the higher the amount of victims and their value at stake.
The attack may take a long time. The fraction of miners participating (via direct control or bribes) and the amount of blocks to revert will determine how long.
For example, to revert 6 blocks (1 hour worth of confirmations) before coinbases start maturing, the attacker will need to get immediate control over 51.5% of the hashing power. If he falls short of that percentage or requires more time to convince some of the miners, it will take him over 33 hours and reverting more than 100 blocks in total, so rewards from the first blocks may have been mixed and spent already, tainting UTXOs worth much more.



If the attack uses existing mining capacity, during the time it takes to reorg the chain, the capacity of the longest chain will be reduced to less than half (slower block production). Every transaction valuable enough to be processed will need to adjust its fees, at least up to the marginal utility defined by the least valuable transactions included in the less frequent blocks. These transactions were paying a lower fee before, as it was enough to ensure confirmation. You can expect this to have a positive impact on total revenue for miners. Higher rewards on the honest chain will put additional pressure on miners carrying the attack.



A significant reorg does not only affect direct victims, every bitcoin holder would be affected due to a diminished confidence in the system, a reduction in Bitcoin utility and a drop in the price of the coins as a consequence.
PoW is a trust-minimized market signal enabling us to scale social consensus. But,  if somebody builds a heavier chain with a lower value, breaking PoW trust-minimization, users can choose not to follow it and make a UASF, invalidating the reorg:
$ bitcoin-cli invalidateblock "blockhash"
Coins in each chain are only as valuable as their chances to become part of the winning one. Miners coordination to carry the attack, higher fees in the longer/honest chain and UASF risk during the reorg are all factors against reorg-coins having as much value as those in the honest chain. This makes even more challenging to use them to bribe miners.

How can we make reorgs even more difficult? @LukeDashjr provided the first two of these ideas, that would help us achieve stronger immutability:

If users set individual checkpoints in their nodes, this would discourage reorg attempts and split the chain if one happens, leaving it for market to discover the value of each chain when PoW consensus assumptions break down.
Use pool swapping rule introduced by BFGMiner to prevent miners from wasting work on stale blocks. If one pool implements a reorg policy (even if it is trying to earn bribes), miners will refuse to ditch previously validated blocks and switch to a pool working on the newest block.
@TheBlueMatt's BetterHash mining protocol would have a similar effect, making practically impossible for mining pools to enforce an ordering of transactions, hence removing their ability to censor some of them.
The more independent miners, the more difficult it will be for anybody to coordinate them and try to 51% attack the network with existing mining capacity. Currently over 40% and growing.


But not every reorg is an attack destroying net value. We have examples when the blockchain was reorged, discarding some PoW as worthless, because it was economically rational to do so and avoid a greater damage:

On 15 Aug 2010, output-value-overflow bug created 184.5 billion BTC. Around 5 hours after the incident (30 blocks), a fix was released: client 0.3.10. It is believed that 51 blocks were reorged in total (>70% of the hashing power mined the alternative chain during ~12 hours). 2250 BTC in rewards were lost.
On 11 Mar 2013, migration from Berkeley DB to LevelDB caused a 6 hours chainsplit at block 225430. The 0.8.0 chain reached a maximum lead of 13 blocks over 0.7.2 at block 225451, but it was abandoned and reorged at block 225454. 600 BTC in rewards were lost.


user63872: I want to add a little bit to the coordination problem that @PiererWuille mentioned. 
Not only does the probabilistic success of a rollback depend on the ability of miners and affected parties to coordinate, it also requires that individual miners must trust one another to participate in the rollback. 
Consider this: If I had a significant portion of the hashpower, and I wanted my competitors to waste their resources mining a chain that will not end up being accepted, then why wouldn’t I just pretend that I was going to mine a rollback chain, but then actually keep working on the already-established chain? If the parties invested in a rollback were counting on my hashpower to succeed in their plan, then by not participating in the rollback I would guarantee its failure, and increase my profits at the same time (since less hashpower would be working on the already-accepted chain). 
So coordination is tough beyond just actually contacting and coordinating with the other parties involved. The safest bet continues to be mining at the tip of the most-work chain. 

user52021: (adding some color) Some discussion I saw suggested that people promoting this believed they only needed to achieve >50% hashpower, which caused them to overestimate the feasibility. Reorging with only slightly over 50% would take weeks-- even months, creating massive disruption if successful, and virtually guaranteeing an effective public initiative to block it.  In such an event once the rollback began, users would advise each other to use the 'invalidateblock' debugging command to make their nodes ignore it. [I also had multiple users ask me to review patches ahead of the fork that would have blocked it, I told them I thought they were over-reacting and that this was a nothing burger. :)-- but a patch would only be needed before a fork existed, and clearly people were ready to start responding to this only on the basis of twitter chatter]

user208: Disclaimer: I believe this question may be primarily opinion-based and not very appropriate for this site, but there are a number of technical misunderstandings that can be clarified along with it, so I'll give it a shot.
There are many nuances involved here, and I fear that a large part of them didn't reach as much of an audience as the exchange announcing "we decided not to do it". I believe this was a poor choice of words, as the decision they made wasn't whether or not to roll back the chain; only whether or not to offer a bounty for doing so. I personally believe it would be very unlikely that the alternative would have actually resulted in a deep rollback.
Let's analyze the situation from a number of perspectives.
If we only consider miner's actions, is it theoretically possible for them to roll back the chain? Yes. If you're wondering if there is a small number of mining company CEOs in the world, which, if all together convinced, with complete disregard for their own financial interests, the health of the network, or legal repercussions, could decide to roll back the chain to a point before the theft, the answer is yes. This is the reason why people care about mining decentralization, and permissionlessness of entering the mining market. However, unless it's not just a majority of the hash rate that is on board with this, but actually close to all the network's hashrate (a substantially harder problem, as there are many small miners in addition to the few big ones), this would likely have take days or even weeks (if it's close to 50%), a time during which many things can happen - including a public outcry and a UASF-style fork to prevent the rollback from being accepted by the ecosystem. If considered over an even bigger timescale, events like this may even incentivize people and businesses to become miners, in order to reduce the influence of large pools.
Assuming miners maximize short-short term profit, would it be financially interesting to rollback? No. Even if we assume that everyone in the network is acting selfishly to try to maximize their own (short-term) profit, and ignores the protocol rules and the possible repercussions from doing so, it is not. By the time the information about the theft became known, the transaction was already confirmed several hours before. During those hours, miners had created dozens of blocks, which together earned several hundred BTC in subsidy and fees. The exchange would need to offer at least that amount to the affected miners, to compensate them for the income they'd lose from rolling back those blocks, before it would even be worth discussing. Let's call this the rollback cost R. As the stolen amount was in the thousands (let's call this S), that seems like a reasonable option. However, nothing prevents the thief from using (part of) the stolen funds to do the same. Every BTC offered by the exchange above R can be countered by an equivalent amount offered by the thief. And then it becomes clear that the thief has the upper hand: the exchange can at most gain S-R by a rollback, but the thief stands to gain S by not having a rollback. A theoretical possibility is a bidding war between the exchange and the thief, where both increase the amount paid to make miners act in their favor. The end game of this is that the exchange offers S-R, the thief offers slightly more and keeps R, and miners are paid S-R by the thief, and no rollback happens.
What would happen in the real world? Theoretical models are interesting to study, but in reality many more practical considerations exist. I believe those too are generally in favor of no rollback:

Coordination between distrusting miners (especially close 100% hashrate) is hard, and would take time. The more time it takes, the less advantageous a rollback becomes (see the above point), and the more damage would be done to the ecosystem (see the next point).
An hours-long (in the very best case) or a weeks-long (in the worst case) rollback would monumentally hurt the ecosystem, and likely undermine the public's confidence in the system to the extent that it would severely reduce the profitability of many parties involved (including miners and the exchange itself!).
Even ignoring all the above, miners may not be willing to take a bribe to rollback because of legal reasons if they're publicly known (which they mostly currently are). They may equally not want to take stolen money as a bribe, so this cuts in both directions. This point becomes weaker if the mining ecosystem is more decentralized, but that would also make coordination harder.
As I pointed out above, in the extreme scenario where such a rollback is actually happening, the public has time to react. If a sufficiently large group of economically relevant parties in the network refuse to accept the rollback, miners have no choice but to go along with that. This is a last-resort option, and likely damaging to the ecosystem on its own, but it is an option.

So to summarize: in theory there are absolutely ways in which a rollback could happen, and it's good to be aware of those. In reality, the security of the system relies on economic incentives already which are nontrivial to analyze. It however seems very unlikely that in the case of a theft a deep rollback is a reasonable outcome.

92394: <p>I was shocked to see binance CZ comment to literally "roll back" the bitcoin chain by just "calling" in some favors from "friendly" Asian miners . </p>

<p>This ONE person could effectively do it???  I mean are we all in a bubble, in some kind of utopia then, to think that the chain's decentralization makes it "bulletproof" and resistant to collusion by miners?</p>

<p><em>(1) This is fundamental question:  How are our highly regarded and brilliant Devs of bitcoin explaining such situation where only a handful of persons´ interests could essentially be enough to do a majority 51% attack?</em></p>

<p><em>(2) And secondly, are there active debates about how to mitigate such situation in the future, what technical aspects implemented in the btc chain (or to be implemented) could be helpful?</em></p>

<p>This huge mining farms are essentially very disturbing. it is like  in proof of stake , where the "richest" has most power. And in the PoW mining case , its similiar just that the "biggest hardware" has most power.</p>

<p>we have to try <strong>somehow to eliminate such easily corruptible scenarios</strong>, right? </p>

<p>in todays digital world, there are plenty of collusion examples of even more than 1000 different persons involved. </p>

<p>Handful of colluding majority miners would be a piece of cake, right?</p>

<p>Thank you for explaining to me this issue . I hope sincerely that this is taken up by our awesome dev community, or maybe I am just misunderstanding everything. </p>
 341: <p>There a are a few things to take into account when we consider the probabilities of a rollback attack (a posteriori reorg destroying net value) to be successful:</p>

<ol>
<li><p>If the reorg is shallower than 100 blocks (<a href="https://github.com/bitcoin/bitcoin/blob/78dae8caccd82cfbfd76557f1fb7d7557c7b5edb/src/consensus/consensus.h#L19" rel="nofollow noreferrer">COINBASE_MATURITY</a>), the attacker can minimize the amount of direct victims. But if we are talking about a deeper one, not only the payments he wants to revert may have been spent, mixed with additional inputs and all those coins owned by other innocent people, this would also apply to coinbases earned by honest miners. <strong>The longer it takes to perform the reorg, the higher the amount of victims and their value at stake</strong>.</p></li>
<li><p><strong>The attack may take a long time</strong>. The fraction of miners participating (via direct control or bribes) and the amount of blocks to revert will determine how long.</p>

<p>For example, to revert <strong><em>6 blocks</em></strong> (1 hour worth of confirmations) before coinbases start maturing, the attacker will need to get immediate control over <strong><em>51.5% of the hashing power</em></strong>. If he falls short of that percentage or requires more time to convince some of the miners, it will take him over <strong><em>33 hours</em></strong> and reverting more than <strong><em>100 blocks</em></strong> in total, so rewards from the first blocks may have been mixed and spent already, tainting UTXOs worth much more.</p></li>
</ol>

<p><a href="https://i.stack.imgur.com/2ocYa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2ocYa.png" alt="enter image description here"></a></p>

<ol start="3">
<li>If the attack uses existing mining capacity, during the time it takes to reorg the chain, the capacity of the longest chain will be reduced to less than half (slower block production). Every transaction valuable enough to be processed will need to adjust its fees, at least up to the marginal utility defined by the least valuable transactions included in the less frequent blocks. These transactions were paying a lower fee before, as it was enough to ensure confirmation. You can expect this to have a positive impact on total revenue for miners. <strong>Higher rewards on the honest chain will put additional pressure on miners carrying the attack</strong>.</li>
</ol>

<p><a href="https://i.stack.imgur.com/NTwbH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NTwbH.png" alt="enter image description here"></a></p>

<ol start="4">
<li><p>A significant reorg does not only affect direct victims, <strong>every bitcoin holder would be affected</strong> due to a diminished confidence in the system, a reduction in Bitcoin utility and a drop in the price of the coins as a consequence.</p>

<p>PoW is a trust-minimized market signal enabling us to scale social consensus. But,  if somebody builds a heavier chain with a lower value, breaking PoW trust-minimization, users can choose not to follow it and make a UASF, invalidating the reorg:</p>

<p><code>$ bitcoin-cli invalidateblock "blockhash"</code></p></li>
<li><p><strong>Coins in each chain are only as valuable as their chances to become part of the winning one</strong>. Miners coordination to carry the attack, higher fees in the longer/honest chain and UASF risk during the reorg are all factors against reorg-coins having as much value as those in the honest chain. This makes even more challenging to use them to bribe miners.</p></li>
</ol>

<p>How can we make reorgs even more difficult? @LukeDashjr provided the <a href="https://twitter.com/fnietom/status/1126770846834388993" rel="nofollow noreferrer">first two</a> of these ideas, that would help us achieve stronger immutability:</p>

<ol>
<li>If users set <strong>individual checkpoints</strong> in their nodes, this would discourage reorg attempts and split the chain if one happens, leaving it for market to discover the value of each chain when PoW consensus assumptions break down.</li>
<li>Use <strong>pool swapping rule</strong> introduced by BFGMiner to prevent miners from wasting work on stale blocks. If one pool implements a reorg policy (even if it is trying to earn bribes), miners will refuse to ditch previously validated blocks and switch to a pool working on the newest block.</li>
<li>@TheBlueMatt's <strong>BetterHash</strong> mining protocol would have a similar effect, making practically impossible for mining pools to enforce an ordering of transactions, hence removing their ability to censor some of them.</li>
<li>The more independent miners, the more difficult it will be for anybody to coordinate them and try to 51% attack the network with existing mining capacity. Currently <a href="http://data.bitcoinity.org/bitcoin/hashrate/all?c=m&amp;g=15&amp;t=ae" rel="nofollow noreferrer">over 40% and growing</a>.</li>
</ol>

<p><a href="https://i.stack.imgur.com/TrrUK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TrrUK.png" alt="enter image description here"></a></p>

<p>But <strong>not every reorg is an attack destroying net value</strong>. We have examples when the blockchain was reorged, discarding some PoW as worthless, because it was economically rational to do so and avoid a greater damage:</p>

<ul>
<li><p>On 15 Aug 2010, output-value-overflow bug created 184.5 billion BTC. Around 5 hours after the incident (30 blocks), a fix was released: client 0.3.10. It is believed that 51 blocks were reorged in total (>70% of the hashing power mined the alternative chain during ~12 hours). 2250 BTC in rewards were lost.</p></li>
<li><p>On 11 Mar 2013, migration from Berkeley DB to LevelDB caused a 6 hours chainsplit at block 225430. The 0.8.0 chain reached a maximum lead of 13 blocks over 0.7.2 at block 225451, but it was abandoned and reorged at block 225454. 600 BTC in rewards were lost.</p></li>
</ul>
 63872: <p>I want to add a little bit to the coordination problem that @PiererWuille mentioned. </p>

<p>Not only does the probabilistic success of a rollback depend on the ability of miners and affected parties to coordinate, <em>it also requires that individual miners must <strong>trust</strong> one another to participate in the rollback</em>. </p>

<p>Consider this: If I had a significant portion of the hashpower, and I wanted my competitors to waste their resources mining a chain that will not end up being accepted, then why wouldn’t I just <em>pretend</em> that I was going to mine a rollback chain, but then actually keep working on the already-established chain? If the parties invested in a rollback were counting on my hashpower to succeed in their plan, then by <em>not</em> participating in the rollback I would guarantee its failure, and increase my profits at the same time (since less hashpower would be working on the already-accepted chain). </p>

<p>So coordination is tough beyond just actually contacting and coordinating with the other parties involved. The safest bet continues to be mining at the tip of the most-work chain. </p>
 52021: <p>(adding some color) Some discussion I saw suggested that people promoting this believed they only needed to achieve >50% hashpower, which caused them to overestimate the feasibility. Reorging with only slightly over 50% would take weeks-- even months, creating massive disruption if successful, and virtually guaranteeing an effective public initiative to block it.  In such an event once the rollback began, users would advise each other to use the 'invalidateblock' debugging command to make their nodes ignore it. [I also had multiple users ask me to review patches ahead of the fork that would have blocked it, I told them I thought they were over-reacting and that this was a nothing burger. :)-- but a patch would only be needed before a fork existed, and clearly people were ready to start responding to this only on the basis of twitter chatter]</p>
 208: <p>Disclaimer: I believe this question may be primarily opinion-based and not very appropriate for this site, but there are a number of technical misunderstandings that can be clarified along with it, so I'll give it a shot.</p>

<p>There are many nuances involved here, and I fear that a large part of them didn't reach as much of an audience as the exchange announcing "we <strong>decided</strong> not to do it". I believe this was a poor choice of words, as the decision they made wasn't whether or not to roll back the chain; only whether or not to offer a bounty for doing so. I personally believe it would be very unlikely that the alternative would have actually resulted in a deep rollback.</p>

<p>Let's analyze the situation from a number of perspectives.</p>

<p><strong>If we only consider miner's actions, is it theoretically possible for them to roll back the chain?</strong> Yes. If you're wondering if there is a small number of mining company CEOs in the world, which, if all together convinced, with complete disregard for their own financial interests, the health of the network, or legal repercussions, could decide to roll back the chain to a point before the theft, the answer is yes. This is the reason why people care about mining decentralization, and permissionlessness of entering the mining market. However, unless it's not just a majority of the hash rate that is on board with this, but actually close to all the network's hashrate (a substantially harder problem, as there are many small miners in addition to the few big ones), this would likely have take days or even weeks (if it's close to 50%), a time during which many things can happen - including a public outcry and a UASF-style fork to prevent the rollback from being accepted by the ecosystem. If considered over an even bigger timescale, events like this may even incentivize people and businesses to become miners, in order to reduce the influence of large pools.</p>

<p><strong>Assuming miners maximize short-short term profit, would it be financially interesting to rollback?</strong> No. Even if we assume that everyone in the network is acting selfishly to try to maximize their own (short-term) profit, and ignores the protocol rules and the possible repercussions from doing so, it is not. By the time the information about the theft became known, the transaction was already confirmed several hours before. During those hours, miners had created dozens of blocks, which together earned several hundred BTC in subsidy and fees. The exchange would need to offer at least that amount to the affected miners, to compensate them for the income they'd lose from rolling back those blocks, before it would even be worth discussing. Let's call this the rollback cost <em>R</em>. As the stolen amount was in the thousands (let's call this <em>S</em>), that seems like a reasonable option. However, nothing prevents the thief from using (part of) the stolen funds to do the same. Every BTC offered by the exchange <em>above R</em> can be countered by an equivalent amount offered by the thief. And then it becomes clear that the thief has the upper hand: the exchange can at most gain <em>S-R</em> by a rollback, but the thief stands to gain <em>S</em> by not having a rollback. A theoretical possibility is a bidding war between the exchange and the thief, where both increase the amount paid to make miners act in their favor. The end game of this is that the exchange offers <em>S-R</em>, the thief offers slightly more and keeps <em>R</em>, and miners are paid <em>S-R</em> by the thief, and no rollback happens.</p>

<p><strong>What would happen in the real world?</strong> Theoretical models are interesting to study, but in reality many more practical considerations exist. I believe those too are generally in favor of no rollback:</p>

<ul>
<li>Coordination between distrusting miners (especially close 100% hashrate) is hard, and would take time. The more time it takes, the less advantageous a rollback becomes (see the above point), and the more damage would be done to the ecosystem (see the next point).</li>
<li>An hours-long (in the very best case) or a weeks-long (in the worst case) rollback would monumentally hurt the ecosystem, and likely undermine the public's confidence in the system to the extent that it would severely reduce the profitability of many parties involved (including miners and the exchange itself!).</li>
<li>Even ignoring all the above, miners may not be willing to take a bribe to rollback because of legal reasons if they're publicly known (which they mostly currently are). They may equally not want to take stolen money as a bribe, so this cuts in both directions. This point becomes weaker if the mining ecosystem is more decentralized, but that would also make coordination harder.</li>
<li>As I pointed out above, in the extreme scenario where such a rollback is actually happening, the public has time to react. If a sufficiently large group of economically relevant parties in the network refuse to accept the rollback, miners have no choice but to go along with that. This is a last-resort option, and likely damaging to the ecosystem on its own, but it is an option.</li>
</ul>

<p>So to summarize: in theory there are absolutely ways in which a rollback could happen, and it's good to be aware of those. In reality, the security of the system relies on economic incentives already which are nontrivial to analyze. It however seems very unlikely that in the case of a theft a deep rollback is a reasonable outcome.</p>
