Install Rusk
Rusk contains the software needed to run a Dusk node. Users can set specific compilation flags to configure their node for different roles, allowing it to perform tasks like participating in consensus, validating transactions, and storing historical data.
Rusk supports different feature setups:
- Provisioner : to stake and participates in consensus.
- Archive node : to store and serve historical data.
- Prover : to compute Zero-Knowledge Proofs.
To install Rusk, you can either:
- Use the node installer (recommended)
- Build from source
- Use docker (not recommended for production environment)
Requirements
This page is tailored for Linux servers, if you are using another operating system you may encounter compatibility issues.
Hardware
The node software has been tested on x86-64/AMD64 and ARM architectures.
Dusk supports several types of node configurations, and hardware requirements depend on the type of node you want to set up.
Node Installer
If you want to spin up a Provisioner node on the Nocturne testnet, you can use the node installer script. This installer will set up Rusk as a service, preconfigure parts of the node, and provide a couple of helper scripts.
You can install Rusk by pasting the following command in your terminal:
Build from source
If your goal is to build from source, the section below outlines all the steps and requirements.
1. Install the Rust Programming Language
The majority of Dusk software is written in Rust. To compile our code, we will first need to make sure it’s installed.
Refer to Rustup on how to install Rust.
2. Compiling the Dusk node
2.1 Download Node Software
Clone the Rusk repository:
To compile and run the Dusk node from source, launch the commands in sequence.
Software Prerequisites: You’ll need the following software installed to follow this guide: curl
, zip
, libssl-dev
, rustc
, clang
, gcc
and git
.
Run the setup script in the scripts folder of rusk that can take care of dependencies.
Generate the keys used by the circuits:
Compile all the genesis contracts:
Build the node:
Once your node is installed, you can either run a Provisioner, an archive node or a Prover.
If you want to run a local cluster instead, you can follow the instructions below.
2.2 Networking
Ensure that your device can download files and communicate with other nodes.
As Dusk uses the ultra-efficient P2P UDP network protocol Kadcast, the network requirements are minimal but should maintain symmetrical, stable, low-latency connections.
For external network connectivity, ensure that your firewall and router’s ports are forwarded correctly:
- 9000/udp: Required for Kadcast consensus messages.
- 8080/tcp: Optional HTTPS API for querying the node.
Docker Installation
This guide will take you through the process using Docker, for running a local Dusk node.
Docker packages applications into containers that include all dependencies, ensuring a consistent runtime environment. This ensures that software always runs consistently, regardless of where it is installed.
Prerequisites
- 🐳 Docker: If you don’t have Docker installed, please follow the official guide
- 🛜 Internet Connection: Required to download the Docker image and necessary files.
- 🛠️ Git: Optional, but recommended. Useful for retrieving the node code. Git can be downloaded here
- 💻 Terminal: To execute the steps in the Step-By-Step below, you will need to use a terminal application.
- 🎛️ x86-AMD64: To create the Docker Image, a processor with the x86-AMD64 architecture is required.
Step-by-Step Instructions
1. Get the Dusk node files
There are two way to get the software, cloning the repository using git, or simply downloading from github
2. Build Docker Image
With Docker installed and the repository files obtained, let’s build the Docker image. Note that this can take 15 to 20 minutes.
The most up to date commands can be found in the readme of the repository
Troubleshooting Tips
- Installation Issues: Ensure your operating system is up-to-date, you have adequate permissions and all the necessary prerequisite software is installed.
- Network Errors: Check your internet connection and verify UDP ports are open if connecting to an external network.