# 加入测试网 (Joining Testnets)



## 添加全节点(非验证者) Adding a Full Node (non-Validator)

### 推荐最低硬件配置 (Recommended Minimum Hardware)

| Chain-id 链ID                   | Requirement 需求               |
| ------------------------------ | ---------------------------- |
| sei-testnet-2 (deprecated 已弃用) | 4 Cores (modern CPU's)       |
|                                | 32GB RAM                     |
|                                | 1TB of storage (SSD or NVME) |
| sei-devnet-1                   | 8 Cores (modern CPU's)       |
|                                | 32GB RAM                     |
|                                | 1TB of storage (SSD or NVME) |

> These specifications are the minimum recommended. As Sei is an orderbook oriented smart contract platform, it can at times be very demanding on hardware. Low spec validators may degrade the entire performance of the blockchain.
>
> 这些规格是推荐的最低规格。由于 Sei 是一个面向订单簿的智能合约平台，它有时对硬件要求很高。低规格验证者可能会降低区块链的整体性能。

### Joining a network

#### 1. Download Sei repository

Find the latest release [here](https://github.com/sei-protocol/sei-chain/releases) and download the Sei repository

在 [这里](https://github.com/sei-protocol/sei-chain/releases) 找到最新版本并下载 Sei 存储库

```
git clone https://github.com/sei-protocol/sei-chain.git
cd sei-chain
git checkout <tag_name>
```

> You need to replace \<tag\_name> with your favorable release tag name here. For example, `1.1.1beta`. 您需要在此处将 \<tag\_name> 替换为您喜欢的发布标签名称。例如，`1.1.1beta`。

Using seid, an internal tool of Sei, is the preferred way to start the Sei local. We are currently on **1.1.1beta.**

使用 Sei 的内部工具 seid 是本地启动 Sei 的首选方式。我们目前处于**1.1.1beta。**

#### 2. 构建工具 (Build the tool)

```
cd sei-chain/
make install
# Verify the version
seid version --long | head
name: sei
server_name: <appd>
version: 1.1.1beta
commit: 9764e4d7b0fdbfacfca446c1a12a75df1693cd02
```

#### 3. 初始化和配置moniker (Initialize and configure moniker)

```
export MONIKER="YOUR_MONIKER"

# e.g. export MONIKER="validator-phils-node"

seid init $MONIKER --chain-id sei-devnet-1 -o
```

#### 4. 下载创世文件和地址簿 (Download genesis file and address book)

The **Genesis** **file** specifies the account balances and parameters at the start of the network to use when replaying transactions and syncing.

**创世文件** 指定网络开始时的账户余额和参数，在重现交易和同步时使用。

The **Addressbook** lists a selection of peers for your node to dial to in order to discover other nodes in the network

**地址簿**列出了您的节点拨号到的对等节点的选择，来发现网络中的其他节点

By default, `genesis` and `addressbook` files should be placed under `~/.sei/config/genesis.json` and `~/.sei/config/addrbook.json`, respectively

默认情况下，`genesis` 和 `addressbook` 文件应分别放在 `~/.sei/config/genesis.json` 和 `~/.sei/config/addrbook.json` 下

Example:\
举例：

```
# Obtain the genesis file for sei-devnet-1:
curl https://raw.githubusercontent.com/sei-protocol/testnet/master/sei-devnet-1/genesis.json > ~/.sei/config/genesis.json
# Obtain the address book for sei-devnet-1
curl https://raw.githubusercontent.com/sei-protocol/testnet/master/sei-devnet-1/addrbook.json > ~/.sei/config/addrbook.json
```

Create two tabs. You can then start the node on one tab, and view the status or run commands on the other.

创建两个选项卡，然后您可以在一个选项卡上启动节点，并在另一个选项卡上查看状态或运行命令。

```
seid start
seid status
```

Your node is now syncing. This process may take a long time. **Make sure you’ve set it up on a stable connection so you can leave while it syncs.**

It is recommended that you run with systemd. You can use this systemd file:

您的节点现在正在同步。这个过程可能需要很长时间。 **确保您已将其设置为稳定的连接，以便您可以在同步时离开。** 建议您使用 systemd 运行。您可以使用这个 systemd 文件：

```
[Unit]
Description=Sei Node
After=network.target

[Service]
User=root
Type=simple
ExecStart=/root/go/bin/seid start
Restart=on-failure
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
```

## 添加验证者节点 (Adding a Validator node)

After setting up a full node as above, there are just a few more additional steps to set up your node as a validator. Open a **separate command line window** and follow the steps below:

如上所述设置完整节点后，只需几个额外的步骤即可将您的节点设置为验证者。打开一个**单独的命令行窗口**并按照以下步骤操作：

#### 1. 检索您的 PubKey (Retrieve your PubKey)

The Consensus PubKey of your node is required to create a validator. Run the following:

创建验证者需要您节点的 Consensus PubKey。运行以下命令：

```
PUBKEY=$(seid tendermint show-validator)
```

#### 2. 向您的账户发送资金 (Send funds to your account)

> You need to [create and add an account](https://docs.seinetwork.io/smart-contracts-and-local-development) if you haven't done so.
>
> 如果您还没有的话，需要[创建并添加一个帐户](https://docs.seinetwork.io/smart-contracts-and-local-development)。

Please contact Sei team in the [discord](https://discord.gg/YpYQ77Db) channel to add fund to your account.

请在 [discord](https://discord.gg/YpYQ77Db) 频道联系 Sei 团队，为您的账户充值。

You can verify if the funds have been sent by running the following command:

您可以通过运行以下命令来验证资金是否已发送：

```
seid query bank balances $ACCOUNT_ADDRESS
```

#### 3. 创建验证者 (Create a validator)

To create the validator, run the following command:

要创建验证者，请运行以下命令：

```
seid tx staking create-validator \
    --amount=1000000usei \
    --pubkey=$PUBKEY \
    --moniker=$MONIKER \
    --chain-id=$CHAIN_ID \
    --from=$ACCOUNT_NAME \
    --commission-rate="0.10" \
    --commission-max-rate="0.20" \
    --commission-max-change-rate="0.01" \
    --min-self-delegation="1" \
    --fees="2000usei"
```

#### 4. 验证您的验证者是否处于活动状态 (Verify that your validator is active)

Run the following commands to verify that your validator is active

运行以下命令以，检测您的验证者是否处于活动状态

```
seid query tendermint-validator-set | grep "$(seid tendermint show-validator | jq -r .key)"
```
