> For the complete documentation index, see [llms.txt](https://docs.stacks.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stacks.co/learn/zh/block-production.md).

# 区块生产

<div data-with-frame="true"><figure><img src="https://2842511454-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH74xqoobupBWwBsVMJhK%2Fuploads%2FAtIlPCw7qrGfrokaExNi%2Fblock-production-cover.png?alt=media&#x26;token=a3179850-9434-42ed-baf4-c64037aa5b03" alt=""><figcaption></figcaption></figure></div>

区块生成是理解 Stacks 底层运作方式的关键概念。本节将介绍 Stacks 网络运行所需的三个主要步骤。

{% stepper %}
{% step %}
**挖矿**

矿工负责在 Stacks 链上构建并提议新区块。
{% endstep %}

{% step %}
**签名**

签名是区块在加入链之前用于验证的过程。签名者是一个与某个签名者管理合约绑定的签名者管理器合约，并且只有在持有足够权重的签名者对区块进行签名后，该区块才会加入链中。
{% endstep %}

{% step %}
**质押**

质押是权重的来源。你将 STX 锁定在自己的账户中，并指定一个现有的签名者管理器合约；你添加的质押会成为该管理器权重的一部分，你会因此获得以比特币计价的奖励。每个账户的质押只能走两条互斥路径之一：仅 STX，或将原生 BTC 或 sBTC 与 STX 锁定配对的协议债券。
{% endstep %}
{% endstepper %}

在 Stacks 的区块生成中有三个角色协同工作：矿工构建并提议新区块，签名者验证并签署这些区块，质押者则通过锁定 STX 支持签名者管理器。

{% hint style="info" %}
**这里的签名者不是 sBTC 签名者。** 本页上的签名者在 PoX-5 下验证 Stacks 区块。 [sBTC 签名者](https://docs.stacks.co/learn/sbtc/clarity-contracts/sbtc-signers) 是一组独立的签名者，他们在各自的合约中拥有自己的密钥，而且不必是 Stacks 签名者。他们的阈值签名要求超过 50% 的签名者密钥。两者之间唯一的联系是，sBTC 桥接是矿工承诺的 BTC 转换为作为质押奖励发放的 sBTC 的方式。
{% endhint %}

***

### 核心角色：矿工 vs 质押者 vs 签名者

<table><thead><tr><th width="94.29296875">角色</th><th>主要功能</th><th>他们做什么</th><th>奖励</th><th>他们在哪运行</th></tr></thead><tbody><tr><td><strong>矿工</strong></td><td>生成 Stacks 区块</td><td>在 PoX 中发送 BTC 以竞争写入下一个区块并赚取 STX 的权利</td><td>获得 STX 区块奖励 + 手续费</td><td>比特币（用于竞价）+ Stacks</td></tr><tr><td><strong>质押者</strong></td><td>通过 PoX 保障网络安全</td><td>将 STX 锁定在自己的账户中，并指定一个签名者管理器合约</td><td>获得由矿工 BTC 资助的以比特币计价的奖励，默认以 sBTC 形式发放，或通过投票选择以原生 BTC 形式发放</td><td>Stacks（STX 从不离开他们的账户）</td></tr><tr><td><strong>签名者</strong></td><td>验证并最终确认区块</td><td>与一个签名者密钥绑定的签名者管理器合约对区块进行签名；其权重与通过它质押的 STX 成正比</td><td>接收来自 pox-5 的按每位质押者结算的奖励用于分发，并且可以收取合约中设定的手续费</td><td>Stacks</td></tr></tbody></table>

#### 质押者与签名者之间的关系

在阅读质押部分时，你可能会看到质押者和签名者同时被提及。在 PoX-5 下，这种关系是明确的：

* 质押者不是签名者\
  → 签名由授予其质押的签名者管理器合约的密钥完成，而运行该签名者是管理器运营者的工作
* 每个签名者都由 **已质押的 STX**\
  → 一个签名者管理器如果总计质押了至少 50,000 STX，就会获得收益分配，并且其权重会随着其代表的质押而增长


---

# 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://docs.stacks.co/learn/zh/block-production.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.
