Coder Social home page Coder Social logo

rusk's Introduction

Build Status codecov

Rusk

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.

Prerequisites

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

Specification Requirements

Minimum Specifications

CPU RAM Storage Network Connection
2 cores; 2 GHz 1 GB 60 GB 1 Mbps

Recommended Specifications

CPU RAM Storage Network Connection
4 cores; 2 GHz 4 GB 250 GB 10 Mbps

Build and Tests

To build rusk from source, Rust, GCC and Clang are required. Once the dependencies are installed, 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.

Use

Prerequisites:

# Generate the keys used by the circuits
make keys

# Compile all the genesis contracts
make wasm

# Copy example consensus.keys
mkdir -p ~/.dusk/rusk
cp examples/consensus.keys ~/.dusk/rusk/consensus.keys

Run a single-node cluster with example's data

# Generate genesis state
cargo r --release -p rusk -- recovery-state --init examples/genesis.toml -o /tmp/example.state

# Launch a local ephemeral node
DUSK_CONSENSUS_KEYS_PASS=password cargo r --release -p rusk -- -s /tmp/example.state

Contracts compilation

To just compile all the genesis contracts without running the server:

make contracts

To generate a specific genesis contract:

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

See also make help for all the available commands

Docker support

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

To build the Docker image:

docker build -t rusk .

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.

How to run a node

For more information on running a node, see our wiki:

License

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

rusk's People

Contributors

autholykos avatar cperezz avatar daksh14 avatar fed-franz avatar fulviuus avatar goshawk-3 avatar hdauven avatar herr-seppia avatar miloszm avatar mocello avatar osdusk avatar robert-haas avatar t00ts avatar ureeves avatar vlopes11 avatar xevisalle avatar zer0 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.