Coder Social home page Coder Social logo

plonky-block-proof-gen's Introduction

Plonky block proof generator

Library for generating proofs from proof IR.

DEPRECATION NOTICE

The content of this project has been merged into 0xPolygonZero/proof-protocol-decoder. This repository is hence deprecated and archived.

General Usage (Extremely rough, will change)

For the time being, the only library that produces proof IR is currently plonky-edge-block-trace-parser. Down the road, the IR will be produced by decoding the proof gen protocol.

In proof_gen.rs, there are three core functions:

  • generate_txn_proof
  • generate_agg_proof
  • generate_block_proof

Both libraries are currently targeting the latest plonky2. One noteworthy piece of data that all proofs need is this:

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct BlockHashes {
    pub prev_hashes: Vec<H256>,
    pub cur_hash: H256,
}

Note that prev_hashes is going to be 256 elements long (!) most of the time.

generate_txn_proof takes in the output from the parser lib (TxnProofGenIR).

generate_agg_proof takes in the two child proofs (wrapped in `AggregatableProof`` to support txn or agg proofs).

generate_block_proof is a bit less obvious. You give it an agg proof that contains all txns in the entire block, but also pass in an optional previous block proof. The previous block proof is able to be None on checkpoint heights.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

plonky-block-proof-gen's People

Contributors

bgluth avatar cpubot avatar muursh avatar nashtare avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

topos-protocol

plonky-block-proof-gen's Issues

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.