From From EIP 2, the Homestead difficulty adjustment algorithm is:
block_diff = parent_diff + parent_diff // 2048 *
max(1 - (block_timestamp - parent_timestamp) // 10, -99) +
int(2**((block.number // 100000) - 2))
where // is the integer division operator, eg. 6 // 2 = 3, 7 // 2 = 3, 8 // 2 = 4.
How does this work?
(This question was prompted by the question What was the first block mined with Homestead?What was the first block mined with Homestead?)
Other related Q&As: