> For the complete documentation index, see [llms.txt](https://liuchengxu.gitbook.io/blockchain/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://liuchengxu.gitbook.io/blockchain/ethereum/design-rationale.md).

# 设计原理

比特币，及其很多的继任者，将用户的余额存储在一个基于 UTXO（unspent transaction output）的数据结构中，系统的整个状态由一个“未花费输出，unspent output” 的集合构成。那么 UTXO 到底是什么呢？简单来说，UTXO 就是人民币，就是 “coin”。有多少 UTXO，就有多少人民币。跟人民币的区别在于：

* “面值”，人民币的面值有 1 元，5 元，20 元，100 元等等是固定的，但是理论上，UTXO 的“面值”可以使任意正数。
* 新的人民币由政府的印钞机产生，新的 UTXO 由交易产生。

每个 UTXO 都有一个所有者和一个值，一笔交易会花费一些 UTXO，并创造出一些新的 UTXO，使用 UTXO 模型的交易在验证上有限制：

1. 引用的每个输入必须是有效的，而且还没有被花费
2. 对于每个输入，交易必须有一个跟输入所有者匹配的签名
3. 总输入必须大于或等于总输出

在 UTXO 系统中，一个用户的“余额”实际上并不直接存在，而是通过计算得来。一个用户有一个私钥，这个私钥生成一个有效的签名，这个签名能够解锁的所有币的总和就是“余额”。

以太坊摒弃了 UTXO 模型，采用了一种更简单的方式：账户模型。

<https://github.com/ethereum/wiki/wiki/Design-Rationale/37be78fa7b726d36156c537b757c874b7aa5705>


---

# 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:

```
GET https://liuchengxu.gitbook.io/blockchain/ethereum/design-rationale.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.
