Installation
Prepare your new worker address key, there is 2 easy way you can do:
Using Geth
Download Geth, select the installation packages of various versions applicable to different systems.
wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.10.23-d901d853.tar.gz
Unzip the downloaded installation package
tar -xvzf geth-linux-amd64-1.10.23-d901d853.tar.gz
Enter the unzipped directory
cd geth-linux-amd64-1.10.23-d901d853/
Use. / get account new -- keystore. / keystore to generate Ethereum account and keystore
./geth account new --keystore ./keystore
You will be prompted to enter the password and confirm the password. Please remember this password for late use.
ExampleοΌ
INFO [09-08|15:30:11.904] Maximum peer count ETH=50 LES=0 total=50 INFO [09-08|15:30:11.905] Smartcard socket not found, disabling err="stat /run/pcscd/pcscd.comm: no such file or directory" Your new account is locked with a password. Please give a password. Do not forget this password. Password: Repeat password: Your new key was generated Public address of the key: 0x8B1819341BEc211a45a2186C4D0030681cccE0Ee Path of the secret key file: /root/geth-linux-amd64-1.10.23-d901d853/keystore/UTC--2022-09-13T01-14-32.465358210Z--8b1819341bec211a45a2186c4d0030681ccce0ee - You can share your public address with anyone. Others need it to interact with you. - You must NEVER share the secret key with anyone! The key controls access to your funds! - You must BACKUP your key file! Without the key, it's impossible to access account funds! - You must REMEMBER your password! Without the password, it's impossible to decrypt the
Please save your keystore file, on this example file name "UTC--2022-09-13T01-14-32.465358210Z--8b1819341bec211a45a2186c4d0030681ccce0ee".
Using Eth-Vanity
Go to https://vanity-eth.tk , scroll down, enter any prefix or suffix (using 1-3 char are good, if using too many char on prefix/suffix, your pc could be slowing down and the process could never getting complete). After generated, you'll see your address and private key (save it all). Also click on SAVE button, a popup will appear, insert your password and save the UTC keystore file.
Preparing Dependencies & Download NuLink worker
install docker, you can check how to install here: https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
Pull the latest NuLink image.
docker pull nulink/nulink:latest
Create a directory in your host machine for later usage.
cd /root mkdir nulink
Copy the keystore file of the Worker account to the host directory selected in step 3. The private file generated by NuLink Worker will also be stored in this directory.
cp /root/geth-linux-amd64-1.10.23-d901d853/keystore/* /root/nulink
Please ensure that this directory has 777 permissions:
chmod -R 777 /root/nulink
Export Node Environment Variables
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:
docker run -it --rm \
-p 9151:9151 \
-v /root/nulink:/code \
-v /root/nulink:/home/circleci/.local/share/nulink \
-e NULINK_KEYSTORE_PASSWORD \
nulink/nulink nulink ursula init \
--signer keystore:///code/UTC--2022-09-13T01-14-32.465358210Z--8b1819341bec211a45a2186c4d0030681ccce0ee \
--eth-provider https://data-seed-prebsc-2-s2.binance.org:8545 \
--network horus \
--payment-provider https://data-seed-prebsc-2-s2.binance.org:8545 \
--payment-network bsc_testnet \
--operator-address 0x8B1819341BEc211a45a2186C4D0030681cccE0Ee \
--max-gas-price 10000000000
Preparing some tBNB and NLK test token
Claim some tBNB from https://testnet.binance.org/faucet-smart or their discord faucet channel.
Claim 10 NLK testnet from https://dashboard.testnet.nulink.org/
The claiming process of NLK testnet need some tBNB as gas fees, so please claim tBNB first before claiming NLK testnet.
Launch the Node
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>
$ docker run --restart on-failure -d \
--name ursula \
-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 \
-e NULINK_OPERATOR_ETH_PASSWORD \
nulink/nulink nulink ursula run --no-block-until-ready
Example InputοΌ
docker run --restart on-failure -d \
--name ursula \
-p 9151:9151 \
-v /root/nulink:/code \
-v /root/nulink:/home/circleci/.local/share/nulink \
-e NULINK_KEYSTORE_PASSWORD \
-e NULINK_OPERATOR_ETH_PASSWORD \
nulink/nulink nulink ursula run --no-block-until-ready
Example Output:
aa3a0f6376b566473cbcde46b0e772feb4d3658188d2cbb424a1e94588d6d8eb
Check Node Status for Worker Account
The following command describes how to view worker status.
docker logs -f <docker name>
Example Input:
docker logs -f ursula
Example Output:
Authenticating Ursula
Loaded Ursula (horus)
β External IP matches configuration
Starting services
β Node Discovery (Horus)
β Work Tracking
β Start Operator Bonded Tracker
β Rest Server https://8.219.186.125:9151
Working ~ Keep Ursula Online!
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:
docker restart <container ID>
Note: please use command: docker ps to get your container id.
Update in docker environment
Make sure you still hold your staking account and worker account. The update in docker is simple: stop the node, pull the latest image and restart the node.
Stop the running node in Docker:
docker kill <container ID>
Delete the container:
docker rm <container ID>
Pull the latest NuLink image.
docker pull nulink/nulink:latest
Re-launch the worker node.
docker run --restart on-failure -d \ --name ursula \ -p 9151:9151 \ -v /root/nulink:/code \ -v /root/nulink:/home/circleci/.local/share/nulink \ -e NULINK_KEYSTORE_PASSWORD \ -e NULINK_OPERATOR_ETH_PASSWORD \ nulink/nulink nulink ursula run --no-block-until-ready
Upd
Last updated