What are difficulty windows in Kaspa?
Difficulty windows are sets of recent blocks that Kaspa's algorithm examines to decide how hard mining should be. The algorithm relies on two separate windows: a timestamp flexibility window, which limits how far a block's timestamp can deviate from what is expected, and a difficulty window, which measures how much actual block creation time is drifting from the target rate. In the current implementation the timestamp flexibility window spans 263 seconds and the difficulty window spans 2,641 seconds. Understanding these windows helps explain how Kaspa's mining difficulty can self-correct as miners join or leave the network.