Register an Operator
Download Subspace Node
Download Subspace Node
for your respective operating system.
For running the Operator Node on Linux, proceed directly to the next step.
- 🖼️ Windows
- 🍎macOS
- 🐧Ubuntu
Choosing the right domain
An operator needs to register on a specific domain and create a key pair to participate in bundle production. Stake Wars is using domains with IDs 0 (Nova) and 1 (AutoID). It is possible to register an operator for each domain, but each operator will require running a node.
Any account with the minimum operator stake can become an operator.
Create operator key
An operator needs a key pair to participate in bundle production.
To create a new operator key, run the following command:
subspace-node domain key create --base-path NODE_DATA_PATH --domain-id DOMAIN
Make sure to specify the base --base-path for the key generation, and running an operator node and make sure to replace the value in --domain-id with the domain ID you would like to be an operator on.
The operator is responsible for finding out the correct domain ID they want to operate on.
You have successfully generated an operator key, congratulations!
Be sure to record and securely store the printed seed phrase. If it is leaked or stolen, both your operator and nominator stakes could be at risk of being slashed.
The keys were generated in the subfolder of NODE_DATA_PATH under /domains/domainID/keystore
. If you don't see the generated keypair in the subfolder, something went wrong.
Start the domain operator node
The domain operator node is running with an embedded consensus node, thus you need to specify the args for both the consensus node and the domain operator node:
subspace-node [consensus-chain-args] -- [domain-args]
Example:
Start a node as operator on gemini-3h
chain:
Currently, the domain chain does not support syncing from other operator nodes; it needs to be deterministically derived from the consensus chain block by block.
You need to wipe and sync your node from genesis block without using snap sync, since you need to sync both consensus and domain chains. You do not need to wipe any existing plots.
Ensure you replace your_domain_id
with your domain identifier in the command and your_operator_id
with your operator_id.
You can ignore setting up your_operator_id
while you're syncing your node as you won't have an operator id until you have registered your operator. Make sure to set it after syncing and registration.
While it is possible to use archive
for blocks-pruning
and state-pruning
, it is recommended to use archive-canonical
. Using archive
will keep the state of all blocks and will use additional disk space.
- 🖼️ Windows
- 🍎 macOS
- 🐧 Ubuntu
- 🐋 Docker
target/production/subspace-node run `
--chain gemini-3h `
--name your_node_name `
--base-path NODE_DATA_PATH `
--blocks-pruning archive-canonical `
--state-pruning archive-canonical `
--sync full `
-- `
--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 gemini-3h \
--name your_node_name \
--base-path NODE_DATA_PATH \
--blocks-pruning archive-canonical \
--state-pruning archive-canonical \
--sync full \
-- \
--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 gemini-3h \
--name your_node_name \
--base-path NODE_DATA_PATH \
--blocks-pruning archive-canonical \
--state-pruning archive-canonical \
--sync full \
-- \
--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)
# For running on Aarch64 add -aarch64 after DATE
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", "0.0.0.0:30333",
"--dsn-listen-on", "/ip4/0.0.0.0/tcp/30433",
# Replace INSERT_YOUR_ID with your node ID (will be shown in telemetry)
"--name", "INSERT_YOUR_ID",
"--blocks-pruning", "archive-canonical",
"--state-pruning", "archive-canonical",
"--sync", "full",
"--",
# 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"
]
healthcheck:
timeout: 5s
# If node setup takes longer than expected, you want to increase interval and retries number.
interval: 30s
retries: 60
volumes:
node-data:
If you're running an operator node for AutoID domain, add the following bootstrap node to the list of domain arguments:
--bootstrap-nodes /dns/bootstrap-0.autoid.gemini-3h.subspace.network/tcp/30334/p2p/12D3KooWFoiz2iTkmnnSqiL2oQRhGzaqgtUjYNz2jyWKQqgPXgx9
You should see the node start successfully and begin syncing.