Operator 操作技巧与窍门
申领 tSSC
注册操作员所需的最低代币数量是 100 tSSC。 如果你没有这么多,只要你是一个已认证农民,就有方法可以领取。
- 前往 Astral 上的质押标签页并连接您的钱包。
- 选择您想要连接的钱包。支持Subwallet 和 PolkadotJS 两个钱包。
- 输入您的密码以允许访问您的钱包。
- 从下拉菜单中选择您想使用的账户。 您可以点击左上角的按钮查看选中账户的可用和锁定 (质押的) 代币余额。
- 只要你是一个已验证的农民,就应该可以使用Claim按钮。
- 单击Claim按钮,然后它应该会变成 Pending。
- 大约5分钟后,您应该在您的帐户中看到额外的 100 tSSC 。
If the claim button is not available you may need to disconnect and reconnect your wallet. If you still don't see the claim button you may need to click refresh.
插入密钥到密钥库:
如果您决定切换域或已经有助记词,这段信息可能对你有所帮助。请在下一节阅读更多关于切换域的信息。
要插入密钥,请使用以下命令:
target/production/subspace-node domain key insert \
--base-path NODE_DATA_PATH --domain-id DOMAIN_ID --keystore-suri "<Secret phrase>"
上述命令将把密钥对插入NODE_DATA_PATH/domains/DOMAIN_ID/keystore
的子文件夹。
suri
是操作员密钥的助记词。
切换域
任何操作员都可以随时切换他们操作的域。 要切换域:
- 进入 PolkadotJS
- 请确保在左上角选择正确的网络。
- 选择您想要在
using the selected account
中使用的帐户。 - 选择
submit the following extrinsic
下的domains
并在下拉列表中选择 "switchDomain(operatorId, newDomainId) "。 - 将您的
operatorId
和newDomainId
添加到相应字段。
只有注册Operator 的账户才可以切换域。
您需要将密钥对移动到新的位置,如果您要更换域,请按照insert key to keystore section 进行操作。
您的 提名人 的质押不会被释放,而是会被移动到新的域。
有用的命令
同时运行验证器 (farmer) 和操作员节点
To run both operator and validator at the same time, provide required flags for both roles when starting your node.
- 🖼️ Windows
- 🍎 macOS
- 🐧 Ubuntu
- 🐋 Docker
target/production/subspace-node run `
--chain taurus `
--farmer `
--name your_node_name `
-- `
--domain-id your_domain_id `
--operator-id your_operator_id `
--listen-on /ip4/0.0.0.0/tcp/40333
target/production/subspace-node run \
--chain taurus \
--farmer \
--name your_node_name \
-- \
--domain-id your_domain_id \
--operator-id your_operator_id \
--listen-on /ip4/0.0.0.0/tcp/40333
target/production/subspace-node run \
--chain taurus \
--farmer \
--name your_node_name \
-- \
--domain-id your_domain_id \
--operator-id your_operator_id \
--listen-on /ip4/0.0.0.0/tcp/40333
services:
node:
# Replace snapshot-DATE with the latest release (like snapshot-2024-jun-18)
image: ghcr.io/autonomys/node:snapshot-DATE
volumes:
# Instead of specifying volume (which will store data in /var/lib/docker), you can
# alternatively specify path to the directory where files will be stored, just make
# sure everyone is allowed to write there
- node-data:/var/subspace:rw
# - /path/to/subspace-node:/var/subspace:rw
ports:
# If port 30333 or 30433 is already occupied by another Substrate-based node, replace all
# occurrences of 30333 or 30433 in this file with another value
- "0.0.0.0:30333:30333/tcp"
- "0.0.0.0:30433:30433/tcp"
- "0.0.0.0:40333:40333/tcp"
restart: unless-stopped
command: [
"run",
"--chain", "gemini-3h",
"--base-path", "/var/subspace",
"--listen-on", "30333",
"--dsn-listen-on", "/ip4/0.0.0.0/tcp/30433",
"--rpc-cors", "all",
"--rpc-methods", "unsafe",
"--rpc-listen-on", "0.0.0.0:9944",
"--farmer",
"--name", "INSERT_YOUR_ID",
"--",
# Replace INSERT_YOUR_DOMAIN_ID with domain ID you want to be operator on
"--domain-id", "INSERT_YOUR_DOMAIN_ID",
# Replace INSERT_YOUR_OPERATOR_ID with your operator ID
"--operator-id", "INSERT_YOUR_OPERATOR_ID",
"--listen-on", "/ip4/0.0.0.0/tcp/40333",
# Replace INSERT_YOUR_ID with your node ID (will be shown in telemetry)
]
healthcheck:
timeout: 5s
# If node setup takes longer than expected, you want to increase interval and retries number.
interval: 30s
retries: 60
farmer:
depends_on:
node:
condition: service_healthy
# Replace snapshot-DATE with latest release (like snapshot-2024-jun-18)
image: ghcr.io/autonomys/farmer:snapshot-DATE
volumes:
# Instead of specifying volume (which will store data in /var/lib/docker), you can
# alternatively specify path to the directory where files will be stored, just make
# sure everyone is allowed to write there
- farmer-data:/var/subspace:rw
# - /path/to/subspace-farmer:/var/subspace:rw
ports:
# If port 30533 is already occupied by something else, replace all
# occurrences of 30533 in this file with another value
- "0.0.0.0:30533:30533/tcp"
restart: unless-stopped
command: [
"farm",
"--node-rpc-url", "ws://node:9944",
"--listen-on", "/ip4/0.0.0.0/tcp/30533",
# Replace WALLET_ADDRESS with your Polkadot.js wallet address
"--reward-address", "WALLET_ADDRESS",
# 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)
"path=/var/subspace,size=PLOT_SIZE",
]
volumes:
node-data:
farmer-data:
If you're running an operator node for AutoID domain, add the following bootstrap node to the list of domain arguments:
--bootstrap-node /dns/bootstrap-0.autoid.gemini-3h.subspace.network/tcp/30334/p2p/12D3KooWFoiz2iTkmnnSqiL2oQRhGzaqgtUjYNz2jyWKQqgPXgx9
您应该能看到节点启动成功并开始同步。
切换到另一个服务器
为了确保您在切换过程中的停机时间最短,我们提出以下建议:
- 使用临时密钥同步一个新的operator节点。您可以生成一个新密钥,只是不要将它插入您的密钥库。
- 停止原节点并重命名密钥库(或任何你觉得合适的方法,以防止你不小心用原签名密钥启动原节点)。
- 使用原签名密钥更新新节点上的密钥。
- 重新启动新的operator节点。