Fork of https://github.com/0xPARC/pod2
Resolve #448 Previously a predicate was 6 elements. Now it grows to 8 elements; and the hash is 4 elements. Some parts of the circuit require only require equality checks with the predicate: that works with the predicate hash. Other parts require inspecting or working with particular elements in the predicate, those need the preimage of the predicate hash. Both `StatementTarget` and `StatementTmplTarget` have been updated to include the predicate hash and optionally the predicate. When the predicate is included, constraints are automatically generated for `pred_hash = hash(pred)`. We only include the predicate when needed. |
||
|---|---|---|
| .github/workflows | ||
| book | ||
| examples | ||
| src | ||
| .gitignore | ||
| build.rs | ||
| Cargo.toml | ||
| README.md | ||
| rust-analyzer.toml | ||
| rust-toolchain.toml | ||
| rustfmt.toml | ||
POD2
Usage
- Run tests:
cargo test --release - Rustfmt:
cargo fmt - Check typos:
typos -c .github/workflows/typos.toml
Book
The book contains the specification of POD2. A rendered version of the site can be found at: https://0xparc.github.io/pod2/
To run it locally:
- Requirements
- mdbook:
cargo install mdbook - mdbook-katex:
cargo install mdbook-katex
- mdbook:
- Go to the book directory:
cd book - Run the mdbook:
mdbook serve