> For the complete documentation index, see [llms.txt](https://docs.applayer.com/testnet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.applayer.com/testnet/understanding-rdpos/blockchains-overview.md).

# Blockchains overview

One of the biggest problems of blockchain development is handling block rollbacks. For example, on the Bitcoin chain, assuming there is a latest block that has another block after it. If a node receives a block that replaces the latest block, the next block and all the transactions in it are replaced too, which results in a rollback of the blockchain’s state by one block.

The Bitcoin blockchain and other derivatives follow the "longest lived chain" rule (the chain with the most accumulated proof of work is the main chain). However, rollbacks unearth problems in that rule. For instance, when a developer is building dApps where they have to deal with such special conditions, it could take a greater effort depending on the size and/or complexity of the application.

<figure><img src="/files/7c355eBV1swvIjypiQ7w" alt=""><figcaption><p>Example of block rollback</p></figcaption></figure>

In the diagram above, block C was replaced by block D followed by block E, rolling back the transactions made in block C.

The solution to the problem is avoiding the rollback condition altogether. This can be done by deterministically defining which network node can create a block, thereby eliminating the block race condition and keeping everyone in the network synchronized to the same latest block.

AppLayer implements this concept as **Random Deterministic Proof of Stake (rdPoS)**, which pairs a block congestion system and a random number generator system, allowing only one Validator to create a block at any given time, thus avoiding rollbacks and achieving consensus on ultra-fast networks.


---

# 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.applayer.com/testnet/understanding-rdpos/blockchains-overview.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.
