# 节点网络和同步

## 节点网络拓扑

验证器节点和全节点形成一个层次结构，验证器节点位于根部，全节点位于其他任何地方。 Aptos 区块链区分两种类型的全节点：验证者全节点和公共全节点。 验证器全节点直接连接到验证器节点并提供可扩展性以及 DDoS 缓解。 公共 FullNodes 连接到 Validator FullNodes（或其他公共 FullNodes）以获得对 Aptos 网络的低延迟访问。

![](https://837065856-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEVfhRe3oc2wVpOxYrh1V%2Fuploads%2FkfqvpatoMCA405bdAxzz%2Fimage.png?alt=media\&token=551561bb-7017-48bb-afd1-5b20aaeb7379)

### 独立的网络堆栈[​](https://aptos.dev/basics/basics-node-networks-sync#separate-network-stacks) <a href="#separate-network-stacks" id="separate-network-stacks"></a>

Aptos 区块链支持各种网络拓扑的不同网络堆栈。 例如，验证者网络独立于 FullNode 网络。 拥有单独的网络堆栈的优点包括：

* 不同网络之间的清晰分离。
* 更好地支持安全首选项（例如，双向与服务器身份验证）。
* 允许隔离发现协议（即验证节点公共端点的链上发现与私有组织的手动配置）。

## 节点同步

Aptos 节点通过两种机制同步到 Aptos 区块链的最新状态：共识或状态同步。 验证节点将使用共识和状态同步来保持最新状态，而全节点仅使用状态同步。

例如，验证器节点将在第一次上线或重启时调用状态同步（例如，在离线一段时间后）。 一旦验证者与区块链的最新状态保持同步，它将开始参与共识并完全依赖共识来保持最新状态。 然而，随着区块链的增长，FullNodes 会持续依赖状态同步来获取并保持最新状态。

### 状态同步器[​](https://aptos.dev/basics/basics-node-networks-sync#state-synchronizer) <a href="#state-synchronizer" id="state-synchronizer"></a>

每个 Aptos 节点都包含一个[状态同步器](https://github.com/aptos-labs/aptos-core/tree/main/state-sync)组件，用于将节点的状态与其对等节点同步。 该组件对所有类型的 Aptos 节点具有相同的功能：它利用专用的点对点网络不断请求和传播区块链数据。 验证者节点在验证者节点网络内分发区块链数据，而全节点依赖于其他全节点（即验证者或公共全节点）。

### 同步 API[​](https://aptos.dev/basics/basics-node-networks-sync#synchronization-api) <a href="#synchronization-api" id="synchronization-api"></a>

Aptos 节点的状态同步器与其他节点的状态同步器通信以获取和发送事务块。 在[此处](https://github.com/aptos-labs/aptos-core/tree/main/documentation/specifications/state_sync)的规范中了解有关其工作原理的更多信息。


---

# 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/jie-dian-wang-luo-he-tong-bu.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.
