> For the complete documentation index, see [llms.txt](https://docs.xenblocks.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xenblocks.io/technicals/difficulty/difficulty-consensus.md).

# Difficulty consensus

The difficulty adjustment in the XenBlocks is governed by a protocol managed by X1 validators. These validators ensure network synchronisation, receive and verify XenBlocks, and utilize block timestamps to monitor the block production rate. When deviations occur, nodes calculate a new difficulty level and propose adjustments. A consensus on the new difficulty is reached by averaging the proposals from all nodes, specifically using the median of these adjustments to ensure fairness and mitigate outliers.

<figure><img src="/files/aDJHwxGaTUa3ISrmSw1A" alt=""><figcaption><p>Difficulty consensus</p></figcaption></figure>

Before implementing the new difficulty setting, the network undergoes a verification phase to prevent attacks and errors. Once this phase concludes and consensus is achieved, the updated difficulty is applied across the network. This streamlined process allows the XenBlocks network to adapt efficiently to mining activity changes, maintaining stability and security through collective decision-making.

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.xenblocks.io/technicals/difficulty/difficulty-consensus.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
