> 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/attacking-the-longest-chain.md).

# Attacking the Longest Chain

<figure><img src="https://3421145409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRTEKu4E7Fvtss3GI9CYU%2Fuploads%2FPsdHIEFreNyK8MGAAtXn%2FAttacking.gif?alt=media&amp;token=cc7f4980-8527-4418-814e-0bb0713df289" alt=""><figcaption></figcaption></figure>

*To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added.*

Satoshi Nakamoto, Bitcoin Whitepaper

Thanks to the cumulative nature of Bitcoin’s proof-of-work process, an attacking node that **wants to overwrite a particular block or record which has already been built upon by the honest operators** on the network, would:

* First have to **create a competing block**
* Then **create a new chain of blocks that is longer** than the existing chain of honest blocks being built upon by the network.

In order to uphold the fraud, the dishonest nodes must now also **perform enough proof-of-work to generate new blocks at a rate that exceeds the generation of the honest blocks for as long as they require to perpetrate their fraud**.

They must do so in a way that is **completely public, exposing their dishonesty** to the entire world and leaving a direct trail to their system for law enforcement to follow.

Ps. It should be noted that as the requirement for Proof-of-work grows with the size of the network as a whole, the operation of a node leaves a larger and larger footprint that becomes near impossible to hide. Thus, further disincentivizing dishonest behaviour to the ease of identifying the dishonest actor.


---

# 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/attacking-the-longest-chain.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.
