স্কিপ করে মূল কন্টেন্ট এ যান
Version: latest

Operators guide

note

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.

note

Any account with the minimum operator stake can become an operator.

To check the list of available domains:

  1. Proceed to PolkadotJS
  2. Make sure to select the correct network at the top-left corner.
  3. Go to Developer -> Chain state Staking-1
  4. Select domains under selected state query and choose domainRegistry
  5. Exclude option
  6. Click on + to query the chain state. Staking-2
  7. Review the list of available domains Staking-3
    tip

    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

Staking-4

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:

  1. Proceed to PolkadotJS
  2. Make sure to select the correct network at the top-left corner.
  3. Select the account you want to use in using the selected account.
  4. Select domains under submit the following extrinsic and choose registerOperator(domainID, amount, config) in the dropdown.
  5. Enter the domainId to be registered on.
  6. Enter the desired staking amount in the amount field.
  7. Put your public signing key at the signingKey field.
note

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.

Staking-5

info

Make sure to use the signing key generated on the previous Create operator key step

  1. Enter minimumNominatorStake - in the example, it's set to 1 TSSC.
  2. Enter nominatorTax - in the example, it's set to 5%.
  3. Sign and submit the transaction to register an operator.

Staking-6

info

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:

  1. You can use PolkadotJS Network Explorer.

    Staking-7

  2. Browse the recent events and you should see domains.OperatorRegistered event.

    Staking-8

  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.

  1. Navigate to Subspace Subscan portal.

  2. Click on Blockchain -> Extrinsics.

    Staking-9

  3. Scroll to the bottom of the page to view all recent events, search for register_operator event.

    Staking-10

  4. Click on Extrinsic ID for the desired event.

  5. Scroll to Parameters and ensure that signing_key corresponds to your signing key.

    Staking-11

  6. Scroll to Events and click on dropdown arrow for domains(OperatorRegistered).

    Staking-12

  7. 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:

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
note

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

Staking-13

To view the stored node information navigate to:

FOLDERID_LocalAppData e.g.

C:\Users\Alice\AppData\Local

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:

info

Only account who registered an operator can deregister it. Make sure to use the same wallet / account to sign the transaction for deregistration.

  1. Proceed to PolkadotJS

  2. Make sure to select the correct network at the top-left corner.

  3. Select the account you want to use in using the selected account.

  4. Select domains under submit the following extrinsic and choose deregisterOperator(operatorId) in the dropdown.

    Staking-14

  5. Your tokens and tokens of operator Nominators will be released after the lockingPeriod.

  6. To check the locking period you can go to Developer -> Chain state -> Constants.

  7. Select domains under selected contant query and choose stakeWithdrawalLockingPeriod.

  8. Click on + to run the query.

Staking-15

info

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:

  1. Proceed to PolkadotJS
  2. Make sure to select the correct network at the top-left corner.
  3. Select the account you want to use in using the selected account.
  4. Select domains under submit the following extrinsic and choose switchDomain(operatorId, newDomainId) in the dropdown.
  5. Add your operatorId and newDomainId to the corresponding fields.

Staking-24

note

Only the account who registered Operator can swith the domain.

note

Stake of your Nominators won't be released, but will be moved to the new domain as well.