# 验证者节点

Aptos 节点是 Aptos 生态系统的一个实体，用于跟踪 Aptos 区块链的状态。 客户端通过 Aptos 节点与区块链交互。 有两种类型的节点：

* 验证者节点（本篇）
* [全节点](https://wiki.aptos.movemove.org/ji-chu/quan-jie-dian)

每个 Aptos 节点都包含几个逻辑组件：

* [REST service](https://aptos.dev/reference/glossary#rest-service)
* [Mempool](#mempool)
* [Consensus (disabled in FullNodes)](#consensus)
* [Execution](#execution)
* [Virtual Machine](#virtual-machine-vm)
* [Storage](#storage)
* [State synchronizer](#state-synchronizer)

[Aptos-core](https://aptos.dev/reference/glossary#aptos-core) 软件可以配置为作为验证节点或全节点运行。

## 概述

当一笔交易提交到 Aptos Blockchain 时，验证者节点运行分布式共识协议（[consensus protocol](https://aptos.dev/reference/glossary#consensus-protocol)），执行交易，并将交易和执行结果存储在区块链上。验证者节点决定哪些交易将被添加到区块链中以及以何种顺序添加。

Aptos 区块链使用拜占庭容错 (BFT) 共识协议，让验证者节点就最终交易的账本及其执行结果达成一致。验证器节点处理这些交易并将它们包含在区块链数据库的本地副本中。这意味着最新的验证器节点始终在本地维护区块链当前状态（[state](https://aptos.dev/reference/glossary#state)）的副本。

验证器节点通过专用网络直接与其他验证器节点通信。 全节点（[Fullnodes](https://wiki.aptos.movemove.org/ji-chu/quan-jie-dian)）是最终交易历史的外部验证和/或传播资源。它们从对等点（peers）接收交易并可能在本地重新执行它们（与验证器执行交易的方式相同）。 FullNode 将重新执行的交易结果存储到本地存储中。这样做，他们可以挑战验证者的任何犯规行为，并在有任何尝试重写或修改区块链历史时提供证据。这有助于减轻验证者的腐败和/或勾结。

> AptosBFT 共识协议为多达三分之一的恶意验证节点提供容错能力。

### 验证者节点组件[​](https://aptos.dev/basics/basics-validator-nodes/#validator-node-components) <a href="#validator-node-components" id="validator-node-components"></a>

![](https://837065856-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEVfhRe3oc2wVpOxYrh1V%2Fuploads%2F9WF5XV9e69IWgx7kqqrI%2Fvalidator.png?alt=media\&token=5adf7a8c-660a-43a3-9494-3086d136c8e4)

#### Mempool[​](https://aptos.dev/basics/basics-validator-nodes/#mempool) <a href="#mempool" id="mempool"></a>

Mempool 是每个节点中的一个组件，它保存已提交到区块链但尚未商定或执行的交易的内存缓冲区。 此缓冲区在验证器节点和 FullNode 之间复制。

FullNode 的 JSON-RPC 服务将交易发送到验证节点的内存池。 Mempool 对交易进行各种检查，以确保交易的有效性并防止 DOS 攻击。 当一个新的交易通过初始验证并被添加到内存池中时，它会被分发到网络中其他验证者节点的内存池中。

当验证者节点暂时成为共识协议的领导者时，共识会从内存池中提取交易并提出新的交易块。 该区块被广播给其他验证者，并包含该区块中所有交易的总排序。 然后每个验证者执行区块并提交是否接受新区块提案的投票

#### Consensus[​](https://aptos.dev/basics/basics-validator-nodes/#consensus) <a href="#consensus" id="consensus"></a>

共识（Consensus）是负责通过与网络中的其他验证节点参与共识协议来对交易块进行排序并就执行结果达成一致的组件。

#### Execution[​](https://aptos.dev/basics/basics-validator-nodes/#execution) <a href="#execution" id="execution"></a>

执行器（Execution）是协调事务块执行并保持瞬态状态的组件。 共识投票在这个短暂的状态。 执行器维护执行结果的内存表示，直到共识将块提交到分布式数据库。 执行器使用虚拟机执行事务。 执行器充当系统输入（由交易表示）、存储（提供持久层）和虚拟机（用于执行）之间的粘合层。

#### Virtual machine (VM)[​](https://aptos.dev/basics/basics-validator-nodes/#virtual-machine-vm) <a href="#virtual-machine-vm" id="virtual-machine-vm"></a>

虚拟机 (VM) 用于在每个交易中运行 Move 程序并确定执行结果。 节点的内存池使用虚拟机对交易进行验证检查，而执行器使用虚拟机执行交易。

#### Storage[​](https://aptos.dev/basics/basics-validator-nodes/#storage) <a href="#storage" id="storage"></a>

存储（Storage）组件用于将商定的交易块及其执行结果保存到本地数据库。

#### State synchronizer[​](https://aptos.dev/basics/basics-validator-nodes/#state-synchronizer) <a href="#state-synchronizer" id="state-synchronizer"></a>

节点使用它们的状态同步器（State synchronizer）组件来“赶上”区块链的最新状态并保持最新状态。


---

# Agent Instructions: 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://wiki.aptos.movemove.org/ji-chu/yan-zheng-zhe-jie-dian.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.
