# Difficulty Adjustment and Block Validation

<figure><img src="/files/WHt2JtSfxnp6Ludzs4pf" alt=""><figcaption></figcaption></figure>

*To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they're generated too fast, the difficulty increases.*

\- Satoshi Nakamoto, Bitcoin Whitepaper

To maintain a consistent rate of block discovery, the Bitcoin network employs a **difficulty adjustment algorithm**. This algorithm dynamically adjusts the difficulty of the PoW process based on the total computational power of the network and the time taken to mine previous blocks. The goal is to ensure that, on average, a new block is added to the blockchain approximately every ten minutes.

#### Difficulty Adjustment Mechanism:

* **Moving Average**: The difficulty is recalibrated based on the average time taken to mine the last 2016 blocks, which corresponds to roughly two weeks of mining.
* **Increased Difficulty**: If blocks are being mined too quickly, the difficulty increases to slow down the rate of block creation.
* **Decreased Difficulty**: Conversely, if blocks are being mined too slowly, the difficulty decreases to encourage faster block generation.

This adaptive mechanism ensures that the network remains stable and that the block validation process is efficient, regardless of fluctuations in hashing power or the number of active nodes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hub.bsvblockchain.org/higher-learning/bsv-academy/bitcoin-whitepaper-series/section-4-proof-of-work-bitcoin-whitepaper/difficulty-adjustment-and-block-validation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
