I am wondering about the consequences of a potential 51% CPU attack on the bitcoin blockchain. Imagine that a state invests enough computational power to rewrite from scratch an entire blockchain, longer than the current bitcoin blockchain (maybe because the state wants to control money). In this forged blockain all blocks would be empty (no transactions), which means the state owns all bitcoins as the result of mining.
In that case would it really be the end of bitcoin ? I have the impression that it would be easy to patch the nodes on the network to dismiss the forged blockchain, for example by banning the state's public key.
That would violate the intent of bitcoin that mathematics and cryptography replace trust in a third-party, but eventually bitcoin is used by people who need to trust it. They wouldn't want all their money destroyed by an attack.
Or are there 51% attacks harder to detect and to patch ? I am not asking about short-chains attacks that would only rob a few merchants, rather about the global stability of bitcoin.