> For the complete documentation index, see [llms.txt](https://gushi10546.gitbook.io/aptos-kai-fa-zhe-wen-dang/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gushi10546.gitbook.io/aptos-kai-fa-zhe-wen-dang/jie-dian/ait-3/ji-li-ce-shi-wang-de-fu-jia-wen-dang.md).

# 激励测试网的附加文档

## 关闭激励测试网的节点

当您需要关闭验证器节点并清理节点使用的资源时，请按照此说明进行操作。

在关闭节点之前，应确保先保留验证器设置（将在下一个epoch中生效）。

`aptos node leave-validator-set --profile testnet-operator --pool-address <owner-address>`

#### 使用源代码

* 停止节点。
* 删除数据目录：`rm-rf＜您的数据目录＞`
* 删除genesis blob文件和航路点
* 取决于您是否要重用节点标识，您可以选择保留或删除“私钥.yaml”、“验证器标识.yaml”和“验证器完整节点标识.yaml”文件。

#### 使用 Docker

* 停止节点并删除数据卷，`docker compose down--卷`
* 删除genesis blob文件和航路点
* 取决于您是否要重用节点标识，您可以选择保留或删除“私钥.yaml”、“验证器标识.yaml”和“验证器完整节点标识.yaml”文件。

### 添加监控组件

{% hint style="info" %}
&#x20;💡 注意：目前仅支持使用 Terraform。
{% endhint %}

1. 在 terraform 模块中设置 `enable_monitoring` 变量。例如：

   ```
   module "aptos-node" {
     ...
     enable_monitoring           = true
     utility_instance_num        = 3  # this will add one more utility instance to run monitoring component
   }
   ```
2. 应用更改： `terraform apply`
3. 您应该会看到创建了一个新的 pod。运行 `kubectl get pods` 来检测。
4. 访问仪表板

   首先，找到监控负载均衡器的 IP/DNS。

   ```
   kubectl get svc ${WORKSPACE}-mon-aptos-monitoring --output jsonpath='{.status.loadBalancer.ingress[0]}'
   ```

   您可以访问仪表板：`http://<ip/DNS>`

### 使用 CLI 质押

我们现在有一个 UI 来支持一些质押操作，但无论如何，如果您需要执行 UI 中不支持的操作，您可以使用 CLI 来实现。

* 使用您的钱包私钥初始化 CLI 或创建新钱包

  ```
  aptos init --profile ait3-owner \\
    --rest-url <http://ait3.aptosdev.com>
  ```

  您可以从现有钱包中输入私钥，也可以根据需要创建新的钱包地址。
* 使用 CLI 初始化质押池

  ```
  aptos stake initialize-stake-owner \\
    --initial-stake-amount 100000000000000 \\
    --operator-address <operator-address> \\
    --voter-address <voter-address> \\
    --profile ait3-owner
  ```
* 账户间转账

  ```
  aptos account transfer \\
    --account <operator-address> \\
    --amount <amount> \\
    --profile ait3-owner
  ```
* 转换 operator

  ```
  aptos stake set-operator \\
    --operator-address <new-operator-address> \\
    --profile ait3-owner
  ```
* 转换 voter

  ```
  aptos stake set-delegated-voter \\
    --voter-address <new-voter-address> \\
    --profile ait3-owner
  ```
* 增加质押份额

  ```
  aptos stake add-stake \\
    --amount <amount> \\
    --profile ait3-owner
  ```
* 增加质押锁定

  ```
  aptos stake increase-lockup --profile ait3-owner
  ```
* 解锁质押

  ```
  aptos stake unlock-stake \\
    --amount <amount> \\
    --profile ait3-owner
  ```
* 提现质押

  ```bash
  aptos stake withdraw-stake \\
    --amount <amount> \\
    --profile ait3-owner
  ```

### 激励测试网的关闭节点

当您需要关闭validator节点并清理该节点使用的资源时，请遵循此说明。

在关闭节点之前，应确保先保留验证器设置（将在下一个epoch中生效）。

`aptos node leave-validator-set --profile testnet-operator --pool-address <owner-address>`

#### 使用源代码

* 停止节点。
* 删除数据目录：`rm-rf＜your-data-directory＞`
* 删除genesis blob文件和waypoint
* 取决于您是否要重用节点标识，您可以选择保留或删除`private-keys.yaml`, `validator-identity.yaml`, `validator-full-node-identity.yaml` 文件。

#### 使用Docker

* 停止节点并删除数据 `docker compose down --volumes`
* 删除genesis blob文件和waypoint
* 取决于您是否要重用节点标识，您可以选择保留或删除`private-keys.yaml`, `validator-identity.yaml`, `validator-full-node-identity.yaml` 文件。

#### 使用Terraform

* 停止节点并删除数据 `terraform destroy`

### 添加监控组件

{% hint style="info" %}
&#x20;💡 注意：目前仅使用Terraform支持此功能。
{% endhint %}

1. 在terraform中设置`enable_monitoring`变量.例如:

   ```
   module "aptos-node" {
     ...
     enable_monitoring           = true
     utility_instance_num        = 3  # this will add one more utility instance to run monitoring component
   }
   ```
2. 使用变更: `terraform apply`
3. 一个新的pod被创建。运行`kubectl get pods`检查。
4. 访问仪表盘

   首先，找到监控负载平衡器的IP/DNS。

   ```
   kubectl get svc ${WORKSPACE}-mon-aptos-monitoring --output jsonpath='{.status.loadBalancer.ingress[0]}'
   ```

   可以在`http://<ip/DNS>` 中访问仪表盘

### 使用CLI质押

我们现在有了一个UI来支持一些质押操作，如果您需要执行UI中不支持的操作，您都可以使用CLI。

* 使用您的钱包私钥初始化CLI或创建新钱包

  ```
  aptos init --profile ait3-owner \\
    --rest-url <http://ait3.aptosdev.com>
  ```

  您可以从现有钱包输入私钥，也可以根据需要创建新的钱包地址。
* 使用CLI初始化质押池

  ```
  aptos stake initialize-stake-owner \\
    --initial-stake-amount 100000000000000 \\
    --operator-address <operator-address> \\
    --voter-address <voter-address> \\
    --profile ait3-owner
  ```
* 账户间转账

  ```
  aptos account transfer \\
    --account <operator-address> \\
    --amount <amount> \\
    --profile ait3-owner
  ```
* 更换操作者

  ```
  aptos stake set-operator \\
    --operator-address <new-operator-address> \\
    --profile ait3-owner
  ```
* 更换投票者

  ```
  aptos stake set-delegated-voter \\
    --voter-address <new-voter-address> \\
    --profile ait3-owner
  ```
* 增加质押

  ```
  aptos stake add-stake \\
    --amount <amount> \\
    --profile ait3-owner
  ```
* 增加锁定质押

  ```
  aptos stake increase-lockup --profile ait3-owner
  ```
* 解锁质押

  ```
  aptos stake unlock-stake \\
    --amount <amount> \\
    --profile ait3-owner
  ```
* 提取质押

  ```bash
  aptos stake withdraw-stake \\
    --amount <amount> \\
    --profile ait3-owner
  ```


---

# 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://gushi10546.gitbook.io/aptos-kai-fa-zhe-wen-dang/jie-dian/ait-3/ji-li-ce-shi-wang-de-fu-jia-wen-dang.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.
