Operators guide
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
порада
In the example above the number 3 corresponds to the domainId.
Register an operator on domain
Prefer a video? Expand for our installation video
Create operator key:
An operator needs a key pair to participate in bundle production. You can create a key using the following command:
target/production/subspace-node key generate --scheme sr25519
Back up the key. Take the public key (hex)
of the Keypair. The public key is part of the operator config we will be using later on PolkadotJS portal.
Insert key to Keystore:
The key generated above needs to be added to the Keystore so that the operator node can use it to participate in bundle production.
To insert the key, use the following command:
target/production/subspace-node key insert \
--suri "<Secret phrase>" --key-type oper --scheme sr25519 --keystore-path /tmp/keystore
The command above assumes /tmp/keystore
as the keystore location.
suri
is the secret phrase of the operator key.
To register an operator on the domain:
- Proceed to PolkadotJS
- Make sure to select the correct network at the top-left corner.
- Select the account you want to use in
using the selected account
. - Select
domains
undersubmit the following extrinsic
and chooseregisterOperator(domainID, amount, config)
in the dropdown. - Enter the
domainId
to be registered on. - Enter the desired staking amount in the
amount
field. - Put your public signing key at the
signingKey
field.
In the example below, 1 TSSC is selected for staking. 18 zeros are added because of the u128
type, so make sure to put 1000000000000000000 instead.
Make sure to use the signing key generated on the previous Create operator key step
- Enter
minimumNominatorStake
- in the example, it's set to1 TSSC
. - Enter
nominatorTax
- in the example, it's set to5%
. - Sign and submit the transaction to register an operator.
Make sure to select Submit Transaction since the transaction needs to be signed.
Once registered, the operator has to wait until the domain epoch is complete to start operating for the domain, participate in bundle production, and receive rewards.
Once the domain epoch is finished, the operator can produce bundles from the new epoch.
Any operator can add more stake by using the same functionality.
Checking your operatorId
There are two ways to check your operatorId:
You can use PolkadotJS Network Explorer.
Browse the recent events and you should see domains.OperatorRegistered event.
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
.
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-3f
chain:
- 🖼️ Windows
- 🍎 macOS
- 🐧 Ubuntu
target/production/subspace-node `
--chain gemini-3f `
--rpc-external `
--node-key 0xxeea96fe9cfbd6c1d7e9657e36447a158c0c80432b2bc8869a1c6706707843f `
-- `
--domain-id 3 `
--chain gemini-3f `
--operator `
--keystore-path /tmp/keystore `
--rpc-external
target/production/subspace-node \
--chain gemini-3f \
--rpc-external \
--node-key 0xxeea96fe9cfbd6c1d7e9657e36447a158c0c80432b2bc8869a1c6706707843f \
-- \
--domain-id 3 \
--chain gemini-3f \
--operator \
--keystore-path /tmp/keystore \
--rpc-external
target/production/subspace-node \
--chain gemini-3f \
--rpc-external \
--node-key 0xxeea96fe9cfbd6c1d7e9657e36447a158c0c80432b2bc8869a1c6706707843f \
-- \
--domain-id 3 \
--chain gemini-3f \
--operator \
--keystore-path /tmp/keystore \
--rpc-external
Make sure to use the public key (hex) that we generated earlier in the Create Operator Key section
You should see the node start sucesfully and begin syncing
To view the stored node information navigate to:
- 🖼️ Windows
- 🍎 macOS
- 🐧 Ubuntu
C:\Users\Alice\AppData\Local
/Users/Alice/Library/Application Support
$HOME/.local/share
Embedded Docs
The following command can be used to explore all parameters and subcommands:
target/production/subspace-node --help
Build from source
If you prefer to build from the source rather using existing builds, the domain operator node is embedded within the subspace-node
binary, please refer to Subspace node for how to build from source.
Operator deregistration
To deregister an operator on the domain and have your tokens released:
Only account who registered an operator can deregister it. Make sure to use the same wallet / account to sign the transaction for deregistration.
Proceed to PolkadotJS
Make sure to select the correct network at the top-left corner.
Select the account you want to use in
using the selected account
.Select
domains
undersubmit the following extrinsic
and choosederegisterOperator(operatorId)
in the dropdown.Your tokens and tokens of operator
Nominators
will be released after thelockingPeriod
.To check the locking period you can go to
Developer
->Chain state
->Constants
.Select
domains
underselected contant query
and choosestakeWithdrawalLockingPeriod
.Click on
+
to run the query.
Number 256 above corresponds to the number of the domain blocks, and not the consensus chain blocks.
Operator Stake Withdrawal
Operator stake withdrawal works similarly to Nominator stake withdrawal. Refer to this section to withdraw your stake.
Switch domains
Any Operator can switch domain they operate on anytime. In order to switch domain:
- Proceed to PolkadotJS
- Make sure to select the correct network at the top-left corner.
- Select the account you want to use in
using the selected account
. - Select
domains
undersubmit the following extrinsic
and chooseswitchDomain(operatorId, newDomainId)
in the dropdown. - Add your
operatorId
andnewDomainId
to the corresponding fields.
Only the account who registered Operator can swith the domain.
Stake of your Nominators won't be released, but will be moved to the new domain as well.