### 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

**157** downloads per month

**MIT/Apache**

2MB

**49K**
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

is going to be `prev_hashes`

elements long (!) most of the time.`256`

takes in the output from the parser lib (`generate_txn_proof`

).`GenerationInputs`

takes in the two child proofs (wrapped in `AggregatableProof`` to support txn or agg proofs).`generate_agg_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 `generate_block_proof`

on checkpoint heights.`None`

## License

Licensed under either of

- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

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.

#### Dependencies

~12–21MB

~291K SLoC