5 releases

0.2.0 Jun 12, 2024
0.1.3 Apr 19, 2024
0.1.2 Mar 19, 2024
0.1.1 Mar 1, 2024
0.1.0 Feb 21, 2024

#1690 in Magic Beans

Download history 31/week @ 2024-03-08 169/week @ 2024-03-15 24/week @ 2024-03-22 45/week @ 2024-03-29 41/week @ 2024-04-05 49/week @ 2024-04-12 191/week @ 2024-04-19 10/week @ 2024-04-26 2/week @ 2024-05-10 5/week @ 2024-05-17 3/week @ 2024-05-24 1/week @ 2024-05-31 128/week @ 2024-06-07 27/week @ 2024-06-14

157 downloads per month


49K SLoC

Rust 28K SLoC // 0.1% comments Assembly 20K SLoC Pest 35 SLoC

Proof generator

Library for generating proofs from proof IR.

General Usage (Extremely rough, will change)

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 (GenerationInputs).

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.


Licensed under either of

at your option.


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.


~291K SLoC