Register an Operator
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.
Check the list of the available domains:
In order to participate in block production, operator needs to register on a specific domain.
Any account with the minimum operator stake can become an operator.
To check the list of available domains:
- Proceed to PolkadotJS
- Make sure to select the correct network at the top-left corner.
- Go to Developer -> Chain state
- Select
domains
underselected state query
and choosedomainRegistry
- Exclude
option
- Click on
+
to query the chain state. - Review the list of available domains
tip
In the example above the number 3 corresponds to the domainId. The example is not Stake Wars specific, the operator is responsible for finding out the correct domain ID they want to operate on. Stake Wars are using the domain with ID 1.
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 /tmp/node --domain-id 0
Make sure to specify the base --base-path for the key generation, and running an operator node and make sure to replace --domain-id value with the domain ID you would like to be an operator 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:
You need to wipe and sync your node from genesis block, 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. Make sure to set it after syncing and registration.
- 🖼️ Windows
- 🍎 macOS
- 🐧 Ubuntu
- 🐋 Docker
target/production/subspace-node run `
--chain gemini-3h `
--name your_node_name `
--base-path NODE_DATA_PATH `
-- `
--domain-id your_domain_id `
--operator-id your_operator_id `
--bootstrap-nodes /dns/bootstrap-0.nova.gemini-3h.subspace.network/tcp/30334/p2p/12D3KooWBm1PHFHAP9mA6LNd72uFimyPoo6ixjdfgajzizXDYND2 `
--bootstrap-nodes /dns/bootstrap-1.nova.gemini-3h.subspace.network/tcp/30334/p2p/12D3KooWD3Q8JpAPoXR67ZQ1H1nXfPqCgPHCvWVcGxNKbfFmuPnu `
--bootstrap-nodes /dns/bootstrap-2.nova.gemini-3h.subspace.network/tcp/30334/p2p/12D3KooWEYs5yikat5NanzN7c2Sb4ngxJoCro9vXMULM2ZYVWW9H `
--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 \
-- \
--domain-id your_domain_id \
--operator-id your_operator_id \
--bootstrap-nodes /dns/bootstrap-0.nova.gemini-3h.subspace.network/tcp/30334/p2p/12D3KooWBm1PHFHAP9mA6LNd72uFimyPoo6ixjdfgajzizXDYND2 \
--bootstrap-nodes /dns/bootstrap-1.nova.gemini-3h.subspace.network/tcp/30334/p2p/12D3KooWD3Q8JpAPoXR67ZQ1H1nXfPqCgPHCvWVcGxNKbfFmuPnu \
--bootstrap-nodes /dns/bootstrap-2.nova.gemini-3h.subspace.network/tcp/30334/p2p/12D3KooWEYs5yikat5NanzN7c2Sb4ngxJoCro9vXMULM2ZYVWW9H \
--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 \
-- \
--domain-id your_domain_id \
--operator-id your_operator_id \
--bootstrap-nodes /dns/bootstrap-0.nova.gemini-3h.subspace.network/tcp/30334/p2p/12D3KooWBm1PHFHAP9mA6LNd72uFimyPoo6ixjdfgajzizXDYND2 \
--bootstrap-nodes /dns/bootstrap-1.nova.gemini-3h.subspace.network/tcp/30334/p2p/12D3KooWD3Q8JpAPoXR67ZQ1H1nXfPqCgPHCvWVcGxNKbfFmuPnu \
--bootstrap-nodes /dns/bootstrap-2.nova.gemini-3h.subspace.network/tcp/30334/p2p/12D3KooWEYs5yikat5NanzN7c2Sb4ngxJoCro9vXMULM2ZYVWW9H \
--listen-on /ip4/0.0.0.0/tcp/40333
version: "3.7"
services:
node:
# Replace snapshot-DATE with the latest release (like snapshot-2022-apr-29)
# For running on Aarch64 add -aarch64 after DATE
image: ghcr.io/subspace/node:snapshot-DATE
volumes:
# Replace path/to/keystore with your actual path to keystore.
- /path/to/keystore:/keystore:ro
# 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",
"--",
# 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",
"--bootstrap-nodes", "/dns/bootstrap-0.nova.gemini-3h.subspace.network/tcp/30334/p2p/12D3KooWBm1PHFHAP9mA6LNd72uFimyPoo6ixjdfgajzizXDYND2",
"--bootstrap-nodes", "/dns/bootstrap-1.nova.gemini-3h.subspace.network/tcp/30334/p2p/12D3KooWD3Q8JpAPoXR67ZQ1H1nXfPqCgPHCvWVcGxNKbfFmuPnu",
"--bootstrap-nodes", "/dns/bootstrap-2.nova.gemini-3h.subspace.network/tcp/30334/p2p/12D3KooWEYs5yikat5NanzN7c2Sb4ngxJoCro9vXMULM2ZYVWW9H"
]
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:
You should see the node start successfully and begin syncing.
Register an operator on domain
It's crucial to fully sync your node before registering as an operator. Please follow the commands in the Start the domain operator node section and only register as an operator once your node is fully synced. If many operators are registered but their nodes are still syncing or offline, it can adversely affect the speed of block production in the domain.
Prefer a video? Expand for our installation video using PolkadotJS interface.
Register an operator using Subspace Staking interface (recommended)
- Proceed to the Subspace Staking portal and connect your wallet.
- Select the wallet you would like to connect. Both Subwallet and PolkadotJS wallets are supported.
- Enter your password to give an access to your wallet.
- Select the account you'd like to use form the dropdown menu. You will see both available and locked (staked) token balances for each account.
5. Proceed to the Stake as a pool operator
tab.
6. Select the domainId
you would like to be registered on. Enter the Minimum Operator Stake
, Amount to Stake
, Nomination Tax
and Signing key
and then click Next
.
Make sure to use the signing key generated on the previous Create operator key step.
- Approve the request in the pop-up window.
8. Congratulations, you're now registered as an operator!
It can take up to 10 minutes for the operator to be registered and appear on the page. You can check if the operator was created successfully by following the steps.
You can view some additional actions by clicking on action
next to your operator.
You can increase your stake, withdraw some stake and de-register your operator from there.
If you prefer to use a native PolkadotJS, or faced any issues in one of the steps above, you can try using PolkadotJS interface guide to register an operator on the domain.
Checking your operatorId
There are two ways to check your operatorId:
- You can use PolkadotJS Network Explorer.
2. Browse the recent events and you should see domains.OperatorRegistered event.
3. Click on the dropdown arrow to view the domainId and operatorId.
Alternatively, you can use Subscan which is a little easier to navigate for this job.
- Navigate to Subspace Subscan portal.
- Click on
Blockchain
->Extrinsics
.
- Scroll to the bottom of the page to view all recent events, search for
register_operator
event.
Click on
Extrinsic ID
for the desired event.Scroll to
Parameters
and ensure thatsigning_key
corresponds to your signing key.
- Scroll to
Events
and click on dropdown arrow fordomains(OperatorRegistered)
.
- Inspect and remember your
domain_id
.