36 releases (3 stable)

new 1.1.0 Feb 14, 2025
0.25.0-phoenix.0.26 May 1, 2024
0.24.0-plonk.0.16-rc.2 Dec 19, 2023
0.22.0-plonk.0.16 Oct 14, 2023
0.13.0-rc.0 Mar 14, 2022

#4 in #rusk

Download history 10/week @ 2024-11-02 7/week @ 2024-12-07 1/week @ 2024-12-14 278/week @ 2025-01-18 39/week @ 2025-01-25 18/week @ 2025-02-01 66/week @ 2025-02-08

407 downloads per month
Used in 4 crates

MPL-2.0 license

215KB
4.5K SLoC

Rusk Rusk

The official Dusk protocol node client and smart contract platform.

Rusk CI   explorer CI   web-wallet CI   GitHub Repo stars   Discord   X (formerly Twitter) Follow   Static Badge

Unstable : No guarantees can be made regarding the API stability, the project is in development.

🖧 How to run a node

This README is for people who want to develop, test nodes locally, and contribute to the Rusk codebase.

For more information on running a node for main- or testnet, see our Node operator docs

📃 Table of Contents

📝 Prerequisites

  • Rust 1.71 nightly or higher
  • GCC 13 or higher
  • Clang 16 or higher

Setup script

We provide a setup script in the scripts folder that can take care of everything.

bash scripts/dev-setup.sh

Rust Installation

Rusk makes use of the nightly toolchain, make sure it is installed. Furthermore, to build the WASM contracts, wasm-pack is required.

To install and set the nightly toolchain, and install wasm-pack, run:

rustup toolchain install nightly
rustup default nightly
cargo install wasm-pack

🛠️ Build and Tests

To build rusk from source, make sure the prerequisites are met. Then you can simply run the following command to compile everything:

make

To run tests:

make test

That will also compile all the genesis contracts and its associated circuits. See also make help for all the available commands

💻 Run a local node for development

Spin up local node

Run a single full-node cluster with example state.

Prepare modules:

# Generate the keys used by the circuits
# Compile all the genesis contracts
# Copy example consensus.keys
make prepare-dev

Run a Node

# Launch a local ephemeral node
make run-dev

Run an Archive node

make run-dev-archive

Run a Prover Node

The node can be build as a prover only as follows:

cargo r --release --no-default-features --features prover -p dusk-rusk

This prover node will be accessible on https://localhost:8080. Apps like the rusk-wallet can be connected to it for quicker and more private local proving.

📜 Contracts compilation

Compile all the genesis contracts without running the server:

make contracts

Compile a specific genesis contract:

# generate the wasm for `transfer` contract
make wasm for=transfer

🐳 Docker support

It's also possible to run a local ephemeral node with Docker.

To build the Docker image with archive:

docker build -t rusk .

To build the Docker image without archive:

docker build -t rusk --build-arg CARGO_FEATURES="" .

To run Rusk inside a Docker container:

docker run -p 9000:9000/udp -p 8080:8080/tcp rusk

Port 9000 is used for Kadcast, port 8080 for the HTTP and GraphQL APIs.

License

The Rusk software is licensed under the Mozilla Public License Version 2.0.


lib.rs:

Implementations of basic wallet functionalities. Re-export of the most commonly used types and traits.

Dependencies

~8–16MB
~235K SLoC