3 ms·
This hack results from a basic design error: for difficulty adjustment to work properly, the window of recent blocks it considers must be relatively immune to t
by tromp 8y ago
This hack results from a basic design error: for difficulty adjustment to work properly, the window of recent blocks it considers must be relatively immune to time stamp manipulation. In other words, the allowed timestamp drift must be much smaller than the adjustment time window.
Bitcoin allows a 2 hour drift, but has an adjustment window of 2 weeks.
In verge's case, both are identical, at 2 hours. This is an open invitation to difficulty adjustment abuse.
- gtrubetskoy 8y ago> In verge's case, both are identical, at 2 hours. Naive question - is verge adjustment window defined in block time (as opposed to "human" time)? because > Bitcoin allows a 2 hour drift, but has an adjustment window of 2 weeks. The adjustment window is technically 2016 blocks, which is about two weeks in human time, but can in theory vary greatly if mining capacity fluctuates.
- tromp 8y agoI went looking through the source code and found that the adjustment window is indeed defined in block time as PastBlocksMax = 12 while nProofOfWorkTargetSpacing = 150 (half a minute for each of 5 different pow algorithms), giving an expected adjustment window of 12 * 150 = 1800 seconds. Apparently, the adjustment window, which needs to be way longer than the allowed timestamp drift, is in fact way shorter...
- tetha 8y agoAt that point, I got a bit scared, too. This feels way too much against the rule of thumb that code consuming untrusted input should never be able to modify or control it's own configuration or binaries (or, more generally, trusted input). In this case, the attacker can hijack 50% - 100% of the configuration of the weighting algorithm. For bitcoin, you can control around 4% at most without risking immediate attention. Unless mining speed increases by a factor of 40 or 50 suddenly.
- ikeboy 8y agoVitalik has laid out a method for doing the same thing in Bitcoin. See https://www.reddit.com/r/btc/comments/428tjl/softforking_the_block_time_to_2_min_my_primarily/ https://www.reddit.com/r/btc/comments/428tjl/softforking_the...