Git Product home page Git Product logo

hintstest's Introduction

Example Project

It calculates sqrt using an RPC server implemented in Rust.

Prerequisites

  • protoc from here
  • scarb from here
  • lambdaworks/provers/cairo from here for proving only. As of February 2024, the tested revision is fed12d6.

Usage

  1. Start the hints server:
    1. Rust: cd rust; cargo run
    2. Javascript: cd js; npm install; npm start
  2. Run scarb hints-run --oracle-server http://127.0.0.1:3000 --layout all_cairo

Extra options

If the circuit requires built-ins, it's possible to add the flag --layout <VALUE>

It's possible to generate trace and memory files when running the circuit by adding the flags --trace-file <PATH> --memory-file <PATH>.

If the intention is to generate and verify a proof, execute scarb hints-run with the flag --proof-mode. The proof can be generated and verified using lambdaworks/provers/cairo. The command to generate the proof is: platinum-prover prove <TRACE_FILE> <MEMORY_FILE> <PROOF_FILE>. The command to verify a proof is: platinum-prover verify <PROOF_FILE>.

Testing

The command for running tests is: scarb hints-test --oracle-server http://127.0.0.1:3000 --layout all_cairo

Note

Proof generation and verification has been tested exclusively with lambdaworks-fed12d6. Other versions may generate invalid proofs.

To install the prover, execute the following commands:

    git clone https://github.com/lambdaclass/lambdaworks.git
    cd lambdaworks
    git checkout fed12d674418e4f09bc843b71bc90008a85b1aed
    cd provers/cairo
    cargo install --path . --locked --features=cli,instruments,parallel

hintstest's People

Contributors

ametel01 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.