19

The attack allows a group of miners with more than 50% of the network's computational power to change difficulty arbitrarily. When difficulty is adjusted, only the times of the first and last blocks in a retarget period (i.e., the first and last blocks with a certain difficulty) are considered. This attack works by manipulating the timestamp of one of these ...


9

Nothing directly prevents it in Bitcoin, and indeed the attack has been demonstrated on testnet3 many times---it's the primary reason that testnet3 currently has almost three times as many blocks as Bitcoin, despite being launched several years after Bitcoin mainnet and with a something similar to[1] Bitcoin's 10-minute average block interval. Indirectly, ...


7

The Bitcoin Protocol (consensus rules) has two relevant rules for the timestamps in block headers: A node will not accept a block whose timestamp is more than two hours in the future. A node will not accept a block unless it has a timestamp greater than the median of the previous 11 blocks. In Bitcoin, we call this Median-Time-Past (MTP). As you mention ...


5

From Litecoin wiki: Time warp bug[14]: the Bitcoin difficulty calculation is off by one block, so an attacker can repeatedly try to generate the last block of each retarget window, and use a fabricated timestamp of 2 hours into the future in order to make the time difference from the first block in the retarget window high, thus lowering the difficulty by ...


4

The simple solution is a soft fork that requires each block's time be equal to or greater than the time of the previous block on the block chain. That is, time on the block chain can't go backwards. If time can't go backwards, then the attacker can't artificially lower difficulty except by mining blocks with times in the future, and the network already ...


4

When there's a re-org of the chain of several blocks, isn't the total chainwork of both chains compared? Yes, that's true. In fact, that's how a reorg of any size is considered. However, that wasn't always the case. In the first version of Bitcoin, the client compared purely by chain height. In version 0.3.3 (released July 2010) we switched to comparing by ...


3

If the time warp bug was fixed in bitcoin, would comparing chains by length always produce the same result as comparing by work done? No. It's easy to create a chain with more chainwork but fewer blocks. For example, lets say we have a chain with 2,016 difficulty 1 blocks. This chain is created in 20,160 minutes so the difficulty doesn't change next ...


Only top voted, non community-wiki answers of a minimum length are eligible