As far as I understood, on short timescales regularly a blockchain split happens, i.e. when two miners find a block concurrently. However just a few blocks later the chain with more work wins and all unconfirmed transactions re-enter the pool.
Assume following scenario: One miner with 51% of the hashrate decides to perform an attack, even if it is economically not feasible, by withholding their mined blocks for an extended period of time, let's say a month. What happens if they suddenly publish 4.320 blocks at once which contain more cumulative work than the current blockchain?
- Does the software running on nodes just blindly accept the new blocks? Even when it is able to detect obvious double-spends?
- or is there a threshold in the number of blocks after which the node software rejects the new chain even if it has more work?
- or is there some form of input prompt so in the end the owner of the node decides what they accept as the valid chain?
I think this question is not so much centered around the principles of the bitcoin network but rather how node software is implemented.