GithubHelp home page GithubHelp logo

otti's Introduction

Otti

A zkSNARK compiler, solver, prover and verifier for optimization problems (paper).

Cloning

To clone this repository and its submodules run

git clone --recursive https://github.com/eniac/otti.git

Building

First, make sure you have installed Docker CE.

Then build the Otti container

docker build -t otti .

And then run the container with 200GB of memory and get terminal access

docker run -m 200g -it otti

Reproducing experimental results

After connecting to the Docker container, run the following script to reproduce the experimental results from Otti.

./run.py [--lp | --sdp | --sgd] [--small | --full | --custom datasets/<path to dataset>]

One of the --lp | --sdp | --sgd options is required. Then either execute with the --small or --full flag or --custom and explicitly give a path to a dataset file.

Running the small suite

A subset of each dataset that can be reproduced on a personal computer with x86_64 architecture and >= 12GB of RAM. These datasets are expected to take less than 1 hour.

Running the full suite

A subset of each MPS dataset that can be reproduced on a large machine with x86_64 architecture and > 200GB RAM. These datasets can take several hours, in the order of 2-3 days to terminate. If your computer does not have sufficient RAM memory or more applications have reserved memory, this might be killed by the OS. This is a well-known limitation of the compiler that consumes large amounts of memory.

Running individual files in datasets/*

Our script will generate a C-file from the dataset file including non-deterministic checks. We compile it with the Otti compiler, prove and verify it and print Verification successful and the total runtime. of each stage. Note that running indiviudal SGD datasets not from plmb is not supported at this time.

Directory structure

├── compiler             -- zkSNARK compiler written in Haskell, a fork of CirC.
├── codegen              -- Code generators convert LP, SDP, SGD datasets to C files with non-deterministic checkers
├── datasets             -- The datasets from the Otti paper evaluation
│   ├── LP               -- Linear programming (LP) dataset based on Netlib-LP
│   ├── SDP              -- Semi-definite programming (SDP) dataset based on SDPLIB
│   ├── SGD              -- Stochastic Gradient Descent (SGD) dataset references and hyperparameters for PMLB dataset
├── Dockerfile           -- The Dockerfile that builds Otti
├── README.md            -- This file
├── run.py               -- Entry point executable script for reproducing experimental results (artifact eval)
├── Spartan              -- The Spartan zkSNARK prover/verifier back-end from Microsoft
├── spartan-zkinterface  -- A compatibility layer between the compiler and Spartan
└── deps                 -- External dependensieshttps://github.com/circify/circ

otti's People

Contributors

alex-ozdemir avatar elefthei avatar jkwoods avatar kwantam avatar sga001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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