[Node] Run your DUSK node

Node Science
7 min readMar 6, 2024

--

09/03 UPDATE : Dusk has definitely closed its faucet. It continues to process previous requests, but no longer accepts new ones. The developers believe they have gathered enough information with the 7000 nodes deployed on their testnet.

Dusk is currently in the testnet phase, and many of you have asked me in pm for a guide about setting up a node on Dusk, especially with the VPS issues, here it is !

Dusk is a Layer-1 blockchain technology designed to support smart contracts that maintain privacy while meeting regulatory standards for businesses. Its security is ensured through Succinct Attestation (SA), an innovative and efficient Proof-of-Stake (PoS) consensus mechanism that ensures transactions are finalized — a critical feature for financial applications. This innovation paves the way for groups and businesses eager to adopt blockchain to overcome the shortcomings of conventional financial systems

Note that Dusk supports several types of node configurations, depending on the preference of the users and their intended setup.

  • Provisioner: Provisioners are specialized in directly participating in the consensus. They play a vital role as they are responsible for validating transactions, as well as processing and appending new blocks to Dusk blockchain.
  • Prover: Provers carry on the computation-heavy task of creating Zero-Knowledge proofs (ZKP), which are a requirement for transactions on Dusk.
  • Full Node: A full node combines the capabilities of a provisioner node and prover node.
  • Archiver: While Provisioners and full nodes generally only keep the current state of the blockchain, Archivers instead maintain a complete copy of the blockchain. They normally don’t actively engage in consensus related tasks and do not require a valid Stake.

But as suggested in their documentation, we are going to learn how to build a Provisioner node on a VPS.

Welcome to Node Science! Here, you will learn and understand how to set up your node easily and quickly, without any prior technical knowledge.

Feel free to follow us on Twitter to stay updated on everything related to nodes and join our Discord for further discussion or any questions with our community!

I) VPS configuration

To run a node you’ll need a VPS (Virtual Private Server) and one of the most reliable and cheapest solutions is Contabo. It’s a cost-effective German VPS solution built in 2003, known for its robust performance and reliability, catering to a wide range of computing needs and budgets.

Please be aware that there seem to be connectivity issues with Contabo VPS located in the EU. It is therefore advisable to order a VPS from the US or UK (which are the least expensive).

If you already have an EU VPS, simply go to this page, click on Manage and select Move to other region. Select US or UK region (with an additional cost of 2.5$), choose New deployment and go through the different confirmation. Wait a few minutes and your node (with a new IP) should appear under “VPS control”. Click on Reinstall, install Ubuntu 22.04 as OS and finally click on Restart.

If this is your first VPS, you can choose the CLOUD VPS 2 by clicking here and select “United States (Central)”. Note that you can opt for a more powerful server (VPS 3 or 4) to run multiple different nodes on it more economically.

Don’t forget to choose a password.

Once payment is complete, you’ll receive an e-mail with your IP address entitled “Your login data!”. To connect to your VPS and securely run your node, you must download and install the Putty software, which enables a secure connection.

Type your IP address and Open.

II) Create your DUSK wallet

To get started, you need to install the wallet provided by the Dusk team by clicking here. Don’t forget to save your seed.

Your public address is displayed above your balance.

II) Claiming Faucet

Before proceeding with the next steps, you need to claim from the faucet. To do this, go to Dusk’s Discord by clicking here and complete the verification. Among the team members, locate the bot “Dusk Testnet Faucet.”, right-click on it and select “Message.”

Type !dusk, and the bot will ask for your DUSK address. Simply respond by copying your address from your wallet and the bot will respond that the transaction is scheduled and all you have to do is wait a few minutes. Note that there is currently a limit of 1 transaction per user/wallet every 24 hours.

You should then see a balance of 1100 DUSK in your wallet.

III) Setup firewall

Start by configuring the Uncomplicated Firewall (UFW) in Linux to allow network traffic on specific ports and protocols, and then enable the firewall.

ufw allow ssh
ufw allow 9000/udp
ufw allow 8080/tcp
ufw enable

IV) Node deployment

Start by refreshing the local package index to incorporate the most recent modifications made in the repositories.

sudo apt -q update && sudo apt -qy upgrade

You must now install RUSK using the latest version of the ITN installer from the Dusk Network’s GitHub repository. This installer will set up Rusk as a service, preconfigure parts of the node, and provide a couple of helper scripts.

Note: I didn't do this myself, but it appears that by installing version 1.0.4 and then updating to version 1.0.6, you can significantly save time in node synchronization by starting at block ~89,000.

#curl --proto '=https' --tlsv1.2 -sSfL https://github.com/dusk-network/itn-installer/releases/download/v0.1.4/itn-installer.sh | sudo sh
curl --proto '=https' --tlsv1.2 -sSfL https://github.com/dusk-network/itn-installer/releases/download/v0.1.6/itn-installer.sh | sudo sh

You can now import your previously created wallet by copying your mnemonic phrase generated during the creation of the wallet in lowercase. They will ask you to choose a password that you should remember well.

You will likely receive an error message saying “Connection to Rusk Failed, some operations won’t be available.” This is because your node is not yet online, but this is not a problem; you can continue with the steps.

rusk-wallet restore

You now need to export a consensus key for the given wallet by entering the password you just set and by providing a new password for your provisionner keys.

rusk-wallet export -d /opt/dusk/conf -n consensus.keys

Run the following script to set it as an environment variable and type your password as the Consensus keys password.

sh /opt/dusk/bin/setup_consensus_pwd.sh

You can now start rusk.

service rusk start

You now need to wait for your node to synchronize up to the current block available here (actually ~350,000). Based on my experience, it took 24 hours starting from block 0.

You can check the block with :

ruskquery block-height

Or by checking the height of the last “block accepted”.

grep "block accepted" /var/log/rusk.log

V) Stake Dusk

You now need to stake your Dusk. You can stake any amount you wish, but it must be more than 1000. For your information, the faucet, which can be used once every 24 hours, dispenses 1100 tokens.

rusk-wallet stake --amt 1000

Wait a few minutes to get to this screen.

You can then view the amount you are staking with:

rusk-wallet stake-info

And finally to see if your node is participating in consensus and creating blocks, you can occasionally check:

grep "execute_state_transition" /var/log/rusk.log | tail -n 5

Please be aware that this process may take some time, as your stake requires a minimum of 2 epochs, equivalent to 4320 blocks, to mature. Additionally, the proportion of your stake in relation to the total stake influences this process.

After the two epochs have passed, you will be able to see how much tDUSK you have earned with :

rusk-wallet stake-info --reward

Congratulations, you have successfully configured your Dusk node!

Feel free to follow us on Twitter to stay updated on everything related to nodes and join our Discord for further discussion or any questions with our community!

--

--

Node Science
Node Science

Written by Node Science

Learn how to easily set up your node with Node Science ! https://discord.gg/XCWThSXzZp

Responses (2)