高级 CLI 安装入门
我们将为您各自的操作系统下载两个文件。
Subspace-Node
– 这是实际与子空间网络建立连接的可执行文件Subspace-Farmer
– 这是实际将在您分配的存储地块上耕种以获得奖励的可执行文件。
注意
从 2 月 19 日版本开始,我们通过增加内部并发性来增强绘图性能。此增强功能可提高 CPU 利用率并增加 RAM 使用率。如果您希望将农民恢复到其先前的行为,则可以使用标志 。--record-encoding-concurrency 1
Linux 文件系统建议:
LINUX用户重要须知
- 交换:仅当系统的 RAM 量较低时,才需要交换文件。
- RAID:避免对具有绘图的文件系统进行冗余设置(RAID1/5/6、RAIDZ)。子空间服务器使用校验和来确保数据完整性,并且通常可以恢复损坏的块。用于维护。RAID0 的作用只是在驱动器发生故障时将更多地块置于危险之中。
scrub
- ext4:对于专用于子空间的驱动器,推荐的格式化命令是 ,因为它可以最大化可用空间,并且绘图大小调整功能可以完美运行。以前推荐的条带化和块大小参数尚未证明任何明显的益处或危害。
sudo mkfs.ext4 -m 0 -T largefile4 /path/to/dev
- XFS:不再推荐,因为在驱动器几乎满 (98%+) 的情况下尝试调整地块大小(更大或更小)将导致地块无法耕种,除非可以通过尝试缩小地块以外的方式释放足够的额外空间(如果发生这种情况,请尝试删除piece_cache.bin)。只有在绘图的初始创建期间才能实现完整的 XFS 磁盘利用率,并且产生的可用空间仍然比上面的 ext4 建议少。
- CoW 文件系统:避免将 Copy-on-Write (CoW) 文件系统(如 ReFS、BTRFS、ZFS、bcachefs、HAMMER)与 Subspace 一起使用。如果使用 BTRFS,请在启动 Subspace 之前禁用 CoW 使用。这仅适用于新创建的文件。或者,使用上面推荐的非 CoW 文件系统,如 ext4。 :::
sudo chattr +C path/to/data/dir
- 文件描述符限制:Linux 有 100k 文件描述符的硬性限制。超过此值可能会导致错误。Substrate 的默认限制为 10k。检查并调整 的限制。请参阅本教程以更改限制。
/proc/sys/fs/file-max
- 依赖关系:如果遇到与 相关的错误,请使用 . :::
libgomp.so.1
libgomp1
sudo apt-get install libgomp1
步骤 1:下载高级 CLI 可执行文件
步骤 2:启动高级 CLI 节点
- 打开你喜爱的终端,并使用 切换到下载目录
cd Downloads
- 使农民节点可执行(&N)
chmod +x Autonomys-farmer-ubuntu-x86_64-skylake-gemini-3h-2024-apr-24
chmod +x Autonomys-node-ubuntu-x86_64-skylake-gemini-3h-2024-apr-24
- 然后,我们将使用以下命令启动节点
# Replace `INSERT_YOUR_ID` with a nickname you choose
# Copy all of the lines below, they are all part of the same command
./Autonomys-node-ubuntu-x86_64-skylake-gemini-3h-2024-apr-24 \
run \
--chain gemini-3h \
--base-path NODE_DATA_PATH \
--farmer \
--name "INSERT_YOUR_ID"
注意
使用 run,从 Gemini 3h 开始,设置 –base-path 并指定 –chain 成为强制性的。
- 你应该在终端中看到类似的内容:
2022-02-03 10:52:23 Subspace
2022-02-03 10:52:23 ✌️ version 0.1.0-35cf6f5-x86_64-ubuntu
2022-02-03 10:52:23 ❤️ by Subspace Labs <https://Autonomys.network>, 2021-2022
2022-02-03 10:52:23 📋 Chain specification: Subspace Gemini 1
2022-02-03 10:52:23 🏷 Node name: YOUR_FANCY_NAME
2022-02-03 10:52:23 👤 Role: AUTHORITY
2022-02-03 10:52:23 💾 Database: RocksDb at /home/X/.local/share/Autonomys-node-x86_64-ubuntu-20.04-snapshot-2022-jan-05/chains/Autonomys_test/db/full
2022-02-03 10:52:23 ⛓ Native runtime: Autonomys-100 (Autonomys-1.tx1.au1)
2022-02-03 10:52:23 🔨 Initializing Genesis block/state (state: 0x22a5…17ea, header-hash: 0x6ada…0d38)
2022-02-03 10:52:24 ⏱ Loaded block-time = 1s from block 0x6ada0792ea62bf3501abc87d92e1ce0e78ddefba66f02973de54144d12ed0d38
2022-02-03 10:52:24 Starting archiving from genesis
2022-02-03 10:52:24 Archiving already produced blocks 0..=0
2022-02-03 10:52:24 🏷 Local node identity is: 12D3KooWBgKtea7MVvraeNyxdPF935pToq1x9VjR1rDeNH1qecXu
2022-02-03 10:52:24 🧑🌾 Starting Subspace Authorship worker
2022-02-03 10:52:24 📦 Highest known block at #0
2022-02-03 10:52:24 〽️ Prometheus exporter started at 127.0.0.1:9615
2022-02-03 10:52:24 Listening for new connections on 0.0.0.0:9944.
2022-02-03 10:52:26 🔍 Discovered new external address for our node: /ip4/176.233.17.199/tcp/30333/p2p/12D3KooWBgKtea7MVvraeNyxdPF935pToq1x9VjR1rDeNH1qecXu
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
步骤 3:启动高级 CLI Farmer
- 然后,我们将打开另一个终端,切换到 Downloads 目录,然后使用以下命令启动 Farmer 节点:
# Replace `PATH_TO_FARM` with location where you want you store plot files
# Replace `WALLET_ADDRESS` below with your account address from Polkadot.js wallet
# Replace `PLOT_SIZE` with plot size in gigabytes or terabytes, for example 100G or 2T (but leave at least 60G of disk space for node and some for OS)
./Autonomys-farmer-ubuntu-x86_64-skylake-gemini-3h-2024-apr-24 farm --reward-address WALLET_ADDRESS path=PATH_TO_FARM,size=PLOT_SIZE
- 你应该在终端中看到类似的内容:
2022-06-02T00:02:04.552120Z INFO Autonomys_farmer::commands::farm: Connecting to node at ws://127.0.0.1:9944
2022-06-02T00:02:04.557220Z INFO jsonrpsee_client_transport::ws: Connection established to target: Target sockaddrs: , host: "127.0.0.1", host_header: "127.0.0.1:9944", _mode: Plain, path_and_query: "/"
2022-06-02T00:02:04.575669Z INFO Autonomys_farmer::commands::farm: Opening object mapping
2022-06-02T00:02:04.617553Z INFO Autonomys_farmer::multi_farming: Opening plot
2022-06-02T00:02:04.645422Z INFO Autonomys_farmer::multi_farming: Opening commitments
2022-06-02T00:02:04.666925Z INFO Autonomys_farmer::farming: Subscribing to slot info notifications
2022-06-02T00:02:04.688218Z INFO Autonomys_farmer::archiving: Subscribing to archived segments
2022-06-02T00:02:04.689129Z INFO Autonomys_farmer::commands::farm: WS RPC server listening on 127.0.0.1:9955
2022-06-02T00:02:09.492868Z INFO Autonomys_farmer::archiving: Plotted segment segment_index=0
2022-06-02T00:02:09.492868Z INFO Autonomys_farmer::archiving: Plotted segment segment_index=1
2022-06-02T00:02:09.492868Z INFO Autonomys_farmer::archiving: Plotted segment segment_index=2
2022-06-02T00:02:09.492868Z INFO Autonomys_farmer::archiving: Plotted segment segment_index=3
2022-06-02T00:02:09.492868Z INFO Autonomys_farmer::archiving: Plotted segment segment_index=4
2022-06-02T00:02:09.492868Z INFO Autonomys_farmer::archiving: Plotted segment segment_index=5
- 你现在正在耕种!你现在在种田!只需等待你的节点完全同步,并等待你的农民完全绘制。