# Byzantine Fault-Tolerant Consensus&#x20;

Sharpe Consensus follows a Byzantine fault-tolerant approach to ensure the integrity and reliability of farm scores across a decentralised network of verifiers. This protocol can maintain consensus even when a portion of the network participants are malicious or faulty. The protocol operates through discrete consensus rounds, each managed by a deterministically selected leader. Leader selection follows a round-robin approach based on lexicographically sorted peer IDs, ensuring fair distribution of leadership responsibilities across all network participants.

Each consensus round progresses through three distinct phases ensuring structured progression toward agreement:

* **Leader Election Phase:** Verifiers deterministically select a leader for the current round based on the round number and sorted peer IDs. This approach ensures that leadership rotates fairly among all participating verifiers.
* **Score Submission Phase:** Once a leader is elected, all verifiers independently calculate farm scores using the standardised algorithm and submit their results to the leader. This distributed calculation approach ensures that no single entity can manipulate the scoring process.
* **Result Aggregation Phase:** The leader collects all submitted scores, calculates the consensus result (typically using a Byzantine-resistant aggregation function like median or trimmed mean), and broadcasts the final result to all participants. The result includes the final score, a list of participating verifiers, and the timing for the next consensus round.

Beyond its core logic, the protocol employs various security measures to preserve the integrity and reliability of each consensus round, such as:

* **Timeout Mechanisms:** Stalled rounds are automatically detected and reset after 30 seconds, preventing malicious leaders from blocking consensus.
* **Cooldown Periods:** After each round, a cooldown period prevents network congestion and allows for synchronization across all nodes.
* **Participation Tracking:** The system records all participating verifiers, enabling accountability and potential slashing of malicious actors.


---

# 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://litepaper.dexponent.com/sharpe-consensus/byzantine-fault-tolerant-consensus.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.
