NuLink Worker Initialization and Running

After installing the worker node via Docker, you can initialize and run it by following these three steps:

  1. Export Node Environment Variables

  2. Initialize Node Configuration

  3. Launch the Node

You have to deposit a small amount of the testnet BNB (tBNB) into the worker account to facilitate the sending of a confirmation transaction.

Export Node Environment Variables

To streamline the Docker installation procedure, we utilize certain environment variables. These variables are crucial for the operation of the NuLink Worker.

Select a password with at least 8 characters to lock and unlock the private storage created by the NuLink Worker. It's important to remember this password for future access.

export NULINK_KEYSTORE_PASSWORD=<YOUR NULINK STORAGE PASSWORD>

This password is used to unlock the keystore file of your Worker account. You would have established this password when creating the Worker account via Geth. Make sure you enter the same one!!!

export NULINK_OPERATOR_ETH_PASSWORD=<YOUR WORKER ACCOUNT PASSWORD>

Initialize Node Configuration

This step creates and stores the NuLink worker node configuration, and only needs to be run once.

$ docker run -it --rm \
-p 9151:9151 \
-v </path/to/host/machine/directory>:/code \
-v </path/to/host/machine/directory>:/home/circleci/.local/share/nulink \
-e NULINK_KEYSTORE_PASSWORD \
nulink/nulink nulink ursula init \
--signer <ETH KEYSTORE URI> \
--eth-provider <NULINK PROVIDER URI>  \
--network <NULINK NETWORK NAME> \
--payment-provider <PAYMENT PROVIDER URI> \
--payment-network <PAYMENT NETWORK NAME> \
--operator-address <WORKER ADDRESS> \
--max-gas-price <GWEI>

Replace the following values with your own value:

  • </path/to/host/machine/directory> - The host directory you create when install.

  • <ETH KEYSTORE URI> - The path to the keystore file of the Worker account.

  • <NULINK PROVIDER URI> - The URI of a local or hosted node where the Horus network launched.

  • <NULINK NETWORK NAME> - The name of the network where the Horus network launched.

  • <PAYMENT PROVIDER URI> - The URI of a local or hosted node where payment goes.

  • <PAYMENT NETWORK NAME> - The name of the payment network.

  • <OPERATOR ADDRESS> - The address of the Worker account. How to generate Worker account.

  • <GWEI> (Optional) - The maximum price of gas to spend on any transaction.

Example Input:

Example Output:

Launch the Node

Before performing this step, make sure that the environment variable has been set successfully. You can verify it using the following method, execute the following command:

If the password is not displayed, please reset the environment variables.

The following command will start the node. Make sure you use the same host directory as the configuration.

Remark1: You need to claim some BNB(test) token for Worker account as gas fee.

Remark2: If you encounter error when starting Worker node, first please check that the port 9151 has not been occupied by other process. If still not working, please check there is only one configuration json file in the </path/to/host/machine/directory>

Example Input:

Example Output:

Check Node Status for Worker Account

The following command describes how to view worker status.

Example Input:

Example Output:

Now the Worker address(e.g: 0x8B1819341BEc211a45a2186C4D0030681cccE0Ee) is ready for bonding operation.

Restart the Worker Node

Occasionally, the staker may find it necessary to restart the worker node. Below is the command for restarting the currently running nodes:

Last updated

Was this helpful?