Giter VIP home page Giter VIP logo

nexus-zkevm's Introduction

# The Nexus zkVM

Screenshot_1

The Nexus zkVM is a modular, extensible, open-source, and highly-parallelized zkVM, designed to run at a trillion CPU cycles proved per second given enough machine power.

Submit ZK Proof

Note that if you are using VPS, use Mobaxterm client to connect to SSH to be able to download files from your server to your local PC

1-Install Nexus zkVM CLI

1- Update packages:

sudo apt update && sudo apt upgrade

2- Install cmake:

sudo apt install build-essential cmake

3- Install Rust:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
. "$HOME/.cargo/env"

# Redirect rust to RISC-V:
rustup target add riscv32i-unknown-none-elf

4- Install Nexus zkVM CLI:

cargo install --git https://github.com/nexus-xyz/nexus-zkvm nexus-tools --tag 'v1.0.0'

5- Verify Installation:

cargo nexus --help

Screenshot_1

2-Create a new Nexus project

1- Create directory:

cargo nexus new nexus-project

2- Go to Directory

cd nexus-project

3- Edit main.rs

# Open edit menu
nano src/main.rs

# Delete everything and paste the following code
#![no_std]
#![no_main]

fn fib(n: u32) -> u32 {
    match n {
        0 => 0,
        1 => 1,
        _ => fib(n - 1) + fib(n - 2),
    }
}

#[nexus_rt::main]
fn main() {
    let n = 7;
    let result = fib(n);
    assert_eq!(result, 13);
}

To save: Ctrl+X Y Enter

3- Run Nexus

cargo nexus run -v

4- Prove your program

Generate a proof for your Rust program using the Nexus zkVM.

cargo nexus prove

5-Verify your proof

Finally, load and verify the proof:

cargo nexus verify

Easily done! Now download and SAVE your NEXUS-PROOF file in a safe place! Screenshot_1

nexus-zkevm's People

Contributors

ehsan2141sh avatar

Watchers

 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.