Crates.io | proof_gen |
lib.rs | proof_gen |
version | 0.4.0 |
source | src |
created_at | 2024-02-21 21:39:39.882927 |
updated_at | 2024-07-15 19:40:02.701061 |
description | Generates block proofs from zero proof IR. |
homepage | https://github.com/0xPolygonZero/zk_evm |
repository | https://github.com/0xPolygonZero/zk_evm |
max_upload_size | |
id | 1148519 |
size | 26,669 |
Library for generating proofs from proof IR.
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.