# 激励测试网双子座II期运行教程

## 激励性测试网 双子座II的详细信息

日期：2022年9月20日&#x20;

时间：太平洋时间上午8点/世界标准时间下午3点

官方公告：<https://forum.subspace.network/t/gemini-ii-incentivized-testnet-will-be-live-on-sep-20/675/10?u=chainguys>

官方教程：<https://docs.subspace.network/protocol/>

## 硬件要求 <a href="#ya-li-ce-shi-yao-qiu" id="ya-li-ce-shi-yao-qiu"></a>

| Hardware | Specs           |
| -------- | --------------- |
| CPU      | 2 Core+         |
| RAM      | 4GB+ (Rec. 8GB) |
| Storage  | 150GB           |

{% hint style="info" %}
因官方仅支持CLI和Docker两种方式运行节点，所以教程将分为CLI和Docker
{% endhint %}

## CLI运行教程

#### 安装必要组件

```shell
sudo apt-get install ocl-icd-opencl-dev curl -y
```

#### 下载node和farmer程序

<pre class="language-shell"><code class="lang-shell">sudo mkdir ~/subspace-cli &#x26;&#x26; cd ~/subspace-cli
<strong>wget https://github.com/subspace/subspace/releases/download/gemini-2a-2022-sep-10/subspace-node-ubuntu-x86_64-gemini-2a-2022-sep-10
</strong><strong>wget https://github.com/subspace/subspace/releases/download/gemini-2a-2022-sep-10/subspace-farmer-ubuntu-x86_64-gemini-2a-2022-sep-10
</strong></code></pre>

#### 运行程序

{% hint style="info" %}
先运行node程序，等待node程序显示出如下类似内容时，再运行farmer程序

2022-02-03 10:52:29 ⚙️ Syncing, target=#215883 (2 peers), best: #55 (0xafc7…bccf), finalized #0 (0x6ada…0d38), ⬇ 850.1kiB/s ⬆ 1.5kiB/s
{% endhint %}

<pre class="language-shell"><code class="lang-shell"><strong># 运行node
</strong>nohup ./subspace-node-ubuntu-x86_64-gemini-2a-2022-sep-10 \
  --chain gemini-2a \
  --execution wasm \
  --state-pruning archive \
  --validator \
  --name &#x3C;修改自己的节点名字> \
  > node.log 2>&#x26;1 &#x26;
  
# 运行farmer
nohup ./subspace-farmer-ubuntu-x86_64-gemini-2a-2022-sep-10 farm \
  --reward-address &#x3C;修改为自己的钱包地址> \
  --plot-size &#x3C;修改为想要绘图的大小，最大100G> \
  > farmer.log 2>&#x26;1 &#x26;
</code></pre>

#### 示例

<pre class="language-shell"><code class="lang-shell"><strong># 运行node
</strong>nohup ./subspace-node-ubuntu-x86_64-gemini-2a-2022-sep-10 \
  --chain gemini-2a \
  --execution wasm \
  --state-pruning archive \
  --validator \
  --name test \
  > node.log 2>&#x26;1 &#x26;
  
# 运行farmer
nohup ./subspace-farmer-ubuntu-x86_64-gemini-2a-2022-sep-10 farm \
  --reward-address stxxxxxxxxxxx \
  --plot-size 50G \
  > farmer.log 2>&#x26;1 &#x26;
</code></pre>

#### 查看运行日志

```shell
# 查看node运行日志 (退出查看日志界面，直接按键盘Ctrl + C)
cd ~/subspace-cli
tail -f node.log
#查看farmer运行日志
tail -f farmer.log
```

## Docker运行教程

#### 安装docker和docker-compose

```shell
curl -fsSL get.docker.com -o get-docker.sh \
	&& sh get-docker.sh \
	&& systemctl enable docker \
	&& systemctl start docker \
	&& curl -L https://github.com/docker/compose/releases/download/v2.10.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose \
	&& chmod +x /usr/local/bin/docker-compose \
	&& docker info \
	&& docker-compose -v 
```

#### 创建目录

```shell
sudo mkdir ~/subspace-docker && cd ~/subspace-docker
```

#### 下载编排文件

```shell
sudo wget -O docker-compose.yml https://raw.githubusercontent.com/skyMetaverse/subspace-docker/main/dokcer-compose.yml
```

#### 修改配置文件

{% hint style="info" %}
name、rewardAddress、一定要修改为自己的地址。

plotSize字段要根据自己的实际硬盘大小来填写，此次压力测试绘图最大为100G。
{% endhint %}

```shell
name=<节点名字，建议用英文>
rewardAddress=<钱包地址>
plotSize=<绘图大小>

sed -i "s/INSERT_YOUR_ID/$name/g" docker-compose.yml
sed -i "s/WALLET_ADDRESS/$rewardAddress/g" docker-compose.yml
sed -i "s/PLOT_SIZE/$plotSize/g" docker-compose.ymlshe
```

#### 示例

```shell
name=test
rewardAddress=stxxxxxxxxxx
plotSize=100G

sed -i "s/INSERT_YOUR_ID/$name/g" docker-compose.yml
sed -i "s/WALLET_ADDRESS/$rewardAddress/g" docker-compose.yml
sed -i "s/PLOT_SIZE/$plotSize/g" docker-compose.yml
```

#### 启动Node和Farmer

```shell
sudo docker-compose pull
sudo docker-compose up -d
```

#### 查看运行日志

```shell
cd ~/subspace-docker
sudo docker-compose logs -f --tail=1000

# 退出查看日志界面
# 按住键盘Ctrl + C
```

#### 在遥感浏览器中查询能否看到节点

打开[网站](https://telemetry.subspace.network/#list/0x43d10ffd50990380ffe6c9392145431d630ae67e89dbc9c014cac2a417759101)，Ctrl +F 搜索自己的节点名字

<figure><img src="/files/NnW1BN4UwLCUkhsDAXOJ" alt=""><figcaption></figcaption></figure>

#### 查看已经挖了多少代币

打开[网站](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Feu-1.gemini-2a.subspace.network%2Fws#/accounts)，即可查看。

<figure><img src="/files/vf9NHbroY518iCxz3rDB" alt=""><figcaption></figcaption></figure>


---

# 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://syskey.gitbook.io/subspace-network/she-qu-jiao-cheng/ji-li-ce-shi-wang-shuang-zi-zuo-ii-qi-yun-xing-jiao-cheng.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.
