I read that you can only tamper with a blockchain if you have more than 50% of the computing power in the network. So say you have 51% of the computing power, then you can create a longer blockchain than the legit one. But how does this one get accepted by the network? I mean, the blockchain gets extended when people broadcast the transfers they want to make. Say the 51% wants to change something 10 blocks earlier. Does he change the copy independently of the network until it's longer than the network's copy? And how does he present it to the network then? Doesn't the network see that since a certain block, all the following blocks are suddenly different from those of the previously ongoing blockchain, which the entire network considered legit?

I know the longest chain gets accepted as the legit one because it's (almost) impossible to have more than half of the computing power but can't they add some security that takes it into account if, like, all but one node have a shorter blockchain, this is probably the legit one?

My apologies if this is considered a very basic question. Just trying to understand the main concepts and can't really find a straightforward answer to this.


It does not matter how a miner broadcasts his blocks if he is performing a 51% attack. The blocks can be kept privately and broadcast later, or they can be broadcast as they are being mined. Either way, once his branch of the blockchain has more work (aka "longer") than the current blockchain, when that most recent block is broadcast, all other nodes on the network will switch to that blockchain.

Keep in mind that "the network" is not one entity that thinks together. It is a collection of independent nodes that make their own decisions; it just so happens that everyone's decisions are exactly the same so it appears as if "the network" is one entity. There is no way for "the network" to decide "everyone but this one node has a shorter blockchain" as it is not one entity but rather thousands of individual nodes. Verifying that this statement is true requires every node to connect to every other node on the network which is practically impossible to do.

And then of course, why shouldn't everyone switch to the blockchain that the attacker made? It has more cumulative work and is thus more secure. It is valid; the attacker cannot insert invalid transactions otherwise his blockchain would be invalid. The only reason to reject this is for human subjective reasons, not the objective reasons that a computer will switch for. In the end, it would come down to human decisions as many technical people would notice such a fork and humans may decide to switch back to the other chain by directly instructing their software to do so. The software itself will follow the valid chain with the most cumulative work.

  • Furthermore, refusing the accept the new and longer chain would introduce a new attack: old nodes (which did see the old chain) would stick to it, but new nodes (which could be fed the new chain first) would never care about the old chain, causing a permanent fork in the network. – Pieter Wuille May 11 '18 at 19:01

Your Answer

