- Difficulty (https://en.bitcoin.it/wiki/Difficulty):
- Difficulty is a measure of how difficult it is to find a hash below a given target. The Bitcoin network has a global block difficulty. Valid blocks must have a hash below this target. Mining pools also have a pool-specific share difficulty setting a lower limit for shares.
- Re-targeting: recalculation of the difficulty target occurs every 2016 blocks.
- Formula for difficulty:
difficulty = difficulty_1_target / current_target (target is a 256 bit number)

- Formula for difficulty: