Giter Club home page Giter Club logo

ivls's Introduction

Incrementally Verifiable Ledger Systems (IVLS)

This arkworks library describes an interface and contains an implementation for incrementally verifiable ledger systems (IVLS).

An IVLS adds additional security properties to a ledger system, which consists of a state, a transition function, and a client function that reads data from the state. (Blockchains and transparency logs are two of the most prominent examples of ledger systems.) In an IVLS, each state is augmented with a proof that it has been achieved through valid transactions, and a succinct commitment relative to which the client function's answers can be proved. All proofs are succinct and can be efficiently verified.

This library is released under the MIT License and the Apache v2 License (see License).

WARNING: This is an academic proof-of-concept prototype, and in particular has not received careful code review. This implementation is NOT ready for production use.

The library includes a circuit-specific setup IVLS compiler and a universal setup IVLS compiler. The transition function is built on top of the arkworks PCD library, and the PCD type (which is in turn determined by the underlying SNARK type) determines the type of the IVLS compiler. IVLS is built on top of the Merkle tree implemented here.

Build guide

The library compiles on the stable toolchain of the Rust compiler. To install the latest version of Rust, first install rustup by following the instructions here, or via your platform's package manager. Once rustup is installed, install the Rust toolchain by invoking:

rustup install stable

After that, use cargo, the standard Rust build tool, to build the libraries:

git clone https://github.com/arkworks-rs/ivls.git
cd ivls
cargo build

Tests

This library comes with comprehensive unit and integration tests. Run the tests with:

cargo test --all

License

The crates in this repo are licensed under either of the following licenses, at your discretion.

Unless you explicitly state otherwise, any contribution submitted for inclusion in this library by you shall be dual licensed as above (as defined in the Apache v2 License), without any additional terms or conditions.

ivls's People

Contributors

drewstone avatar npwardberkeley avatar pratyush avatar weikengchen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ivls's Issues

Unknown reasons for the failure in verifying the Groth16 proof

During the process to replace rand, we encounter an issue where the HelpCircuit's constraint system is not satisfactory.

This error is not triggered yesterday and based on the current attempts, it is likely due to other repos. We have not yet unveiled what the cause is.

Since ivls depends on a large number of repos, it is hard to conduct the debugging. I will start to take a look later this week after my other obligations are met. Likely I will start from PCD. We may have to go all the way back to algebra if FFT is indeed the reason.

IVLS uses Poseidon with hardcoded parameters that do not guarantee to be secure

This is the same as arkworks-rs/pcd#1.

IVLS has two instantiations of Merkle trees, one via Poseidon, one via Bowe-Hopwood variant of Pedersen. The problem with Poseidon, as the post above mentions, is that the parameter is hardcoded regardless of the curve and field. Sometimes, and in some situations, such parameters could be completely insecure.

This, therefore, means that the current repo is benchmark-purpose, and will wait for an upstream end-to-end implementation of a nice Poseidon sponge.

Regarding Merkle sparse prefix tree vs. Merkle self-balancing search tree

In some applications, we need non-membership proofs, which would be based on Merkle prefix tree (e.g., in CONIKS and Google Key Transparency) or self-balancing search tree (e.g., AVL tree).

Preliminarily, it seems that a search tree is better than a prefix tree because its height no longer depends on the security parameters.

But, note that for a self-balancing search tree to work, it requires a few changes to the tree:

  • Middle nodes need to store data, instead of just the left nodes.
  • Some self-balancing data needs to be stored, too.

This would mean that the overhead of CRH for each layer is higher, roughly 1.5x for Pedersen and 2x for Poseidon.

This means that, if the number of elements is large enough (e.g., supposedly 2^32), then the prefix tree (assuming the height is 2^80), which is much easier to implement, may not be too bad compared with the search tree.

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.