Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dusk-network/rusk
The reference Dusk platform implementation and tools
https://github.com/dusk-network/rusk
Last synced: 3 days ago
JSON representation
The reference Dusk platform implementation and tools
- Host: GitHub
- URL: https://github.com/dusk-network/rusk
- Owner: dusk-network
- License: mpl-2.0
- Created: 2020-02-10T13:24:17.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-01-24T14:28:39.000Z (4 days ago)
- Last Synced: 2025-01-24T14:34:32.136Z (4 days ago)
- Language: Rust
- Homepage:
- Size: 45.5 MB
- Stars: 183
- Watchers: 18
- Forks: 60
- Open Issues: 289
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- fucking-awesome-rust - dusk-network/rusk - Reference implementation of Dusk, a privacy-focused, scalable FMI for real-world assets (RWA) and compliant financial applications. [![Build Status](https://github.com/dusk-network/rusk/actions/workflows/rusk_ci.yml/badge.svg)](https://github.com/dusk-network/rusk/actions/workflows/rusk_ci.yml) (Applications / Blockchain)
- awesome-rust - dusk-network/rusk - Reference implementation of Dusk, a privacy-focused, scalable FMI for real-world assets (RWA) and compliant financial applications. [![Build Status](https://github.com/dusk-network/rusk/actions/workflows/rusk_ci.yml/badge.svg)](https://github.com/dusk-network/rusk/actions/workflows/rusk_ci.yml) (Applications / Blockchain)
README
The official Dusk protocol node client and smart contract platform.> _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](https://docs.dusk.network/operator/overview/)# 📃 Table of Contents
- [Prerequisites](#prerequisites)
- [Setup script](#setup-script)
- [Rust Installation](#rust-installation)
- [Build and Tests](#️-build-and-tests)
- [Run a local node for development](#-run-a-local-node-for-development)
- [Spin up local node](#spin-up-local-node)
- [Prepare modules](#prepare-modules)
- [Run a node](#run-a-node)
- [Run an archive node](#run-an-archive-node)
- [Run a prover node](#run-a-prover-node)
- [Contracts compilation](#-contracts-compilation)
- [Docker support](#-docker-support)## 📝 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
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:
```bash
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:```bash
make
```To run tests:
```bash
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:
```bash
# Generate the keys used by the circuits
# Compile all the genesis contracts
# Copy example consensus.keys
make prepare-dev
```#### Run a Node
```bash
# Launch a local ephemeral node
make run-dev
```#### Run an Archive node
```bash
make run-dev-archive
```#### Run a Prover Node
The node can be build as a prover only as follows:
```bash
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](https://github.com/dusk-network/rusk/tree/master/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:
```bash
make contracts
```Compile a specific genesis contract:
```bash
# 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:
```bash
docker build -t rusk .
```To build the Docker image **without** archive:
```bash
docker build -t rusk --build-arg CARGO_FEATURES="" .
```To run Rusk inside a Docker container:
```bash
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](./LICENSE).