访问 testnets 仓库 以获取当前可用公共测试网的最新信息:

如何加入

你可以使用以下任一方式,通过一条命令完成测试网节点的设置:

创建验证者(可选)

如果你想在任一测试网中创建验证者,请通过 Discord 水龙头频道 申请代币,并按照本指南进行操作。如果你要在发布测试网中创建验证者,则可以忽略关于加入在线消费者链的说明。

升级你的节点

如果你已经有一个完成同步的节点,并希望参与预定的测试网软件升级,请按照以下说明操作。 当链达到软件升级提案中指定的升级区块高度时,链二进制程序将停止运行,并要求启动新版本二进制程序(系统日志中会显示 ERR UPGRADE "<Upgrade name>" NEEDED at height: XXXX 或类似信息)。 你可以通过以下三种方式更新二进制程序:
  1. 不使用 Cosmovisor:你必须在升级前提前构建或下载新的二进制程序。当链二进制程序在升级高度停止后:
  • 使用 systemctl stop gaiad.service 停止 gaiad 服务。
  • 构建或下载新的二进制程序,并替换现有的 ~/go/bin 中对应文件。
  • 使用 systemctl start gaiad.service 启动 gaiad 服务。
  1. 使用 Cosmovisor:你必须在升级前提前构建或下载新的二进制程序,并将其复制到相应目录。
  2. 使用 Cosmovisor:使用自动下载功能,前提是提案中包含适用于你系统架构的二进制程序。
以下说明对应选项 2。有关使用 Cosmovisor 自动下载的更多信息,请参阅 Cosmos SDK 仓库中的相关文档。 如果环境变量 DAEMON_ALLOW_DOWNLOAD_BINARIES 被设置为 false,Cosmovisor 将在与软件升级提案中指定的升级名称相匹配的目录中查找新的二进制程序。

Cosmovisor 升级示例

以 v17 升级为例,预期的目录结构如下:
.gaia
└── cosmovisor
    ├── current
    ├── genesis
    │   └── bin
    |       └── gaiad
    └── upgrades
        └── v17
            └── bin
                └── gaiad
准备升级目录
mkdir -p ~/.gaia/cosmovisor/upgrades/v17/bin
下载并安装新的二进制版本。
cd $HOME/gaia
git pull
git checkout v17.0.0-rc0
make install

cp ~/go/bin/gaiad ~/.gaia/cosmovisor/upgrades/v17/bin/gaiad
当达到升级高度时,Cosmovisor 将停止 gaiad 二进制程序,把 current 的符号链接更新到对应的升级目录,并重新启动。几分钟后,节点应开始使用新的二进制程序同步区块。
Visit the testnets repo for the most up-to-date information on the currently available public testnets:

How to Join

You can set up a testnet node with a single command using one of the options below:

Create a Validator (Optional)

If you want to create a validator in either testnet, request tokens through the faucet Discord channel and follow the this guide. If you are creating a validator in the Release Testnet, you can disregard the instructions about joining live consumer chains.

Upgrading Your Node

Follow these instructions if you have a node that is already synced and wish to participate in a scheduled testnet software upgrade. When the chain reaches the upgrade block height specified by a software upgrade proposal, the chain binary will halt and expect the new binary to be run (the system log will show ERR UPGRADE "<Upgrade name>" NEEDED at height: XXXX or something similar). There are three ways you can update the binary:
  1. Without Cosmovisor: You must build or download the new binary ahead of the upgrade. When the chain binary halts at the upgrade height:
  • Stop the gaiad service with systemctl stop gaiad.service.
  • Build or download the new binary, replacing the existing ~/go/bin one.
  • Start the gaiad service with systemctl start gaiad.service.
  1. With Cosmovisor: You must build or download the new binary and copy it to the appropriate folder ahead of the upgrade.
  2. With Cosmovisor: Using the auto-download feature, assuming the proposal includes the binaries for your system architecture.
The instructions below are for option 2. For more information on auto-download with Cosmovisor, see the relevant documentation in the Cosmos SDK repo. If the environment variable DAEMON_ALLOW_DOWNLOAD_BINARIES is set to false, Cosmovisor will look for the new binary in a folder that matches the name of the upgrade specified in the software upgrade proposal.

Cosmovisor Upgrade Example

Using the v17 upgrade as an example, the expected folder structure would look as follows:
.gaia
└── cosmovisor
    ├── current
    ├── genesis
    │   └── bin
    |       └── gaiad
    └── upgrades
        └── v17
            └── bin
                └── gaiad
Prepare the upgrade directory
mkdir -p ~/.gaia/cosmovisor/upgrades/v17/bin
Download and install the new binary version.
cd $HOME/gaia
git pull
git checkout v17.0.0-rc0
make install

cp ~/go/bin/gaiad ~/.gaia/cosmovisor/upgrades/v17/bin/gaiad
When the upgrade height is reached, Cosmovisor will stop the gaiad binary, update the symlink from current to the relevant upgrade folder, and restart. After a few minutes, the node should start syncing blocks using the new binary.