Giter VIP home page Giter VIP logo

jellyfish's Introduction

Jellyfish cryptographic library

example workflow Crates.io (version) GitHub

Disclaimer

DISCLAIMER: This software is provided "as is" and its security has not been externally audited. Use at your own risk.

Chatroom

For general discussions on Jellyfish PLONK, please join our Discord channel.

Development environment setup

We recommend the following tools:

Run direnv allow at the repo root. You should see dependencies (including Rust) being installed.

Build, run tests and examples

Build:

cargo build

Run an example:

cargo run --release --example proof_of_exp

This is a simple example to prove and verify knowledge of exponent. It shows how one may compose a circuit, and then build a proof for the circuit.

Tests

cargo test --release

Note that by default the release mode does not check integers overflow. In order to enforce this check run:

./scripts/run_tests.sh

Test coverage

We use grcov for test coverage

./scripts/test_coverage.sh

Generate and read the documentation

Standard

cargo doc --open

Code formatting

To format your code run

cargo fmt

Updating non-cargo dependencies

Run nix flake update if you would like to pin other version edit flake.nix beforehand. Commit the lock file when happy.

To update only a single input specify it as argument, for example

nix flake update github:oxalica/rust-overlay

Benchmarks

Primitives

Currently, a benchmark for verifying Merkle paths is implemented. The additional flags allow using assembly implementation of square_in_place and mul_assign within arkworks:

RUSTFLAGS='-Ctarget-cpu=native -Ctarget-feature=+bmi2,+adx' cargo bench --bench=merkle_path

PLONK proof generation/verification

For benchmark, run:

RAYON_NUM_THREADS=N cargo bench

where N is the number of threads you want to use (N = 1 for single-thread).

A sample benchmark result is available under bench.md.

Git Hooks

The pre-commit hooks are installed via the nix shell. To run them on all files use

pre-commit run --all-files

jellyfish's People

Contributors

alxiong avatar ancient123 avatar bfish713 avatar chancharles92 avatar clu8 avatar dependabot[bot] avatar ggutoski avatar huitseeker avatar jbearer avatar mrain avatar philippecamacho avatar sveitser avatar tessico avatar victorkoenders avatar zhenfeizhang 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.