> For the complete documentation index, see [llms.txt](https://hub.bsvblockchain.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hub.bsvblockchain.org/higher-learning/bsv-academy/bitcoin-whitepaper-series/section-4-proof-of-work-bitcoin-whitepaper/consensus-mechanism.md).

# Consensus Mechanism

<figure><img src="https://3421145409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTEKu4E7Fvtss3GI9CYU%2Fuploads%2FZAzWmmymDKomX7jBJKSe%2FConsensus.gif?alt=media&amp;token=f290607b-a676-4c97-8dc8-b33f658f7ade" alt=""><figcaption></figcaption></figure>

*The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it.*

Satoshi Nakamoto, Bitcoin Whitepaper

The consensus mechanism in a blockchain network is crucial for ensuring that all participants agree on the state of the blockchain. In the case of Bitcoin, the consensus is achieved through the **longest chain rule**, which states that the valid chain is the one with the most accumulated Proof-of-work. This means that the chain with the greatest amount of computational effort invested in it is considered the authoritative version of the blockchain.

#### Characteristics of the Consensus Mechanism:

* **One CPU, One Vote**: Unlike systems that rely on *one-IP-address-one-vote* or *proof of stake*, the PoW system ensures that each participant's voting power is proportional to their computational investment in the network.
* **Majority Decision**: The longest chain represents the majority decision, as it reflects the collective effort of honest nodes working to maintain the integrity of the blockchain.
* **Competing Chains**: Occasionally, competing chains may emerge, but over time, the network will converge back to a single chain as nodes align their efforts with the longest chain.

This consensus mechanism not only secures the network but also incentivizes honest behavior among participants, as any attempt to manipulate the blockchain would require an immense amount of computational resources.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hub.bsvblockchain.org/higher-learning/bsv-academy/bitcoin-whitepaper-series/section-4-proof-of-work-bitcoin-whitepaper/consensus-mechanism.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
