Giter Club home page Giter Club logo

raiko's Introduction

raiko

Usage

Building

  • Install the cargo risczero tool and the risc0 toolchain:
$ cargo install cargo-risczero
$ cargo risczero install
$ cargo risczero install --version v2024-02-08.1
  • Install the cargo prove tool and the succinct toolchain:
$ curl -L https://sp1.succinct.xyz | bash
$ sp1up
$ cargo prove --version
$ cargo build

Running

Run the host in a terminal that will listen to requests:

Just for development with the native prover:

cargo run

Then in another terminal you can do requests like this:

./prove_block.sh taiko_a7 native 10

Look into prove_block.sh for the available options or run the script without inputs and it will tell you.

You can also automatically sync with the tip of the chain and prove all new blocks:

./prove_block.sh taiko_a7 native sync

Provers

Before running you should set the rust toolchain in workspace to the desired prover's toolchain. If the script is not run, cargo will proceed with the defult rust-toolchain file which specifies "nightly". Assuming you want to run prover X:

./toolchain.sh X

Provers can be enabled using features. To compile with all of them (using standard options):

cargo run --release --features "risc0 sp1"

risc zero

Testing

RISC0_DEV_MODE=1 cargo run --release --features risc0

Bonsai

# edit run_bonsai.sh and run
run_bonsai.sh
# then
prove_block.sh taiko_a7 risc0-bonsai 10

CPU

cargo run --release --features risc0

GPU

cargo run -F cuda --release --features risc0

OR

cargo run -F metal --release --features risc0

CUDA needs to be installed when using cuda: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html

SP1:

cargo run --release --features sp1

SGX:

cargo build --release --features sgx
cargo run --release --features sgx

Make sure to first do a cargo build because cargo run does not build the sgx binary!

If your CPU doesn't support SGX, you can still run the SGX code through gramine like it would on an SGX machine:

SGX_DIRECT=1 cargo run --release --features sgx

raiko's People

Contributors

ceciliaz030 avatar brechtpd avatar smtmfft avatar wollac avatar rogerlamtd avatar johntaiko avatar hashcashier avatar intoverflow avatar d1onys1us avatar pbeza avatar petarvujovic98 avatar tquangtuyen avatar capossele avatar dyxushuai avatar criadoperez avatar austinabell avatar nategraf avatar hmrtn avatar distributedstatemachine avatar spachib avatar subnetdev0 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.